From owner-svn-src-all@FreeBSD.ORG Sun Sep 28 00:13:06 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 08266FB3; Sun, 28 Sep 2014 00:13:06 +0000 (UTC) Received: from mail109.syd.optusnet.com.au (mail109.syd.optusnet.com.au [211.29.132.80]) by mx1.freebsd.org (Postfix) with ESMTP id 348385EC; Sun, 28 Sep 2014 00:13:05 +0000 (UTC) Received: from c122-106-147-133.carlnfd1.nsw.optusnet.com.au (c122-106-147-133.carlnfd1.nsw.optusnet.com.au [122.106.147.133]) by mail109.syd.optusnet.com.au (Postfix) with ESMTPS id 37A92D6293D; Sun, 28 Sep 2014 09:55:36 +1000 (EST) Date: Sun, 28 Sep 2014 09:55:35 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Colin Percival Subject: Re: svn commit: r272207 - in head/games: factor primes In-Reply-To: <201409270900.s8R90dWl029070@svn.freebsd.org> Message-ID: <20140928071459.C927@besplex.bde.org> References: <201409270900.s8R90dWl029070@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.1 cv=BdjhjNd2 c=1 sm=1 tr=0 a=7NqvjVvQucbO2RlWB8PEog==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=6Wz-CoUn4gwvbWm69jgA:9 a=CjuIK1q_8ugA:10 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Sep 2014 00:13:06 -0000 On Sat, 27 Sep 2014, Colin Percival wrote: > Log: > Switch primes(6) from using unsigned long to using uint64_t. This fixes > 'limited range of type' warnings about comparisons on 32-bit systems, and > allows 32-bit systems to compute the full range of primes. Since it no longer pretends to support up to the limit of the type, using the correct type of uintmax_t doesn't necessarily break anything immediately. However, blindly changing it gives bugs. Mostly style bugs like different error messages for different range errors. primes(6) already has mounds of similar source and output bugs. > Modified: head/games/primes/primes.c > ============================================================================== > --- head/games/primes/primes.c Sat Sep 27 08:59:43 2014 (r272206) > +++ head/games/primes/primes.c Sat Sep 27 09:00:38 2014 (r272207) > @@ -111,10 +112,10 @@ main(int argc, char *argv[]) > argv += optind; > > start = 0; > - stop = (sizeof(ubig) > 4) ? SPSPMAX : BIG; > + stop = SPSPMAX; > > /* > - * Convert low and high args. Strtoul(3) sets errno to > + * Convert low and high args. Strtoumax(3) sets errno to > * ERANGE if the number is too large, but, if there's > * a leading minus sign it returns the negation of the > * result of the conversion, which we'd rather disallow. Only some numbers that are too large are detected by strtoumax(). Since SIEVEMAX is now < the return value for a range error, there is no now need for checking ERANGE. > @@ -126,19 +127,19 @@ main(int argc, char *argv[]) > errx(1, "negative numbers aren't permitted."); > > errno = 0; > - start = strtoul(argv[0], &p, 0); > + start = strtoumax(argv[0], &p, 0); This now truncates the value from uintmax_t to typeof(ubig) == uint64_t (on unsupported arches with uintmax_t larger than uint64_t). This is broken (see below). Use uintmax_t for ubig to avoid complications. Or at least use it to check values before they are truncated. > if (errno) > err(1, "%s", argv[0]); This handles mainly the ERANGE error. Some out-of-range values are detected by this. The code is still essentially the same as in 4.4BSD. Then ERANGE was the only possible error (except preverse functions can set errno to anything nonzero). POSIX added "helpful" setting to EINVAL which is actually perverse since it changes the error handling of sloppy code like this. This code doesn't really expect EINVAL and should have been written as "if (errno == ERANGE)". This would also fix one of the style bugs in it (boolean check for non-boolean). Bugs like this only give minor differences in the error messages. There are many other style errors in the error messages. All the parsing and error handling bugs for numbers are quadruplicated, except for parsing numbers in a file, the bug of misdetecting negative numbers by checking only the first character in argv[n] is replaced by the bug of using isblank() on possibly-signed characters to skip whitespace. > - if ((uint64_t)stop > SPSPMAX) > + if (stop > SPSPMAX) > errx(1, "%s: stop value too large.", argv[1]); Numbers larger than UINTMAX_MAX are now detected as ERANGE errors and their error handling is err(1, "%s", argv[0]);. 'stop' numbers > SPSPAX and <= UINT64_MAX are detected here and their error handling is better. 'start' and numbers in these ranges are detected as ERANGE errors or later by comparing them with 'stop'. I'm not sure if their later error handling is as good (it is unlikely to be so). Detection of errors for numbers > UINT64_MAX and <= UINTMAX_MAX is broken by truncation. E.g., UINT64_MAX + (uintmax_t)2 is truncated to 1. > @@ -243,7 +244,7 @@ primes(ubig start, ubig stop) > for (p = &prime[0], factor = prime[0]; > factor < stop && p <= pr_limit; factor = *(++p)) { > if (factor >= start) { > - printf(hflag ? "0x%lx\n" : "%lu\n", factor); > + printf(hflag ? "%" PRIx64 "\n" : "%" PRIu64 "\n", factor); This adds 2 style bugs and 1 non-style bug: - it uses the PRI* mistake - as well as its own ugliness, blind use of PRI* expands the line beyond 80 columns - the use of PRI* isn't even blind. Blind use would have preserved the leading "lx" in the hex format. The PRI* mistake is so ugly that bugs like this might be hard to see. If the correct type (uintmax_t) were used throughout, then the change here would be simply to replace 'l' by 'j'. Otherwise, PRI* should never be used except possibly to micro-optimize for space on 8-bit systems. Instead, cast 'factor' to uintmax_t and use %j formats. This doesn't apply here for various reasons. Expansion of the main code to 64 bits might already be too much bloat for the 8-bit systems. If they don't mind that, then they shouldn't mind printing the 64-bit values. They can limit the bloat to 64 bits by not making uintmax_t larger than that. It should only be larger than that on 64-bit systems. > } > } > /* return early if we are done */ > @@ -306,11 +307,11 @@ primes(ubig start, ubig stop) > */ > for (q = table; q < tab_lim; ++q, start+=2) { > if (*q) { > - if ((uint64_t)start > SIEVEMAX) { > + if (start > SIEVEMAX) { Why compare with SIEVEMAX instead of 'stop'? 'start' should be <= 'stop', and I think there is an up-front check for 'stop'. > if (!isprime(start)) > continue; > } > - printf(hflag ? "0x%lx\n" : "%lu\n", start); > + printf(hflag ? "%" PRIx64 "\n" : "%" PRIu64 "\n", start); This set of bugs is only duplicated. > } > } > } > > Modified: head/games/primes/primes.h > ============================================================================== > --- head/games/primes/primes.h Sat Sep 27 08:59:43 2014 (r272206) > +++ head/games/primes/primes.h Sat Sep 27 09:00:38 2014 (r272207) > @@ -41,8 +41,10 @@ > * chongo /\oo/\ > */ > > +#include Style bug: nested include. > + > /* ubig is the type that holds a large unsigned value */ > -typedef unsigned long ubig; /* must be >=32 bit unsigned value */ > +typedef uint64_t ubig; /* must be >=32 bit unsigned value */ The comment is very wrong now. After the previous commit, 32 bits may have been sufficient but they gave annoying restrictions. Now, 32 bits isn't sufficient to give the documented limit. It might be correct to say "must be large enough to hold ". However, using PRI64 is more broken than first appeared. It hard-codes the assumption that ubig has type precisely uint64_t (like old code hard-coded the assumption that ubig has type unsigned long). So the only correct comment now is /* must be precisely what it is (duh) */. It was wrong originally, since >= 32 bits was too large for the algorithm and there was no range checking other that the ERANGE check related to the type. > #define BIG ULONG_MAX /* largest value will sieve */ This bug was pointed out in another reply. BIG might be unused, but its comment is wrong. Bruce From owner-svn-src-all@FreeBSD.ORG Sun Sep 28 00:57:48 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0350B807; Sun, 28 Sep 2014 00:57:48 +0000 (UTC) Received: from mail110.syd.optusnet.com.au (mail110.syd.optusnet.com.au [211.29.132.97]) by mx1.freebsd.org (Postfix) with ESMTP id B6F1496E; Sun, 28 Sep 2014 00:57:47 +0000 (UTC) Received: from c122-106-147-133.carlnfd1.nsw.optusnet.com.au (c122-106-147-133.carlnfd1.nsw.optusnet.com.au [122.106.147.133]) by mail110.syd.optusnet.com.au (Postfix) with ESMTPS id BA848780FD8; Sun, 28 Sep 2014 10:30:40 +1000 (EST) Date: Sun, 28 Sep 2014 10:30:39 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Sean Bruno Subject: Re: svn commit: r272210 - head/games/factor In-Reply-To: <201409271057.s8RAvYdF086338@svn.freebsd.org> Message-ID: <20140928101352.C927@besplex.bde.org> References: <201409271057.s8RAvYdF086338@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.1 cv=fvDlOjIf c=1 sm=1 tr=0 a=7NqvjVvQucbO2RlWB8PEog==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=FhmKRLTLOMscdICiqboA:9 a=CjuIK1q_8ugA:10 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Sep 2014 00:57:48 -0000 On Sat, 27 Sep 2014, Sean Bruno wrote: > Log: > Update factor for changes to types in primes, which is a dependency. > > Fixes build-fail on mips32 introduced at 272207. > > Modified: > head/games/factor/factor.c > > Modified: head/games/factor/factor.c > ============================================================================== > --- head/games/factor/factor.c Sat Sep 27 09:57:34 2014 (r272209) > +++ head/games/factor/factor.c Sat Sep 27 10:57:34 2014 (r272210) > @@ -69,6 +69,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include Needed only for the style bugs below. > #include > #include > #include > @@ -227,7 +228,7 @@ pr_fact(BIGNUM *val) > > /* Divide factor out until none are left. */ > do { > - printf(hflag ? " 0x%lx" : " %lu", *fact); > + printf(hflag ? " 0x%" PRIx64 "" : " %" PRIu64 "", *fact); This has the same PRI* ugliness as primes.c, but doesn't break the output format for the hex case (it still has the "0x" prefix). > BN_div_word(val, (BN_ULONG)*fact); > } while (BN_mod_word(val, (BN_ULONG)*fact) == 0); However, it seems to need much larger changes to keep up. Its BN and BIGNUMS aren't actually (arbitrary-precision) bignums. BIGNUM is just ubig, which is now uint64_t. BN_ULONG is still just u_long. Parsing functions still use just strtoul() to create BIGNUMs. Now they can't even create the non-bignums given by BIGNUM == ubig on 32-bit systems. So if there are no other bugs, factor(6) is probably limited to UINT32_MAX on 32-bit system and to the new limit SIEVE_MAX on 64-bit systems (like the previous version of primes(6)). Its documentation doesn't seem to have been changed. Its old documentation gives the wrong limit of UINT64_MAX (expressed unreadably in decimal) on 64-bit systems. Bruce From owner-svn-src-all@FreeBSD.ORG Sun Sep 28 03:44:02 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id 798E636F; Sun, 28 Sep 2014 03:44:02 +0000 (UTC) Date: Sun, 28 Sep 2014 03:44:02 +0000 From: Alexey Dokuchaev To: Alexander Kabaev Subject: Re: svn commit: r272214 - in head/sys: boot/i386/libfirewire dev/firewire Message-ID: <20140928034402.GA82578@FreeBSD.org> References: <201409271650.s8RGoLHS053554@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201409271650.s8RGoLHS053554@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Sep 2014 03:44:02 -0000 On Sat, Sep 27, 2014 at 04:50:21PM +0000, Alexander Kabaev wrote: > New Revision: 272214 > URL: http://svnweb.freebsd.org/changeset/base/272214 > > Log: > Remove obsolete compatibility glue and improve firewire code readability. > > Commit my version of style(9) pass over the firewire code. Now that > other people have started changing the code carrying this is as a > local patch is not longer a viable option. Thank you. I've tried to work on this code a while ago, but was disgusted away by its lack of style. ./danfe From owner-svn-src-all@FreeBSD.ORG Sun Sep 28 05:28:11 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E1C2BC5C; Sun, 28 Sep 2014 05:28:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CDF38241; Sun, 28 Sep 2014 05:28:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8S5SBLu012766; Sun, 28 Sep 2014 05:28:11 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8S5SBm5012765; Sun, 28 Sep 2014 05:28:11 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201409280528.s8S5SBm5012765@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 28 Sep 2014 05:28:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272237 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Sep 2014 05:28:12 -0000 Author: adrian Date: Sun Sep 28 05:28:11 2014 New Revision: 272237 URL: http://svnweb.freebsd.org/changeset/base/272237 Log: Fix the ar724x PCI config space register read. It was doing incorrect things with masks. This was fixed in the AR71xx codebase but it wasn't yet fixed in the AR724x code. This ended up having config space reads return larger/incorrect values in some situations. Tested: * AR7240 TODO: * test ar7241, AR7242, and AR934x. Modified: head/sys/mips/atheros/ar724x_pci.c Modified: head/sys/mips/atheros/ar724x_pci.c ============================================================================== --- head/sys/mips/atheros/ar724x_pci.c Sun Sep 28 01:53:02 2014 (r272236) +++ head/sys/mips/atheros/ar724x_pci.c Sun Sep 28 05:28:11 2014 (r272237) @@ -122,8 +122,12 @@ ar724x_pci_read_config(device_t dev, u_i /* Register access is 32-bit aligned */ shift = (reg & 3) * 8; - if (shift) - mask = (1 << shift) - 1; + + /* Create a mask based on the width, post-shift */ + if (bytes == 2) + mask = 0xffff; + else if (bytes == 1) + mask = 0xff; else mask = 0xffffffff; @@ -337,7 +341,6 @@ ar724x_pci_slot_fixup(device_t dev) return; } - device_printf(dev, "found EEPROM at 0x%lx on %d.%d.%d\n", flash_addr, 0, 0, 0); ar724x_pci_fixup(dev, flash_addr, size); @@ -486,7 +489,6 @@ ar724x_pci_alloc_resource(device_t bus, } } - return (rv); } From owner-svn-src-all@FreeBSD.ORG Sun Sep 28 07:19:33 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A7C1ED2F; Sun, 28 Sep 2014 07:19:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 948E5D1A; Sun, 28 Sep 2014 07:19:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8S7JXP0063907; Sun, 28 Sep 2014 07:19:33 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8S7JXhg063906; Sun, 28 Sep 2014 07:19:33 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201409280719.s8S7JXhg063906@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Sun, 28 Sep 2014 07:19:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272238 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Sep 2014 07:19:33 -0000 Author: glebius Date: Sun Sep 28 07:19:32 2014 New Revision: 272238 URL: http://svnweb.freebsd.org/changeset/base/272238 Log: Mechanically switch ixv(4) to if_inc_counter(). Modified: head/sys/dev/ixgbe/ixv.c Modified: head/sys/dev/ixgbe/ixv.c ============================================================================== --- head/sys/dev/ixgbe/ixv.c Sun Sep 28 05:28:11 2014 (r272237) +++ head/sys/dev/ixgbe/ixv.c Sun Sep 28 07:19:32 2014 (r272238) @@ -634,9 +634,9 @@ ixv_mq_start_locked(struct ifnet *ifp, s } drbr_advance(ifp, txr->br); enqueued++; - ifp->if_obytes += next->m_pkthdr.len; + if_inc_counter(ifp, IFCOUNTER_OBYTES, next->m_pkthdr.len); if (next->m_flags & M_MCAST) - ifp->if_omcasts++; + if_inc_counter(ifp, IFCOUNTER_OMCASTS, 1); /* Send a copy of the frame to the BPF listener */ ETHER_BPF_MTAP(ifp, next); if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) @@ -2651,7 +2651,7 @@ ixv_txeof(struct tx_ring *txr) tx_desc = (struct ixgbe_legacy_tx_desc *)&txr->tx_base[first]; } - ++ifp->if_opackets; + if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1); /* See if there is more work now */ last = tx_buffer->eop_index; if (last != -1) { @@ -3341,7 +3341,7 @@ ixv_rxeof(struct ix_queue *que, int coun /* Make sure all parts of a bad packet are discarded */ if (((staterr & IXGBE_RXDADV_ERR_FRAME_ERR_MASK) != 0) || (rxr->discard)) { - ifp->if_ierrors++; + if_inc_counter(ifp, IFCOUNTER_IERRORS, 1); rxr->rx_discarded++; if (!eop) rxr->discard = TRUE; @@ -3455,7 +3455,7 @@ ixv_rxeof(struct ix_queue *que, int coun /* Sending this frame? */ if (eop) { sendmp->m_pkthdr.rcvif = ifp; - ifp->if_ipackets++; + if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1); rxr->rx_packets++; /* capture data for AIM */ rxr->bytes += sendmp->m_pkthdr.len; From owner-svn-src-all@FreeBSD.ORG Sun Sep 28 07:27:59 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5DBAAF57; Sun, 28 Sep 2014 07:27:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2FF05DD6; Sun, 28 Sep 2014 07:27:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8S7Rx11068696; Sun, 28 Sep 2014 07:27:59 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8S7RxWP068695; Sun, 28 Sep 2014 07:27:59 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201409280727.s8S7RxWP068695@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 28 Sep 2014 07:27:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272239 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Sep 2014 07:27:59 -0000 Author: adrian Date: Sun Sep 28 07:27:58 2014 New Revision: 272239 URL: http://svnweb.freebsd.org/changeset/base/272239 Log: Fix the AR724x PCIe glue to correctly probe the BAR on AR7240 devices. There's a bug in the AR7240 PCIe hardware where a correct BAR will end up having the device disappear. It turns out that for the device address it should be all 0's. However, this meant that the PCI probe code would try writing 0xffffffff in to see how big the window was, read back 0x0, and think the window was 32 bits. It then ended up calculating a resource size of 0 bytes, failed to find anything via an rman call, and this would fail to attach. I have quite absolutely no idea how in the various planes of existence this particular bit of code and how it worked with the PCI bus code ever worked. But, well, it did. Tested: * Atheros AP93 - AR7240 + AR9280 reference board Modified: head/sys/mips/atheros/ar724x_pci.c Modified: head/sys/mips/atheros/ar724x_pci.c ============================================================================== --- head/sys/mips/atheros/ar724x_pci.c Sun Sep 28 07:19:32 2014 (r272238) +++ head/sys/mips/atheros/ar724x_pci.c Sun Sep 28 07:27:58 2014 (r272239) @@ -159,10 +159,18 @@ ar724x_pci_write_config(device_t dev, u_ return; /* - * WAR for BAR issue on AR7240 - We are unable to access the PCI device - * space if we set the BAR with proper base address. + * WAR for BAR issue on AR7240 - We are unable to access the PCI + * device space if we set the BAR with proper base address. + * + * However, we _do_ want to allow programming in the probe value + * (0xffffffff) so the PCI code can find out how big the memory + * map is for this device. Without it, it'll think the memory + * map is 32 bits wide, the PCI code will then end up thinking + * the register window is '0' and fail to allocate resources. */ - if (reg == PCIR_BAR(0) && bytes == 4 && ar71xx_soc == AR71XX_SOC_AR7240) + if (reg == PCIR_BAR(0) && bytes == 4 + && ar71xx_soc == AR71XX_SOC_AR7240 + && data != 0xffffffff) ar724x_pci_write(AR724X_PCI_CFG_BASE, reg, 0xffff, bytes); else ar724x_pci_write(AR724X_PCI_CFG_BASE, reg, data, bytes); From owner-svn-src-all@FreeBSD.ORG Sun Sep 28 07:29:46 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 34B39133; Sun, 28 Sep 2014 07:29:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 20B62DDE; Sun, 28 Sep 2014 07:29:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8S7TjLS068959; Sun, 28 Sep 2014 07:29:45 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8S7TjDQ068958; Sun, 28 Sep 2014 07:29:45 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201409280729.s8S7TjDQ068958@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Sun, 28 Sep 2014 07:29:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272240 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Sep 2014 07:29:46 -0000 Author: glebius Date: Sun Sep 28 07:29:45 2014 New Revision: 272240 URL: http://svnweb.freebsd.org/changeset/base/272240 Log: Convert to if_get_counter(). Modified: head/sys/dev/ixgbe/ixgbe.c Modified: head/sys/dev/ixgbe/ixgbe.c ============================================================================== --- head/sys/dev/ixgbe/ixgbe.c Sun Sep 28 07:27:58 2014 (r272239) +++ head/sys/dev/ixgbe/ixgbe.c Sun Sep 28 07:29:45 2014 (r272240) @@ -120,6 +120,7 @@ static int ixgbe_ioctl(struct ifnet static void ixgbe_init(void *); static void ixgbe_init_locked(struct adapter *); static void ixgbe_stop(void *); +static uint64_t ixgbe_get_counter(struct ifnet *, ift_counter); static void ixgbe_media_status(struct ifnet *, struct ifmediareq *); static int ixgbe_media_change(struct ifnet *); static void ixgbe_identify_hardware(struct adapter *); @@ -2721,6 +2722,7 @@ ixgbe_setup_interface(device_t dev, stru ifp->if_softc = adapter; ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ifp->if_ioctl = ixgbe_ioctl; + ifp->if_get_counter = ixgbe_get_counter; #ifndef IXGBE_LEGACY_TX ifp->if_transmit = ixgbe_mq_start; ifp->if_qflush = ixgbe_qflush; @@ -5364,10 +5366,8 @@ ixgbe_reinit_fdir(void *context, int pen static void ixgbe_update_stats_counters(struct adapter *adapter) { - struct ifnet *ifp = adapter->ifp; struct ixgbe_hw *hw = &adapter->hw; u32 missed_rx = 0, bprc, lxon, lxoff, total; - u64 total_missed_rx = 0; adapter->stats.crcerrs += IXGBE_READ_REG(hw, IXGBE_CRCERRS); adapter->stats.illerrc += IXGBE_READ_REG(hw, IXGBE_ILLERRC); @@ -5386,8 +5386,6 @@ ixgbe_update_stats_counters(struct adapt missed_rx += mp; /* global total per queue */ adapter->stats.mpc[i] += mp; - /* Running comprehensive total for stats display */ - total_missed_rx += adapter->stats.mpc[i]; if (hw->mac.type == ixgbe_mac_82598EB) { adapter->stats.rnbc[i] += IXGBE_READ_REG(hw, IXGBE_RNBC(i)); @@ -5497,19 +5495,41 @@ ixgbe_update_stats_counters(struct adapt adapter->stats.fcoedwrc += IXGBE_READ_REG(hw, IXGBE_FCOEDWRC); adapter->stats.fcoedwtc += IXGBE_READ_REG(hw, IXGBE_FCOEDWTC); } +} + +static uint64_t +ixgbe_get_counter(struct ifnet *ifp, ift_counter cnt) +{ + struct adapter *adapter; + uint64_t rv; - /* Fill out the OS statistics structure */ - ifp->if_ipackets = adapter->stats.gprc; - ifp->if_opackets = adapter->stats.gptc; - ifp->if_ibytes = adapter->stats.gorc; - ifp->if_obytes = adapter->stats.gotc; - ifp->if_imcasts = adapter->stats.mprc; - ifp->if_omcasts = adapter->stats.mptc; - ifp->if_collisions = 0; - - /* Rx Errors */ - ifp->if_iqdrops = total_missed_rx; - ifp->if_ierrors = adapter->stats.crcerrs + adapter->stats.rlec; + adapter = if_getsoftc(ifp); + + switch (cnt) { + case IFCOUNTER_IPACKETS: + return (adapter->stats.gprc); + case IFCOUNTER_OPACKETS: + return (adapter->stats.gptc); + case IFCOUNTER_IBYTES: + return (adapter->stats.gorc); + case IFCOUNTER_OBYTES: + return (adapter->stats.gotc); + case IFCOUNTER_IMCASTS: + return (adapter->stats.mprc); + case IFCOUNTER_OMCASTS: + return (adapter->stats.mptc); + case IFCOUNTER_COLLISIONS: + return (0); + case IFCOUNTER_IQDROPS: + rv = 0; + for (int i = 0; i < 8; i++) + rv += adapter->stats.mpc[i]; + return (rv); + case IFCOUNTER_IERRORS: + return (adapter->stats.crcerrs + adapter->stats.rlec); + default: + return (if_get_counter_default(ifp, cnt)); + } } /** ixgbe_sysctl_tdh_handler - Handler function From owner-svn-src-all@FreeBSD.ORG Sun Sep 28 07:40:27 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 92FAF456; Sun, 28 Sep 2014 07:40:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 748AAF30; Sun, 28 Sep 2014 07:40:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8S7eRhW073744; Sun, 28 Sep 2014 07:40:27 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8S7eRbF073742; Sun, 28 Sep 2014 07:40:27 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201409280740.s8S7eRbF073742@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Sun, 28 Sep 2014 07:40:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272241 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Sep 2014 07:40:27 -0000 Author: glebius Date: Sun Sep 28 07:40:26 2014 New Revision: 272241 URL: http://svnweb.freebsd.org/changeset/base/272241 Log: Provide ixgb_get_counter(). Modified: head/sys/dev/ixgb/if_ixgb.c Modified: head/sys/dev/ixgb/if_ixgb.c ============================================================================== --- head/sys/dev/ixgb/if_ixgb.c Sun Sep 28 07:29:45 2014 (r272240) +++ head/sys/dev/ixgb/if_ixgb.c Sun Sep 28 07:40:26 2014 (r272241) @@ -97,6 +97,7 @@ static void ixgb_intr(void *); static void ixgb_start(struct ifnet *); static void ixgb_start_locked(struct ifnet *); static int ixgb_ioctl(struct ifnet *, IOCTL_CMD_TYPE, caddr_t); +static uint64_t ixgb_get_counter(struct ifnet *, ift_counter); static void ixgb_watchdog(struct adapter *); static void ixgb_init(void *); static void ixgb_init_locked(struct adapter *); @@ -643,7 +644,7 @@ ixgb_watchdog(struct adapter *adapter) ixgb_init_locked(adapter); - ifp->if_oerrors++; + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); return; } @@ -1355,6 +1356,7 @@ ixgb_setup_interface(device_t dev, struc ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ifp->if_ioctl = ixgb_ioctl; ifp->if_start = ixgb_start; + ifp->if_get_counter = ixgb_get_counter; ifp->if_snd.ifq_maxlen = adapter->num_tx_desc - 1; #if __FreeBSD_version < 500000 @@ -2326,7 +2328,6 @@ ixgb_write_pci_cfg(struct ixgb_hw * hw, static void ixgb_update_stats_counters(struct adapter * adapter) { - struct ifnet *ifp; adapter->stats.crcerrs += IXGB_READ_REG(&adapter->hw, CRCERRS); adapter->stats.gprcl += IXGB_READ_REG(&adapter->hw, GPRCL); @@ -2389,29 +2390,37 @@ ixgb_update_stats_counters(struct adapte adapter->stats.pfrc += IXGB_READ_REG(&adapter->hw, PFRC); adapter->stats.pftc += IXGB_READ_REG(&adapter->hw, PFTC); adapter->stats.mcfrc += IXGB_READ_REG(&adapter->hw, MCFRC); +} - ifp = adapter->ifp; - - /* Fill out the OS statistics structure */ - ifp->if_ipackets = adapter->stats.gprcl; - ifp->if_opackets = adapter->stats.gptcl; - ifp->if_ibytes = adapter->stats.gorcl; - ifp->if_obytes = adapter->stats.gotcl; - ifp->if_imcasts = adapter->stats.mprcl; - ifp->if_collisions = 0; - - /* Rx Errors */ - ifp->if_ierrors = - adapter->dropped_pkts + - adapter->stats.crcerrs + - adapter->stats.rnbc + - adapter->stats.mpc + - adapter->stats.rlec; +static uint64_t +ixgb_get_counter(struct ifnet *ifp, ift_counter cnt) +{ + struct adapter *adapter; + adapter = if_getsoftc(ifp); + switch (cnt) { + case IFCOUNTER_IPACKETS: + return (adapter->stats.gprcl); + case IFCOUNTER_OPACKETS: + return ( adapter->stats.gptcl); + case IFCOUNTER_IBYTES: + return (adapter->stats.gorcl); + case IFCOUNTER_OBYTES: + return (adapter->stats.gotcl); + case IFCOUNTER_IMCASTS: + return ( adapter->stats.mprcl); + case IFCOUNTER_COLLISIONS: + return (0); + case IFCOUNTER_IERRORS: + return (adapter->dropped_pkts + adapter->stats.crcerrs + + adapter->stats.rnbc + adapter->stats.mpc + + adapter->stats.rlec); + default: + return (if_get_counter_default(ifp, cnt)); + } } - /********************************************************************** * * This routine is called only when ixgb_display_debug_stats is enabled. From owner-svn-src-all@FreeBSD.ORG Sun Sep 28 07:43:39 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 38AD85D9; Sun, 28 Sep 2014 07:43:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 25C42F4C; Sun, 28 Sep 2014 07:43:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8S7hdB9077483; Sun, 28 Sep 2014 07:43:39 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8S7hdXs077482; Sun, 28 Sep 2014 07:43:39 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201409280743.s8S7hdXs077482@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Sun, 28 Sep 2014 07:43:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272242 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Sep 2014 07:43:39 -0000 Author: glebius Date: Sun Sep 28 07:43:38 2014 New Revision: 272242 URL: http://svnweb.freebsd.org/changeset/base/272242 Log: Convert to if_inc_counter() last remnantes of bare access to struct ifnet counters. Modified: head/sys/net/if_lagg.c Modified: head/sys/net/if_lagg.c ============================================================================== --- head/sys/net/if_lagg.c Sun Sep 28 07:40:26 2014 (r272241) +++ head/sys/net/if_lagg.c Sun Sep 28 07:43:38 2014 (r272242) @@ -1485,7 +1485,7 @@ lagg_transmit(struct ifnet *ifp, struct if (sc->sc_proto == LAGG_PROTO_NONE || sc->sc_count == 0) { LAGG_RUNLOCK(sc, &tracker); m_freem(m); - ifp->if_oerrors++; + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); return (ENXIO); } @@ -1495,7 +1495,7 @@ lagg_transmit(struct ifnet *ifp, struct LAGG_RUNLOCK(sc, &tracker); if (error != 0) - ifp->if_oerrors++; + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); return (error); } From owner-svn-src-all@FreeBSD.ORG Sun Sep 28 08:23:26 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EA742B97; Sun, 28 Sep 2014 08:23:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D6ED1315; Sun, 28 Sep 2014 08:23:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8S8NQFV096369; Sun, 28 Sep 2014 08:23:26 GMT (envelope-from nyan@FreeBSD.org) Received: (from nyan@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8S8NQe9096368; Sun, 28 Sep 2014 08:23:26 GMT (envelope-from nyan@FreeBSD.org) Message-Id: <201409280823.s8S8NQe9096368@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nyan set sender to nyan@FreeBSD.org using -f From: Takahashi Yoshihiro Date: Sun, 28 Sep 2014 08:23:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272243 - head/sbin/fdisk_pc98 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Sep 2014 08:23:27 -0000 Author: nyan Date: Sun Sep 28 08:23:26 2014 New Revision: 272243 URL: http://svnweb.freebsd.org/changeset/base/272243 Log: Merged from r183296. Add missing library dependencies. Modified: head/sbin/fdisk_pc98/Makefile Modified: head/sbin/fdisk_pc98/Makefile ============================================================================== --- head/sbin/fdisk_pc98/Makefile Sun Sep 28 07:43:38 2014 (r272242) +++ head/sbin/fdisk_pc98/Makefile Sun Sep 28 08:23:26 2014 (r272243) @@ -7,7 +7,7 @@ MAN= fdisk.8 .PATH: ${.CURDIR}/../../sys/geom -DPADD += ${LIBGEOM} -LDADD += -lgeom +DPADD+= ${LIBGEOM} ${LIBBSDXML} ${LIBSBUF} +LDADD+= -lgeom -lbsdxml -lsbuf .include From owner-svn-src-all@FreeBSD.ORG Sun Sep 28 08:57:09 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 66631336; Sun, 28 Sep 2014 08:57:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 51D9D7B4; Sun, 28 Sep 2014 08:57:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8S8v9sJ011123; Sun, 28 Sep 2014 08:57:09 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8S8v8cG011117; Sun, 28 Sep 2014 08:57:08 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201409280857.s8S8v8cG011117@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Sun, 28 Sep 2014 08:57:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272244 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Sep 2014 08:57:09 -0000 Author: glebius Date: Sun Sep 28 08:57:07 2014 New Revision: 272244 URL: http://svnweb.freebsd.org/changeset/base/272244 Log: Finally, convert counters in struct ifnet to counter(9). Sponsored by: Netflix Sponsored by: Nginx, Inc. Modified: head/sys/net/if.c head/sys/net/if_lagg.c head/sys/net/if_lagg.h head/sys/net/if_var.h head/sys/net/ifq.h Modified: head/sys/net/if.c ============================================================================== --- head/sys/net/if.c Sun Sep 28 08:23:26 2014 (r272243) +++ head/sys/net/if.c Sun Sep 28 08:57:07 2014 (r272244) @@ -468,6 +468,10 @@ if_alloc(u_char type) refcount_init(&ifp->if_refcount, 1); /* Index reference. */ ifnet_setbyindex(ifp->if_index, ifp); + + for (int i = 0; i < IFCOUNTERS; i++) + ifp->if_counters[i] = counter_u64_alloc(M_WAITOK); + return (ifp); } @@ -495,6 +499,10 @@ if_free_internal(struct ifnet *ifp) IF_AFDATA_DESTROY(ifp); IF_ADDR_LOCK_DESTROY(ifp); ifq_delete(&ifp->if_snd); + + for (int i = 0; i < IFCOUNTERS; i++) + counter_u64_free(ifp->if_counters[i]); + free(ifp, M_IFNET); } @@ -1460,39 +1468,15 @@ if_rtdel(struct radix_node *rn, void *ar } /* - * Return counter values from old racy non-pcpu counters. + * Return counter values from counter(9)s stored in ifnet. */ uint64_t if_get_counter_default(struct ifnet *ifp, ift_counter cnt) { - switch (cnt) { - case IFCOUNTER_IPACKETS: - return (ifp->if_ipackets); - case IFCOUNTER_IERRORS: - return (ifp->if_ierrors); - case IFCOUNTER_OPACKETS: - return (ifp->if_opackets); - case IFCOUNTER_OERRORS: - return (ifp->if_oerrors); - case IFCOUNTER_COLLISIONS: - return (ifp->if_collisions); - case IFCOUNTER_IBYTES: - return (ifp->if_ibytes); - case IFCOUNTER_OBYTES: - return (ifp->if_obytes); - case IFCOUNTER_IMCASTS: - return (ifp->if_imcasts); - case IFCOUNTER_OMCASTS: - return (ifp->if_omcasts); - case IFCOUNTER_IQDROPS: - return (ifp->if_iqdrops); - case IFCOUNTER_OQDROPS: - return (ifp->if_oqdrops); - case IFCOUNTER_NOPROTO: - return (ifp->if_noproto); - } - panic("%s: unknown counter %d", __func__, cnt); + KASSERT(cnt < IFCOUNTERS, ("%s: invalid cnt %d", __func__, cnt)); + + return (counter_u64_fetch(ifp->if_counters[cnt])); } /* @@ -1503,46 +1487,9 @@ void if_inc_counter(struct ifnet *ifp, ift_counter cnt, int64_t inc) { - switch (cnt) { - case IFCOUNTER_IPACKETS: - ifp->if_ipackets += inc; - break; - case IFCOUNTER_IERRORS: - ifp->if_ierrors += inc; - break; - case IFCOUNTER_OPACKETS: - ifp->if_opackets += inc; - break; - case IFCOUNTER_OERRORS: - ifp->if_oerrors += inc; - break; - case IFCOUNTER_COLLISIONS: - ifp->if_collisions += inc; - break; - case IFCOUNTER_IBYTES: - ifp->if_ibytes += inc; - break; - case IFCOUNTER_OBYTES: - ifp->if_obytes += inc; - break; - case IFCOUNTER_IMCASTS: - ifp->if_imcasts += inc; - break; - case IFCOUNTER_OMCASTS: - ifp->if_omcasts += inc; - break; - case IFCOUNTER_IQDROPS: - ifp->if_iqdrops += inc; - break; - case IFCOUNTER_OQDROPS: - ifp->if_oqdrops += inc; - break; - case IFCOUNTER_NOPROTO: - ifp->if_noproto += inc; - break; - default: - panic("%s: unknown counter %d", __func__, cnt); - } + KASSERT(cnt < IFCOUNTERS, ("%s: invalid cnt %d", __func__, cnt)); + + counter_u64_add(ifp->if_counters[cnt], inc); } /* @@ -3596,14 +3543,14 @@ if_handoff(struct ifqueue *ifq, struct m IF_LOCK(ifq); if (_IF_QFULL(ifq)) { IF_UNLOCK(ifq); - ifp->if_oqdrops++; + if_inc_counter(ifp, IFCOUNTER_OQDROPS, 1); m_freem(m); return (0); } if (ifp != NULL) { - ifp->if_obytes += m->m_pkthdr.len + adjust; + if_inc_counter(ifp, IFCOUNTER_OBYTES, m->m_pkthdr.len + adjust); if (m->m_flags & (M_BCAST|M_MCAST)) - ifp->if_omcasts++; + if_inc_counter(ifp, IFCOUNTER_OMCASTS, 1); active = ifp->if_drv_flags & IFF_DRV_OACTIVE; } _IF_ENQUEUE(ifq, m); Modified: head/sys/net/if_lagg.c ============================================================================== --- head/sys/net/if_lagg.c Sun Sep 28 08:23:26 2014 (r272243) +++ head/sys/net/if_lagg.c Sun Sep 28 08:57:07 2014 (r272244) @@ -815,7 +815,7 @@ lagg_port_create(struct lagg_softc *sc, /* Read port counters */ pval = lp->port_counters.val; - for (i = IFCOUNTER_IPACKETS; i <= IFCOUNTER_LAST; i++, pval++) + for (i = 0; i < IFCOUNTERS; i++, pval++) *pval = ifp->if_get_counter(ifp, i); /* Add multicast addresses and interface flags to this port */ lagg_ether_cmdmulti(lp, 1); @@ -884,9 +884,9 @@ lagg_port_destroy(struct lagg_port *lp, /* Update detached port counters */ pval = lp->port_counters.val; - for (i = IFCOUNTER_IPACKETS; i <= IFCOUNTER_LAST; i++, pval++) { + for (i = 0; i <= IFCOUNTERS; i++, pval++) { vdiff = ifp->if_get_counter(ifp, i) - *pval; - sc->detached_counters.val[i - 1] += vdiff; + sc->detached_counters.val[i] += vdiff; } /* Finally, remove the port from the lagg */ @@ -1023,8 +1023,8 @@ lagg_get_counter(struct ifnet *ifp, ift_ struct rm_priotracker tracker; uint64_t newval, oldval, vsum; - if (cnt <= 0 || cnt > IFCOUNTER_LAST) - return (if_get_counter_default(ifp, cnt)); + /* Revise this when we've got non-generic counters. */ + KASSERT(cnt < IFCOUNTERS, ("%s: invalid cnt %d", __func__, cnt)); sc = (struct lagg_softc *)ifp->if_softc; LAGG_RLOCK(sc, &tracker); @@ -1032,7 +1032,7 @@ lagg_get_counter(struct ifnet *ifp, ift_ vsum = 0; SLIST_FOREACH(lp, &sc->sc_ports, lp_entries) { /* Saved attached value */ - oldval = lp->port_counters.val[cnt - 1]; + oldval = lp->port_counters.val[cnt]; /* current value */ lpifp = lp->lp_ifp; newval = lpifp->if_get_counter(lpifp, cnt); @@ -1049,7 +1049,7 @@ lagg_get_counter(struct ifnet *ifp, ift_ /* * Add counter data from detached ports counters */ - vsum += sc->detached_counters.val[cnt - 1]; + vsum += sc->detached_counters.val[cnt]; LAGG_RUNLOCK(sc, &tracker); Modified: head/sys/net/if_lagg.h ============================================================================== --- head/sys/net/if_lagg.h Sun Sep 28 08:23:26 2014 (r272243) +++ head/sys/net/if_lagg.h Sun Sep 28 08:57:07 2014 (r272244) @@ -186,7 +186,7 @@ struct lagg_llq { }; struct lagg_counters { - uint64_t val[IFCOUNTER_LAST]; + uint64_t val[IFCOUNTERS]; }; struct lagg_softc { Modified: head/sys/net/if_var.h ============================================================================== --- head/sys/net/if_var.h Sun Sep 28 08:23:26 2014 (r272243) +++ head/sys/net/if_var.h Sun Sep 28 08:57:07 2014 (r272244) @@ -96,7 +96,7 @@ VNET_DECLARE(struct pfil_head, link_pfil #endif /* _KERNEL */ typedef enum { - IFCOUNTER_IPACKETS = 1, + IFCOUNTER_IPACKETS = 0, IFCOUNTER_IERRORS, IFCOUNTER_OPACKETS, IFCOUNTER_OERRORS, @@ -108,8 +108,8 @@ typedef enum { IFCOUNTER_IQDROPS, IFCOUNTER_OQDROPS, IFCOUNTER_NOPROTO, + IFCOUNTERS /* Array size. */ } ift_counter; -#define IFCOUNTER_LAST IFCOUNTER_NOPROTO typedef struct ifnet * if_t; @@ -228,28 +228,15 @@ struct ifnet { (struct ifnet *, struct vnet *, char *); if_get_counter_t if_get_counter; /* get counter values */ + /* Statistics. */ + counter_u64_t if_counters[IFCOUNTERS]; + /* Stuff that's only temporary and doesn't belong here. */ u_int if_hw_tsomax; /* TSO total burst length * limit in bytes. A value of * zero means no limit. Have * to find a better place for * it eventually. */ - /* - * Old, racy and expensive statistics, should not be used in - * new drivers. - */ - uint64_t if_ipackets; /* packets received on interface */ - uint64_t if_ierrors; /* input errors on interface */ - uint64_t if_opackets; /* packets sent on interface */ - uint64_t if_oerrors; /* output errors on interface */ - uint64_t if_collisions; /* collisions on csma interfaces */ - uint64_t if_ibytes; /* total number of octets received */ - uint64_t if_obytes; /* total number of octets sent */ - uint64_t if_imcasts; /* packets received via multicast */ - uint64_t if_omcasts; /* packets sent via multicast */ - uint64_t if_iqdrops; /* dropped on input */ - uint64_t if_oqdrops; /* dropped on output */ - uint64_t if_noproto; /* destined for unsupported protocol */ /* TSO fields for segment limits. If a field is zero below, there is no limit. */ u_int if_hw_tsomaxsegcount; /* TSO maximum segment count */ Modified: head/sys/net/ifq.h ============================================================================== --- head/sys/net/ifq.h Sun Sep 28 08:23:26 2014 (r272243) +++ head/sys/net/ifq.h Sun Sep 28 08:57:07 2014 (r272244) @@ -41,7 +41,12 @@ #include /* XXX */ #include /* struct ifqueue */ +/* + * Couple of ugly extra definitions that are required since ifq.h + * is splitted from if_var.h. + */ #define IF_DUNIT_NONE -1 +void if_inc_counter(struct ifnet *, ift_counter, int64_t inc); #include @@ -245,13 +250,13 @@ do { \ mflags = (m)->m_flags; \ IFQ_ENQUEUE(&(ifp)->if_snd, m, err); \ if ((err) == 0) { \ - (ifp)->if_obytes += len + (adj); \ + if_inc_counter((ifp), IFCOUNTER_OBYTES, len + (adj)); \ if (mflags & M_MCAST) \ - (ifp)->if_omcasts++; \ + if_inc_counter((ifp), IFCOUNTER_OMCASTS, 1); \ if (((ifp)->if_drv_flags & IFF_DRV_OACTIVE) == 0) \ if_start(ifp); \ } else \ - ifp->if_oqdrops++; \ + if_inc_counter((ifp), IFCOUNTER_OQDROPS, 1); \ } while (0) #define IFQ_HANDOFF(ifp, m, err) \ @@ -318,7 +323,7 @@ drbr_enqueue(struct ifnet *ifp, struct b if (ALTQ_IS_ENABLED(&ifp->if_snd)) { IFQ_ENQUEUE(&ifp->if_snd, m, error); if (error) - ifp->if_oqdrops++; + if_inc_counter((ifp), IFCOUNTER_OQDROPS, 1); return (error); } #endif From owner-svn-src-all@FreeBSD.ORG Sun Sep 28 08:59:39 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 43E2E496; Sun, 28 Sep 2014 08:59:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3086E7C5; Sun, 28 Sep 2014 08:59:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8S8xdMw011447; Sun, 28 Sep 2014 08:59:39 GMT (envelope-from nyan@FreeBSD.org) Received: (from nyan@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8S8xd2t011446; Sun, 28 Sep 2014 08:59:39 GMT (envelope-from nyan@FreeBSD.org) Message-Id: <201409280859.s8S8xd2t011446@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nyan set sender to nyan@FreeBSD.org using -f From: Takahashi Yoshihiro Date: Sun, 28 Sep 2014 08:59:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272245 - head/rescue/rescue X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Sep 2014 08:59:39 -0000 Author: nyan Date: Sun Sep 28 08:59:38 2014 New Revision: 272245 URL: http://svnweb.freebsd.org/changeset/base/272245 Log: Remove duplicate prog. Modified: head/rescue/rescue/Makefile Modified: head/rescue/rescue/Makefile ============================================================================== --- head/rescue/rescue/Makefile Sun Sep 28 08:57:07 2014 (r272244) +++ head/rescue/rescue/Makefile Sun Sep 28 08:59:38 2014 (r272245) @@ -137,7 +137,6 @@ CRUNCH_ALIAS_bsdlabel= disklabel .endif .if ${MACHINE} == "pc98" -CRUNCH_PROGS_sbin+= bsdlabel CRUNCH_SRCDIR_fdisk= $(.CURDIR)/../../sbin/fdisk_pc98 .endif From owner-svn-src-all@FreeBSD.ORG Sun Sep 28 09:16:30 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 924D2843; Sun, 28 Sep 2014 09:16:30 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 164D294D; Sun, 28 Sep 2014 09:16:28 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id s8S9GPX3057815 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 28 Sep 2014 13:16:25 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id s8S9GPUO057814; Sun, 28 Sep 2014 13:16:25 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Sun, 28 Sep 2014 13:16:25 +0400 From: Gleb Smirnoff To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r272244 - head/sys/net Message-ID: <20140928091625.GU884@FreeBSD.org> References: <201409280857.s8S8v8cG011117@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201409280857.s8S8v8cG011117@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Sep 2014 09:16:30 -0000 On Sun, Sep 28, 2014 at 08:57:08AM +0000, Gleb Smirnoff wrote: T> Author: glebius T> Date: Sun Sep 28 08:57:07 2014 T> New Revision: 272244 T> URL: http://svnweb.freebsd.org/changeset/base/272244 T> T> Log: T> Finally, convert counters in struct ifnet to counter(9). T> T> Sponsored by: Netflix T> Sponsored by: Nginx, Inc. Now the network stack is 99% free of old style ++ on a global variable, that trashes cache line and is racy. The last remnant is queue drop counter in buf_ring(9), which would be probably addressed when interface queuing is generalized. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Sun Sep 28 11:08:33 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DFE93EDD; Sun, 28 Sep 2014 11:08:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CAD54327; Sun, 28 Sep 2014 11:08:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8SB8X9r071764; Sun, 28 Sep 2014 11:08:33 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8SB8XbN071761; Sun, 28 Sep 2014 11:08:33 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201409281108.s8SB8XbN071761@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 28 Sep 2014 11:08:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272246 - in stable/10/sys: compat/freebsd32 kern sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Sep 2014 11:08:34 -0000 Author: kib Date: Sun Sep 28 11:08:32 2014 New Revision: 272246 URL: http://svnweb.freebsd.org/changeset/base/272246 Log: MFC r272132: Fix fcntl(2) compat32 after r270691. Approved by: re (glebius) Modified: stable/10/sys/compat/freebsd32/freebsd32_misc.c stable/10/sys/kern/kern_descrip.c stable/10/sys/sys/syscallsubr.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- stable/10/sys/compat/freebsd32/freebsd32_misc.c Sun Sep 28 08:59:38 2014 (r272245) +++ stable/10/sys/compat/freebsd32/freebsd32_misc.c Sun Sep 28 11:08:32 2014 (r272246) @@ -3076,7 +3076,7 @@ freebsd32_procctl(struct thread *td, str int freebsd32_fcntl(struct thread *td, struct freebsd32_fcntl_args *uap) { - intptr_t tmp; + long tmp; switch (uap->cmd) { /* @@ -3095,5 +3095,5 @@ freebsd32_fcntl(struct thread *td, struc tmp = uap->arg; break; } - return (kern_fcntl(td, uap->fd, uap->cmd, tmp)); + return (kern_fcntl_freebsd(td, uap->fd, uap->cmd, tmp)); } Modified: stable/10/sys/kern/kern_descrip.c ============================================================================== --- stable/10/sys/kern/kern_descrip.c Sun Sep 28 08:59:38 2014 (r272245) +++ stable/10/sys/kern/kern_descrip.c Sun Sep 28 11:08:32 2014 (r272246) @@ -401,22 +401,27 @@ struct fcntl_args { int sys_fcntl(struct thread *td, struct fcntl_args *uap) { + + return (kern_fcntl_freebsd(td, uap->fd, uap->cmd, uap->arg)); +} + +int +kern_fcntl_freebsd(struct thread *td, int fd, int cmd, long arg) +{ struct flock fl; struct __oflock ofl; - intptr_t arg; + intptr_t arg1; int error; - int cmd; error = 0; - cmd = uap->cmd; - switch (uap->cmd) { + switch (cmd) { case F_OGETLK: case F_OSETLK: case F_OSETLKW: /* * Convert old flock structure to new. */ - error = copyin((void *)(intptr_t)uap->arg, &ofl, sizeof(ofl)); + error = copyin((void *)(intptr_t)arg, &ofl, sizeof(ofl)); fl.l_start = ofl.l_start; fl.l_len = ofl.l_len; fl.l_pid = ofl.l_pid; @@ -424,7 +429,7 @@ sys_fcntl(struct thread *td, struct fcnt fl.l_whence = ofl.l_whence; fl.l_sysid = 0; - switch (uap->cmd) { + switch (cmd) { case F_OGETLK: cmd = F_GETLK; break; @@ -435,33 +440,33 @@ sys_fcntl(struct thread *td, struct fcnt cmd = F_SETLKW; break; } - arg = (intptr_t)&fl; + arg1 = (intptr_t)&fl; break; case F_GETLK: case F_SETLK: case F_SETLKW: case F_SETLK_REMOTE: - error = copyin((void *)(intptr_t)uap->arg, &fl, sizeof(fl)); - arg = (intptr_t)&fl; + error = copyin((void *)(intptr_t)arg, &fl, sizeof(fl)); + arg1 = (intptr_t)&fl; break; default: - arg = uap->arg; + arg1 = arg; break; } if (error) return (error); - error = kern_fcntl(td, uap->fd, cmd, arg); + error = kern_fcntl(td, fd, cmd, arg1); if (error) return (error); - if (uap->cmd == F_OGETLK) { + if (cmd == F_OGETLK) { ofl.l_start = fl.l_start; ofl.l_len = fl.l_len; ofl.l_pid = fl.l_pid; ofl.l_type = fl.l_type; ofl.l_whence = fl.l_whence; - error = copyout(&ofl, (void *)(intptr_t)uap->arg, sizeof(ofl)); - } else if (uap->cmd == F_GETLK) { - error = copyout(&fl, (void *)(intptr_t)uap->arg, sizeof(fl)); + error = copyout(&ofl, (void *)(intptr_t)arg, sizeof(ofl)); + } else if (cmd == F_GETLK) { + error = copyout(&fl, (void *)(intptr_t)arg, sizeof(fl)); } return (error); } Modified: stable/10/sys/sys/syscallsubr.h ============================================================================== --- stable/10/sys/sys/syscallsubr.h Sun Sep 28 08:59:38 2014 (r272245) +++ stable/10/sys/sys/syscallsubr.h Sun Sep 28 11:08:32 2014 (r272246) @@ -97,6 +97,7 @@ int kern_fchmodat(struct thread *td, int int kern_fchownat(struct thread *td, int fd, char *path, enum uio_seg pathseg, int uid, int gid, int flag); int kern_fcntl(struct thread *td, int fd, int cmd, intptr_t arg); +int kern_fcntl_freebsd(struct thread *td, int fd, int cmd, long arg); int kern_fhstat(struct thread *td, fhandle_t fh, struct stat *buf); int kern_fhstatfs(struct thread *td, fhandle_t fh, struct statfs *buf); int kern_fstat(struct thread *td, int fd, struct stat *sbp); From owner-svn-src-all@FreeBSD.ORG Sun Sep 28 11:10:38 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B1B46A9; Sun, 28 Sep 2014 11:10:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 84B74335; Sun, 28 Sep 2014 11:10:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8SBAcZU072256; Sun, 28 Sep 2014 11:10:38 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8SBAcEI072255; Sun, 28 Sep 2014 11:10:38 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201409281110.s8SBAcEI072255@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 28 Sep 2014 11:10:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272247 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Sep 2014 11:10:38 -0000 Author: mav Date: Sun Sep 28 11:10:37 2014 New Revision: 272247 URL: http://svnweb.freebsd.org/changeset/base/272247 Log: Do not transfer unneeded training zero bytes in INQUIRY response. It is an addition to r269631. Modified: head/sys/cam/ctl/ctl.c Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Sun Sep 28 11:08:32 2014 (r272246) +++ head/sys/cam/ctl/ctl.c Sun Sep 28 11:10:37 2014 (r272247) @@ -10480,7 +10480,7 @@ ctl_inquiry_std(struct ctl_scsiio *ctsio struct ctl_softc *ctl_softc; struct ctl_lun *lun; char *val; - uint32_t alloc_len; + uint32_t alloc_len, data_len; ctl_port_type port_type; ctl_softc = control_softc; @@ -10504,16 +10504,17 @@ ctl_inquiry_std(struct ctl_scsiio *ctsio * in. If the user only asks for less, we'll give him * that much. */ - ctsio->kern_data_ptr = malloc(sizeof(*inq_ptr), M_CTL, M_WAITOK | M_ZERO); + data_len = offsetof(struct scsi_inquiry_data, vendor_specific1); + ctsio->kern_data_ptr = malloc(data_len, M_CTL, M_WAITOK | M_ZERO); inq_ptr = (struct scsi_inquiry_data *)ctsio->kern_data_ptr; ctsio->kern_sg_entries = 0; ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; - if (sizeof(*inq_ptr) < alloc_len) { - ctsio->residual = alloc_len - sizeof(*inq_ptr); - ctsio->kern_data_len = sizeof(*inq_ptr); - ctsio->kern_total_len = sizeof(*inq_ptr); + if (data_len < alloc_len) { + ctsio->residual = alloc_len - data_len; + ctsio->kern_data_len = data_len; + ctsio->kern_total_len = data_len; } else { ctsio->residual = 0; ctsio->kern_data_len = alloc_len; @@ -10593,8 +10594,7 @@ ctl_inquiry_std(struct ctl_scsiio *ctsio */ inq_ptr->response_format = SID_HiSup | 2; - inq_ptr->additional_length = - offsetof(struct scsi_inquiry_data, vendor_specific1) - + inq_ptr->additional_length = data_len - (offsetof(struct scsi_inquiry_data, additional_length) + 1); CTL_DEBUG_PRINT(("additional_length = %d\n", inq_ptr->additional_length)); From owner-svn-src-all@FreeBSD.ORG Sun Sep 28 11:32:47 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 464F7388; Sun, 28 Sep 2014 11:32:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 32F827AC; Sun, 28 Sep 2014 11:32:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8SBWlv9085167; Sun, 28 Sep 2014 11:32:47 GMT (envelope-from nyan@FreeBSD.org) Received: (from nyan@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8SBWkmt085165; Sun, 28 Sep 2014 11:32:46 GMT (envelope-from nyan@FreeBSD.org) Message-Id: <201409281132.s8SBWkmt085165@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nyan set sender to nyan@FreeBSD.org using -f From: Takahashi Yoshihiro Date: Sun, 28 Sep 2014 11:32:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272248 - in head: sys/sys usr.sbin/fdread X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Sep 2014 11:32:47 -0000 Author: nyan Date: Sun Sep 28 11:32:46 2014 New Revision: 272248 URL: http://svnweb.freebsd.org/changeset/base/272248 Log: - Cleanups pc98 code. - Remove unworked formats. Modified: head/sys/sys/fdcio.h head/usr.sbin/fdread/fdutil.c Modified: head/sys/sys/fdcio.h ============================================================================== --- head/sys/sys/fdcio.h Sun Sep 28 11:10:37 2014 (r272247) +++ head/sys/sys/fdcio.h Sun Sep 28 11:32:46 2014 (r272248) @@ -181,27 +181,17 @@ enum fd_drivetype { * XXX: should have been done 20 years ago to make sense. */ #ifdef PC98 -#define FDF_3_1722 21,2,0xFF,0x04,82,0,2,2,0x0C,2,0,FL_MFM -#define FDF_3_1476 18,2,0xFF,0x1B,82,0,2,2,0x54,1,0,FL_MFM #define FDF_3_1440 18,2,0xFF,0x1B,80,0,2,2,0x54,1,0,FL_MFM #define FDF_3_1200 15,2,0xFF,0x1B,80,0,0,2,0x54,1,0,FL_MFM -#define FDF_3_820 10,2,0xFF,0x10,82,0,1,2,0x30,1,0,FL_MFM -#define FDF_3_800 10,2,0xFF,0x10,80,0,1,2,0x30,1,0,FL_MFM #define FDF_3_720 9,2,0xFF,0x20,80,0,1,2,0x50,1,0,FL_MFM #define FDF_3_360 9,2,0xFF,0x20,40,0,1,2,0x50,1,0,FL_MFM|FL_2STEP #define FDF_3_640 8,2,0xFF,0x2A,80,0,1,2,0x50,1,0,FL_MFM #define FDF_3_1230 8,3,0xFF,0x35,77,0,0,2,0x74,1,0,FL_MFM -#define FDF_3_1280 8,3,0xFF,0x35,80,0,0,2,0x74,1,0,FL_MFM -#define FDF_3_1480 9,3,0xFF,0x35,82,0,0,2,0x47,1,0,FL_MFM -#define FDF_3_1640 10,3,0xFF,0x1B,82,0,2,2,0x54,1,0,FL_MFM #define FDF_5_1200 15,2,0xFF,0x1B,80,0,0,2,0x54,1,0,FL_MFM -#define FDF_5_820 10,2,0xFF,0x10,82,0,1,2,0x30,1,0,FL_MFM -#define FDF_5_800 10,2,0xFF,0x10,80,0,1,2,0x30,1,0,FL_MFM #define FDF_5_720 9,2,0xFF,0x20,80,0,1,2,0x50,1,0,FL_MFM #define FDF_5_360 9,2,0xFF,0x20,40,0,1,2,0x50,1,0,FL_MFM|FL_2STEP #define FDF_5_640 8,2,0xFF,0x2A,80,0,1,2,0x50,1,0,FL_MFM #define FDF_5_1230 8,3,0xFF,0x35,77,0,0,2,0x74,1,0,FL_MFM -#define FDF_5_1280 8,3,0xFF,0x35,80,0,0,2,0x74,1,0,FL_MFM #else /* PC98 */ #define FDF_3_2880 36,2,0xFF,0x1B,80,0,FDC_1MBPS,002,0x4C,1,1,FL_MFM|FL_PERPND #define FDF_3_1722 21,2,0xFF,0x04,82,0,FDC_500KBPS,2,0x0C,2,0,FL_MFM Modified: head/usr.sbin/fdread/fdutil.c ============================================================================== --- head/usr.sbin/fdread/fdutil.c Sun Sep 28 11:10:37 2014 (r272247) +++ head/usr.sbin/fdread/fdutil.c Sun Sep 28 11:32:46 2014 (r272248) @@ -92,6 +92,7 @@ static struct fd_type fd_types_auto[1] = static struct fd_type fd_types_288m[] = { +#ifndef PC98 #if 0 { FDF_3_2880 }, #endif @@ -102,30 +103,18 @@ static struct fd_type fd_types_288m[] = { FDF_3_820 }, { FDF_3_800 }, { FDF_3_720 }, +#endif /* !PC98 */ { 0,0,0,0,0,0,0,0,0,0,0,0 } }; static struct fd_type fd_types_144m[] = { #ifdef PC98 -#if 0 - { FDF_3_1722 }, - { FDF_3_1476 }, -#endif { FDF_3_1440 }, { FDF_3_1200 }, -#if 0 - { FDF_3_820 }, - { FDF_3_800 }, -#endif { FDF_3_720 }, { FDF_3_360 }, { FDF_3_640 }, { FDF_3_1230 }, -#if 0 - { FDF_3_1280 }, - { FDF_3_1480 }, - { FDF_3_1640 }, -#endif { 0,0,0,0,0,0,0,0,0,0,0,0 } #else { FDF_3_1722 }, @@ -142,17 +131,10 @@ static struct fd_type fd_types_144m[] = static struct fd_type fd_types_12m[] = { #ifdef PC98 { FDF_5_1200 }, -#if 0 - { FDF_5_820 }, - { FDF_5_800 }, -#endif { FDF_5_720 }, { FDF_5_360 }, { FDF_5_640 }, { FDF_5_1230 }, -#if 0 - { FDF_5_1280 }, -#endif { 0,0,0,0,0,0,0,0,0,0,0,0 } #else { FDF_5_1200 }, @@ -170,13 +152,17 @@ static struct fd_type fd_types_12m[] = { static struct fd_type fd_types_720k[] = { +#ifndef PC98 { FDF_3_720 }, +#endif { 0,0,0,0,0,0,0,0,0,0,0,0 } }; static struct fd_type fd_types_360k[] = { +#ifndef PC98 { FDF_5_360 }, +#endif { 0,0,0,0,0,0,0,0,0,0,0,0 } }; From owner-svn-src-all@FreeBSD.ORG Sun Sep 28 12:12:55 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 86214A69; Sun, 28 Sep 2014 12:12:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 72013AFF; Sun, 28 Sep 2014 12:12:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8SCCt4v004229; Sun, 28 Sep 2014 12:12:55 GMT (envelope-from nyan@FreeBSD.org) Received: (from nyan@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8SCCtXg004228; Sun, 28 Sep 2014 12:12:55 GMT (envelope-from nyan@FreeBSD.org) Message-Id: <201409281212.s8SCCtXg004228@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nyan set sender to nyan@FreeBSD.org using -f From: Takahashi Yoshihiro Date: Sun, 28 Sep 2014 12:12:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272249 - head/sys/boot/i386/boot2 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Sep 2014 12:12:55 -0000 Author: nyan Date: Sun Sep 28 12:12:54 2014 New Revision: 272249 URL: http://svnweb.freebsd.org/changeset/base/272249 Log: Remove extra '\'. Modified: head/sys/boot/i386/boot2/Makefile Modified: head/sys/boot/i386/boot2/Makefile ============================================================================== --- head/sys/boot/i386/boot2/Makefile Sun Sep 28 11:32:46 2014 (r272248) +++ head/sys/boot/i386/boot2/Makefile Sun Sep 28 12:12:54 2014 (r272249) @@ -37,7 +37,7 @@ CFLAGS= -Os \ -Wall -Waggregate-return -Wbad-function-cast -Wcast-align \ -Wmissing-declarations -Wmissing-prototypes -Wnested-externs \ -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \ - -Winline \ + -Winline CFLAGS.gcc+= -fno-guess-branch-probability \ -fno-unit-at-a-time \ From owner-svn-src-all@FreeBSD.ORG Sun Sep 28 12:13:52 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 750A6BB3; Sun, 28 Sep 2014 12:13:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 60E58B08; Sun, 28 Sep 2014 12:13:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8SCDqgP004457; Sun, 28 Sep 2014 12:13:52 GMT (envelope-from nyan@FreeBSD.org) Received: (from nyan@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8SCDqsB004456; Sun, 28 Sep 2014 12:13:52 GMT (envelope-from nyan@FreeBSD.org) Message-Id: <201409281213.s8SCDqsB004456@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nyan set sender to nyan@FreeBSD.org using -f From: Takahashi Yoshihiro Date: Sun, 28 Sep 2014 12:13:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272250 - head/sys/boot/pc98/boot2 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Sep 2014 12:13:52 -0000 Author: nyan Date: Sun Sep 28 12:13:51 2014 New Revision: 272250 URL: http://svnweb.freebsd.org/changeset/base/272250 Log: Reduce diffs against i386. Modified: head/sys/boot/pc98/boot2/Makefile Modified: head/sys/boot/pc98/boot2/Makefile ============================================================================== --- head/sys/boot/pc98/boot2/Makefile Sun Sep 28 12:12:54 2014 (r272249) +++ head/sys/boot/pc98/boot2/Makefile Sun Sep 28 12:13:51 2014 (r272250) @@ -2,10 +2,6 @@ .include -# XXX: clang can compile the boot code just fine, but boot2 gets too big -#CC:= gcc -#COMPILER_TYPE:= gcc - FILES= boot boot1 boot2 NM?= nm @@ -114,4 +110,5 @@ boot2.h: boot1.out .include # XXX: clang integrated-as doesn't grok .codeNN directives yet -CFLAGS+= ${CLANG_NO_IAS} +CFLAGS.boot1.S= ${CLANG_NO_IAS} +CFLAGS+= ${CFLAGS.${.IMPSRC:T}} From owner-svn-src-all@FreeBSD.ORG Sun Sep 28 12:25:28 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 94A50F24; Sun, 28 Sep 2014 12:25:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8042CBFA; Sun, 28 Sep 2014 12:25:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8SCPSQg012517; Sun, 28 Sep 2014 12:25:28 GMT (envelope-from nyan@FreeBSD.org) Received: (from nyan@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8SCPSl2012516; Sun, 28 Sep 2014 12:25:28 GMT (envelope-from nyan@FreeBSD.org) Message-Id: <201409281225.s8SCPSl2012516@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nyan set sender to nyan@FreeBSD.org using -f From: Takahashi Yoshihiro Date: Sun, 28 Sep 2014 12:25:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272252 - head/sys/boot/pc98/cdboot X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Sep 2014 12:25:28 -0000 Author: nyan Date: Sun Sep 28 12:25:27 2014 New Revision: 272252 URL: http://svnweb.freebsd.org/changeset/base/272252 Log: MFi386: r261520 Drop the 3rd clause from all 3 clause BSD licenses. Modified: head/sys/boot/pc98/cdboot/cdboot.S Modified: head/sys/boot/pc98/cdboot/cdboot.S ============================================================================== --- head/sys/boot/pc98/cdboot/cdboot.S Sun Sep 28 12:18:21 2014 (r272251) +++ head/sys/boot/pc98/cdboot/cdboot.S Sun Sep 28 12:25:27 2014 (r272252) @@ -11,9 +11,6 @@ # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. -# 3. Neither the name of the author nor the names of any co-contributors -# may 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 From owner-svn-src-all@FreeBSD.ORG Sun Sep 28 12:41:49 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EF67B325; Sun, 28 Sep 2014 12:41:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D0AA4D79; Sun, 28 Sep 2014 12:41:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8SCfmsi021521; Sun, 28 Sep 2014 12:41:48 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8SCfmPK021520; Sun, 28 Sep 2014 12:41:48 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201409281241.s8SCfmPK021520@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 28 Sep 2014 12:41:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272253 - head/etc/devd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Sep 2014 12:41:49 -0000 Author: hselasky Date: Sun Sep 28 12:41:48 2014 New Revision: 272253 URL: http://svnweb.freebsd.org/changeset/base/272253 Log: Regenerate usb.conf MFC after: 3 days Modified: head/etc/devd/usb.conf Modified: head/etc/devd/usb.conf ============================================================================== --- head/etc/devd/usb.conf Sun Sep 28 12:25:27 2014 (r272252) +++ head/etc/devd/usb.conf Sun Sep 28 12:41:48 2014 (r272253) @@ -65,7 +65,23 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x03f0"; - match "product" "(0x2016|0x2116|0x2216|0x3016|0x3116)"; + match "product" "(0x2016|0x2116|0x2216)"; + action "kldload -n uipaq"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x03f0"; + match "product" "(0x241d|0x251d)"; + action "kldload -n u3g"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x03f0"; + match "product" "(0x3016|0x3116)"; action "kldload -n uipaq"; }; @@ -129,7 +145,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0403"; - match "product" "(0x6001|0x6004|0x6006|0x6006|0x6010|0x6011|0x6014|0x6015|0x8372|0x9378|0x9379|0x937a|0x937c|0x9868|0x9e90|0x9f80|0xa6d0|0xabb8|0xb810|0xb811|0xb812|0xbaf8|0xbbe2|0xbca0|0xbca1|0xbca2|0xbca4|0xbcd8|0xbcd9|0xbcda|0xbdc8|0xbfd8|0xbfd9|0xbfda|0xbfdb|0xbfdc|0xc7d0|0xc850|0xc991|0xcaa0|0xcc48|0xcc49|0xcc4a|0xd010|0xd011|0xd012|0xd013|0xd014|0xd015|0xd016|0xd017|0xd070|0xd071|0xd388|0xd389|0xd38a|0xd38b|0xd38c|0xd38d|0xd38e|0xd38f|0xd578|0xd678|0xd738|0xd780|0xdaf8|0xdaf9|0xdafa|0xdafb|0xdafc|0xdafd|0xdafe|0xdaff|0xdc00|0xdc01|0xdd20|0xdf28|0xdf30|0xdf31|0xdf32|0xdf33|0xdf35|0xe000|0xe001|0xe002|0xe004|0xe006|0xe008|0xe009|0xe00a|0xe050|0xe0e8|0xe0e9|0xe0ea|0xe0eb|0xe0ec|0xe0ed|0xe0ee|0xe0ef|0xe0f0|0xe0f1|0xe0f2|0xe0f3|0xe0f4|0xe0f5|0xe0f6|0xe0f7|0xe40b|0xe520|0xe548|0xe6c8|0xe700|0xe729|0xe808|0xe809|0xe80a|0xe80b|0xe80c|0xe80d|0xe80e|0xe80f|0xe888|0xe889|0xe88a|0xe88b|0xe88c|0xe88d|0xe88e|0xe88f|0xea90|0xebe0|0xec88|0xec89|0xed22|0xed71|0xed72|0xed73|0xed74|0xee18|0xeee 8|0xeee9|0xeeea|0xeeeb|0xeeec|0xeeed|0xeeee|0xeeef|0xef50|0xef51|0xf068|0xf069|0xf06a|0xf06b|0xf06c|0xf06d|0xf06e|0xf06f|0xf070|0xf0c0|0xf0c8|0xf208|0xf2d0|0xf3c0|0xf3c1|0xf3c2|0xf448|0xf449|0xf44a|0xf44b|0xf44c|0xf460|0xf608|0xf60b|0xf680|0xf850|0xf857|0xf9d0|0xf9d1|0xf9d2|0xf9d3|0xf9d4|0xf9d5|0xfa00|0xfa01|0xfa02|0xfa03|0xfa04|0xfa05|0xfa06|0xfa10|0xfa33|0xfa88|0xfad0|0xfaf0|0xfb58|0xfb59|0xfb5a|0xfb5b|0xfb5c|0xfb5d|0xfb5e|0xfb5f|0xfb80|0xfb99|0xfbfa|0xfc08|0xfc09|0xfc0a|0xfc0b|0xfc0c|0xfc0d|0xfc0e|0xfc0f|0xfc60|0xfc70|0xfc71|0xfc72|0xfc73|0xfc82|0xfd60|0xfe38|0xff00|0xff18|0xff1c|0xff1d|0xff20|0xff38|0xff39|0xff3a|0xff3b|0xff3c|0xff3d|0xff3e|0xff3f|0xffa8)"; + match "product" "(0x6001|0x6004|0x6006|0x6006|0x6010|0x6011|0x6014|0x6015|0x8372|0x9378|0x9379|0x937a|0x937c|0x9868|0x9e90|0x9f80|0xa6d0|0xa6d1|0xabb8|0xb810|0xb811|0xb812|0xbaf8|0xbbe2|0xbca0|0xbca1|0xbca2|0xbca4|0xbcd8|0xbcd9|0xbcda|0xbdc8|0xbfd8|0xbfd9|0xbfda|0xbfdb|0xbfdc|0xc7d0|0xc850|0xc991|0xcaa0|0xcc48|0xcc49|0xcc4a|0xd010|0xd011|0xd012|0xd013|0xd014|0xd015|0xd016|0xd017|0xd070|0xd071|0xd388|0xd389|0xd38a|0xd38b|0xd38c|0xd38d|0xd38e|0xd38f|0xd578|0xd678|0xd738|0xd780|0xdaf8|0xdaf9|0xdafa|0xdafb|0xdafc|0xdafd|0xdafe|0xdaff|0xdc00|0xdc01|0xdd20|0xdf28|0xdf30|0xdf31|0xdf32|0xdf33|0xdf35|0xe000|0xe001|0xe002|0xe004|0xe006|0xe008|0xe009|0xe00a|0xe050|0xe0e8|0xe0e9|0xe0ea|0xe0eb|0xe0ec|0xe0ed|0xe0ee|0xe0ef|0xe0f0|0xe0f1|0xe0f2|0xe0f3|0xe0f4|0xe0f5|0xe0f6|0xe0f7|0xe40b|0xe520|0xe548|0xe6c8|0xe700|0xe729|0xe808|0xe809|0xe80a|0xe80b|0xe80c|0xe80d|0xe80e|0xe80f|0xe888|0xe889|0xe88a|0xe88b|0xe88c|0xe88d|0xe88e|0xe88f|0xea90|0xebe0|0xec88|0xec89|0xed22|0xed71|0xed72|0xed73|0xed74|0xee1 8|0xeee8|0xeee9|0xeeea|0xeeeb|0xeeec|0xeeed|0xeeee|0xeeef|0xef50|0xef51|0xf068|0xf069|0xf06a|0xf06b|0xf06c|0xf06d|0xf06e|0xf06f|0xf070|0xf0c0|0xf0c8|0xf208|0xf2d0|0xf3c0|0xf3c1|0xf3c2|0xf448|0xf449|0xf44a|0xf44b|0xf44c|0xf460|0xf608|0xf60b|0xf680|0xf850|0xf857|0xf9d0|0xf9d1|0xf9d2|0xf9d3|0xf9d4|0xf9d5|0xfa00|0xfa01|0xfa02|0xfa03|0xfa04|0xfa05|0xfa06|0xfa10|0xfa33|0xfa88|0xfad0|0xfaf0|0xfb58|0xfb59|0xfb5a|0xfb5b|0xfb5c|0xfb5d|0xfb5e|0xfb5f|0xfb80|0xfb99|0xfbfa|0xfc08|0xfc09|0xfc0a|0xfc0b|0xfc0c|0xfc0d|0xfc0e|0xfc0f|0xfc60|0xfc70|0xfc71|0xfc72|0xfc73|0xfc82|0xfd60|0xfe38|0xff00|0xff18|0xff1c|0xff1d|0xff20|0xff38|0xff39|0xff3a|0xff3b|0xff3c|0xff3d|0xff3e|0xff3f|0xffa8)"; action "kldload -n uftdi"; }; @@ -1057,7 +1073,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0586"; - match "product" "(0x3416|0x341a)"; + match "product" "(0x3416|0x341a|0x341e)"; action "kldload -n if_run"; }; @@ -1097,7 +1113,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x05ac"; - match "product" "(0x020d|0x020e|0x020f|0x0215|0x0217|0x0218|0x0219|0x021a|0x021b|0x021c)"; + match "product" "(0x020d|0x020e|0x020f|0x0210|0x0214|0x0215|0x0216|0x0217|0x0218|0x0219|0x021a|0x021b|0x021c)"; action "kldload -n atp"; }; @@ -2353,7 +2369,23 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0b05"; - match "product" "(0x17b5|0x17cb)"; + match "product" "0x17b5"; + action "kldload -n ng_ubt"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0b05"; + match "product" "0x17ba"; + action "kldload -n if_urtwn"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0b05"; + match "product" "0x17cb"; action "kldload -n ng_ubt"; }; @@ -2481,7 +2513,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0bda"; - match "product" "(0x018a|0x317f)"; + match "product" "(0x0179|0x018a|0x317f)"; action "kldload -n if_urtwn"; }; @@ -2513,7 +2545,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0bda"; - match "product" "(0x8176|0x8176|0x8177|0x8178|0x817a|0x817b|0x817c|0x817d|0x817e)"; + match "product" "(0x8176|0x8176|0x8177|0x8178|0x8179|0x817a|0x817b|0x817c|0x817d|0x817e)"; action "kldload -n if_urtwn"; }; @@ -2929,6 +2961,14 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0df6"; + match "product" "0x0072"; + action "kldload -n if_axge"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0df6"; match "product" "0x061c"; action "kldload -n if_axe"; }; @@ -3577,7 +3617,23 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x12d1"; - match "product" "(0x1001|0x1003|0x1004|0x1401|0x1402|0x1403|0x1404|0x1405|0x1406|0x1407|0x1408|0x1409|0x140a|0x140b|0x140c|0x140d|0x140e|0x140f|0x1410|0x1411|0x1412|0x1413|0x1414|0x1415|0x1416|0x1417|0x1418|0x1419|0x141a|0x141b|0x141c|0x141d|0x141e|0x141f|0x1420|0x1421|0x1422|0x1423|0x1424|0x1425|0x1426|0x1427|0x1428|0x1429|0x142a|0x142b|0x142c|0x142d|0x142e|0x142f|0x1430|0x1431|0x1432|0x1433|0x1434|0x1435|0x1436|0x1437|0x1438|0x1439|0x143a|0x143b|0x143c|0x143d|0x143e|0x143f|0x1446|0x1464|0x1465|0x14ac|0x14c9|0x14d1|0x14fe|0x1505|0x1506|0x1520|0x1521|0x1803|0x1c05|0x1c0b)"; + match "product" "(0x1001|0x1003|0x1004|0x1401|0x1402|0x1403|0x1404|0x1405|0x1406|0x1407|0x1408|0x1409|0x140a|0x140b|0x140c|0x140d|0x140e|0x140f|0x1410|0x1411|0x1412|0x1413|0x1414|0x1415|0x1416|0x1417|0x1418|0x1419|0x141a|0x141b|0x141c|0x141d|0x141e|0x141f|0x1420|0x1421|0x1422|0x1423|0x1424|0x1425|0x1426|0x1427|0x1428|0x1429|0x142a|0x142b|0x142c|0x142d|0x142e|0x142f|0x1430|0x1431|0x1432|0x1433|0x1434|0x1435|0x1436|0x1437|0x1438|0x1439|0x143a|0x143b|0x143c|0x143d|0x143e|0x143f|0x1446|0x1464|0x1465|0x14ac|0x14c9|0x14d1|0x14fe|0x1505|0x1506|0x1520|0x1521)"; + action "kldload -n u3g"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x12d1"; + match "product" "0x155b"; + action "kldload -n if_cdce"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x12d1"; + match "product" "(0x1803|0x1c05|0x1c0b)"; action "kldload -n u3g"; }; @@ -3753,7 +3809,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x1410"; - match "product" "(0x1100|0x1110|0x1120|0x1130|0x1400|0x1410|0x1420|0x1430|0x1450|0x2100|0x2110|0x2120|0x2130|0x2400|0x2410|0x2420|0x4100|0x4400|0x5010|0x5020|0x5041|0x5100|0x6000|0x6002|0x7042)"; + match "product" "(0x1100|0x1110|0x1120|0x1130|0x1400|0x1410|0x1420|0x1430|0x1450|0x2100|0x2110|0x2120|0x2130|0x2400|0x2410|0x2420|0x4100|0x4400|0x5010|0x5020|0x5041|0x5100|0x6000|0x6002|0x7001|0x7031|0x7042)"; action "kldload -n u3g"; }; @@ -4553,7 +4609,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x1cf1"; - match "product" "(0x0001|0x0004)"; + match "product" "(0x0001|0x0004|0x0022)"; action "kldload -n uftdi"; }; @@ -4568,6 +4624,14 @@ nomatch 32 { nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; + match "vendor" "0x1d34"; + match "product" "0x0004"; + action "kldload -n uled"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; match "vendor" "0x1d4d"; match "product" "(0x0002|0x000c|0x000e|0x0010)"; action "kldload -n if_run"; @@ -4633,7 +4697,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x2001"; - match "product" "(0x3307|0x3308|0x3309|0x330a|0x330d)"; + match "product" "(0x3307|0x3308|0x3309|0x330a|0x330d|0x330f)"; action "kldload -n if_urtwn"; }; @@ -4665,7 +4729,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x2001"; - match "product" "(0x3c09|0x3c0a|0x3c15|0x3c1a|0x3c1b|0x3c1f)"; + match "product" "(0x3c09|0x3c0a|0x3c15|0x3c1a|0x3c1b|0x3c1f|0x3c20)"; action "kldload -n if_run"; }; @@ -4689,6 +4753,14 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x2001"; + match "product" "0x4a00"; + action "kldload -n if_axge"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x2001"; match "product" "(0x7e12|0xa805)"; action "kldload -n u3g"; }; @@ -5232,6 +5304,36 @@ nomatch 32 { nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; + match "vendor" "0x12d1"; + match "intclass" "0xff"; + match "intsubclass" "0x02"; + match "intprotocol" "0x16"; + action "kldload -n if_cdce"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x12d1"; + match "intclass" "0xff"; + match "intsubclass" "0x02"; + match "intprotocol" "0x46"; + action "kldload -n if_cdce"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x12d1"; + match "intclass" "0xff"; + match "intsubclass" "0x02"; + match "intprotocol" "0x76"; + action "kldload -n if_cdce"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; match "intclass" "0x02"; match "intsubclass" "0x02"; match "intprotocol" "0x00"; @@ -5399,5 +5501,5 @@ nomatch 32 { action "kldload -n umass"; }; -# 2621 USB entries processed +# 2643 USB entries processed From owner-svn-src-all@FreeBSD.ORG Sun Sep 28 12:55:14 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6DF5E60C; Sun, 28 Sep 2014 12:55:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 590B7E59; Sun, 28 Sep 2014 12:55:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8SCtERh026693; Sun, 28 Sep 2014 12:55:14 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8SCtDxH026691; Sun, 28 Sep 2014 12:55:13 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201409281255.s8SCtDxH026691@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 28 Sep 2014 12:55:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272254 - head/sys/dev/sound/usb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Sep 2014 12:55:14 -0000 Author: hselasky Date: Sun Sep 28 12:55:13 2014 New Revision: 272254 URL: http://svnweb.freebsd.org/changeset/base/272254 Log: Instead of creating the full range of possible ports, try to figure out the actual number of so-called "embedded jacks" which are present when a USB MIDI device is attaching. MFC after: 3 days Modified: head/sys/dev/sound/usb/uaudio.c head/sys/dev/sound/usb/uaudioreg.h Modified: head/sys/dev/sound/usb/uaudio.c ============================================================================== --- head/sys/dev/sound/usb/uaudio.c Sun Sep 28 12:41:48 2014 (r272253) +++ head/sys/dev/sound/usb/uaudio.c Sun Sep 28 12:55:13 2014 (r272254) @@ -232,7 +232,7 @@ struct uaudio_chan { #define UAUDIO_SYNC_LESS 2 }; -#define UMIDI_CABLES_MAX 16 /* units */ +#define UMIDI_EMB_JACK_MAX 16 /* units */ #define UMIDI_TX_FRAMES 256 /* units */ #define UMIDI_TX_BUFFER (UMIDI_TX_FRAMES * 4) /* bytes */ @@ -263,7 +263,7 @@ struct umidi_sub_chan { struct umidi_chan { - struct umidi_sub_chan sub[UMIDI_CABLES_MAX]; + struct umidi_sub_chan sub[UMIDI_EMB_JACK_MAX]; struct mtx mtx; struct usb_xfer *xfer[UMIDI_N_TRANSFER]; @@ -275,7 +275,7 @@ struct umidi_chan { uint8_t write_open_refcount; uint8_t curr_cable; - uint8_t max_cable; + uint8_t max_emb_jack; uint8_t valid; uint8_t single_command; }; @@ -1481,6 +1481,7 @@ uaudio_chan_fill_info_sub(struct uaudio_ union uaudio_asid asid = { NULL }; union uaudio_asf1d asf1d = { NULL }; union uaudio_sed sed = { NULL }; + struct usb_midi_streaming_endpoint_descriptor *msid = NULL; usb_endpoint_descriptor_audio_t *ed1 = NULL; const struct usb_audio_control_descriptor *acdp = NULL; struct usb_config_descriptor *cd = usbd_get_config_descriptor(udev); @@ -1498,6 +1499,7 @@ uaudio_chan_fill_info_sub(struct uaudio_ uint8_t bChannels; uint8_t bBitResolution; uint8_t audio_if = 0; + uint8_t midi_if = 0; uint8_t uma_if_class; while ((desc = usb_desc_foreach(cd, desc))) { @@ -1533,7 +1535,8 @@ uaudio_chan_fill_info_sub(struct uaudio_ ((id->bInterfaceClass == UICLASS_VENDOR) && (sc->sc_uq_au_vendor_class != 0))); - if ((uma_if_class != 0) && (id->bInterfaceSubClass == UISUBCLASS_AUDIOSTREAM)) { + if ((uma_if_class != 0) && + (id->bInterfaceSubClass == UISUBCLASS_AUDIOSTREAM)) { audio_if = 1; } else { audio_if = 0; @@ -1545,13 +1548,16 @@ uaudio_chan_fill_info_sub(struct uaudio_ /* * XXX could allow multiple MIDI interfaces */ + midi_if = 1; if ((sc->sc_midi_chan.valid == 0) && - usbd_get_iface(udev, curidx)) { + (usbd_get_iface(udev, curidx) != NULL)) { sc->sc_midi_chan.iface_index = curidx; sc->sc_midi_chan.iface_alt_index = alt_index; sc->sc_midi_chan.valid = 1; } + } else { + midi_if = 0; } asid.v1 = NULL; asf1d.v1 = NULL; @@ -1560,14 +1566,25 @@ uaudio_chan_fill_info_sub(struct uaudio_ } if (audio_if == 0) { - if ((acdp == NULL) && - (desc->bDescriptorType == UDESC_CS_INTERFACE) && - (desc->bDescriptorSubtype == UDESCSUB_AC_HEADER) && - (desc->bLength >= sizeof(*acdp))) { - acdp = (void *)desc; - audio_rev = UGETW(acdp->bcdADC); - } + if (midi_if == 0) { + if ((acdp == NULL) && + (desc->bDescriptorType == UDESC_CS_INTERFACE) && + (desc->bDescriptorSubtype == UDESCSUB_AC_HEADER) && + (desc->bLength >= sizeof(*acdp))) { + acdp = (void *)desc; + audio_rev = UGETW(acdp->bcdADC); + } + } else { + msid = (void *)desc; + /* get the maximum number of embedded jacks in use, if any */ + if (msid->bLength >= sizeof(*msid) && + msid->bDescriptorType == UDESC_CS_ENDPOINT && + msid->bDescriptorSubtype == MS_GENERAL && + msid->bNumEmbMIDIJack > sc->sc_midi_chan.max_emb_jack) { + sc->sc_midi_chan.max_emb_jack = msid->bNumEmbMIDIJack; + } + } /* * Don't collect any USB audio descriptors if * this is not an USB audio stream interface. @@ -5219,8 +5236,7 @@ umidi_bulk_read_callback(struct usb_xfer */ sub = &chan->sub[cn]; - if ((cmd_len != 0) && - (cn < chan->max_cable) && + if ((cmd_len != 0) && (cn < chan->max_emb_jack) && (sub->read_open != 0)) { /* Send data to the application */ @@ -5456,7 +5472,7 @@ tr_setup: } chan->curr_cable++; - if (chan->curr_cable >= chan->max_cable) + if (chan->curr_cable >= chan->max_emb_jack) chan->curr_cable = 0; if (chan->curr_cable == start_cable) { @@ -5493,7 +5509,7 @@ umidi_sub_by_fifo(struct usb_fifo *fifo) struct umidi_sub_chan *sub; uint32_t n; - for (n = 0; n < UMIDI_CABLES_MAX; n++) { + for (n = 0; n < UMIDI_EMB_JACK_MAX; n++) { sub = &chan->sub[n]; if ((sub->fifo.fp[USB_FIFO_RX] == fifo) || (sub->fifo.fp[USB_FIFO_TX] == fifo)) { @@ -5676,12 +5692,12 @@ umidi_probe(device_t dev) if (chan->single_command != 0) device_printf(dev, "Single command MIDI quirk enabled\n"); - if ((chan->max_cable > UMIDI_CABLES_MAX) || - (chan->max_cable == 0)) { - chan->max_cable = UMIDI_CABLES_MAX; + if ((chan->max_emb_jack == 0) || + (chan->max_emb_jack > UMIDI_EMB_JACK_MAX)) { + chan->max_emb_jack = UMIDI_EMB_JACK_MAX; } - for (n = 0; n < chan->max_cable; n++) { + for (n = 0; n < chan->max_emb_jack; n++) { sub = &chan->sub[n]; @@ -5719,9 +5735,8 @@ umidi_detach(device_t dev) struct umidi_chan *chan = &sc->sc_midi_chan; uint32_t n; - for (n = 0; n < UMIDI_CABLES_MAX; n++) { + for (n = 0; n < UMIDI_EMB_JACK_MAX; n++) usb_fifo_detach(&chan->sub[n].fifo); - } mtx_lock(&chan->mtx); Modified: head/sys/dev/sound/usb/uaudioreg.h ============================================================================== --- head/sys/dev/sound/usb/uaudioreg.h Sun Sep 28 12:41:48 2014 (r272253) +++ head/sys/dev/sound/usb/uaudioreg.h Sun Sep 28 12:55:13 2014 (r272254) @@ -119,6 +119,13 @@ struct usb_audio_streaming_endpoint_desc uWord wLockDelay; } __packed; +struct usb_midi_streaming_endpoint_descriptor { + uByte bLength; + uByte bDescriptorType; + uByte bDescriptorSubtype; + uByte bNumEmbMIDIJack; +} __packed; + struct usb_audio_streaming_type1_descriptor { uByte bLength; uByte bDescriptorType; @@ -378,6 +385,7 @@ struct usb_audio_extension_unit_1 { #define MASTER_CHAN 0 +#define MS_GENERAL 1 #define AS_GENERAL 1 #define FORMAT_TYPE 2 #define FORMAT_SPECIFIC 3 From owner-svn-src-all@FreeBSD.ORG Sun Sep 28 13:13:19 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 20239B5B; Sun, 28 Sep 2014 13:13:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0BDEA1000; Sun, 28 Sep 2014 13:13:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8SDDIcq036214; Sun, 28 Sep 2014 13:13:18 GMT (envelope-from nyan@FreeBSD.org) Received: (from nyan@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8SDDIW0036213; Sun, 28 Sep 2014 13:13:18 GMT (envelope-from nyan@FreeBSD.org) Message-Id: <201409281313.s8SDDIW0036213@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nyan set sender to nyan@FreeBSD.org using -f From: Takahashi Yoshihiro Date: Sun, 28 Sep 2014 13:13:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272255 - head/sys/boot/pc98/libpc98 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Sep 2014 13:13:19 -0000 Author: nyan Date: Sun Sep 28 13:13:18 2014 New Revision: 272255 URL: http://svnweb.freebsd.org/changeset/base/272255 Log: MFi386: r268974 Supress clang warning for FreeBSD printf %b and %D formats. Modified: head/sys/boot/pc98/libpc98/Makefile Modified: head/sys/boot/pc98/libpc98/Makefile ============================================================================== --- head/sys/boot/pc98/libpc98/Makefile Sun Sep 28 12:55:13 2014 (r272254) +++ head/sys/boot/pc98/libpc98/Makefile Sun Sep 28 13:13:18 2014 (r272255) @@ -44,4 +44,7 @@ CFLAGS+= -I${.CURDIR}/../../common \ # the location of libstand CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/ +# Suppress warning from clang for FreeBSD %b and %D formats +CFLAGS+= -fformat-extensions + .include From owner-svn-src-all@FreeBSD.ORG Sun Sep 28 13:34:44 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D573AEEC; Sun, 28 Sep 2014 13:34:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C118F21B; Sun, 28 Sep 2014 13:34:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8SDYix4045811; Sun, 28 Sep 2014 13:34:44 GMT (envelope-from nyan@FreeBSD.org) Received: (from nyan@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8SDYiht045809; Sun, 28 Sep 2014 13:34:44 GMT (envelope-from nyan@FreeBSD.org) Message-Id: <201409281334.s8SDYiht045809@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nyan set sender to nyan@FreeBSD.org using -f From: Takahashi Yoshihiro Date: Sun, 28 Sep 2014 13:34:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272256 - in head/sys/boot: . pc98/loader X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Sep 2014 13:34:44 -0000 Author: nyan Date: Sun Sep 28 13:34:43 2014 New Revision: 272256 URL: http://svnweb.freebsd.org/changeset/base/272256 Log: MFi386: r261567 Switch from lib/libstand to sys/boot/libstand32. Modified: head/sys/boot/Makefile.pc98 head/sys/boot/pc98/loader/Makefile Modified: head/sys/boot/Makefile.pc98 ============================================================================== --- head/sys/boot/Makefile.pc98 Sun Sep 28 13:13:18 2014 (r272255) +++ head/sys/boot/Makefile.pc98 Sun Sep 28 13:34:43 2014 (r272256) @@ -1,4 +1,3 @@ # $FreeBSD$ -# Blank, to override Makefile.i386 since Makefile.$MACHINE is included before -# Makefile.$MACHINE_ARCH +SUBDIR+= libstand32 Modified: head/sys/boot/pc98/loader/Makefile ============================================================================== --- head/sys/boot/pc98/loader/Makefile Sun Sep 28 13:13:18 2014 (r272255) +++ head/sys/boot/pc98/loader/Makefile Sun Sep 28 13:34:43 2014 (r272256) @@ -56,6 +56,8 @@ LDFLAGS= -static -Ttext 0x0 LIBPC98= ${.OBJDIR}/../libpc98/libpc98.a CFLAGS+= -I${.CURDIR}/.. +LIBSTAND= ${.OBJDIR}/../../libstand32/libstand.a + # BTX components CFLAGS+= -I${.CURDIR}/../btx/lib From owner-svn-src-all@FreeBSD.ORG Sun Sep 28 14:05:21 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 16CAE32B; Sun, 28 Sep 2014 14:05:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 015EF66A; Sun, 28 Sep 2014 14:05:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8SE5Kcm059810; Sun, 28 Sep 2014 14:05:20 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8SE5IlR059799; Sun, 28 Sep 2014 14:05:18 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201409281405.s8SE5IlR059799@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Sun, 28 Sep 2014 14:05:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272257 - in head/sys: dev/bge dev/e1000 dev/fxp dev/nfe kern net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Sep 2014 14:05:21 -0000 Author: glebius Date: Sun Sep 28 14:05:18 2014 New Revision: 272257 URL: http://svnweb.freebsd.org/changeset/base/272257 Log: - Remove empty wrappers ether_poll_[de]register_drv(). [1] - Move polling(9) declarations out of ifq.h back to if_var.h they are absolutely unrelated to queues. Submitted by: Mikhail [1] Modified: head/sys/dev/bge/if_bge.c head/sys/dev/e1000/if_em.c head/sys/dev/e1000/if_lem.c head/sys/dev/fxp/if_fxp.c head/sys/dev/nfe/if_nfe.c head/sys/kern/kern_poll.c head/sys/net/if_var.h head/sys/net/ifq.h Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Sun Sep 28 13:34:43 2014 (r272256) +++ head/sys/dev/bge/if_bge.c Sun Sep 28 14:05:18 2014 (r272257) @@ -5828,7 +5828,7 @@ bge_ioctl(if_t ifp, u_long command, cadd #ifdef DEVICE_POLLING if (mask & IFCAP_POLLING) { if (ifr->ifr_reqcap & IFCAP_POLLING) { - error = ether_poll_register_drv(bge_poll, ifp); + error = ether_poll_register(bge_poll, ifp); if (error) return (error); BGE_LOCK(sc); Modified: head/sys/dev/e1000/if_em.c ============================================================================== --- head/sys/dev/e1000/if_em.c Sun Sep 28 13:34:43 2014 (r272256) +++ head/sys/dev/e1000/if_em.c Sun Sep 28 14:05:18 2014 (r272257) @@ -307,7 +307,7 @@ static int em_sysctl_eee(SYSCTL_HANDLER_ static __inline void em_rx_discard(struct rx_ring *, int); #ifdef DEVICE_POLLING -static poll_handler_drv_t em_poll; +static poll_handler_t em_poll; #endif /* POLLING */ /********************************************************************* @@ -787,7 +787,7 @@ em_detach(device_t dev) #ifdef DEVICE_POLLING if (if_getcapenable(ifp) & IFCAP_POLLING) - ether_poll_deregister_drv(ifp); + ether_poll_deregister(ifp); #endif if (adapter->led_dev != NULL) @@ -1208,7 +1208,7 @@ em_ioctl(if_t ifp, u_long command, caddr #ifdef DEVICE_POLLING if (mask & IFCAP_POLLING) { if (ifr->ifr_reqcap & IFCAP_POLLING) { - error = ether_poll_register_drv(em_poll, ifp); + error = ether_poll_register(em_poll, ifp); if (error) return (error); EM_CORE_LOCK(adapter); @@ -1216,7 +1216,7 @@ em_ioctl(if_t ifp, u_long command, caddr if_setcapenablebit(ifp, IFCAP_POLLING, 0); EM_CORE_UNLOCK(adapter); } else { - error = ether_poll_deregister_drv(ifp); + error = ether_poll_deregister(ifp); /* Enable interrupt even in error case */ EM_CORE_LOCK(adapter); em_enable_intr(adapter); Modified: head/sys/dev/e1000/if_lem.c ============================================================================== --- head/sys/dev/e1000/if_lem.c Sun Sep 28 13:34:43 2014 (r272256) +++ head/sys/dev/e1000/if_lem.c Sun Sep 28 14:05:18 2014 (r272257) @@ -260,7 +260,7 @@ static void lem_add_rx_process_limit(str const char *, int *, int); #ifdef DEVICE_POLLING -static poll_handler_drv_t lem_poll; +static poll_handler_t lem_poll; #endif /* POLLING */ /********************************************************************* @@ -789,7 +789,7 @@ lem_detach(device_t dev) #ifdef DEVICE_POLLING if (if_getcapenable(ifp) & IFCAP_POLLING) - ether_poll_deregister_drv(ifp); + ether_poll_deregister(ifp); #endif if (adapter->led_dev != NULL) @@ -1119,7 +1119,7 @@ lem_ioctl(if_t ifp, u_long command, cadd #ifdef DEVICE_POLLING if (mask & IFCAP_POLLING) { if (ifr->ifr_reqcap & IFCAP_POLLING) { - error = ether_poll_register_drv(lem_poll, ifp); + error = ether_poll_register(lem_poll, ifp); if (error) return (error); EM_CORE_LOCK(adapter); @@ -1127,7 +1127,7 @@ lem_ioctl(if_t ifp, u_long command, cadd if_setcapenablebit(ifp, IFCAP_POLLING, 0); EM_CORE_UNLOCK(adapter); } else { - error = ether_poll_deregister_drv(ifp); + error = ether_poll_deregister(ifp); /* Enable interrupt even in error case */ EM_CORE_LOCK(adapter); lem_enable_intr(adapter); Modified: head/sys/dev/fxp/if_fxp.c ============================================================================== --- head/sys/dev/fxp/if_fxp.c Sun Sep 28 13:34:43 2014 (r272256) +++ head/sys/dev/fxp/if_fxp.c Sun Sep 28 14:05:18 2014 (r272257) @@ -1008,7 +1008,7 @@ fxp_detach(device_t dev) #ifdef DEVICE_POLLING if (if_getcapenable(sc->ifp) & IFCAP_POLLING) - ether_poll_deregister_drv(sc->ifp); + ether_poll_deregister(sc->ifp); #endif FXP_LOCK(sc); @@ -1670,7 +1670,7 @@ fxp_encap(struct fxp_softc *sc, struct m } #ifdef DEVICE_POLLING -static poll_handler_drv_t fxp_poll; +static poll_handler_t fxp_poll; static int fxp_poll(if_t ifp, enum poll_cmd cmd, int count) @@ -2890,7 +2890,7 @@ fxp_ioctl(if_t ifp, u_long command, cadd #ifdef DEVICE_POLLING if (mask & IFCAP_POLLING) { if (ifr->ifr_reqcap & IFCAP_POLLING) { - error = ether_poll_register_drv(fxp_poll, ifp); + error = ether_poll_register(fxp_poll, ifp); if (error) return(error); FXP_LOCK(sc); @@ -2899,7 +2899,7 @@ fxp_ioctl(if_t ifp, u_long command, cadd if_setcapenablebit(ifp, IFCAP_POLLING, 0); FXP_UNLOCK(sc); } else { - error = ether_poll_deregister_drv(ifp); + error = ether_poll_deregister(ifp); /* Enable interrupts in any case */ FXP_LOCK(sc); CSR_WRITE_1(sc, FXP_CSR_SCB_INTRCNTL, 0); Modified: head/sys/dev/nfe/if_nfe.c ============================================================================== --- head/sys/dev/nfe/if_nfe.c Sun Sep 28 13:34:43 2014 (r272256) +++ head/sys/dev/nfe/if_nfe.c Sun Sep 28 14:05:18 2014 (r272257) @@ -1630,7 +1630,7 @@ nfe_free_tx_ring(struct nfe_softc *sc, s } #ifdef DEVICE_POLLING -static poll_handler_drv_t nfe_poll; +static poll_handler_t nfe_poll; static int @@ -1782,7 +1782,7 @@ nfe_ioctl(if_t ifp, u_long cmd, caddr_t #ifdef DEVICE_POLLING if ((mask & IFCAP_POLLING) != 0) { if ((ifr->ifr_reqcap & IFCAP_POLLING) != 0) { - error = ether_poll_register_drv(nfe_poll, ifp); + error = ether_poll_register(nfe_poll, ifp); if (error) break; NFE_LOCK(sc); Modified: head/sys/kern/kern_poll.c ============================================================================== --- head/sys/kern/kern_poll.c Sun Sep 28 13:34:43 2014 (r272256) +++ head/sys/kern/kern_poll.c Sun Sep 28 14:05:18 2014 (r272257) @@ -451,19 +451,6 @@ netisr_poll(void) mtx_unlock(&poll_mtx); } -/* The following should be temporary, till all drivers use the driver API */ -int -ether_poll_register_drv(poll_handler_drv_t *h, if_t ifh) -{ - return (ether_poll_register((poll_handler_t *)h, (struct ifnet *)ifh)); -} - -int -ether_poll_deregister_drv(if_t ifh) -{ - return (ether_poll_deregister((struct ifnet *)ifh)); -} - /* * Try to register routine for polling. Returns 0 if successful * (and polling should be enabled), error code otherwise. @@ -472,7 +459,7 @@ ether_poll_deregister_drv(if_t ifh) * This is called from within the *_ioctl() functions. */ int -ether_poll_register(poll_handler_t *h, struct ifnet *ifp) +ether_poll_register(poll_handler_t *h, if_t ifp) { int i; @@ -519,7 +506,7 @@ ether_poll_register(poll_handler_t *h, s * Remove interface from the polling list. Called from *_ioctl(), too. */ int -ether_poll_deregister(struct ifnet *ifp) +ether_poll_deregister(if_t ifp) { int i; Modified: head/sys/net/if_var.h ============================================================================== --- head/sys/net/if_var.h Sun Sep 28 13:34:43 2014 (r272256) +++ head/sys/net/if_var.h Sun Sep 28 14:05:18 2014 (r272257) @@ -599,5 +599,13 @@ int drbr_enqueue_drv(if_t ifp, struct bu void if_hw_tsomax_common(if_t ifp, struct ifnet_hw_tsomax *); int if_hw_tsomax_update(if_t ifp, struct ifnet_hw_tsomax *); +#ifdef DEVICE_POLLING +enum poll_cmd { POLL_ONLY, POLL_AND_CHECK_STATUS }; + +typedef int poll_handler_t(if_t ifp, enum poll_cmd cmd, int count); +int ether_poll_register(poll_handler_t *h, if_t ifp); +int ether_poll_deregister(if_t ifp); +#endif /* DEVICE_POLLING */ + #endif /* _KERNEL */ #endif /* !_NET_IF_VAR_H_ */ Modified: head/sys/net/ifq.h ============================================================================== --- head/sys/net/ifq.h Sun Sep 28 13:34:43 2014 (r272256) +++ head/sys/net/ifq.h Sun Sep 28 14:05:18 2014 (r272257) @@ -481,17 +481,5 @@ void if_qflush(struct ifnet *); void ifq_init(struct ifaltq *, struct ifnet *ifp); void ifq_delete(struct ifaltq *); -#ifdef DEVICE_POLLING -enum poll_cmd { POLL_ONLY, POLL_AND_CHECK_STATUS }; - -typedef int poll_handler_t(struct ifnet *ifp, enum poll_cmd cmd, int count); -int ether_poll_register(poll_handler_t *h, struct ifnet *ifp); -int ether_poll_deregister(struct ifnet *ifp); -/* The following should be temporary, till all drivers use the driver API */ -typedef int poll_handler_drv_t(if_t ifh, enum poll_cmd cmd, int count); -int ether_poll_register_drv(poll_handler_drv_t *h, if_t ifh); -int ether_poll_deregister_drv(if_t ifh); -#endif /* DEVICE_POLLING */ - #endif /* _KERNEL */ #endif /* !_NET_IFQ_H_ */ From owner-svn-src-all@FreeBSD.ORG Sun Sep 28 14:25:47 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6F3878BE; Sun, 28 Sep 2014 14:25:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5AF3E852; Sun, 28 Sep 2014 14:25:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8SEPlut069624; Sun, 28 Sep 2014 14:25:47 GMT (envelope-from nyan@FreeBSD.org) Received: (from nyan@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8SEPlHe069623; Sun, 28 Sep 2014 14:25:47 GMT (envelope-from nyan@FreeBSD.org) Message-Id: <201409281425.s8SEPlHe069623@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nyan set sender to nyan@FreeBSD.org using -f From: Takahashi Yoshihiro Date: Sun, 28 Sep 2014 14:25:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272258 - head/sys/pc98/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Sep 2014 14:25:47 -0000 Author: nyan Date: Sun Sep 28 14:25:46 2014 New Revision: 272258 URL: http://svnweb.freebsd.org/changeset/base/272258 Log: - Cosmetic changes. - Reduce diffs against i386. Modified: head/sys/pc98/conf/GENERIC Modified: head/sys/pc98/conf/GENERIC ============================================================================== --- head/sys/pc98/conf/GENERIC Sun Sep 28 14:05:18 2014 (r272257) +++ head/sys/pc98/conf/GENERIC Sun Sep 28 14:25:46 2014 (r272258) @@ -66,9 +66,11 @@ options AUDIT # Security event auditi options CAPABILITY_MODE # Capsicum capability mode options CAPABILITIES # Capsicum capabilities options MAC # TrustedBSD MAC Framework -options INCLUDE_CONFIG_FILE # Include this file in kernel -options KDB # Kernel debugger related code -options KDB_TRACE # Print a stack trace for a panic +options INCLUDE_CONFIG_FILE # Include this file in kernel + +# Debugging support. Always need this: +options KDB # Enable kernel debugger support. +options KDB_TRACE # Print a stack trace for a panic. # To make an SMP kernel, the next two lines are needed #options SMP # Symmetric MultiProcessor Kernel @@ -81,47 +83,47 @@ device pci device fdc # ATA controllers -device ahci # AHCI-compatible SATA controllers -device ata # Legacy ATA/SATA controllers -options ATA_STATIC_ID # Static device numbering -device mvs # Marvell 88SX50XX/88SX60XX/88SX70XX/SoC SATA -device siis # SiliconImage SiI3124/SiI3132/SiI3531 SATA +device ahci # AHCI-compatible SATA controllers +device ata # Legacy ATA/SATA controllers +options ATA_STATIC_ID # Static device numbering +device mvs # Marvell 88SX50XX/88SX60XX/88SX70XX/SoC SATA +device siis # SiliconImage SiI3124/SiI3132/SiI3531 SATA # SCSI Controllers -device adv # Advansys SCSI adapters -device ahc # AHA2940 and onboard AIC7xxx devices -device esp # AMD Am53C974 (Tekram DC-390(T)) -device isp # Qlogic family -#device ncr # NCR/Symbios Logic -device sym # NCR/Symbios Logic (newer chipsets + those of `ncr') - -device aic # PC-9801-100 -device ct # host adapter using WD33C93[ABC] chip (C bus) - -device ncv # NCR 53C500 -device nsp # Workbit Ninja SCSI-3 -device stg # TMC 18C30/18C50 +device ahc # AHA2940 and onboard AIC7xxx devices +device esp # AMD Am53C974 (Tekram DC-390(T)) +device isp # Qlogic family +#device ncr # NCR/Symbios Logic +device sym # NCR/Symbios Logic (newer chipsets + those of `ncr') + +device adv # Advansys SCSI adapters +device aic # PC-9801-100 +device ct # host adapter using WD33C93[ABC] chip + +device ncv # NCR 53C500 +device nsp # Workbit Ninja SCSI-3 +device stg # TMC 18C30/18C50 # ATA/SCSI peripherals -device scbus # SCSI bus (required for ATA/SCSI) -device ch # SCSI media changers -device da # Direct Access (disks) -device sa # Sequential Access (tape etc) -device cd # CD -device pass # Passthrough device (direct ATA/SCSI access) -device ses # Enclosure Services (SES and SAF-TE) +device scbus # SCSI bus (required for ATA/SCSI) +device ch # SCSI media changers +device da # Direct Access (disks) +device sa # Sequential Access (tape etc) +device cd # CD +device pass # Passthrough device (direct ATA/SCSI access) +device ses # Enclosure Services (SES and SAF-TE) # keyboard driver -device pckbd # PC98 keyboard +device pckbd # PC98 keyboard -device gdc # GDC screen +device gdc # GDC screen -device splash # Splash screen and screen saver support +device splash # Splash screen and screen saver support # syscons is the default console driver, resembling an SCO console device sc -#device agp # support several AGP chipsets +#device agp # support several AGP chipsets # Power management support (see NOTES for more options) #device apm @@ -133,114 +135,114 @@ device sc # PCCARD (PCMCIA) support # PCMCIA and cardbus bridge support -device cbb # cardbus (yenta) bridge -device pccard # PC Card (16-bit) bus -device cardbus # CardBus (32-bit) bus +device cbb # cardbus (yenta) bridge +device pccard # PC Card (16-bit) bus +device cardbus # CardBus (32-bit) bus # Serial (COM) ports #options COM_MULTIPORT -#options COM_ESP # ESP98 -#device sio # 8250, 16[45]50, 8251 based serial ports -device uart # Generic UART driver +#options COM_ESP # ESP98 +#device sio # 8250, 16[45]50, 8251 based serial ports +device uart # Generic UART driver device mse #device joy -# NEW Parallel port +# Parallel port device ppc -device ppbus # Parallel port bus (required) -device lpt # Printer -device ppi # Parallel port interface device -#device vpo # Requires scbus and da +device ppbus # Parallel port bus (required) +device lpt # Printer +device ppi # Parallel port interface device +#device vpo # Requires scbus and da # OLD Parallel port #device olpt # PCI Ethernet NICs. -device de # DEC/Intel DC21x4x (``Tulip'') -#device em # Intel PRO/1000 adapter Gigabit Ethernet Card -device le # AMD Am7900 LANCE and Am79C9xx PCnet -#device ti # Alteon Networks Tigon I/II gigabit Ethernet -device txp # 3Com 3cR990 (``Typhoon'') -device vx # 3Com 3c590, 3c595 (``Vortex'') +device de # DEC/Intel DC21x4x (``Tulip'') +#device em # Intel PRO/1000 Gigabit Ethernet Family +device le # AMD Am7900 LANCE and Am79C9xx PCnet +#device ti # Alteon Networks Tigon I/II gigabit Ethernet +device txp # 3Com 3cR990 (``Typhoon'') +device vx # 3Com 3c590, 3c595 (``Vortex'') # PCI Ethernet NICs that use the common MII bus controller code. # NOTE: Be sure to keep the 'device miibus' line in order to use these NICs! -device miibus # MII bus support -device bfe # Broadcom BCM440x 10/100 Ethernet -#device bge # Broadcom BCM570xx Gigabit Ethernet -device dc # DEC/Intel 21143 and various workalikes -device fxp # Intel EtherExpress PRO/100B (82557, 82558) -#device lge # Level 1 LXT1001 gigabit Ethernet -#device nge # NatSemi DP83820 gigabit Ethernet -device pcn # AMD Am79C97x PCI 10/100 (precedence over 'le') -device re # RealTek 8139C+/8169/8169S/8110S -device rl # RealTek 8129/8139 -device sf # Adaptec AIC-6915 (``Starfire'') -device sis # Silicon Integrated Systems SiS 900/SiS 7016 -#device sk # SysKonnect SK-984x & SK-982x gigabit Ethernet -device ste # Sundance ST201 (D-Link DFE-550TX) -device tl # Texas Instruments ThunderLAN -device tx # SMC EtherPower II (83c170 ``EPIC'') -#device vge # VIA VT612x gigabit Ethernet -device vr # VIA Rhine, Rhine II -device wb # Winbond W89C840F -device xl # 3Com 3c90x (``Boomerang'', ``Cyclone'') +device miibus # MII bus support +device bfe # Broadcom BCM440x 10/100 Ethernet +#device bge # Broadcom BCM570xx Gigabit Ethernet +device dc # DEC/Intel 21143 and various workalikes +device fxp # Intel EtherExpress PRO/100B (82557, 82558) +#device lge # Level 1 LXT1001 gigabit Ethernet +#device nge # NatSemi DP83820 gigabit Ethernet +device pcn # AMD Am79C97x PCI 10/100 (precedence over 'le') +device re # RealTek 8139C+/8169/8169S/8110S +device rl # RealTek 8129/8139 +device sf # Adaptec AIC-6915 (``Starfire'') +device sis # Silicon Integrated Systems SiS 900/SiS 7016 +#device sk # SysKonnect SK-984x & SK-982x gigabit Ethernet +device ste # Sundance ST201 (D-Link DFE-550TX) +device tl # Texas Instruments ThunderLAN +device tx # SMC EtherPower II (83c170 ``EPIC'') +#device vge # VIA VT612x gigabit Ethernet +device vr # VIA Rhine, Rhine II +device wb # Winbond W89C840F +device xl # 3Com 3c90x (``Boomerang'', ``Cyclone'') # ISA Ethernet NICs. pccard NICs included. # 'device ed' requires 'device miibus' -device ed # NE[12]000, SMC Ultra, 3c503, DS8390 cards -device ep # Etherlink III based cards -device fe # Fujitsu MB8696x based cards -device sn # SMC's 9000 series of Ethernet chips +device ed # NE[12]000, SMC Ultra, 3c503, DS8390 cards +device ep # Etherlink III based cards +device fe # Fujitsu MB8696x based cards +device sn # SMC's 9000 series of Ethernet chips device snc -device xe # Xircom pccard Ethernet +device xe # Xircom pccard Ethernet # Wireless NIC cards -#device wlan # 802.11 support -#options IEEE80211_DEBUG # enable debug msgs +#device wlan # 802.11 support +#options IEEE80211_DEBUG # enable debug msgs #options IEEE80211_AMPDU_AGE # age frames in AMPDU reorder q's options IEEE80211_SUPPORT_MESH # enable 802.11s draft support -#device wlan_wep # 802.11 WEP support -#device wlan_ccmp # 802.11 CCMP support -#device wlan_tkip # 802.11 TKIP support -#device wlan_amrr # AMRR transmit rate control algorithm -#device an # Aironet 4500/4800 802.11 wireless NICs. -#device ath # Atheros NICs -#device ath_pci # Atheros pci/cardbus glue -#device ath_hal # pci/cardbus chip support +#device wlan_wep # 802.11 WEP support +#device wlan_ccmp # 802.11 CCMP support +#device wlan_tkip # 802.11 TKIP support +#device wlan_amrr # AMRR transmit rate control algorithm +#device an # Aironet 4500/4800 802.11 wireless NICs. +#device ath # Atheros NICs +#device ath_pci # Atheros pci/cardbus glue +#device ath_hal # pci/cardbus chip support options AH_SUPPORT_AR5416 # enable AR5416 tx/rx descriptors -#device ath_rate_sample # SampleRate tx rate control for ath -#device ral # Ralink Technology RT2500 wireless NICs. -#device wi # WaveLAN/Intersil/Symbol 802.11 wireless NICs. -#device wl # Older non 802.11 Wavelan wireless NIC. +#device ath_rate_sample # SampleRate tx rate control for ath +#device ral # Ralink Technology RT2500 wireless NICs. +#device wi # WaveLAN/Intersil/Symbol 802.11 wireless NICs. +#device wl # Older non 802.11 Wavelan wireless NIC. # Pseudo devices. -device loop # Network loopback -device random # Entropy device -device ether # Ethernet support -device vlan # 802.1Q VLAN support -device tun # Packet tunnel. -device md # Memory "disks" -device gif # IPv6 and IPv4 tunneling -device faith # IPv6-to-IPv4 relaying (translation) -device firmware # firmware assist module +device loop # Network loopback +device random # Entropy device +device ether # Ethernet support +device vlan # 802.1Q VLAN support +device tun # Packet tunnel. +device md # Memory "disks" +device gif # IPv6 and IPv4 tunneling +device faith # IPv6-to-IPv4 relaying (translation) +device firmware # firmware assist module # The `bpf' device enables the Berkeley Packet Filter. # Be aware of the administrative consequences of enabling this! # Note that 'bpf' is required for DHCP. -device bpf # Berkeley packet filter +device bpf # Berkeley packet filter # USB support -#options USB_DEBUG # enable debug msgs -#device uhci # UHCI PCI->USB interface -#device ohci # OHCI PCI->USB interface -#device ehci # EHCI PCI->USB interface (USB 2.0) -#device usb # USB Bus (required) -#device ukbd # Keyboard -#device umass # Disks/Mass storage - Requires scbus and da +#options USB_DEBUG # enable debug msgs +#device uhci # UHCI PCI->USB interface +#device ohci # OHCI PCI->USB interface +#device ehci # EHCI PCI->USB interface (USB 2.0) +#device usb # USB Bus (required) +#device ukbd # Keyboard +#device umass # Disks/Mass storage - Requires scbus and da # Sound support -#device sound # Generic sound driver (required) -#device snd_mss # Microsoft Sound System -#device "snd_sb16" # Sound Blaster 16 -#device snd_sbc # Sound Blaster +#device sound # Generic sound driver (required) +#device snd_mss # Microsoft Sound System +#device "snd_sb16" # Sound Blaster 16 +#device snd_sbc # Sound Blaster From owner-svn-src-all@FreeBSD.ORG Sun Sep 28 14:39:12 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2DA3FAFA; Sun, 28 Sep 2014 14:39:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1A4AE93D; Sun, 28 Sep 2014 14:39:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8SEdB0w074709; Sun, 28 Sep 2014 14:39:11 GMT (envelope-from nyan@FreeBSD.org) Received: (from nyan@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8SEdBMm074708; Sun, 28 Sep 2014 14:39:11 GMT (envelope-from nyan@FreeBSD.org) Message-Id: <201409281439.s8SEdBMm074708@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nyan set sender to nyan@FreeBSD.org using -f From: Takahashi Yoshihiro Date: Sun, 28 Sep 2014 14:39:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272259 - head/sys/pc98/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Sep 2014 14:39:12 -0000 Author: nyan Date: Sun Sep 28 14:39:11 2014 New Revision: 272259 URL: http://svnweb.freebsd.org/changeset/base/272259 Log: MFi386: Enable QUOTA, PRINTF_BUFR_SIZE and puc. Modified: head/sys/pc98/conf/GENERIC Modified: head/sys/pc98/conf/GENERIC ============================================================================== --- head/sys/pc98/conf/GENERIC Sun Sep 28 14:25:46 2014 (r272258) +++ head/sys/pc98/conf/GENERIC Sun Sep 28 14:39:11 2014 (r272259) @@ -35,6 +35,7 @@ options SOFTUPDATES # Enable FFS soft options UFS_ACL # Support for access control lists options UFS_DIRHASH # Improve performance on big directories options UFS_GJOURNAL # Enable gjournal-based UFS journaling +options QUOTA # Enable disk quotas for UFS options MD_ROOT # MD is a potential root device options NFSCL # New Network Filesystem Client options NFSD # New Network Filesystem Server @@ -60,6 +61,7 @@ options SYSVSHM # SYSV-style shared m options SYSVMSG # SYSV-style message queues options SYSVSEM # SYSV-style semaphores options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions +options PRINTF_BUFR_SIZE=128 # Prevent printf output being interspersed. options KBD_INSTALL_CDEV # install a CDEV entry in /dev options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) options AUDIT # Security event auditing @@ -112,6 +114,7 @@ device sa # Sequential Access (tape e device cd # CD device pass # Passthrough device (direct ATA/SCSI access) device ses # Enclosure Services (SES and SAF-TE) +#device ctl # CAM Target Layer # keyboard driver device pckbd # PC98 keyboard @@ -157,6 +160,8 @@ device ppi # Parallel port interface # OLD Parallel port #device olpt +device puc # Multi I/O cards and multi-channel UARTs + # PCI Ethernet NICs. device de # DEC/Intel DC21x4x (``Tulip'') #device em # Intel PRO/1000 Gigabit Ethernet Family From owner-svn-src-all@FreeBSD.ORG Sun Sep 28 15:38:22 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A9361E43; Sun, 28 Sep 2014 15:38:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 95C53223; Sun, 28 Sep 2014 15:38:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8SFcM3D003688; Sun, 28 Sep 2014 15:38:22 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8SFcMFP003687; Sun, 28 Sep 2014 15:38:22 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201409281538.s8SFcMFP003687@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Sun, 28 Sep 2014 15:38:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272260 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Sep 2014 15:38:22 -0000 Author: bz Date: Sun Sep 28 15:38:21 2014 New Revision: 272260 URL: http://svnweb.freebsd.org/changeset/base/272260 Log: Remove duplicate declaraton of the if_inc_counter() function after r272244. if_var.h has the expected on and if_var.h include ifq.h and thus we get duplicates. It seems only one cavium ethernet file actually includes ifq.h directly which might be another cleanup to be done but need to test first. Modified: head/sys/net/ifq.h Modified: head/sys/net/ifq.h ============================================================================== --- head/sys/net/ifq.h Sun Sep 28 14:39:11 2014 (r272259) +++ head/sys/net/ifq.h Sun Sep 28 15:38:21 2014 (r272260) @@ -46,7 +46,6 @@ * is splitted from if_var.h. */ #define IF_DUNIT_NONE -1 -void if_inc_counter(struct ifnet *, ift_counter, int64_t inc); #include From owner-svn-src-all@FreeBSD.ORG Sun Sep 28 16:21:43 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 38CA694D; Sun, 28 Sep 2014 16:21:43 +0000 (UTC) Received: from mx1.sbone.de (bird.sbone.de [46.4.1.90]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id E0C84904; Sun, 28 Sep 2014 16:21:42 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id A183F25D37C7; Sun, 28 Sep 2014 16:21:32 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id C5B75C77074; Sun, 28 Sep 2014 16:21:31 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id m2TERyM86mgr; Sun, 28 Sep 2014 16:21:30 +0000 (UTC) Received: from [IPv6:fde9:577b:c1a9:4410:659f:b2ef:1a54:d54] (unknown [IPv6:fde9:577b:c1a9:4410:659f:b2ef:1a54:d54]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 0CB18C77072; Sun, 28 Sep 2014 16:21:28 +0000 (UTC) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r272260 - head/sys/net From: "Bjoern A. Zeeb" In-Reply-To: <201409281538.s8SFcMFP003687@svn.freebsd.org> Date: Sun, 28 Sep 2014 16:21:06 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <002DAFE6-C240-48E0-ACA9-5E47C011C817@FreeBSD.org> References: <201409281538.s8SFcMFP003687@svn.freebsd.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Mailer: Apple Mail (2.1878.6) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Sep 2014 16:21:43 -0000 On 28 Sep 2014, at 15:38 , Bjoern A. Zeeb wrote: > Author: bz > Date: Sun Sep 28 15:38:21 2014 > New Revision: 272260 > URL: http://svnweb.freebsd.org/changeset/base/272260 >=20 > Log: > Remove duplicate declaraton of the if_inc_counter() function after = r272244. > if_var.h has the expected on and if_var.h include ifq.h and thus we = get > duplicates. It seems only one cavium ethernet file actually includes = ifq.h > directly which might be another cleanup to be done but need to test = first. Never mind; ifq.h is included too early in if_var.h; whoever thought = that separating these things that way was a good idea; sorry. I=92ll run a universe t make sure the next one works better. > Modified: > head/sys/net/ifq.h >=20 > Modified: head/sys/net/ifq.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/sys/net/ifq.h Sun Sep 28 14:39:11 2014 = (r272259) > +++ head/sys/net/ifq.h Sun Sep 28 15:38:21 2014 = (r272260) > @@ -46,7 +46,6 @@ > * is splitted from if_var.h. > */ > #define IF_DUNIT_NONE -1 > -void if_inc_counter(struct ifnet *, ift_counter, int64_t inc); >=20 > #include >=20 >=20 =97=20 Bjoern A. Zeeb "Come on. Learn, goddamn it.", WarGames, 1983 From owner-svn-src-all@FreeBSD.ORG Sun Sep 28 17:09:40 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DADA85BF; Sun, 28 Sep 2014 17:09:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C7CFECDA; Sun, 28 Sep 2014 17:09:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8SH9eIV047461; Sun, 28 Sep 2014 17:09:40 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8SH9e0Y047460; Sun, 28 Sep 2014 17:09:40 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201409281709.s8SH9e0Y047460@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Sun, 28 Sep 2014 17:09:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272261 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Sep 2014 17:09:41 -0000 Author: bz Date: Sun Sep 28 17:09:40 2014 New Revision: 272261 URL: http://svnweb.freebsd.org/changeset/base/272261 Log: Move the unconditional #include of net/ifq.h to the very end of file. This seems to allow us to pass a universe with either clang or gcc after r272244 (and r272260) and probably makes it easier to untabgle these chained #includes in the future. Modified: head/sys/net/if_var.h Modified: head/sys/net/if_var.h ============================================================================== --- head/sys/net/if_var.h Sun Sep 28 15:38:21 2014 (r272260) +++ head/sys/net/if_var.h Sun Sep 28 17:09:40 2014 (r272261) @@ -249,8 +249,6 @@ struct ifnet { */ }; -#include /* XXXAO: temporary unconditional include */ - /* for compatibility with other BSDs */ #define if_addrlist if_addrhead #define if_list if_link @@ -608,4 +606,7 @@ int ether_poll_deregister(if_t ifp); #endif /* DEVICE_POLLING */ #endif /* _KERNEL */ + +#include /* XXXAO: temporary unconditional include */ + #endif /* !_NET_IF_VAR_H_ */ From owner-svn-src-all@FreeBSD.ORG Sun Sep 28 17:22:46 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 436A385E; Sun, 28 Sep 2014 17:22:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2FE0FE20; Sun, 28 Sep 2014 17:22:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8SHMkIV055989; Sun, 28 Sep 2014 17:22:46 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8SHMkSt055988; Sun, 28 Sep 2014 17:22:46 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201409281722.s8SHMkSt055988@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 28 Sep 2014 17:22:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272263 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Sep 2014 17:22:46 -0000 Author: tuexen Date: Sun Sep 28 17:22:45 2014 New Revision: 272263 URL: http://svnweb.freebsd.org/changeset/base/272263 Log: Checksum coverage values larger than 65535 for UDPLite are invalid. Check for this when the user calls setsockopt using UDPLITE_{SEND,RECV}CSCOV. Reviewed by: kevlo MFC after: 3 days Modified: head/sys/netinet/udp_usrreq.c Modified: head/sys/netinet/udp_usrreq.c ============================================================================== --- head/sys/netinet/udp_usrreq.c Sun Sep 28 17:16:45 2014 (r272262) +++ head/sys/netinet/udp_usrreq.c Sun Sep 28 17:22:45 2014 (r272263) @@ -1017,7 +1017,7 @@ udp_ctloutput(struct socket *so, struct INP_WLOCK(inp); up = intoudpcb(inp); KASSERT(up != NULL, ("%s: up == NULL", __func__)); - if (optval != 0 && optval < 8) { + if ((optval != 0 && optval < 8) || (optval > 65535)) { INP_WUNLOCK(inp); error = EINVAL; break; From owner-svn-src-all@FreeBSD.ORG Sun Sep 28 19:05:24 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AFE36570; Sun, 28 Sep 2014 19:05:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9B321A6B; Sun, 28 Sep 2014 19:05:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8SJ5OX7006232; Sun, 28 Sep 2014 19:05:24 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8SJ5NPg006227; Sun, 28 Sep 2014 19:05:23 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201409281905.s8SJ5NPg006227@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Sun, 28 Sep 2014 19:05:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272266 - in head/sys/dev: ce cp ctau cx ie X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Sep 2014 19:05:24 -0000 Author: melifaro Date: Sun Sep 28 19:05:22 2014 New Revision: 272266 URL: http://svnweb.freebsd.org/changeset/base/272266 Log: Convert most BPF_TAP users to BPF_MTAP. MFC after: 2 weeks Modified: head/sys/dev/ce/if_ce.c head/sys/dev/cp/if_cp.c head/sys/dev/ctau/if_ct.c head/sys/dev/cx/if_cx.c head/sys/dev/ie/if_ie.c Modified: head/sys/dev/ce/if_ce.c ============================================================================== --- head/sys/dev/ce/if_ce.c Sun Sep 28 18:34:20 2014 (r272265) +++ head/sys/dev/ce/if_ce.c Sun Sep 28 19:05:22 2014 (r272266) @@ -1133,12 +1133,7 @@ static void ce_receive (ce_chan_t *c, un m->m_pkthdr.rcvif = d->ifp; /* Check if there's a BPF listener on this interface. * If so, hand off the raw packet to bpf. */ -#if __FreeBSD_version >= 500000 - BPF_TAP (d->ifp, data, len); -#else - if (d->ifp->if_bpf) - bpf_tap (d->ifp, data, len); -#endif + BPF_MTAP(d->ifp, m); IF_ENQUEUE(&d->rqueue, m); #endif } Modified: head/sys/dev/cp/if_cp.c ============================================================================== --- head/sys/dev/cp/if_cp.c Sun Sep 28 18:34:20 2014 (r272265) +++ head/sys/dev/cp/if_cp.c Sun Sep 28 19:05:22 2014 (r272266) @@ -902,7 +902,7 @@ static void cp_receive (cp_chan_t *c, un m->m_pkthdr.rcvif = d->ifp; /* Check if there's a BPF listener on this interface. * If so, hand off the raw packet to bpf. */ - BPF_TAP (d->ifp, data, len); + BPF_MTAP(d->ifp, m); IF_ENQUEUE (&d->queue, m); #endif } Modified: head/sys/dev/ctau/if_ct.c ============================================================================== --- head/sys/dev/ctau/if_ct.c Sun Sep 28 18:34:20 2014 (r272265) +++ head/sys/dev/ctau/if_ct.c Sun Sep 28 19:05:22 2014 (r272266) @@ -1120,7 +1120,7 @@ static void ct_receive (ct_chan_t *c, ch m->m_pkthdr.rcvif = d->ifp; /* Check if there's a BPF listener on this interface. * If so, hand off the raw packet to bpf. */ - BPF_TAP (d->ifp, data, len); + BPF_MTAP(d->ifp, m); IF_ENQUEUE (&d->queue, m); #endif } Modified: head/sys/dev/cx/if_cx.c ============================================================================== --- head/sys/dev/cx/if_cx.c Sun Sep 28 18:34:20 2014 (r272265) +++ head/sys/dev/cx/if_cx.c Sun Sep 28 19:05:22 2014 (r272266) @@ -1318,7 +1318,7 @@ static void cx_receive (cx_chan_t *c, ch m->m_pkthdr.rcvif = d->ifp; /* Check if there's a BPF listener on this interface. * If so, hand off the raw packet to bpf. */ - BPF_TAP (d->ifp, data, len); + BPF_MTAP(d->ifp, m); IF_ENQUEUE (&d->queue, m); #endif } Modified: head/sys/dev/ie/if_ie.c ============================================================================== --- head/sys/dev/ie/if_ie.c Sun Sep 28 18:34:20 2014 (r272265) +++ head/sys/dev/ie/if_ie.c Sun Sep 28 19:05:22 2014 (r272266) @@ -949,6 +949,8 @@ iestart_locked(struct ifnet *ifp) if (!m) break; + BPF_MTAP(ifp, m); + buffer = sc->xmit_cbuffs[sc->xmit_count]; len = 0; @@ -961,13 +963,6 @@ iestart_locked(struct ifnet *ifp) m_freem(m0); len = max(len, ETHER_MIN_LEN); - /* - * See if bpf is listening on this interface, let it see the - * packet before we commit it to the wire. - */ - BPF_TAP(sc->ifp, - (void *)sc->xmit_cbuffs[sc->xmit_count], len); - sc->xmit_buffs[sc->xmit_count]->ie_xmit_flags = IE_XMIT_LAST|len; sc->xmit_buffs[sc->xmit_count]->ie_xmit_next = 0xffff; From owner-svn-src-all@FreeBSD.ORG Sun Sep 28 21:12:23 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EE047C4F; Sun, 28 Sep 2014 21:12:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C0A578D9; Sun, 28 Sep 2014 21:12:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8SLCN4p067732; Sun, 28 Sep 2014 21:12:23 GMT (envelope-from neel@FreeBSD.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8SLCNuA067731; Sun, 28 Sep 2014 21:12:23 GMT (envelope-from neel@FreeBSD.org) Message-Id: <201409282112.s8SLCNuA067731@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: neel set sender to neel@FreeBSD.org using -f From: Neel Natu Date: Sun, 28 Sep 2014 21:12:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272270 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Sep 2014 21:12:24 -0000 Author: neel Date: Sun Sep 28 21:12:23 2014 New Revision: 272270 URL: http://svnweb.freebsd.org/changeset/base/272270 Log: tty_rel_free() can be called more than once for the same tty so make sure that the tty is dequeued from 'tty_list' only the first time. The panic below was seen when a revoke(2) was issued on an nmdm device. In this case there was also a thread that was blocked on a read(2) on the device. The revoke(2) woke up the blocked thread which would typically return an error to userspace. In this case the reader also held the last reference on the file descriptor so fdrop() ended up calling tty_rel_free() via ttydev_close(). tty_rel_free() then tried to dequeue 'tp' again which led to the panic. panic: Bad link elm 0xfffff80042602400 prev->next != elm cpuid = 1 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe00f9c90460 kdb_backtrace() at kdb_backtrace+0x39/frame 0xfffffe00f9c90510 vpanic() at vpanic+0x189/frame 0xfffffe00f9c90590 panic() at panic+0x43/frame 0xfffffe00f9c905f0 tty_rel_free() at tty_rel_free+0x29b/frame 0xfffffe00f9c90640 ttydev_close() at ttydev_close+0x1f9/frame 0xfffffe00f9c90690 devfs_close() at devfs_close+0x298/frame 0xfffffe00f9c90720 VOP_CLOSE_APV() at VOP_CLOSE_APV+0x13c/frame 0xfffffe00f9c90770 vn_close() at vn_close+0x194/frame 0xfffffe00f9c90810 vn_closefile() at vn_closefile+0x48/frame 0xfffffe00f9c90890 devfs_close_f() at devfs_close_f+0x2c/frame 0xfffffe00f9c908c0 _fdrop() at _fdrop+0x29/frame 0xfffffe00f9c908e0 sys_read() at sys_read+0x63/frame 0xfffffe00f9c90980 amd64_syscall() at amd64_syscall+0x2b3/frame 0xfffffe00f9c90ab0 Xfast_syscall() at Xfast_syscall+0xfb/frame 0xfffffe00f9c90ab0 --- syscall (3, FreeBSD ELF64, sys_read), rip = 0x800b78d8a, rsp = 0x7fffffbfdaf8, rbp = 0x7fffffbfdb30 --- CR: https://reviews.freebsd.org/D851 Reviewed by: glebius, ed Reported by: Leon Dang Sponsored by: Nahanni Systems MFC after: 1 week Modified: head/sys/kern/tty.c Modified: head/sys/kern/tty.c ============================================================================== --- head/sys/kern/tty.c Sun Sep 28 20:06:02 2014 (r272269) +++ head/sys/kern/tty.c Sun Sep 28 21:12:23 2014 (r272270) @@ -1055,13 +1055,13 @@ tty_rel_free(struct tty *tp) tp->t_dev = NULL; tty_unlock(tp); - sx_xlock(&tty_list_sx); - TAILQ_REMOVE(&tty_list, tp, t_list); - tty_list_count--; - sx_xunlock(&tty_list_sx); - - if (dev != NULL) + if (dev != NULL) { + sx_xlock(&tty_list_sx); + TAILQ_REMOVE(&tty_list, tp, t_list); + tty_list_count--; + sx_xunlock(&tty_list_sx); destroy_dev_sched_cb(dev, tty_dealloc, tp); + } } void From owner-svn-src-all@FreeBSD.ORG Sun Sep 28 21:20:21 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 40D6C3F5; Sun, 28 Sep 2014 21:20:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2D29C9BA; Sun, 28 Sep 2014 21:20:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8SLKLFB070470; Sun, 28 Sep 2014 21:20:21 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8SLKLJs070469; Sun, 28 Sep 2014 21:20:21 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201409282120.s8SLKLJs070469@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sun, 28 Sep 2014 21:20:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272273 - head/lib/libc/stdtime X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Sep 2014 21:20:21 -0000 Author: pfg Date: Sun Sep 28 21:20:20 2014 New Revision: 272273 URL: http://svnweb.freebsd.org/changeset/base/272273 Log: Add strptime(3) support for %U and %W (take 2) Add support for the missing POSIX-2001 %U and %W features: the existing FreeBSD strptime code recognizes both directives and validates that the week number lies in the permitted range, but then simply discards the value. Initial support for the feature was written by Paul Green. David Carlier added the initial handling of tm_wday/tm_yday. Major credit goes to Andrey Chernov for detecting much of the brokenness, and rewriting/cleaning most of the code, making it much more robust. Tested independently with the strptime test from the GNU C library. PR: 137307 MFC after: 1 month Relnotes: yes Modified: head/lib/libc/stdtime/strptime.c Modified: head/lib/libc/stdtime/strptime.c ============================================================================== --- head/lib/libc/stdtime/strptime.c Sun Sep 28 21:15:30 2014 (r272272) +++ head/lib/libc/stdtime/strptime.c Sun Sep 28 21:20:20 2014 (r272273) @@ -55,10 +55,32 @@ __FBSDID("$FreeBSD$"); #include "un-namespace.h" #include "libc_private.h" #include "timelocal.h" - +#include "tzfile.h" +#include static char * _strptime(const char *, const char *, struct tm *, int *, locale_t); -#define asizeof(a) (sizeof (a) / sizeof ((a)[0])) +#define asizeof(a) (sizeof(a) / sizeof((a)[0])) + +#define FLAG_NONE (1 << 0) +#define FLAG_YEAR (1 << 1) +#define FLAG_MONTH (1 << 2) +#define FLAG_YDAY (1 << 3) +#define FLAG_MDAY (1 << 4) +#define FLAG_WDAY (1 << 5) + +/* + * Calculate the week day of the first day of a year. Valid for + * the Gregorian calendar, which began Sept 14, 1752 in the UK + * and its colonies. Ref: + * http://en.wikipedia.org/wiki/Determination_of_the_day_of_the_week + */ + +static int +first_wday_of(int year) +{ + return (((2 * (3 - (year / 100) % 4)) + (year % 100) + + ((year % 100) / 4) + (isleap(year) ? 6 : 0) + 1) % 7); +} static char * _strptime(const char *buf, const char *fmt, struct tm *tm, int *GMTp, @@ -66,9 +88,18 @@ _strptime(const char *buf, const char *f { char c; const char *ptr; + int day_offset = -1, wday_offset; + int week_offset; int i, len; + int flags; int Ealternative, Oalternative; - struct lc_time_T *tptr = __get_current_time_locale(locale); + const struct lc_time_T *tptr = __get_current_time_locale(locale); + static int start_of_month[2][13] = { + {0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365}, + {0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366} + }; + + flags = FLAG_NONE; ptr = fmt; while (*ptr != 0) { @@ -102,6 +133,7 @@ label: buf = _strptime(buf, tptr->date_fmt, tm, GMTp, locale); if (buf == NULL) return (NULL); + flags |= FLAG_WDAY | FLAG_MONTH | FLAG_MDAY | FLAG_YEAR; break; case 'C': @@ -119,19 +151,23 @@ label: if (i < 19) return (NULL); - tm->tm_year = i * 100 - 1900; + tm->tm_year = i * 100 - TM_YEAR_BASE; + flags |= FLAG_YEAR; + break; case 'c': buf = _strptime(buf, tptr->c_fmt, tm, GMTp, locale); if (buf == NULL) return (NULL); + flags |= FLAG_WDAY | FLAG_MONTH | FLAG_MDAY | FLAG_YEAR; break; case 'D': buf = _strptime(buf, "%m/%d/%y", tm, GMTp, locale); if (buf == NULL) return (NULL); + flags |= FLAG_MONTH | FLAG_MDAY | FLAG_YEAR; break; case 'E': @@ -150,6 +186,7 @@ label: buf = _strptime(buf, "%Y-%m-%d", tm, GMTp, locale); if (buf == NULL) return (NULL); + flags |= FLAG_MONTH | FLAG_MDAY | FLAG_YEAR; break; case 'R': @@ -180,6 +217,7 @@ label: buf = _strptime(buf, tptr->x_fmt, tm, GMTp, locale); if (buf == NULL) return (NULL); + flags |= FLAG_MONTH | FLAG_MDAY | FLAG_YEAR; break; case 'j': @@ -197,6 +235,8 @@ label: return (NULL); tm->tm_yday = i - 1; + flags |= FLAG_YDAY; + break; case 'M': @@ -303,7 +343,7 @@ label: return (NULL); tm->tm_wday = i; - buf += len; + flags |= FLAG_WDAY; break; case 'U': @@ -327,6 +367,14 @@ label: if (i > 53) return (NULL); + if (c == 'U') + day_offset = TM_SUNDAY; + else + day_offset = TM_MONDAY; + + + week_offset = i; + break; case 'w': @@ -338,6 +386,7 @@ label: return (NULL); tm->tm_wday = i; + flags |= FLAG_WDAY; break; @@ -374,6 +423,7 @@ label: return (NULL); tm->tm_mday = i; + flags |= FLAG_MDAY; break; @@ -413,6 +463,8 @@ label: tm->tm_mon = i; buf += len; + flags |= FLAG_MONTH; + break; case 'm': @@ -430,6 +482,7 @@ label: return (NULL); tm->tm_mon = i - 1; + flags |= FLAG_MONTH; break; @@ -471,13 +524,14 @@ label: len--; } if (c == 'Y') - i -= 1900; + i -= TM_YEAR_BASE; if (c == 'y' && i < 69) i += 100; if (i < 0) return (NULL); tm->tm_year = i; + flags |= FLAG_YEAR; break; @@ -543,10 +597,67 @@ label: break; } } + + if (!(flags & FLAG_YDAY) && (flags & FLAG_YEAR)) { + if ((flags & (FLAG_MONTH | FLAG_MDAY)) == + (FLAG_MONTH | FLAG_MDAY)) { + tm->tm_yday = start_of_month[isleap(tm->tm_year + + TM_YEAR_BASE)][tm->tm_mon] + (tm->tm_mday - 1); + flags |= FLAG_YDAY; + } else if (day_offset != -1) { + /* Set the date to the first Sunday (or Monday) + * of the specified week of the year. + */ + if (!(flags & FLAG_WDAY)) { + tm->tm_wday = day_offset; + flags |= FLAG_WDAY; + } + tm->tm_yday = (7 - + first_wday_of(tm->tm_year + TM_YEAR_BASE) + + day_offset) % 7 + (week_offset - 1) * 7 + + tm->tm_wday - day_offset; + flags |= FLAG_YDAY; + } + } + + if ((flags & (FLAG_YEAR | FLAG_YDAY)) == (FLAG_YEAR | FLAG_YDAY)) { + if (!(flags & FLAG_MONTH)) { + i = 0; + while (tm->tm_yday >= + start_of_month[isleap(tm->tm_year + + TM_YEAR_BASE)][i]) + i++; + if (i > 12) { + i = 1; + tm->tm_yday -= + start_of_month[isleap(tm->tm_year + + TM_YEAR_BASE)][12]; + tm->tm_year++; + } + tm->tm_mon = i - 1; + flags |= FLAG_MONTH; + } + if (!(flags & FLAG_MDAY)) { + tm->tm_mday = tm->tm_yday - + start_of_month[isleap(tm->tm_year + TM_YEAR_BASE)] + [tm->tm_mon] + 1; + flags |= FLAG_MDAY; + } + if (!(flags & FLAG_WDAY)) { + i = 0; + wday_offset = first_wday_of(tm->tm_year); + while (i++ <= tm->tm_yday) { + if (wday_offset++ >= 6) + wday_offset = 0; + } + tm->tm_wday = wday_offset; + flags |= FLAG_WDAY; + } + } + return ((char *)buf); } - char * strptime_l(const char * __restrict buf, const char * __restrict fmt, struct tm * __restrict tm, locale_t loc) @@ -564,6 +675,7 @@ strptime_l(const char * __restrict buf, return (ret); } + char * strptime(const char * __restrict buf, const char * __restrict fmt, struct tm * __restrict tm) From owner-svn-src-all@FreeBSD.ORG Sun Sep 28 21:25:59 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C8A1B5BD; Sun, 28 Sep 2014 21:25:59 +0000 (UTC) Received: from mail-pa0-x236.google.com (mail-pa0-x236.google.com [IPv6:2607:f8b0:400e:c03::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8D2E8AA7; Sun, 28 Sep 2014 21:25:59 +0000 (UTC) Received: by mail-pa0-f54.google.com with SMTP id ey11so4728673pad.13 for ; Sun, 28 Sep 2014 14:25:59 -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:from:subject:date:to; bh=2n1NNx+I6SwVQeg3iqH9NvmekgrXszTQYzB8kZvRwtE=; b=cIqGEcO9sYMQ2VhYSUIAbpoeeU61rcqET0H2Unie4yMgDOzXngnlx5+6v92vB88I8y 2IfoN2WcPBuJQF9PkcNxXxYOW8qpbckzDHsx1a+UehXLGVZYOImdoc8geHh2ZcGbkf2f +JGpqej+/d1hAsybjQrp+MN7aFkW69hri1exvBpRWWbYT4mlzSKEu4932+zmoizJwfjl TzJ89YTZtz4bi5HEhpmN1jfW4cxBVCE3kMDB6aJHATWHHGg5kwntsqTyhdgWcLFrS8Yu /2RxieROcg2QfOyxcfO3sV0mbnxJmDQuC0tZX9PfpArOFBkUmHTe54J+ubh7EjvE93Hz l+bA== X-Received: by 10.68.197.65 with SMTP id is1mr53239109pbc.125.1411939559190; Sun, 28 Sep 2014 14:25:59 -0700 (PDT) Received: from [192.168.20.11] (c-98-247-240-204.hsd1.wa.comcast.net. [98.247.240.204]) by mx.google.com with ESMTPSA id qs4sm10417079pbb.90.2014.09.28.14.25.58 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 28 Sep 2014 14:25:58 -0700 (PDT) References: <201409282112.s8SLCNuA067731@svn.freebsd.org> Mime-Version: 1.0 (1.0) In-Reply-To: <201409282112.s8SLCNuA067731@svn.freebsd.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Message-Id: X-Mailer: iPhone Mail (11D257) From: Garrett Cooper Subject: Re: svn commit: r272270 - head/sys/kern Date: Sun, 28 Sep 2014 14:25:56 -0700 To: Neel Natu Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Sep 2014 21:25:59 -0000 Hi Neel! Thank you for fixing this. I think we've run into similar issues with cu= stomizations to the tty code at Isilon. I have one comment... Thanks! > On Sep 28, 2014, at 14:12, Neel Natu wrote: >=20 > Author: neel > Date: Sun Sep 28 21:12:23 2014 > New Revision: 272270 > URL: http://svnweb.freebsd.org/changeset/base/272270 >=20 > Log: > tty_rel_free() can be called more than once for the same tty so make sure= > that the tty is dequeued from 'tty_list' only the first time. >=20 > The panic below was seen when a revoke(2) was issued on an nmdm device. > In this case there was also a thread that was blocked on a read(2) on the= > device. The revoke(2) woke up the blocked thread which would typically > return an error to userspace. In this case the reader also held the last > reference on the file descriptor so fdrop() ended up calling tty_rel_free= () > via ttydev_close(). >=20 > tty_rel_free() then tried to dequeue 'tp' again which led to the panic. >=20 > panic: Bad link elm 0xfffff80042602400 prev->next !=3D elm > cpuid =3D 1 > KDB: stack backtrace: > db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe00f9c= 90460 > kdb_backtrace() at kdb_backtrace+0x39/frame 0xfffffe00f9c90510 > vpanic() at vpanic+0x189/frame 0xfffffe00f9c90590 > panic() at panic+0x43/frame 0xfffffe00f9c905f0 > tty_rel_free() at tty_rel_free+0x29b/frame 0xfffffe00f9c90640 > ttydev_close() at ttydev_close+0x1f9/frame 0xfffffe00f9c90690 > devfs_close() at devfs_close+0x298/frame 0xfffffe00f9c90720 > VOP_CLOSE_APV() at VOP_CLOSE_APV+0x13c/frame 0xfffffe00f9c90770 > vn_close() at vn_close+0x194/frame 0xfffffe00f9c90810 > vn_closefile() at vn_closefile+0x48/frame 0xfffffe00f9c90890 > devfs_close_f() at devfs_close_f+0x2c/frame 0xfffffe00f9c908c0 > _fdrop() at _fdrop+0x29/frame 0xfffffe00f9c908e0 > sys_read() at sys_read+0x63/frame 0xfffffe00f9c90980 > amd64_syscall() at amd64_syscall+0x2b3/frame 0xfffffe00f9c90ab0 > Xfast_syscall() at Xfast_syscall+0xfb/frame 0xfffffe00f9c90ab0 > --- syscall (3, FreeBSD ELF64, sys_read), rip =3D 0x800b78d8a, rsp =3D 0x= 7fffffbfdaf8, rbp =3D 0x7fffffbfdb30 --- >=20 > CR: https://reviews.freebsd.org/D851 > Reviewed by: glebius, ed > Reported by: Leon Dang > Sponsored by: Nahanni Systems > MFC after: 1 week >=20 > Modified: > head/sys/kern/tty.c >=20 > Modified: head/sys/kern/tty.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > --- head/sys/kern/tty.c Sun Sep 28 20:06:02 2014 (r272269) > +++ head/sys/kern/tty.c Sun Sep 28 21:12:23 2014 (r272270) > @@ -1055,13 +1055,13 @@ tty_rel_free(struct tty *tp) > tp->t_dev =3D NULL; > tty_unlock(tp); >=20 > - sx_xlock(&tty_list_sx); > - TAILQ_REMOVE(&tty_list, tp, t_list); > - tty_list_count--; > - sx_xunlock(&tty_list_sx); > - > - if (dev !=3D NULL) > + if (dev !=3D NULL) { if (dev =3D=3D NULL) return; Would be result in less change in an MFC. > + sx_xlock(&tty_list_sx); > + TAILQ_REMOVE(&tty_list, tp, t_list); > + tty_list_count--; > + sx_xunlock(&tty_list_sx); > destroy_dev_sched_cb(dev, tty_dealloc, tp); > + } > } >=20 > void From owner-svn-src-all@FreeBSD.ORG Sun Sep 28 21:27:44 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 00BFC6FE; Sun, 28 Sep 2014 21:27:43 +0000 (UTC) Received: from mail-pd0-x22c.google.com (mail-pd0-x22c.google.com [IPv6:2607:f8b0:400e:c02::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B9C45AAF; Sun, 28 Sep 2014 21:27:43 +0000 (UTC) Received: by mail-pd0-f172.google.com with SMTP id g10so4093547pdj.17 for ; Sun, 28 Sep 2014 14:27:43 -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:from:subject:date:to; bh=WGKfrGfI3g3TSpozrEOMQe+K1BEgfzJbg16kv3GrirI=; b=YMQHbwVtE9xzv2WViBK1o8U7ynl885wR1ZAmEXip63MpXM/yZkkfcG6/9h9Aeb4qOC AvDjPUf2kdxdDV7BL6beH4RBqjNf64a+rjHEK6/nBLCGg0JIl8nDp0Kkv7XpTaF9qdek cgTyU8MfTPG/FYJvMUS2RJfE5szvh6Z50wlN/NRv1oiKmjHCPexCGvXLGksfccx9xFpl ZIZEYy25gevo9pTvzXBtVUN7+uFwwEF2dDL5ClWDnxMUoiKXVLzyzztIK01d2fmxc2jU 8o2oGQoMIgajEjwtuUk0ItdG1DkayFTWeROFWSajNzbhv5mZ1+tPGakNNDv1fCjMs7Xg 1Yog== X-Received: by 10.70.119.105 with SMTP id kt9mr47810050pdb.7.1411939663191; Sun, 28 Sep 2014 14:27:43 -0700 (PDT) Received: from [192.168.20.11] (c-98-247-240-204.hsd1.wa.comcast.net. [98.247.240.204]) by mx.google.com with ESMTPSA id rg1sm10507408pdb.14.2014.09.28.14.27.42 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 28 Sep 2014 14:27:42 -0700 (PDT) References: <201409282120.s8SLKLJs070469@svn.freebsd.org> Mime-Version: 1.0 (1.0) In-Reply-To: <201409282120.s8SLKLJs070469@svn.freebsd.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: X-Mailer: iPhone Mail (11D257) From: Garrett Cooper Subject: Re: svn commit: r272273 - head/lib/libc/stdtime Date: Sun, 28 Sep 2014 14:27:40 -0700 To: "Pedro F. Giffuni" Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Sep 2014 21:27:44 -0000 > On Sep 28, 2014, at 14:20, "Pedro F. Giffuni" wrote: > > Author: pfg > Date: Sun Sep 28 21:20:20 2014 > New Revision: 272273 > URL: http://svnweb.freebsd.org/changeset/base/272273 > > Log: > Add strptime(3) support for %U and %W (take 2) > > Add support for the missing POSIX-2001 %U and %W features: the > existing FreeBSD strptime code recognizes both directives and > validates that the week number lies in the permitted range, > but then simply discards the value. > > Initial support for the feature was written by Paul Green. > David Carlier added the initial handling of tm_wday/tm_yday. > Major credit goes to Andrey Chernov for detecting much of the > brokenness, and rewriting/cleaning most of the code, making it > much more robust. > > Tested independently with the strptime test from the GNU C > library. I'll try the netbsd testcases as well. Thanks! From owner-svn-src-all@FreeBSD.ORG Sun Sep 28 21:44:24 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4A9A0CCD; Sun, 28 Sep 2014 21:44:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 36C4CC54; Sun, 28 Sep 2014 21:44:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8SLiOHb082039; Sun, 28 Sep 2014 21:44:24 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8SLiO6C082038; Sun, 28 Sep 2014 21:44:24 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201409282144.s8SLiO6C082038@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Sun, 28 Sep 2014 21:44:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272274 - head/usr.sbin/bsdinstall/scripts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Sep 2014 21:44:24 -0000 Author: allanjude (doc committer) Date: Sun Sep 28 21:44:23 2014 New Revision: 272274 URL: http://svnweb.freebsd.org/changeset/base/272274 Log: Change the /var dataset in the default ZFS layout to have the ZFS property canmount=off so that /var/db/pkg and other such directories are part of the / dataset, and only /var/mail, /var/log, and /var/crash are excluded from the ZFS boot environment (beadm). PR: 193971 Approved by: jmg MFC after: ASAP Relnotes: yes Sponsored by: ScaleEngine Inc. Modified: head/usr.sbin/bsdinstall/scripts/zfsboot Modified: head/usr.sbin/bsdinstall/scripts/zfsboot ============================================================================== --- head/usr.sbin/bsdinstall/scripts/zfsboot Sun Sep 28 21:20:20 2014 (r272273) +++ head/usr.sbin/bsdinstall/scripts/zfsboot Sun Sep 28 21:44:23 2014 (r272274) @@ -156,7 +156,7 @@ f_isset ZFSBOOT_DATASETS || ZFSBOOT_DATA /usr/src # Create /var and friends - /var mountpoint=/var + /var mountpoint=/var,canmount=off /var/crash exec=off,setuid=off /var/log exec=off,setuid=off /var/mail atime=on From owner-svn-src-all@FreeBSD.ORG Sun Sep 28 21:47:31 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B8FD5E5B for ; Sun, 28 Sep 2014 21:47:31 +0000 (UTC) Received: from nm24-vm0.bullet.mail.bf1.yahoo.com (nm24-vm0.bullet.mail.bf1.yahoo.com [98.139.213.161]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5C2AFC7C for ; Sun, 28 Sep 2014 21:47:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1411940844; bh=g+jjBEy2hLs762o1qE5jcmTuxZo5O0sceLVQOjTlNgQ=; h=Received:Received:Received:X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding:From:Subject; b=LulEXn5pCVMkLmyfnuefjCQxChp89kZjKlf9yyGgX/OY2l4A/HKSdBcXbrttItXiegxEGD908LZVu7/4FhgH4PPC8AkPHEDTgtFaLJ75jgzDJbzptR8myF7ZJ1L/mfzctHISylaSNYGZ3Mdq+DHUqfNA1uyrPzCNPBZQJWpyFm7/pdNlFSrYrX1RuNIrNDR0LN5s8e4EGbFaOcW8VJDG8NtYNPG+qVsGz2MFf0rWEfH0Y6Fizkk0I+6u678MBFbD/hZ9RP8Txgn4HkDfc03n/ProVS3IGTFw+npj49oBaMiwULYLWxvzNJByzg/aTXswz4dV94gGLexyd5wBe4lAdA== DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s2048; d=yahoo.com; b=FrY8GFkZFtrtpmVh+pINMFx9iVbjybSysIwLDwq+/VsleU1zzKS1duD+n2DSansiCZBVhO/eiXeYa5oq1oC6sxpxiCnddH0J3vBFv/EHt8UuDQpFTBuxqkRZfRVcCKROkcXFFswgwK+4cl+gam22bM0DWsgC5rqCh/x3+q5RSfIdA02J37C3LZolslKvrVC/ZVvEswT6l9odsQmiB/Y9f/+VgX3wUXYzM9lOVqnxkmzoN4ks3YX7dwAEK+DTDxHalalOhdBREnMxXEkyIisEdDK8CCDNKdNwFEt32r/jN7r3a+NUP45X928VO8POLUJigRspOp1jrOeYBqRijTEt8w==; Received: from [98.139.212.152] by nm24.bullet.mail.bf1.yahoo.com with NNFMP; 28 Sep 2014 21:47:24 -0000 Received: from [98.139.211.162] by tm9.bullet.mail.bf1.yahoo.com with NNFMP; 28 Sep 2014 21:47:24 -0000 Received: from [127.0.0.1] by smtp219.mail.bf1.yahoo.com with NNFMP; 28 Sep 2014 21:47:24 -0000 X-Yahoo-Newman-Id: 98092.50548.bm@smtp219.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: DYyrPi4VM1lLfBTBUuy9Mh0R8r5G72IvQs9vU8d0rj8fxHo MCnwhFXhxzusy4v5VScp5YOHY9iGWbZ1pfKc4M2SKy5W718p7KLPCDmL9YfZ 5CKFTD12GgAqLFRV5.WibDGO80Ygx2cT5KISIKP0wZI5Y82FC4amwGp75myk Kj4yDlRBiZPE9W2s87ZJTX0SDRchthxefA5pEpCZblDEHPa_h2cUwf34lRUj xR4yqnJ4atMOoHV1lEdWJs1ckQH1ePDMO_DYb7fzVIdcmlzDrrsbfEcWNHV3 L72VCuInMy9FZP8asrv7ezJALWszEw83UzxSzWU8JyKCiUCwEHgLkBFsXunC 73H3NQ5rOJG0rz9bgN9PzdG6fltQgDZmgRuNh89EzWoZPObGjum.fXHT8R5_ fA0Ff.q1ILesOVAEqtMfS1BTjIHu4ZaYaq7XafyQpL_qyFw2XZ5rmItIeSkY BnQoTkyVz48D0ccWcf6YbNH9a7gSq6IVyd7YI12Daoz.bs0GP_v7TRjpQEKh LAMqKiDXu_5mQXh9sFptbdUzTxcd1E2Y0ig-- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Message-ID: <542881F2.2090000@freebsd.org> Date: Sun, 28 Sep 2014 16:47:30 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Garrett Cooper Subject: Re: svn commit: r272273 - head/lib/libc/stdtime References: <201409282120.s8SLKLJs070469@svn.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" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Sep 2014 21:47:31 -0000 On 09/28/14 16:27, Garrett Cooper wrote: >> On Sep 28, 2014, at 14:20, "Pedro F. Giffuni" wrote: >> >> Author: pfg >> Date: Sun Sep 28 21:20:20 2014 >> New Revision: 272273 >> URL: http://svnweb.freebsd.org/changeset/base/272273 >> >> Log: >> Add strptime(3) support for %U and %W (take 2) >> >> Add support for the missing POSIX-2001 %U and %W features: the >> existing FreeBSD strptime code recognizes both directives and >> validates that the week number lies in the permitted range, >> but then simply discards the value. >> >> Initial support for the feature was written by Paul Green. >> David Carlier added the initial handling of tm_wday/tm_yday. >> Major credit goes to Andrey Chernov for detecting much of the >> brokenness, and rewriting/cleaning most of the code, making it >> much more robust. >> >> Tested independently with the strptime test from the GNU C >> library. > I'll try the netbsd testcases as well. > Thanks! Great! It may be that NetBSD doesn't support %U %W. Still, it would be really interesting to run the NetBSD tests after applying the patch here: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=93197 Regards, Pedro. From owner-svn-src-all@FreeBSD.ORG Sun Sep 28 21:49:05 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A2C67FB1; Sun, 28 Sep 2014 21:49:05 +0000 (UTC) Received: from mail-qg0-x230.google.com (mail-qg0-x230.google.com [IPv6:2607:f8b0:400d:c04::230]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2F185C8F; Sun, 28 Sep 2014 21:49:05 +0000 (UTC) Received: by mail-qg0-f48.google.com with SMTP id i50so1048770qgf.21 for ; Sun, 28 Sep 2014 14:49: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=CFQRoNm59wG646LQiZIILY+/sB5D+wy0HnilXeBZU/k=; b=A0374GitBXdRc5slSF/iJEmiHhIOxFHpMiOPtIv/+EsnwcwW3Wv/k5eDkaS/JhgDcj wkyJWYFXzEMlrF5DjYCtK//Sk56f23abpk3ppQTyYuG1xihq4iYz4u+/yE6Dpfx+xY2i rq0+xsnneBopzJwVF9MUJb9esITJmHNyyIpHxC1GQZ2gZGtGUlHnWB0GZ+96uMIq9dDQ vpAdamsp3/NqAZwA28r+2xrUaPMg3qp88yFiRsUFu1GbUjow3HtUdP7Ududou7lA26Pe YKRdGgud8HiW3XGZqVf7+g7vcL0hj+dq7GdKQl5HDZ40kIXOyFQfllBFn5YeE0zvPa5h 9pAw== MIME-Version: 1.0 X-Received: by 10.140.28.8 with SMTP id 8mr55216837qgy.19.1411940944231; Sun, 28 Sep 2014 14:49:04 -0700 (PDT) Received: by 10.140.97.100 with HTTP; Sun, 28 Sep 2014 14:49:04 -0700 (PDT) In-Reply-To: References: <201409282112.s8SLCNuA067731@svn.freebsd.org> Date: Sun, 28 Sep 2014 14:49:04 -0700 Message-ID: Subject: Re: svn commit: r272270 - head/sys/kern From: Neel Natu To: Garrett Cooper Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Neel Natu X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Sep 2014 21:49:05 -0000 Hi, On Sun, Sep 28, 2014 at 2:25 PM, Garrett Cooper wrote: > Hi Neel! > Thank you for fixing this. I think we've run into similar issues with customizations to the tty code at Isilon. I have one comment... > Thanks! > Happy to help. >> On Sep 28, 2014, at 14:12, Neel Natu wrote: >> >> Author: neel >> Date: Sun Sep 28 21:12:23 2014 >> New Revision: 272270 >> URL: http://svnweb.freebsd.org/changeset/base/272270 >> >> Log: >> tty_rel_free() can be called more than once for the same tty so make sure >> that the tty is dequeued from 'tty_list' only the first time. >> >> The panic below was seen when a revoke(2) was issued on an nmdm device. >> In this case there was also a thread that was blocked on a read(2) on the >> device. The revoke(2) woke up the blocked thread which would typically >> return an error to userspace. In this case the reader also held the last >> reference on the file descriptor so fdrop() ended up calling tty_rel_free() >> via ttydev_close(). >> >> tty_rel_free() then tried to dequeue 'tp' again which led to the panic. >> >> panic: Bad link elm 0xfffff80042602400 prev->next != elm >> cpuid = 1 >> KDB: stack backtrace: >> db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe00f9c90460 >> kdb_backtrace() at kdb_backtrace+0x39/frame 0xfffffe00f9c90510 >> vpanic() at vpanic+0x189/frame 0xfffffe00f9c90590 >> panic() at panic+0x43/frame 0xfffffe00f9c905f0 >> tty_rel_free() at tty_rel_free+0x29b/frame 0xfffffe00f9c90640 >> ttydev_close() at ttydev_close+0x1f9/frame 0xfffffe00f9c90690 >> devfs_close() at devfs_close+0x298/frame 0xfffffe00f9c90720 >> VOP_CLOSE_APV() at VOP_CLOSE_APV+0x13c/frame 0xfffffe00f9c90770 >> vn_close() at vn_close+0x194/frame 0xfffffe00f9c90810 >> vn_closefile() at vn_closefile+0x48/frame 0xfffffe00f9c90890 >> devfs_close_f() at devfs_close_f+0x2c/frame 0xfffffe00f9c908c0 >> _fdrop() at _fdrop+0x29/frame 0xfffffe00f9c908e0 >> sys_read() at sys_read+0x63/frame 0xfffffe00f9c90980 >> amd64_syscall() at amd64_syscall+0x2b3/frame 0xfffffe00f9c90ab0 >> Xfast_syscall() at Xfast_syscall+0xfb/frame 0xfffffe00f9c90ab0 >> --- syscall (3, FreeBSD ELF64, sys_read), rip = 0x800b78d8a, rsp = 0x7fffffbfdaf8, rbp = 0x7fffffbfdb30 --- >> >> CR: https://reviews.freebsd.org/D851 >> Reviewed by: glebius, ed >> Reported by: Leon Dang >> Sponsored by: Nahanni Systems >> MFC after: 1 week >> >> Modified: >> head/sys/kern/tty.c >> >> Modified: head/sys/kern/tty.c >> ============================================================================== >> --- head/sys/kern/tty.c Sun Sep 28 20:06:02 2014 (r272269) >> +++ head/sys/kern/tty.c Sun Sep 28 21:12:23 2014 (r272270) >> @@ -1055,13 +1055,13 @@ tty_rel_free(struct tty *tp) >> tp->t_dev = NULL; >> tty_unlock(tp); >> >> - sx_xlock(&tty_list_sx); >> - TAILQ_REMOVE(&tty_list, tp, t_list); >> - tty_list_count--; >> - sx_xunlock(&tty_list_sx); >> - >> - if (dev != NULL) >> + if (dev != NULL) { > > if (dev == NULL) > return; > > Would be result in less change in an MFC. > Yes, indeed. I don't think it makes any difference in readability though. best Neel >> + sx_xlock(&tty_list_sx); >> + TAILQ_REMOVE(&tty_list, tp, t_list); >> + tty_list_count--; >> + sx_xunlock(&tty_list_sx); >> destroy_dev_sched_cb(dev, tty_dealloc, tp); >> + } >> } >> >> void From owner-svn-src-all@FreeBSD.ORG Sun Sep 28 23:15:19 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1634B10; Sun, 28 Sep 2014 23:15:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 01922644; Sun, 28 Sep 2014 23:15:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8SNFIqI025502; Sun, 28 Sep 2014 23:15:18 GMT (envelope-from wblock@FreeBSD.org) Received: (from wblock@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8SNFIge025501; Sun, 28 Sep 2014 23:15:18 GMT (envelope-from wblock@FreeBSD.org) Message-Id: <201409282315.s8SNFIge025501@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: wblock set sender to wblock@FreeBSD.org using -f From: Warren Block Date: Sun, 28 Sep 2014 23:15:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272275 - stable/10/etc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Sep 2014 23:15:19 -0000 Author: wblock (doc committer) Date: Sun Sep 28 23:15:18 2014 New Revision: 272275 URL: http://svnweb.freebsd.org/changeset/base/272275 Log: MFC r272137: Revised to better point to release notes and errata, security advisories, and be more specific about the -questions list. Approved by: re (gjb) Modified: stable/10/etc/motd Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/motd ============================================================================== --- stable/10/etc/motd Sun Sep 28 21:44:23 2014 (r272274) +++ stable/10/etc/motd Sun Sep 28 23:15:18 2014 (r272275) @@ -1,12 +1,13 @@ FreeBSD ?.?.? (UNKNOWN) -Welcome to FreeBSD! Handy technical support resources: +Welcome to FreeBSD! -Security advisories and errata: https://www.FreeBSD.org/releases/ -Handbook: https://www.FreeBSD.org/handbook/ -FAQ: https://www.FreeBSD.org/faq/ -Mailing list: https://lists.FreeBSD.org/mailman/listinfo/freebsd-questions/ -Forums: https://forums.FreeBSD.org/ +Release Notes, Errata: https://www.FreeBSD.org/releases/ +Security Advisories: https://www.FreeBSD.org/security/ +FreeBSD Handbook: https://www.FreeBSD.org/handbook/ +FreeBSD FAQ: https://www.FreeBSD.org/faq/ +Questions List: https://lists.FreeBSD.org/mailman/listinfo/freebsd-questions/ +FreeBSD Forums: https://forums.FreeBSD.org/ Documents installed with the system are in the /usr/local/share/doc/freebsd/ directory, or can be installed later with: pkg install en-freebsd-doc @@ -14,7 +15,6 @@ For other languages, replace "en" with a Show the version of FreeBSD installed: uname -a Please include that output and any error messages when posting questions. - Introduction to manual pages: man man FreeBSD directory layout: man hier From owner-svn-src-all@FreeBSD.ORG Sun Sep 28 23:22:47 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4C79F204; Sun, 28 Sep 2014 23:22:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 37E31757; Sun, 28 Sep 2014 23:22:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8SNMlA5029916; Sun, 28 Sep 2014 23:22:47 GMT (envelope-from wblock@FreeBSD.org) Received: (from wblock@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8SNMlGF029915; Sun, 28 Sep 2014 23:22:47 GMT (envelope-from wblock@FreeBSD.org) Message-Id: <201409282322.s8SNMlGF029915@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: wblock set sender to wblock@FreeBSD.org using -f From: Warren Block Date: Sun, 28 Sep 2014 23:22:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r272276 - stable/9/etc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Sep 2014 23:22:47 -0000 Author: wblock (doc committer) Date: Sun Sep 28 23:22:46 2014 New Revision: 272276 URL: http://svnweb.freebsd.org/changeset/base/272276 Log: MFC r272137: Revised to better point to release notes and errata, security advisories, and be more specific about the -questions list. Modified: stable/9/etc/motd Directory Properties: stable/9/etc/ (props changed) Modified: stable/9/etc/motd ============================================================================== --- stable/9/etc/motd Sun Sep 28 23:15:18 2014 (r272275) +++ stable/9/etc/motd Sun Sep 28 23:22:46 2014 (r272276) @@ -1,12 +1,13 @@ FreeBSD ?.?.? (UNKNOWN) -Welcome to FreeBSD! Handy technical support resources: +Welcome to FreeBSD! -Security advisories and errata: https://www.FreeBSD.org/releases/ -Handbook: https://www.FreeBSD.org/handbook/ -FAQ: https://www.FreeBSD.org/faq/ -Mailing list: https://lists.FreeBSD.org/mailman/listinfo/freebsd-questions/ -Forums: https://forums.FreeBSD.org/ +Release Notes, Errata: https://www.FreeBSD.org/releases/ +Security Advisories: https://www.FreeBSD.org/security/ +FreeBSD Handbook: https://www.FreeBSD.org/handbook/ +FreeBSD FAQ: https://www.FreeBSD.org/faq/ +Questions List: https://lists.FreeBSD.org/mailman/listinfo/freebsd-questions/ +FreeBSD Forums: https://forums.FreeBSD.org/ Documents installed with the system are in the /usr/local/share/doc/freebsd/ directory, or can be installed later with: pkg install en-freebsd-doc @@ -14,7 +15,6 @@ For other languages, replace "en" with a Show the version of FreeBSD installed: uname -a Please include that output and any error messages when posting questions. - Introduction to manual pages: man man FreeBSD directory layout: man hier From owner-svn-src-all@FreeBSD.ORG Mon Sep 29 00:35:13 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6CCF1D32; Mon, 29 Sep 2014 00:35:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 57A21CF9; Mon, 29 Sep 2014 00:35:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8T0ZDkq063903; Mon, 29 Sep 2014 00:35:13 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8T0ZC2I063901; Mon, 29 Sep 2014 00:35:12 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201409290035.s8T0ZC2I063901@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 29 Sep 2014 00:35:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272278 - in head/usr.sbin/bsdinstall: distextract distfetch X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Sep 2014 00:35:13 -0000 Author: dteske Date: Mon Sep 29 00:35:12 2014 New Revision: 272278 URL: http://svnweb.freebsd.org/changeset/base/272278 Log: Use snprintf(3) in place of unbounded sprintf(3) (prevent buffer overflow). Use adequately sized buffer for error(s) (512 -> PATH_MAX + 512). Fix the following style(9) nits while here: - distfetch.c uses PATH_MAX while distextract.c uses MAXPATHLEN; standardize on one (PATH_MAX) - Move $FreeBSD$ from comment to __FBSDID() - Sort included headers (alphabetically, sys/* at top) - Add missing header includes (e.g., for getenv(3), calloc(3)/malloc(3)/free(3), and atoi(3); for strdup(3), strrchr(3), strsep(3), and strcmp(3); for isspace(3); and for chdir(2), etc.) - Remove rogue newline at end of distfetch.c - Don't declare variables in if-, while-, or other statement NB: To prevent masking of prior declarations atop function - Perform stack alignment for variable declarations - Add missing function prototype for count_files() in distextract.c - Break out single-line multivariable-declarations NB: Aligning similarly-named variables with one-char difference(s) NB: Minimizes diffs and makes future diffs more clear - Use err(3) family of functions (requires s/int err;/int retval;/g) Reviewed by: nwhitehorn, julian Modified: head/usr.sbin/bsdinstall/distextract/distextract.c head/usr.sbin/bsdinstall/distfetch/distfetch.c Modified: head/usr.sbin/bsdinstall/distextract/distextract.c ============================================================================== --- head/usr.sbin/bsdinstall/distextract/distextract.c Sun Sep 28 23:22:55 2014 (r272277) +++ head/usr.sbin/bsdinstall/distextract/distextract.c Mon Sep 29 00:35:12 2014 (r272278) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2011 Nathan Whitehorn + * Copyright (c) 2014 Devin Teske * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -22,30 +23,38 @@ * 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$ */ +#include +__FBSDID("$FreeBSD$"); + #include -#include -#include -#include #include +#include #include +#include +#include +#include +#include +#include +#include +#include -static int extract_files(int nfiles, const char **files); +static int count_files(const char *file); +static int extract_files(int nfiles, const char **files); int main(void) { - char *diststring; const char **dists; - int i, retval, ndists = 0; + char *diststring; + int i; + int ndists = 0; + int retval; + char error[PATH_MAX + 512]; - if (getenv("DISTRIBUTIONS") == NULL) { - fprintf(stderr, "DISTRIBUTIONS variable is not set\n"); - return (1); - } + if (getenv("DISTRIBUTIONS") == NULL) + errx(EXIT_FAILURE, "DISTRIBUTIONS variable is not set"); diststring = strdup(getenv("DISTRIBUTIONS")); for (i = 0; diststring[i] != 0; i++) @@ -55,9 +64,8 @@ main(void) dists = calloc(ndists, sizeof(const char *)); if (dists == NULL) { - fprintf(stderr, "Out of memory!\n"); free(diststring); - return (1); + errx(EXIT_FAILURE, "Out of memory!"); } for (i = 0; i < ndists; i++) @@ -68,12 +76,12 @@ main(void) dlg_put_backtitle(); if (chdir(getenv("BSDINSTALL_CHROOT")) != 0) { - char error[512]; - sprintf(error, "Could could change to directory %s: %s\n", + snprintf(error, sizeof(error), + "Could could change to directory %s: %s\n", getenv("BSDINSTALL_DISTDIR"), strerror(errno)); dialog_msgbox("Error", error, 0, 0, TRUE); end_dialog(); - return (1); + return (EXIT_FAILURE); } retval = extract_files(ndists, dists); @@ -89,22 +97,24 @@ main(void) static int count_files(const char *file) { + static FILE *manifest = NULL; + char *tok1; + char *tok2; + int file_count; + int retval; struct archive *archive; struct archive_entry *entry; - static FILE *manifest = NULL; - char path[MAXPATHLEN]; - char errormsg[512]; - int file_count, err; + char line[512]; + char path[PATH_MAX]; + char errormsg[PATH_MAX + 512]; if (manifest == NULL) { - sprintf(path, "%s/MANIFEST", getenv("BSDINSTALL_DISTDIR")); + snprintf(path, sizeof(path), "%s/MANIFEST", + getenv("BSDINSTALL_DISTDIR")); manifest = fopen(path, "r"); } if (manifest != NULL) { - char line[512]; - char *tok1, *tok2; - rewind(manifest); while (fgets(line, sizeof(line), manifest) != NULL) { tok2 = line; @@ -127,9 +137,10 @@ count_files(const char *file) archive = archive_read_new(); archive_read_support_format_all(archive); archive_read_support_filter_all(archive); - sprintf(path, "%s/%s", getenv("BSDINSTALL_DISTDIR"), file); - err = archive_read_open_filename(archive, path, 4096); - if (err != ARCHIVE_OK) { + snprintf(path, sizeof(path), "%s/%s", getenv("BSDINSTALL_DISTDIR"), + file); + retval = archive_read_open_filename(archive, path, 4096); + if (retval != ARCHIVE_OK) { snprintf(errormsg, sizeof(errormsg), "Error while extracting %s: %s\n", file, archive_error_string(archive)); @@ -148,19 +159,21 @@ count_files(const char *file) static int extract_files(int nfiles, const char **files) { - const char *items[nfiles*2]; - char path[PATH_MAX]; + int archive_file; int archive_files[nfiles]; - int total_files, current_files, archive_file; + int current_files = 0; + int i; + int last_progress; + int progress = 0; + int retval; + int total_files = 0; struct archive *archive; struct archive_entry *entry; - char errormsg[512]; char status[8]; - int i, err, progress, last_progress; + char path[PATH_MAX]; + char errormsg[PATH_MAX + 512]; + const char *items[nfiles*2]; - err = 0; - progress = 0; - /* Make the transfer list for dialog */ for (i = 0; i < nfiles; i++) { items[i*2] = strrchr(files[i], '/'); @@ -175,7 +188,6 @@ extract_files(int nfiles, const char **f "Checking distribution archives.\nPlease wait...", 0, 0, FALSE); /* Count all the files */ - total_files = 0; for (i = 0; i < nfiles; i++) { archive_files[i] = count_files(files[i]); if (archive_files[i] < 0) @@ -183,24 +195,23 @@ extract_files(int nfiles, const char **f total_files += archive_files[i]; } - current_files = 0; - for (i = 0; i < nfiles; i++) { archive = archive_read_new(); archive_read_support_format_all(archive); archive_read_support_filter_all(archive); - sprintf(path, "%s/%s", getenv("BSDINSTALL_DISTDIR"), files[i]); - err = archive_read_open_filename(archive, path, 4096); + snprintf(path, sizeof(path), "%s/%s", + getenv("BSDINSTALL_DISTDIR"), files[i]); + retval = archive_read_open_filename(archive, path, 4096); items[i*2 + 1] = "In Progress"; archive_file = 0; - while ((err = archive_read_next_header(archive, &entry)) == + while ((retval = archive_read_next_header(archive, &entry)) == ARCHIVE_OK) { last_progress = progress; progress = (current_files*100)/total_files; - sprintf(status, "-%d", + snprintf(status, sizeof(status), "-%d", (archive_file*100)/archive_files[i]); items[i*2 + 1] = status; @@ -210,12 +221,12 @@ extract_files(int nfiles, const char **f progress, nfiles, __DECONST(char **, items)); - err = archive_read_extract(archive, entry, + retval = archive_read_extract(archive, entry, ARCHIVE_EXTRACT_TIME | ARCHIVE_EXTRACT_OWNER | ARCHIVE_EXTRACT_PERM | ARCHIVE_EXTRACT_ACL | ARCHIVE_EXTRACT_XATTR | ARCHIVE_EXTRACT_FFLAGS); - if (err != ARCHIVE_OK) + if (retval != ARCHIVE_OK) break; archive_file++; @@ -224,18 +235,18 @@ extract_files(int nfiles, const char **f items[i*2 + 1] = "Done"; - if (err != ARCHIVE_EOF) { + if (retval != ARCHIVE_EOF) { snprintf(errormsg, sizeof(errormsg), "Error while extracting %s: %s\n", items[i*2], archive_error_string(archive)); items[i*2 + 1] = "Failed"; dialog_msgbox("Extract Error", errormsg, 0, 0, TRUE); - return (err); + return (retval); } archive_read_free(archive); } - return (0); + return (EXIT_SUCCESS); } Modified: head/usr.sbin/bsdinstall/distfetch/distfetch.c ============================================================================== --- head/usr.sbin/bsdinstall/distfetch/distfetch.c Sun Sep 28 23:22:55 2014 (r272277) +++ head/usr.sbin/bsdinstall/distfetch/distfetch.c Mon Sep 29 00:35:12 2014 (r272278) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2011 Nathan Whitehorn + * Copyright (c) 2014 Devin Teske * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -22,15 +23,21 @@ * 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$ */ +#include +__FBSDID("$FreeBSD$"); + #include -#include +#include +#include +#include #include #include -#include +#include +#include +#include +#include static int fetch_files(int nfiles, char **urls); @@ -39,12 +46,13 @@ main(void) { char *diststring; char **urls; - int i, nfetched, ndists = 0; + int i; + int ndists = 0; + int nfetched; + char error[PATH_MAX + 512]; - if (getenv("DISTRIBUTIONS") == NULL) { - fprintf(stderr, "DISTRIBUTIONS variable is not set\n"); - return (1); - } + if (getenv("DISTRIBUTIONS") == NULL) + errx(EXIT_FAILURE, "DISTRIBUTIONS variable is not set"); diststring = strdup(getenv("DISTRIBUTIONS")); for (i = 0; diststring[i] != 0; i++) @@ -54,9 +62,8 @@ main(void) urls = calloc(ndists, sizeof(const char *)); if (urls == NULL) { - fprintf(stderr, "Out of memory!\n"); free(diststring); - return (1); + errx(EXIT_FAILURE, "Out of memory!"); } init_dialog(stdin, stdout); @@ -65,13 +72,13 @@ main(void) for (i = 0; i < ndists; i++) { urls[i] = malloc(PATH_MAX); - sprintf(urls[i], "%s/%s", getenv("BSDINSTALL_DISTSITE"), - strsep(&diststring, " \t")); + snprintf(urls[i], PATH_MAX, "%s/%s", + getenv("BSDINSTALL_DISTSITE"), strsep(&diststring, " \t")); } if (chdir(getenv("BSDINSTALL_DISTDIR")) != 0) { - char error[512]; - sprintf(error, "Could could change to directory %s: %s\n", + snprintf(error, sizeof(error), + "Could could change to directory %s: %s\n", getenv("BSDINSTALL_DISTDIR"), strerror(errno)); dialog_msgbox("Error", error, 0, 0, TRUE); end_dialog(); @@ -93,25 +100,26 @@ main(void) static int fetch_files(int nfiles, char **urls) { + FILE *fetch_out; + FILE *file_out; const char **items; - FILE *fetch_out, *file_out; - struct url_stat ustat; - off_t total_bytes, current_bytes, fsize; + int i; + int last_progress; + int nsuccess = 0; /* Number of files successfully downloaded */ + int progress = 0; + size_t chunk; + off_t current_bytes; + off_t fsize; + off_t total_bytes; char status[8]; - char errormsg[512]; + struct url_stat ustat; + char errormsg[PATH_MAX + 512]; uint8_t block[4096]; - size_t chunk; - int i, progress, last_progress; - int nsuccess = 0; /* Number of files successfully downloaded */ - progress = 0; - /* Make the transfer list for dialog */ items = calloc(sizeof(char *), nfiles * 2); - if (items == NULL) { - fprintf(stderr, "Out of memory!\n"); - return (-1); - } + if (items == NULL) + errx(EXIT_FAILURE, "Out of memory!"); for (i = 0; i < nfiles; i++) { items[i*2] = strrchr(urls[i], '/'); @@ -177,7 +185,8 @@ fetch_files(int nfiles, char **urls) } if (ustat.size > 0) { - sprintf(status, "-%jd", (fsize*100)/ustat.size); + snprintf(status, sizeof(status), "-%jd", + (fsize*100)/ustat.size); items[i*2 + 1] = status; } @@ -212,4 +221,3 @@ fetch_files(int nfiles, char **urls) free(items); return (nsuccess); } - From owner-svn-src-all@FreeBSD.ORG Mon Sep 29 08:57:36 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CFFFCFF2; Mon, 29 Sep 2014 08:57:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BC7AD8BA; Mon, 29 Sep 2014 08:57:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8T8vaqk094032; Mon, 29 Sep 2014 08:57:36 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8T8vamj094031; Mon, 29 Sep 2014 08:57:36 GMT (envelope-from des@FreeBSD.org) Message-Id: <201409290857.s8T8vamj094031@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: des set sender to des@FreeBSD.org using -f From: Dag-Erling Smørgrav Date: Mon, 29 Sep 2014 08:57:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272280 - head/lib/libpam/modules/pam_login_access X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Sep 2014 08:57:36 -0000 Author: des Date: Mon Sep 29 08:57:36 2014 New Revision: 272280 URL: http://svnweb.freebsd.org/changeset/base/272280 Log: Instead of failing when neither PAM_TTY nor PAM_RHOST are available, call login_access() with "**unknown**" as the second argument. This will allow "ALL" rules to match. Reported by: Tim Daneliuk Tested by: dim@ PR: 83099 193927 MFC after: 3 days Modified: head/lib/libpam/modules/pam_login_access/pam_login_access.c Modified: head/lib/libpam/modules/pam_login_access/pam_login_access.c ============================================================================== --- head/lib/libpam/modules/pam_login_access/pam_login_access.c Mon Sep 29 01:17:42 2014 (r272279) +++ head/lib/libpam/modules/pam_login_access/pam_login_access.c Mon Sep 29 08:57:36 2014 (r272280) @@ -94,8 +94,10 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int PAM_VERBOSE_ERROR("%s is not allowed to log in on %s", user, tty); } else { - PAM_VERBOSE_ERROR("PAM_RHOST or PAM_TTY required"); - return (PAM_AUTHINFO_UNAVAIL); + PAM_LOG("Checking login.access for user %s", user); + if (login_access(user, "***unknown***") != 0) + return (PAM_SUCCESS); + PAM_VERBOSE_ERROR("%s is not allowed to log in", user); } return (PAM_AUTH_ERR); From owner-svn-src-all@FreeBSD.ORG Mon Sep 29 09:14:29 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C50334CC; Mon, 29 Sep 2014 09:14:29 +0000 (UTC) Received: from mx1.sbone.de (bird.sbone.de [46.4.1.90]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 77D70AA2; Mon, 29 Sep 2014 09:14:28 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id B2B2E25D3A82; Mon, 29 Sep 2014 09:14:24 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id ACEC1C77108; Mon, 29 Sep 2014 09:14:23 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id ynSQorN8O8Dg; Mon, 29 Sep 2014 09:14:22 +0000 (UTC) Received: from [IPv6:fde9:577b:c1a9:4410:80e5:6a63:fe7c:9e54] (unknown [IPv6:fde9:577b:c1a9:4410:80e5:6a63:fe7c:9e54]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 8BC3AC77107; Mon, 29 Sep 2014 09:14:20 +0000 (UTC) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r272280 - head/lib/libpam/modules/pam_login_access From: "Bjoern A. Zeeb" In-Reply-To: <201409290857.s8T8vamj094031@svn.freebsd.org> Date: Mon, 29 Sep 2014 09:13:59 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <4197A538-C42B-44DD-A20A-C4E900478D69@FreeBSD.org> References: <201409290857.s8T8vamj094031@svn.freebsd.org> To: =?windows-1252?Q?Dag-Erling_Sm=F8rgrav?= X-Mailer: Apple Mail (2.1878.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Sep 2014 09:14:30 -0000 On 29 Sep 2014, at 08:57 , Dag-Erling Sm=F8rgrav = wrote: > Author: des > Date: Mon Sep 29 08:57:36 2014 > New Revision: 272280 > URL: http://svnweb.freebsd.org/changeset/base/272280 >=20 > Log: > Instead of failing when neither PAM_TTY nor PAM_RHOST are available, = call > login_access() with "**unknown**" as the second argument. This will = allow > =93ALL" rules to match. >=20 = /scratch/tmp/bz/head.svn/lib/libpam/modules/pam_login_access/pam_login_acc= ess.c: In function 'pam_sm_acct_mgmt': = /scratch/tmp/bz/head.svn/lib/libpam/modules/pam_login_access/pam_login_acc= ess.c:97: warning: format '%s' expects type 'char *', but argument 4 has = type 'const void *' > Reported by: Tim Daneliuk > Tested by: dim@ > PR: 83099 193927 > MFC after: 3 days >=20 > Modified: > head/lib/libpam/modules/pam_login_access/pam_login_access.c >=20 > Modified: head/lib/libpam/modules/pam_login_access/pam_login_access.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/lib/libpam/modules/pam_login_access/pam_login_access.c = Mon Sep 29 01:17:42 2014 (r272279) > +++ head/lib/libpam/modules/pam_login_access/pam_login_access.c = Mon Sep 29 08:57:36 2014 (r272280) > @@ -94,8 +94,10 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int > PAM_VERBOSE_ERROR("%s is not allowed to log in on %s", > user, tty); > } else { > - PAM_VERBOSE_ERROR("PAM_RHOST or PAM_TTY required"); > - return (PAM_AUTHINFO_UNAVAIL); > + PAM_LOG("Checking login.access for user %s", user); > + if (login_access(user, "***unknown***") !=3D 0) > + return (PAM_SUCCESS); > + PAM_VERBOSE_ERROR("%s is not allowed to log in", user); > } >=20 > return (PAM_AUTH_ERR); >=20 =97=20 Bjoern A. Zeeb "Come on. Learn, goddamn it.", WarGames, 1983 From owner-svn-src-all@FreeBSD.ORG Mon Sep 29 10:36:15 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6B01D845; Mon, 29 Sep 2014 10:36:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 57B1D312; Mon, 29 Sep 2014 10:36:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8TAaFf6040311; Mon, 29 Sep 2014 10:36:15 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8TAaFUs040310; Mon, 29 Sep 2014 10:36:15 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201409291036.s8TAaFUs040310@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Mon, 29 Sep 2014 10:36:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272281 - head/lib/libpam/modules/pam_login_access X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Sep 2014 10:36:15 -0000 Author: bz Date: Mon Sep 29 10:36:14 2014 New Revision: 272281 URL: http://svnweb.freebsd.org/changeset/base/272281 Log: Hopefully fix build breakage with gcc passing void * instead of char * to "%s" format string after r272280. PR: 83099 193927 MFC after: 3 days X-MFC with: r272280 Modified: head/lib/libpam/modules/pam_login_access/pam_login_access.c Modified: head/lib/libpam/modules/pam_login_access/pam_login_access.c ============================================================================== --- head/lib/libpam/modules/pam_login_access/pam_login_access.c Mon Sep 29 08:57:36 2014 (r272280) +++ head/lib/libpam/modules/pam_login_access/pam_login_access.c Mon Sep 29 10:36:14 2014 (r272281) @@ -94,7 +94,8 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int PAM_VERBOSE_ERROR("%s is not allowed to log in on %s", user, tty); } else { - PAM_LOG("Checking login.access for user %s", user); + PAM_LOG("Checking login.access for user %s", + (const char *)user); if (login_access(user, "***unknown***") != 0) return (PAM_SUCCESS); PAM_VERBOSE_ERROR("%s is not allowed to log in", user); From owner-svn-src-all@FreeBSD.ORG Mon Sep 29 11:10:34 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 65DAB2C4; Mon, 29 Sep 2014 11:10:34 +0000 (UTC) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "tensor.andric.com", Issuer "CAcert Class 3 Root" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 2317D8B5; Mon, 29 Sep 2014 11:10:33 +0000 (UTC) Received: from [192.168.2.2] (unknown [77.243.161.229]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 4863FB80A; Mon, 29 Sep 2014 13:10:23 +0200 (CEST) Content-Type: multipart/signed; boundary="Apple-Mail=_0F40BEA6-9BCE-433B-932A-5B2C79865E07"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r272281 - head/lib/libpam/modules/pam_login_access From: Dimitry Andric In-Reply-To: <201409291036.s8TAaFUs040310@svn.freebsd.org> Date: Mon, 29 Sep 2014 13:10:03 +0200 Message-Id: References: <201409291036.s8TAaFUs040310@svn.freebsd.org> To: "Bjoern A. Zeeb" X-Mailer: Apple Mail (2.1878.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Sep 2014 11:10:34 -0000 --Apple-Mail=_0F40BEA6-9BCE-433B-932A-5B2C79865E07 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 29 Sep 2014, at 12:36, Bjoern A. Zeeb wrote: > Author: bz > Date: Mon Sep 29 10:36:14 2014 > New Revision: 272281 > URL: http://svnweb.freebsd.org/changeset/base/272281 >=20 > Log: > Hopefully fix build breakage with gcc passing void * instead of char = * > to "%s" format string after r272280. >=20 > PR: 83099 193927 > MFC after: 3 days > X-MFC with: r272280 >=20 > Modified: > head/lib/libpam/modules/pam_login_access/pam_login_access.c >=20 > Modified: head/lib/libpam/modules/pam_login_access/pam_login_access.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/lib/libpam/modules/pam_login_access/pam_login_access.c = Mon Sep 29 08:57:36 2014 (r272280) > +++ head/lib/libpam/modules/pam_login_access/pam_login_access.c = Mon Sep 29 10:36:14 2014 (r272281) > @@ -94,7 +94,8 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int > PAM_VERBOSE_ERROR("%s is not allowed to log in on %s", > user, tty); > } else { > - PAM_LOG("Checking login.access for user %s", user); > + PAM_LOG("Checking login.access for user %s", > + (const char *)user); > if (login_access(user, "***unknown***") !=3D 0) > return (PAM_SUCCESS); > PAM_VERBOSE_ERROR("%s is not allowed to log in", user); >=20 Just a few lines after the one you fixed it accesses the same variable again. Why doesn't it warn there? And why is 'user' not a char * to begin with? :) -Dimitry --Apple-Mail=_0F40BEA6-9BCE-433B-932A-5B2C79865E07 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.22 (Darwin) iEYEARECAAYFAlQpPhMACgkQsF6jCi4glqMoYgCglBL1qvCzvB7RQrk6+TeQPD5X QmYAoNqkqv091P3gB46nRccVyKQZ9EDh =oeTD -----END PGP SIGNATURE----- --Apple-Mail=_0F40BEA6-9BCE-433B-932A-5B2C79865E07-- From owner-svn-src-all@FreeBSD.ORG Mon Sep 29 11:24:22 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DEA54567; Mon, 29 Sep 2014 11:24:21 +0000 (UTC) Received: from mx1.sbone.de (bird.sbone.de [46.4.1.90]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id AFA08A7A; Mon, 29 Sep 2014 11:23:43 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 2DD4325D37C3; Mon, 29 Sep 2014 11:21:28 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id ADCA9C77108; Mon, 29 Sep 2014 11:21:27 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id kII1DuTQlS0F; Mon, 29 Sep 2014 11:21:26 +0000 (UTC) Received: from [IPv6:fde9:577b:c1a9:4410:80e5:6a63:fe7c:9e54] (unknown [IPv6:fde9:577b:c1a9:4410:80e5:6a63:fe7c:9e54]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 5AF6CC77107; Mon, 29 Sep 2014 11:21:23 +0000 (UTC) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r272281 - head/lib/libpam/modules/pam_login_access From: "Bjoern A. Zeeb" In-Reply-To: Date: Mon, 29 Sep 2014 11:20:20 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <4929EC39-0862-4547-B044-44C396529F74@FreeBSD.org> References: <201409291036.s8TAaFUs040310@svn.freebsd.org> To: Dimitry Andric X-Mailer: Apple Mail (2.1878.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Sep 2014 11:24:22 -0000 On 29 Sep 2014, at 11:10 , Dimitry Andric wrote: > On 29 Sep 2014, at 12:36, Bjoern A. Zeeb wrote: >> Author: bz >> Date: Mon Sep 29 10:36:14 2014 >> New Revision: 272281 >> URL: http://svnweb.freebsd.org/changeset/base/272281 >>=20 >> Log: >> Hopefully fix build breakage with gcc passing void * instead of char = * >> to "%s" format string after r272280. >>=20 >> PR: 83099 193927 >> MFC after: 3 days >> X-MFC with: r272280 >>=20 >> Modified: >> head/lib/libpam/modules/pam_login_access/pam_login_access.c >>=20 >> Modified: head/lib/libpam/modules/pam_login_access/pam_login_access.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/lib/libpam/modules/pam_login_access/pam_login_access.c = Mon Sep 29 08:57:36 2014 (r272280) >> +++ head/lib/libpam/modules/pam_login_access/pam_login_access.c = Mon Sep 29 10:36:14 2014 (r272281) >> @@ -94,7 +94,8 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int >> PAM_VERBOSE_ERROR("%s is not allowed to log in on %s", >> user, tty); >> } else { >> - PAM_LOG("Checking login.access for user %s", user); >> + PAM_LOG("Checking login.access for user %s", >> + (const char *)user); >> if (login_access(user, "***unknown***") !=3D 0) >> return (PAM_SUCCESS); >> PAM_VERBOSE_ERROR("%s is not allowed to log in", user); >>=20 >=20 > Just a few lines after the one you fixed it accesses the same variable > again. Why doesn't it warn there? And why is 'user' not a char * to > begin with? :) For the latter ask des. the PAM_VERBOSE_ERROR goes into a function which (if remembering = correctly) does the va_start and asprintf rather than just being a macro = to printf. The arguments are not casted anywhere to that macro but I = am, again, sure des will have an opinion on it;-) =97=20 Bjoern A. Zeeb "Come on. Learn, goddamn it.", WarGames, 1983 From owner-svn-src-all@FreeBSD.ORG Mon Sep 29 12:01:51 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C39B831F; Mon, 29 Sep 2014 12:01:51 +0000 (UTC) Received: from mail.dawidek.net (garage.dawidek.net [91.121.88.72]) by mx1.freebsd.org (Postfix) with ESMTP id 88C44E73; Mon, 29 Sep 2014 12:01:51 +0000 (UTC) Received: from localhost (unknown [95.87.192.86]) by mail.dawidek.net (Postfix) with ESMTPSA id 2EFA0615; Mon, 29 Sep 2014 14:01:49 +0200 (CEST) Date: Mon, 29 Sep 2014 14:03:36 +0200 From: Pawel Jakub Dawidek To: Garrett Cooper Subject: Re: svn commit: r271241 - head/lib/libnv Message-ID: <20140929120336.GB2194@garage.freebsd.pl> References: <201409072256.s87MuvIl059453@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201409072256.s87MuvIl059453@svn.freebsd.org> X-OS: FreeBSD 11.0-CURRENT amd64 User-Agent: Mutt/1.5.22 (2013-10-16) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Sep 2014 12:01:51 -0000 On Sun, Sep 07, 2014 at 10:56:57PM +0000, Garrett Cooper wrote: > Author: ngie > Date: Sun Sep 7 22:56:57 2014 > New Revision: 271241 > URL: http://svnweb.freebsd.org/changeset/base/271241 > > Log: > Include src.opts.mk after SHLIBDIR has been defined so libnv is installed to > /lib , not /usr/lib Don't forget to add /usr/lib/libnv* to ObsoleteFiles.inc. -- Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://mobter.com From owner-svn-src-all@FreeBSD.ORG Mon Sep 29 14:24:31 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C1F3B4CB; Mon, 29 Sep 2014 14:24:31 +0000 (UTC) Received: from mail105.syd.optusnet.com.au (mail105.syd.optusnet.com.au [211.29.132.249]) by mx1.freebsd.org (Postfix) with ESMTP id 81FFC145; Mon, 29 Sep 2014 14:24:30 +0000 (UTC) Received: from c122-106-147-133.carlnfd1.nsw.optusnet.com.au (c122-106-147-133.carlnfd1.nsw.optusnet.com.au [122.106.147.133]) by mail105.syd.optusnet.com.au (Postfix) with ESMTPS id C64391041BC3; Mon, 29 Sep 2014 23:57:04 +1000 (EST) Date: Mon, 29 Sep 2014 23:56:59 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: "Bjoern A. Zeeb" Subject: Re: svn commit: r272281 - head/lib/libpam/modules/pam_login_access In-Reply-To: <4929EC39-0862-4547-B044-44C396529F74@FreeBSD.org> Message-ID: <20140929233019.C2907@besplex.bde.org> References: <201409291036.s8TAaFUs040310@svn.freebsd.org> <4929EC39-0862-4547-B044-44C396529F74@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.1 cv=AOuw8Gd4 c=1 sm=1 tr=0 a=7NqvjVvQucbO2RlWB8PEog==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=6I5d2MoRAAAA:8 a=MYfIN0nJ268ONEqtP8QA:9 a=CjuIK1q_8ugA:10 a=SV7veod9ZcQA:10 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Dimitry Andric X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Sep 2014 14:24:31 -0000 On Mon, 29 Sep 2014, Bjoern A. Zeeb wrote: > > On 29 Sep 2014, at 11:10 , Dimitry Andric wrote: > >> On 29 Sep 2014, at 12:36, Bjoern A. Zeeb wrote: >>> ... >>> Log: >>> Hopefully fix build breakage with gcc passing void * instead of char * >>> to "%s" format string after r272280. >>> >>> Modified: head/lib/libpam/modules/pam_login_access/pam_login_access.c >>> ============================================================================== >>> --- head/lib/libpam/modules/pam_login_access/pam_login_access.c Mon Sep 29 08:57:36 2014 (r272280) >>> +++ head/lib/libpam/modules/pam_login_access/pam_login_access.c Mon Sep 29 10:36:14 2014 (r272281) >>> @@ -94,7 +94,8 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int >>> PAM_VERBOSE_ERROR("%s is not allowed to log in on %s", >>> user, tty); >>> } else { >>> - PAM_LOG("Checking login.access for user %s", user); >>> + PAM_LOG("Checking login.access for user %s", >>> + (const char *)user); >>> if (login_access(user, "***unknown***") != 0) >>> return (PAM_SUCCESS); >>> PAM_VERBOSE_ERROR("%s is not allowed to log in", user); >>> >> >> Just a few lines after the one you fixed it accesses the same variable >> again. Why doesn't it warn there? And why is 'user' not a char * to >> begin with? :) > > For the latter ask des. > > the PAM_VERBOSE_ERROR goes into a function which (if remembering correctly) does the va_start and asprintf rather than just being a macro to printf. The arguments are not casted anywhere to that macro but I am, again, sure des will have an opinion on it;-) Just another bug. PAM_LOG() expands to a call to a function that is declared as __printflike() (but with a worse spelling). PAM_VERBOSE_ERROR() expands to a call to a function that is missing this declaration. Other bugs in PAM_VERBOSE_ERROR()'s function include not checking if asprintf() succeeded. malloc() failures can't happen, but it is bad to do dynamic allocation in an error-reporting routine. All uses of PAM_VERBOSE_ERROR() except 2 visible in the patch use a format with no args, so there aren't many print format errors to fix. asprintf() is a heavyweight method for constructing a format for printing these args (and some others that are automatically added). Bruce From owner-svn-src-all@FreeBSD.ORG Mon Sep 29 15:05:24 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 69457957; Mon, 29 Sep 2014 15:05:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3B60B856; Mon, 29 Sep 2014 15:05:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8TF5OUi066887; Mon, 29 Sep 2014 15:05:24 GMT (envelope-from will@FreeBSD.org) Received: (from will@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8TF5Nhh066884; Mon, 29 Sep 2014 15:05:23 GMT (envelope-from will@FreeBSD.org) Message-Id: <201409291505.s8TF5Nhh066884@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: will set sender to will@FreeBSD.org using -f From: Will Andrews Date: Mon, 29 Sep 2014 15:05:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272282 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Sep 2014 15:05:24 -0000 Author: will Date: Mon Sep 29 15:05:23 2014 New Revision: 272282 URL: http://svnweb.freebsd.org/changeset/base/272282 Log: Search for the nearest PORTSDIR where Mk/bsd.ports.mk exists, from .CURDIR. This will only take effect if PORTSDIR is not set, as previously supported. Use .if exists(), for four specific possibilities relative to .CURDIR: ., .., ../.., and ../../.. The fourth possibility is primarily in case ports ever grows a third level. If none of these paths exist, fall back to the old default of /usr/ports. This removes the need to set PORTSDIR explicitly (or via wrapper script) if one is running out of a ports tree that is not in /usr/ports, but in a home directory. Reviewed by: bapt, bdrewery (older version) CR: D799 MFC after: 1 week Sponsored by: Spectra Logic Modified: head/share/mk/bsd.port.mk head/share/mk/bsd.port.subdir.mk Modified: head/share/mk/bsd.port.mk ============================================================================== --- head/share/mk/bsd.port.mk Mon Sep 29 10:36:14 2014 (r272281) +++ head/share/mk/bsd.port.mk Mon Sep 29 15:05:23 2014 (r272282) @@ -1,6 +1,22 @@ # $FreeBSD$ -PORTSDIR?= /usr/ports +.if !defined(PORTSDIR) +# Autodetect if the command is being run in a ports tree that's not rooted +# in the default /usr/ports. The ../../.. case is in case ports ever grows +# a third level. +.if exists(${.CURDIR}/Mk/bsd.port.mk) +PORTSDIR= ${.CURDIR} +.elif exists(${.CURDIR}/../Mk/bsd.port.mk) +PORTSDIR= ${.CURDIR}/.. +.elif exists(${.CURDIR}/../../Mk/bsd.port.mk) +PORTSDIR= ${.CURDIR}/../.. +.elif exists(${.CURDIR}/../../../Mk/bsd.port.mk) +PORTSDIR= ${.CURDIR}/../../.. +.else +PORTSDIR= /usr/ports +.endif +.endif + BSDPORTMK?= ${PORTSDIR}/Mk/bsd.port.mk # Needed to keep bsd.own.mk from reading in /etc/src.conf Modified: head/share/mk/bsd.port.subdir.mk ============================================================================== --- head/share/mk/bsd.port.subdir.mk Mon Sep 29 10:36:14 2014 (r272281) +++ head/share/mk/bsd.port.subdir.mk Mon Sep 29 15:05:23 2014 (r272282) @@ -1,6 +1,22 @@ # $FreeBSD$ -PORTSDIR?= /usr/ports +.if !defined(PORTSDIR) +# Autodetect if the command is being run in a ports tree that's not rooted +# in the default /usr/ports. The ../../.. case is in case ports ever grows +# a third level. +.if exists(${.CURDIR}/Mk/bsd.port.mk) +PORTSDIR= ${.CURDIR} +.elif exists(${.CURDIR}/../Mk/bsd.port.mk) +PORTSDIR= ${.CURDIR}/.. +.elif exists(${.CURDIR}/../../Mk/bsd.port.mk) +PORTSDIR= ${.CURDIR}/../.. +.elif exists(${.CURDIR}/../../../Mk/bsd.port.mk) +PORTSDIR= ${.CURDIR}/../../.. +.else +PORTSDIR= /usr/ports +.endif +.endif + BSDPORTSUBDIRMK?= ${PORTSDIR}/Mk/bsd.port.subdir.mk .include "${BSDPORTSUBDIRMK}" From owner-svn-src-all@FreeBSD.ORG Mon Sep 29 15:27:55 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4E175EBA; Mon, 29 Sep 2014 15:27:55 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 26B4EAA4; Mon, 29 Sep 2014 15:27:55 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-70-85-31.nwrknj.fios.verizon.net [173.70.85.31]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 2433AB939; Mon, 29 Sep 2014 11:27:54 -0400 (EDT) From: John Baldwin To: Colin Percival Subject: Re: svn commit: r272207 - in head/games: factor primes Date: Mon, 29 Sep 2014 10:30:14 -0400 Message-ID: <5561525.GofWoxIbJB@ralph.baldwin.cx> User-Agent: KMail/4.12.5 (FreeBSD/10.1-BETA2; KDE/4.12.5; amd64; ; ) In-Reply-To: <5426B4EC.9040102@freebsd.org> References: <201409270900.s8R90dWl029070@svn.freebsd.org> <1576403.4iOOFWFkUs@ralph.baldwin.cx> <5426B4EC.9040102@freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 29 Sep 2014 11:27:54 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Sep 2014 15:27:55 -0000 On Saturday, September 27, 2014 06:00:28 AM Colin Percival wrote: > On 09/27/14 05:52, John Baldwin wrote: > > On Saturday, September 27, 2014 09:00:39 AM Colin Percival wrote: > >> #define BIG ULONG_MAX /* largest value will sieve */ > > > > Should this be UINT64_MAX (or however that is spelled) instead of > > ULONG_MAX > > now? (or is it even still used? I know your change removed its use in at > > least one place.) > > It's not used any more. I was resisting the urge to spend time going > through and removing ancient history (which is why I kept ubig instead of > changing it to uint64_t everywhere). It's kind of misleading though as the value is wrong and the comment for it no longer applies. How about this: Index: primes.c =================================================================== --- primes.c (revision 272281) +++ primes.c (working copy) @@ -169,7 +169,7 @@ /* * read_num_buf -- - * This routine returns a number n, where 0 <= n && n <= BIG. + * This routine returns a non-negative number n */ static ubig read_num_buf(void) @@ -214,7 +214,7 @@ /* * A number of systems can not convert double values into unsigned * longs when the values are larger than the largest signed value. - * We don't have this problem, so we can go all the way to BIG. + * We don't have this problem, so we can go all the way. */ if (start < 3) { start = (ubig)2; Index: primes.h =================================================================== --- primes.h (revision 272281) +++ primes.h (working copy) @@ -45,7 +45,6 @@ /* ubig is the type that holds a large unsigned value */ typedef uint64_t ubig; /* must be >=32 bit unsigned value */ -#define BIG ULONG_MAX /* largest value will sieve */ /* bytes in sieve table (must be > 3*5*7*11) */ #define TABSIZE 256*1024 -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Sep 29 16:44:06 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3D56F1D3; Mon, 29 Sep 2014 16:44:06 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id B5ACC374; Mon, 29 Sep 2014 16:44:04 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id s8TGi1n4067660 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 29 Sep 2014 20:44:01 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id s8TGi1Tk067659; Mon, 29 Sep 2014 20:44:01 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 29 Sep 2014 20:44:01 +0400 From: Gleb Smirnoff To: "Bjoern A. Zeeb" Subject: Re: svn commit: r272261 - head/sys/net Message-ID: <20140929164401.GC884@FreeBSD.org> References: <201409281709.s8SH9e0Y047460@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201409281709.s8SH9e0Y047460@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Sep 2014 16:44:06 -0000 On Sun, Sep 28, 2014 at 05:09:40PM +0000, Bjoern A. Zeeb wrote: B> Author: bz B> Date: Sun Sep 28 17:09:40 2014 B> New Revision: 272261 B> URL: http://svnweb.freebsd.org/changeset/base/272261 B> B> Log: B> Move the unconditional #include of net/ifq.h to the very end of file. B> This seems to allow us to pass a universe with either clang or gcc B> after r272244 (and r272260) and probably makes it easier to untabgle B> these chained #includes in the future. Thanks, Bjoern. This is probably the least ugly solution. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Mon Sep 29 17:38:51 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 70DC39FB; Mon, 29 Sep 2014 17:38:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5C3D6B7F; Mon, 29 Sep 2014 17:38:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8THcpK8038997; Mon, 29 Sep 2014 17:38:51 GMT (envelope-from rstone@FreeBSD.org) Received: (from rstone@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8THcpxo038996; Mon, 29 Sep 2014 17:38:51 GMT (envelope-from rstone@FreeBSD.org) Message-Id: <201409291738.s8THcpxo038996@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rstone set sender to rstone@FreeBSD.org using -f From: Ryan Stone Date: Mon, 29 Sep 2014 17:38:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272284 - head/usr.bin/systat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Sep 2014 17:38:51 -0000 Author: rstone Date: Mon Sep 29 17:38:50 2014 New Revision: 272284 URL: http://svnweb.freebsd.org/changeset/base/272284 Log: Fix integer truncation in affecting systat -ifstat The "systat -ifstat" command was using a u_int to store byte counters. With a 10Gbps or faster interface, this overflows within the default 5 second refresh period. Switch to using a uint64_t across the board, which matches the size used for all counters as of r263102. PR: 182448 MFC after: 1 week Sponsored by: Sandvine Inc Modified: head/usr.bin/systat/ifstat.c Modified: head/usr.bin/systat/ifstat.c ============================================================================== --- head/usr.bin/systat/ifstat.c Mon Sep 29 16:24:48 2014 (r272283) +++ head/usr.bin/systat/ifstat.c Mon Sep 29 17:38:50 2014 (r272284) @@ -68,14 +68,14 @@ struct if_stat { struct ifmibdata if_mib; struct timeval tv; struct timeval tv_lastchanged; - u_long if_in_curtraffic; - u_long if_out_curtraffic; - u_long if_in_traffic_peak; - u_long if_out_traffic_peak; - u_long if_in_curpps; - u_long if_out_curpps; - u_long if_in_pps_peak; - u_long if_out_pps_peak; + uint64_t if_in_curtraffic; + uint64_t if_out_curtraffic; + uint64_t if_in_traffic_peak; + uint64_t if_out_traffic_peak; + uint64_t if_in_curpps; + uint64_t if_out_curpps; + uint64_t if_in_pps_peak; + uint64_t if_out_pps_peak; u_int if_row; /* Index into ifmib sysctl */ int if_ypos; /* -1 if not being displayed */ u_int display; @@ -269,8 +269,8 @@ fetchifstat(void) struct if_stat *ifp = NULL; struct timeval tv, new_tv, old_tv; double elapsed = 0.0; - u_int new_inb, new_outb, old_inb, old_outb = 0; - u_int new_inp, new_outp, old_inp, old_outp = 0; + uint64_t new_inb, new_outb, old_inb, old_outb = 0; + uint64_t new_inp, new_outp, old_inp, old_outp = 0; SLIST_FOREACH(ifp, &curlist, link) { /* From owner-svn-src-all@FreeBSD.ORG Mon Sep 29 17:51:40 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ABA4A1BB; Mon, 29 Sep 2014 17:51:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8C55ACA8; Mon, 29 Sep 2014 17:51:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8THpeXG047517; Mon, 29 Sep 2014 17:51:40 GMT (envelope-from rstone@FreeBSD.org) Received: (from rstone@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8THpdho047514; Mon, 29 Sep 2014 17:51:39 GMT (envelope-from rstone@FreeBSD.org) Message-Id: <201409291751.s8THpdho047514@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rstone set sender to rstone@FreeBSD.org using -f From: Ryan Stone Date: Mon, 29 Sep 2014 17:51:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272285 - head/sys/dev/ixl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Sep 2014 17:51:40 -0000 Author: rstone Date: Mon Sep 29 17:51:39 2014 New Revision: 272285 URL: http://svnweb.freebsd.org/changeset/base/272285 Log: Ensure that ixl_flush() uses a defined register on VFs In some code that is shared between the ixl(4) and ixlv(4) drivers, a macro hard-coded a register offset that was not valid on ixlv devices. Fix this by having each driver define a variable that contains the correct offset. Reviewed by: Eric Joyner MFC after: 3 days Sponsored by: Sandvine Inc Modified: head/sys/dev/ixl/i40e_osdep.h head/sys/dev/ixl/if_ixl.c head/sys/dev/ixl/if_ixlv.c Modified: head/sys/dev/ixl/i40e_osdep.h ============================================================================== --- head/sys/dev/ixl/i40e_osdep.h Mon Sep 29 17:38:50 2014 (r272284) +++ head/sys/dev/ixl/i40e_osdep.h Mon Sep 29 17:51:39 2014 (r272285) @@ -152,6 +152,7 @@ struct i40e_osdep bus_space_tag_t mem_bus_space_tag; bus_space_handle_t mem_bus_space_handle; bus_size_t mem_bus_space_size; + uint32_t flush_reg; struct device *dev; }; @@ -208,6 +209,13 @@ wr32_osdep(struct i40e_osdep *osdep, uin osdep->mem_bus_space_handle, reg, value); } +static __inline void +ixl_flush_osdep(struct i40e_osdep *osdep) +{ + + rd32_osdep(osdep, osdep->flush_reg); +} + #define rd32(a, reg) rd32_osdep((a)->back, (reg)) #define wr32(a, reg, value) wr32_osdep((a)->back, (reg), (value)) @@ -221,9 +229,6 @@ wr32_osdep(struct i40e_osdep *osdep, uin ((struct i40e_osdep *)(a)->back)->mem_bus_space_handle, \ reg, value)) -#define ixl_flush(a) (\ - bus_space_read_4( ((struct i40e_osdep *)(a)->back)->mem_bus_space_tag, \ - ((struct i40e_osdep *)(a)->back)->mem_bus_space_handle, \ - I40E_GLGEN_STAT)) +#define ixl_flush(a) ixl_flush_osdep((a)->back) #endif /* _I40E_OSDEP_H_ */ Modified: head/sys/dev/ixl/if_ixl.c ============================================================================== --- head/sys/dev/ixl/if_ixl.c Mon Sep 29 17:38:50 2014 (r272284) +++ head/sys/dev/ixl/if_ixl.c Mon Sep 29 17:51:39 2014 (r272285) @@ -2177,6 +2177,7 @@ ixl_allocate_pci_resources(struct ixl_pf pf->osdep.mem_bus_space_handle = rman_get_bushandle(pf->pci_mem); pf->osdep.mem_bus_space_size = rman_get_size(pf->pci_mem); + pf->osdep.flush_reg = I40E_GLGEN_STAT; pf->hw.hw_addr = (u8 *) &pf->osdep.mem_bus_space_handle; pf->hw.back = &pf->osdep; Modified: head/sys/dev/ixl/if_ixlv.c ============================================================================== --- head/sys/dev/ixl/if_ixlv.c Mon Sep 29 17:38:50 2014 (r272284) +++ head/sys/dev/ixl/if_ixlv.c Mon Sep 29 17:51:39 2014 (r272285) @@ -1137,6 +1137,7 @@ ixlv_allocate_pci_resources(struct ixlv_ sc->osdep.mem_bus_space_handle = rman_get_bushandle(sc->pci_mem); sc->osdep.mem_bus_space_size = rman_get_size(sc->pci_mem); + sc->osdep.flush_reg = I40E_VFGEN_RSTAT; sc->hw.hw_addr = (u8 *) &sc->osdep.mem_bus_space_handle; sc->hw.back = &sc->osdep; From owner-svn-src-all@FreeBSD.ORG Mon Sep 29 18:39:32 2014 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A7D99EFB; Mon, 29 Sep 2014 18:39:32 +0000 (UTC) Received: from smtp.fgznet.ch (mail.fgznet.ch [81.92.96.47]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 416CD2AE; Mon, 29 Sep 2014 18:39:31 +0000 (UTC) Received: from [192.168.225.11] (dhclient-91-190-14-19.flashcable.ch [91.190.14.19]) by smtp.fgznet.ch (8.13.8/8.13.8/Submit_SMTPAUTH) with ESMTP id s8TIVaK4098317; Mon, 29 Sep 2014 20:31:39 +0200 (CEST) (envelope-from andreast@FreeBSD.org) Message-ID: <5429A58E.2030508@FreeBSD.org> Date: Mon, 29 Sep 2014 20:31:42 +0200 From: Andreas Tobler User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 MIME-Version: 1.0 To: Andrew Turner , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Subject: Re: svn commit: r272209 - in head/sys/arm: arm include References: <201409270957.s8R9vYrw056987@svn.freebsd.org> In-Reply-To: <201409270957.s8R9vYrw056987@svn.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.64 on 81.92.96.47 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Sep 2014 18:39:32 -0000 Hi Andrew, On 27.09.14 11:57, Andrew Turner wrote: > Author: andrew > Date: Sat Sep 27 09:57:34 2014 > New Revision: 272209 > URL: http://svnweb.freebsd.org/changeset/base/272209 > > Log: > Add machine/sysreg.h to simplify accessing the system control coprocessor > registers and use it in the ARMv7 CPU functions. > > The sysreg.h file has been checked by hand, however it may contain errors > with the comments on when a register was first introduced. The ARMv7 cpu > functions have been checked by compiling both the previous and this version > and comparing the md5 of the object files. > > Submitted by: Svatopluk Kraus > Submitted by: Michal Meloun > Reviewed by: ian, rpaulo > Differential Revision: https://reviews.freebsd.org/D795 > > Added: > head/sys/arm/include/sysreg.h (contents, props changed) This one breaks kernel build with gcc-4.2.1. __ARM_ARCH not defined. On gcc-4.2.1 there is no __ARM_ARCH builtin. Later gcc do have it. The include below fixes the build. Andreas Index: sys/arm/arm/cpufunc_asm_armv7.S =================================================================== --- sys/arm/arm/cpufunc_asm_armv7.S (revision 272282) +++ sys/arm/arm/cpufunc_asm_armv7.S (working copy) @@ -33,6 +33,7 @@ #include __FBSDID("$FreeBSD$"); +#include #include .cpu cortex-a8 From owner-svn-src-all@FreeBSD.ORG Mon Sep 29 19:53:43 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 31C04398; Mon, 29 Sep 2014 19:53:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1AB64DBB; Mon, 29 Sep 2014 19:53:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8TJrhfw006215; Mon, 29 Sep 2014 19:53:43 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8TJrdBR006192; Mon, 29 Sep 2014 19:53:39 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201409291953.s8TJrdBR006192@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Mon, 29 Sep 2014 19:53:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r272286 - in vendor-sys/acpica/dist: . generate/unix/acpiexamples generate/unix/acpiexec generate/unix/iasl source/common source/compiler source/components/disassembler source/component... X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Sep 2014 19:53:43 -0000 Author: jkim Date: Mon Sep 29 19:53:38 2014 New Revision: 272286 URL: http://svnweb.freebsd.org/changeset/base/272286 Log: Import ACPICA 20140926. Added: vendor-sys/acpica/dist/source/compiler/aslmapenter.c (contents, props changed) vendor-sys/acpica/dist/source/compiler/aslmapoutput.c (contents, props changed) vendor-sys/acpica/dist/source/compiler/aslmaputils.c (contents, props changed) vendor-sys/acpica/dist/source/tools/acpiexec/aeregion.c (contents, props changed) Modified: vendor-sys/acpica/dist/changes.txt vendor-sys/acpica/dist/generate/unix/acpiexamples/Makefile vendor-sys/acpica/dist/generate/unix/acpiexec/Makefile vendor-sys/acpica/dist/generate/unix/iasl/Makefile vendor-sys/acpica/dist/source/common/adisasm.c vendor-sys/acpica/dist/source/common/ahids.c vendor-sys/acpica/dist/source/compiler/aslcompile.c vendor-sys/acpica/dist/source/compiler/aslcompiler.h vendor-sys/acpica/dist/source/compiler/asldefine.h vendor-sys/acpica/dist/source/compiler/aslglobal.h vendor-sys/acpica/dist/source/compiler/aslload.c vendor-sys/acpica/dist/source/compiler/aslmain.c vendor-sys/acpica/dist/source/compiler/aslopcodes.c vendor-sys/acpica/dist/source/compiler/asloptions.c vendor-sys/acpica/dist/source/compiler/aslparser.y vendor-sys/acpica/dist/source/compiler/aslresource.c vendor-sys/acpica/dist/source/compiler/aslrestype1.c vendor-sys/acpica/dist/source/compiler/aslrestype1i.c vendor-sys/acpica/dist/source/compiler/aslrestype2.c vendor-sys/acpica/dist/source/compiler/aslrestype2d.c vendor-sys/acpica/dist/source/compiler/aslrestype2e.c vendor-sys/acpica/dist/source/compiler/aslrestype2q.c vendor-sys/acpica/dist/source/compiler/aslrestype2s.c vendor-sys/acpica/dist/source/compiler/aslrestype2w.c vendor-sys/acpica/dist/source/compiler/aslsupport.y vendor-sys/acpica/dist/source/compiler/asltree.c vendor-sys/acpica/dist/source/compiler/asltypes.h vendor-sys/acpica/dist/source/compiler/aslxref.c vendor-sys/acpica/dist/source/compiler/dtcompile.c vendor-sys/acpica/dist/source/compiler/dtsubtable.c vendor-sys/acpica/dist/source/components/disassembler/dmbuffer.c vendor-sys/acpica/dist/source/components/disassembler/dmopcode.c vendor-sys/acpica/dist/source/components/disassembler/dmresrc.c vendor-sys/acpica/dist/source/components/disassembler/dmresrcl.c vendor-sys/acpica/dist/source/components/disassembler/dmresrcl2.c vendor-sys/acpica/dist/source/components/disassembler/dmresrcs.c vendor-sys/acpica/dist/source/components/dispatcher/dsfield.c vendor-sys/acpica/dist/source/components/events/evgpeinit.c vendor-sys/acpica/dist/source/components/events/evregion.c vendor-sys/acpica/dist/source/components/events/evxface.c vendor-sys/acpica/dist/source/components/events/evxfevnt.c vendor-sys/acpica/dist/source/components/executer/exfield.c vendor-sys/acpica/dist/source/components/executer/exprep.c vendor-sys/acpica/dist/source/components/hardware/hwgpe.c vendor-sys/acpica/dist/source/components/tables/tbxfroot.c vendor-sys/acpica/dist/source/include/acdisasm.h vendor-sys/acpica/dist/source/include/aclocal.h vendor-sys/acpica/dist/source/include/acnames.h vendor-sys/acpica/dist/source/include/acobject.h vendor-sys/acpica/dist/source/include/acpixf.h vendor-sys/acpica/dist/source/include/actables.h vendor-sys/acpica/dist/source/include/actypes.h vendor-sys/acpica/dist/source/include/amlresrc.h vendor-sys/acpica/dist/source/os_specific/service_layers/osunixxf.c vendor-sys/acpica/dist/source/tools/acpidump/apdump.c vendor-sys/acpica/dist/source/tools/acpiexec/aecommon.h vendor-sys/acpica/dist/source/tools/acpiexec/aehandlers.c vendor-sys/acpica/dist/source/tools/acpiexec/aemain.c vendor-sys/acpica/dist/source/tools/acpisrc/astable.c Modified: vendor-sys/acpica/dist/changes.txt ============================================================================== --- vendor-sys/acpica/dist/changes.txt Mon Sep 29 17:51:39 2014 (r272285) +++ vendor-sys/acpica/dist/changes.txt Mon Sep 29 19:53:38 2014 (r272286) @@ -1,4 +1,71 @@ ---------------------------------------- +26 September 2014. Summary of changes for version 20140926: + +1) ACPICA kernel-resident subsystem: + +Updated the GPIO operation region handler interface (GeneralPurposeIo). +In order to support GPIO Connection objects with multiple pins, along +with the related Field objects, the following changes to the interface +have been made: The Address is now defined to be the offset in bits of +the field unit from the previous invocation of a Connection. It can be +viewed as a "Pin Number Index" into the connection resource descriptor. +The BitWidth is the exact bit width of the field. It is usually one bit, +but not always. See the ACPICA reference guide (section 8.8.6.2.1) for +additional information and examples. + +GPE support: During ACPICA/GPE initialization, ensure that all GPEs with +corresponding _Lxx/_Exx methods are disabled (they may have been enabled +by the firmware), so that they cannot fire until they are enabled via +AcpiUpdateAllGpes. Rafael J. Wysocki. + +Added a new return flag for the Event/GPE status interfaces -- +AcpiGetEventStatus and AcpiGetGpeStatus. The new +ACPI_EVENT_FLAGS_HAS_HANDLER flag is used to indicate that the event or +GPE currently has a handler associated with it, and can thus actually +affect the system. Lv Zheng. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and +has a much larger code and data size. + + Current Release: + Non-Debug Version: 99.1K Code, 27.3K Data, 126.4K Total + Debug Version: 192.8K Code, 79.9K Data, 272.7K Total + Previous Release: + Non-Debug Version: 98.8K Code, 27.3K Data, 126.1K Total + Debug Version: 192.1K Code, 79.8K Data, 271.9K Total + +2) iASL Compiler/Disassembler and Tools: + +iASL: Fixed a memory allocation/free regression introduced in 20140828 +that could cause the compiler to crash. This was introduced inadvertently +during the effort to eliminate compiler memory leaks. ACPICA BZ 1111, +1113. + +iASL: Removed two error messages that have been found to create false +positives, until they can be fixed and fully validated (ACPICA BZ 1112): +1) Illegal forward reference within a method +2) Illegal reference across two methods + +iASL: Implemented a new option (-lm) to create a hardware mapping file +that summarizes all GPIO, I2C, SPI, and UART connections. This option +works for both the compiler and disassembler. See the iASL compiler user +guide for additional information and examples (section 6.4.6). + +AcpiDump: Added support for the version 1 (ACPI 1.0) RSDP in addition to +version 2. This corrects the AE_BAD_HEADER exception seen on systems with +a version 1 RSDP. Lv Zheng ACPICA BZ 1097. + +AcpiExec: For Unix versions, don't attempt to put STDIN into raw mode +unless STDIN is actually a terminal. Assists with batch-mode processing. +ACPICA BZ 1114. + +Disassembler/AcpiHelp: Added another large group of recognized _HID +values. + + +---------------------------------------- 28 August 2014. Summary of changes for version 20140828: 1) ACPICA kernel-resident subsystem: @@ -37,8 +104,10 @@ Memory24 resource descriptor. There was range was equal to the (length -1) caused by the fact that these values are defined in 256-byte blocks, not bytes. ACPICA BZ 1098 -Disassembler: Fixed a problem with the GpioInt descriptor interrupt polarity -flags. The flags are actually 2 bits, not 1, and the "ActiveBoth" keyword is +Disassembler: Fixed a problem with the GpioInt descriptor interrupt +polarity +flags. The flags are actually 2 bits, not 1, and the "ActiveBoth" keyword +is now supported properly. ACPI 5.1: Added the GICC affinity subtable to the SRAT table. Supported Modified: vendor-sys/acpica/dist/generate/unix/acpiexamples/Makefile ============================================================================== --- vendor-sys/acpica/dist/generate/unix/acpiexamples/Makefile Mon Sep 29 17:51:39 2014 (r272285) +++ vendor-sys/acpica/dist/generate/unix/acpiexamples/Makefile Mon Sep 29 19:53:38 2014 (r272286) @@ -162,7 +162,7 @@ OBJECTS = \ # CFLAGS += \ -DACPI_EXAMPLE_APP\ - -I$(EXAMPLES) + -I$(ACPIEXAMPLES) # # Common Rules Modified: vendor-sys/acpica/dist/generate/unix/acpiexec/Makefile ============================================================================== --- vendor-sys/acpica/dist/generate/unix/acpiexec/Makefile Mon Sep 29 17:51:39 2014 (r272285) +++ vendor-sys/acpica/dist/generate/unix/acpiexec/Makefile Mon Sep 29 19:53:38 2014 (r272286) @@ -43,6 +43,7 @@ OBJECTS = \ $(OBJDIR)/aeexec.o\ $(OBJDIR)/aehandlers.o\ $(OBJDIR)/aemain.o\ + $(OBJDIR)/aeregion.o\ $(OBJDIR)/aetables.o\ $(OBJDIR)/ahids.o\ $(OBJDIR)/ahuuids.o\ Modified: vendor-sys/acpica/dist/generate/unix/iasl/Makefile ============================================================================== --- vendor-sys/acpica/dist/generate/unix/iasl/Makefile Mon Sep 29 17:51:39 2014 (r272285) +++ vendor-sys/acpica/dist/generate/unix/iasl/Makefile Mon Sep 29 19:53:38 2014 (r272286) @@ -66,6 +66,9 @@ OBJECTS = \ $(OBJDIR)/asllookup.o\ $(OBJDIR)/aslmain.o\ $(OBJDIR)/aslmap.o\ + $(OBJDIR)/aslmapenter.o\ + $(OBJDIR)/aslmapoutput.o\ + $(OBJDIR)/aslmaputils.o\ $(OBJDIR)/aslmessages.o\ $(OBJDIR)/aslmethod.o\ $(OBJDIR)/aslnamesp.o\ @@ -228,6 +231,7 @@ MISC = \ ASL_PARSER = \ $(ASL_COMPILER)/aslparser.y\ + $(ASL_COMPILER)/aslsupport.y\ $(ASL_COMPILER)/asltokens.y\ $(ASL_COMPILER)/asltypes.y\ $(ASL_COMPILER)/aslrules.y @@ -254,7 +258,7 @@ include ../Makefile.rules # # Macro processing for iASL .y files # -$(OBJDIR)/aslcompiler.y : $(ASL_PARSER) +$(OBJDIR)/aslcompiler.y : $(ASL_PARSER) $(MACROPROC) $(MFLAGS) $(ASL_COMPILER)/aslparser.y > $(OBJDIR)/aslcompiler.y # Modified: vendor-sys/acpica/dist/source/common/adisasm.c ============================================================================== --- vendor-sys/acpica/dist/source/common/adisasm.c Mon Sep 29 17:51:39 2014 (r272285) +++ vendor-sys/acpica/dist/source/common/adisasm.c Mon Sep 29 19:53:38 2014 (r272286) @@ -128,7 +128,7 @@ AcpiDsMethodDataInitArgs ( static ACPI_TABLE_DESC LocalTables[1]; -static ACPI_PARSE_OBJECT *AcpiGbl_ParseOpRoot; +ACPI_PARSE_OBJECT *AcpiGbl_ParseOpRoot; /******************************************************************************* @@ -489,6 +489,14 @@ AdAmlDisassemble ( fprintf (stderr, "Disassembly completed\n"); fprintf (stderr, "ASL Output: %s - %u bytes\n", DisasmFilename, CmGetFileSize (File)); + + if (Gbl_MapfileFlag) + { + fprintf (stderr, "%14s %s - %u bytes\n", + Gbl_Files[ASL_FILE_MAP_OUTPUT].ShortDescription, + Gbl_Files[ASL_FILE_MAP_OUTPUT].Filename, + FlGetFileSize (ASL_FILE_MAP_OUTPUT)); + } } } @@ -688,6 +696,7 @@ AdDisplayTables ( } AcpiDmDisassemble (NULL, AcpiGbl_ParseOpRoot, ACPI_UINT32_MAX); + MpEmitMappingInfo (); if (AcpiGbl_DbOpt_verbose) { Modified: vendor-sys/acpica/dist/source/common/ahids.c ============================================================================== --- vendor-sys/acpica/dist/source/common/ahids.c Mon Sep 29 17:51:39 2014 (r272285) +++ vendor-sys/acpica/dist/source/common/ahids.c Mon Sep 29 19:53:38 2014 (r272286) @@ -54,7 +54,9 @@ const AH_DEVICE_ID AslDeviceIds[] = { {"10EC5640", "Realtek I2S Audio Codec"}, + {"80860F09", "Intel PWM Controller"}, {"80860F0A", "Intel Atom UART Controller"}, + {"80860F0E", "Intel SPI Controller"}, {"80860F14", "Intel Baytrail SDIO/MMC Host Controller"}, {"80860F28", "Intel SST Audio DSP"}, {"80860F41", "Intel Baytrail I2C Host Controller"}, @@ -73,12 +75,20 @@ const AH_DEVICE_ID AslDeviceIds[] = {"ACPI000D", "Power Meter Device"}, {"ACPI000E", "Time and Alarm Device"}, {"ACPI000F", "User Presence Detection Device"}, + {"ADMA0F28", "Intel Audio DMA"}, + {"AMCR0F28", "Intel Audio Machine Driver"}, {"ATK4001", "Asus Radio Control Button"}, {"ATML1000", "Atmel Touchscreen Controller"}, + {"AUTH2750", "AuthenTec AES2750"}, {"BCM2E39", "Broadcom BT Serial Bus Driver over UART Bus Enumerator"}, + {"BCM4752E", "Broadcom GPS Controller"}, + {"BMG0160", "Bosch Gyro Sensor"}, {"CPLM3218", "Capella Micro CM3218x Ambient Light Sensor"}, {"DELLABCE", "Dell Airplane Mode Switch Driver"}, {"DLAC3002", "Qualcomm Atheros Bluetooth UART Transport"}, + {"FTTH5506", "FocalTech 5506 Touch Controller"}, + {"HAD0F28", "Intel HDMI Audio Driver"}, + {"INBC0000", "GPIO Expander"}, {"INT0002", "Virtual GPIO Controller"}, {"INT0800", "Intel 82802 Firmware Hub Device"}, {"INT3394", "ACPI System Fan"}, @@ -87,6 +97,7 @@ const AH_DEVICE_ID AslDeviceIds[] = {"INT33A1", "Intel Power Engine"}, {"INT33BB", "Intel Baytrail SD Host Controller"}, {"INT33BD", "Intel Baytrail Mailbox Device"}, + {"INT33BE", "Camera Sensor OV5693"}, {"INT33C0", "Intel Serial I/O SPI Host Controller"}, {"INT33C1", "Intel Serial I/O SPI Host Controller"}, {"INT33C2", "Intel Serial I/O I2C Host Controller"}, @@ -105,9 +116,12 @@ const AH_DEVICE_ID AslDeviceIds[] = {"INT33D4", "Intel GPIO Buttons"}, {"INT33D6", "Intel Virtual Buttons Device"}, {"INT33F0", "Camera Sensor MT9M114"}, + {"INT33F4", "XPOWER PMIC Controller"}, + {"INT33F5", "TI PMIC Controller"}, {"INT33FB", "MIPI-CSI Camera Sensor OV2722"}, {"INT33FC", "Intel Baytrail GPIO Controller"}, {"INT33FD", "Intel Baytrail Power Management IC"}, + {"INT33FE", "XPOWER Battery Device"}, {"INT3400", "Intel Dynamic Power Performance Management"}, {"INT3401", "Intel Extended Thermal Model CPU"}, {"INT3403", "DPTF Temperature Sensor"}, @@ -127,8 +141,10 @@ const AH_DEVICE_ID AslDeviceIds[] = {"LNXSYSTM", "ACPI Root Node"}, {"LNXTHERM", "ACPI Thermal Zone"}, {"LNXVIDEO", "ACPI Video Controller"}, + {"MAX17047", "Fuel Gauge Controller"}, {"MSFT0101", "TPM 2.0 Security Device"}, {"NXP5442", "NXP 5442 Near Field Communications Controller"}, + {"NXP5472", "NXP NFC"}, {"PNP0000", "8259-compatible Programmable Interrupt Controller"}, {"PNP0001", "EISA Interrupt Controller"}, {"PNP0002", "MCA Interrupt Controller"}, @@ -181,7 +197,13 @@ const AH_DEVICE_ID AslDeviceIds[] = {"PNP0D40", "SDA Standard Compliant SD Host Controller"}, {"PNP0D80", "Windows-compatible System Power Management Controller"}, {"PNP0F03", "Microsoft PS/2-style Mouse"}, + {"PNP0F13", "PS/2 Mouse"}, + {"RTL8723", "Realtek Wireless Controller"}, + {"SMB0349", "Charger"}, {"SMO91D0", "Sensor Hub"}, + {"SMSC3750", "SMSC 3750 USB MUX"}, + {"SSPX0000", "Intel SSP Device"}, + {"TBQ24296", "Charger"}, {NULL, NULL} }; Modified: vendor-sys/acpica/dist/source/compiler/aslcompile.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcompile.c Mon Sep 29 17:51:39 2014 (r272285) +++ vendor-sys/acpica/dist/source/compiler/aslcompile.c Mon Sep 29 19:53:38 2014 (r272286) @@ -540,6 +540,10 @@ CmDoOutputFiles ( /* Dump the namespace to the .nsp file if requested */ (void) NsDisplayNamespace (); + + /* Dump the device mapping file */ + + MpEmitMappingInfo (); } Modified: vendor-sys/acpica/dist/source/compiler/aslcompiler.h ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcompiler.h Mon Sep 29 17:51:39 2014 (r272285) +++ vendor-sys/acpica/dist/source/compiler/aslcompiler.h Mon Sep 29 19:53:38 2014 (r272286) @@ -808,6 +808,13 @@ ACPI_STATUS FlOpenMiscOutputFiles ( char *InputFilename); +/* + * aslhwmap - hardware map summary + */ +void +MpEmitMappingInfo ( + void); + /* * asload - load namespace in prep for cross reference @@ -1045,8 +1052,7 @@ RsCheckListForDuplicates ( ASL_RESOURCE_NODE * RsDoOneResourceDescriptor ( - ACPI_PARSE_OBJECT *DescriptorTypeOp, - UINT32 CurrentByteOffset, + ASL_RESOURCE_INFO *Info, UINT8 *State); /* Values for State above */ @@ -1070,43 +1076,35 @@ RsDoResourceTemplate ( */ ASL_RESOURCE_NODE * RsDoEndTagDescriptor ( - ACPI_PARSE_OBJECT *Op, - UINT32 CurrentByteOffset); + ASL_RESOURCE_INFO *Info); ASL_RESOURCE_NODE * RsDoEndDependentDescriptor ( - ACPI_PARSE_OBJECT *Op, - UINT32 CurrentByteOffset); + ASL_RESOURCE_INFO *Info); ASL_RESOURCE_NODE * RsDoMemory24Descriptor ( - ACPI_PARSE_OBJECT *Op, - UINT32 CurrentByteOffset); + ASL_RESOURCE_INFO *Info); ASL_RESOURCE_NODE * RsDoMemory32Descriptor ( - ACPI_PARSE_OBJECT *Op, - UINT32 CurrentByteOffset); + ASL_RESOURCE_INFO *Info); ASL_RESOURCE_NODE * RsDoMemory32FixedDescriptor ( - ACPI_PARSE_OBJECT *Op, - UINT32 CurrentByteOffset); + ASL_RESOURCE_INFO *Info); ASL_RESOURCE_NODE * RsDoStartDependentDescriptor ( - ACPI_PARSE_OBJECT *Op, - UINT32 CurrentByteOffset); + ASL_RESOURCE_INFO *Info); ASL_RESOURCE_NODE * RsDoStartDependentNoPriDescriptor ( - ACPI_PARSE_OBJECT *Op, - UINT32 CurrentByteOffset); + ASL_RESOURCE_INFO *Info); ASL_RESOURCE_NODE * RsDoVendorSmallDescriptor ( - ACPI_PARSE_OBJECT *Op, - UINT32 CurrentByteOffset); + ASL_RESOURCE_INFO *Info); /* @@ -1114,33 +1112,27 @@ RsDoVendorSmallDescriptor ( */ ASL_RESOURCE_NODE * RsDoDmaDescriptor ( - ACPI_PARSE_OBJECT *Op, - UINT32 CurrentByteOffset); + ASL_RESOURCE_INFO *Info); ASL_RESOURCE_NODE * RsDoFixedDmaDescriptor ( - ACPI_PARSE_OBJECT *Op, - UINT32 CurrentByteOffset); + ASL_RESOURCE_INFO *Info); ASL_RESOURCE_NODE * RsDoFixedIoDescriptor ( - ACPI_PARSE_OBJECT *Op, - UINT32 CurrentByteOffset); + ASL_RESOURCE_INFO *Info); ASL_RESOURCE_NODE * RsDoIoDescriptor ( - ACPI_PARSE_OBJECT *Op, - UINT32 CurrentByteOffset); + ASL_RESOURCE_INFO *Info); ASL_RESOURCE_NODE * RsDoIrqDescriptor ( - ACPI_PARSE_OBJECT *Op, - UINT32 CurrentByteOffset); + ASL_RESOURCE_INFO *Info); ASL_RESOURCE_NODE * RsDoIrqNoFlagsDescriptor ( - ACPI_PARSE_OBJECT *Op, - UINT32 CurrentByteOffset); + ASL_RESOURCE_INFO *Info); /* @@ -1148,61 +1140,50 @@ RsDoIrqNoFlagsDescriptor ( */ ASL_RESOURCE_NODE * RsDoInterruptDescriptor ( - ACPI_PARSE_OBJECT *Op, - UINT32 CurrentByteOffset); + ASL_RESOURCE_INFO *Info); ASL_RESOURCE_NODE * RsDoVendorLargeDescriptor ( - ACPI_PARSE_OBJECT *Op, - UINT32 CurrentByteOffset); + ASL_RESOURCE_INFO *Info); ASL_RESOURCE_NODE * RsDoGeneralRegisterDescriptor ( - ACPI_PARSE_OBJECT *Op, - UINT32 CurrentByteOffset); + ASL_RESOURCE_INFO *Info); ASL_RESOURCE_NODE * RsDoGpioIntDescriptor ( - ACPI_PARSE_OBJECT *Op, - UINT32 CurrentByteOffset); + ASL_RESOURCE_INFO *Info); ASL_RESOURCE_NODE * RsDoGpioIoDescriptor ( - ACPI_PARSE_OBJECT *Op, - UINT32 CurrentByteOffset); + ASL_RESOURCE_INFO *Info); ASL_RESOURCE_NODE * RsDoI2cSerialBusDescriptor ( - ACPI_PARSE_OBJECT *Op, - UINT32 CurrentByteOffset); + ASL_RESOURCE_INFO *Info); ASL_RESOURCE_NODE * RsDoSpiSerialBusDescriptor ( - ACPI_PARSE_OBJECT *Op, - UINT32 CurrentByteOffset); + ASL_RESOURCE_INFO *Info); ASL_RESOURCE_NODE * RsDoUartSerialBusDescriptor ( - ACPI_PARSE_OBJECT *Op, - UINT32 CurrentByteOffset); + ASL_RESOURCE_INFO *Info); /* * aslrestype2d - DWord address descriptors */ ASL_RESOURCE_NODE * RsDoDwordIoDescriptor ( - ACPI_PARSE_OBJECT *Op, - UINT32 CurrentByteOffset); + ASL_RESOURCE_INFO *Info); ASL_RESOURCE_NODE * RsDoDwordMemoryDescriptor ( - ACPI_PARSE_OBJECT *Op, - UINT32 CurrentByteOffset); + ASL_RESOURCE_INFO *Info); ASL_RESOURCE_NODE * RsDoDwordSpaceDescriptor ( - ACPI_PARSE_OBJECT *Op, - UINT32 CurrentByteOffset); + ASL_RESOURCE_INFO *Info); /* @@ -1210,18 +1191,15 @@ RsDoDwordSpaceDescriptor ( */ ASL_RESOURCE_NODE * RsDoExtendedIoDescriptor ( - ACPI_PARSE_OBJECT *Op, - UINT32 CurrentByteOffset); + ASL_RESOURCE_INFO *Info); ASL_RESOURCE_NODE * RsDoExtendedMemoryDescriptor ( - ACPI_PARSE_OBJECT *Op, - UINT32 CurrentByteOffset); + ASL_RESOURCE_INFO *Info); ASL_RESOURCE_NODE * RsDoExtendedSpaceDescriptor ( - ACPI_PARSE_OBJECT *Op, - UINT32 CurrentByteOffset); + ASL_RESOURCE_INFO *Info); /* @@ -1229,18 +1207,15 @@ RsDoExtendedSpaceDescriptor ( */ ASL_RESOURCE_NODE * RsDoQwordIoDescriptor ( - ACPI_PARSE_OBJECT *Op, - UINT32 CurrentByteOffset); + ASL_RESOURCE_INFO *Info); ASL_RESOURCE_NODE * RsDoQwordMemoryDescriptor ( - ACPI_PARSE_OBJECT *Op, - UINT32 CurrentByteOffset); + ASL_RESOURCE_INFO *Info); ASL_RESOURCE_NODE * RsDoQwordSpaceDescriptor ( - ACPI_PARSE_OBJECT *Op, - UINT32 CurrentByteOffset); + ASL_RESOURCE_INFO *Info); /* @@ -1248,18 +1223,16 @@ RsDoQwordSpaceDescriptor ( */ ASL_RESOURCE_NODE * RsDoWordIoDescriptor ( - ACPI_PARSE_OBJECT *Op, - UINT32 CurrentByteOffset); + ASL_RESOURCE_INFO *Info); ASL_RESOURCE_NODE * RsDoWordSpaceDescriptor ( - ACPI_PARSE_OBJECT *Op, - UINT32 CurrentByteOffset); + ASL_RESOURCE_INFO *Info); ASL_RESOURCE_NODE * RsDoWordBusNumberDescriptor ( - ACPI_PARSE_OBJECT *Op, - UINT32 CurrentByteOffset); + ASL_RESOURCE_INFO *Info); + /* * Entry to data table compiler subsystem Modified: vendor-sys/acpica/dist/source/compiler/asldefine.h ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asldefine.h Mon Sep 29 17:51:39 2014 (r272285) +++ vendor-sys/acpica/dist/source/compiler/asldefine.h Mon Sep 29 19:53:38 2014 (r272286) @@ -108,6 +108,7 @@ #define FILE_SUFFIX_PREPROCESSOR "i" #define FILE_SUFFIX_AML_CODE "aml" +#define FILE_SUFFIX_MAP "map" #define FILE_SUFFIX_LISTING "lst" #define FILE_SUFFIX_HEX_DUMP "hex" #define FILE_SUFFIX_DEBUG "txt" Modified: vendor-sys/acpica/dist/source/compiler/aslglobal.h ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslglobal.h Mon Sep 29 17:51:39 2014 (r272285) +++ vendor-sys/acpica/dist/source/compiler/aslglobal.h Mon Sep 29 19:53:38 2014 (r272286) @@ -81,7 +81,8 @@ ASL_FILE_INFO Gbl_ {NULL, NULL, "C Source: ", "C Code Output"}, {NULL, NULL, "ASM Include: ", "Assembly Header Output"}, {NULL, NULL, "C Include: ", "C Header Output"}, - {NULL, NULL, "Offset Table: ", "C Offset Table Output"} + {NULL, NULL, "Offset Table: ", "C Offset Table Output"}, + {NULL, NULL, "Device Map: ", "Device Map Output"} }; #else @@ -141,6 +142,7 @@ ASL_EXTERN BOOLEAN ASL_ ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_DisassembleAll, FALSE); ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_UseDefaultAmlFilename, TRUE); +ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_MapfileFlag, FALSE); ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_NsOutputFlag, FALSE); ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_PreprocessorOutputFlag, FALSE); ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_DebugFlag, FALSE); @@ -221,6 +223,11 @@ ASL_EXTERN ASL_CACHE_INFO ASL_ ASL_EXTERN char ASL_INIT_GLOBAL (*Gbl_StringCacheNext, NULL); ASL_EXTERN char ASL_INIT_GLOBAL (*Gbl_StringCacheLast, NULL); +/* Map file */ + +ASL_EXTERN ACPI_GPIO_INFO ASL_INIT_GLOBAL (*Gbl_GpioList, NULL); +ASL_EXTERN ACPI_SERIAL_INFO ASL_INIT_GLOBAL (*Gbl_SerialList, NULL); + /* Misc */ Modified: vendor-sys/acpica/dist/source/compiler/aslload.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslload.c Mon Sep 29 17:51:39 2014 (r272285) +++ vendor-sys/acpica/dist/source/compiler/aslload.c Mon Sep 29 19:53:38 2014 (r272286) @@ -360,7 +360,6 @@ LdNamespace1Begin ( ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "Op %p [%s]\n", Op, Op->Asl.ParseOpName)); - /* * We are only interested in opcodes that have an associated name * (or multiple names) @@ -374,6 +373,34 @@ LdNamespace1Begin ( Status = LdLoadFieldElements (Op, WalkState); return (Status); + case AML_INT_CONNECTION_OP: + + + if (Op->Asl.Child->Asl.AmlOpcode != AML_INT_NAMEPATH_OP) + { + break; + } + Arg = Op->Asl.Child; + + Status = AcpiNsLookup (WalkState->ScopeInfo, Arg->Asl.ExternalName, + ACPI_TYPE_ANY, ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT, + WalkState, &Node); + if (ACPI_FAILURE (Status)) + { + break; + } + + if (Node->Type == ACPI_TYPE_BUFFER) + { + Arg->Asl.Node = Node; + + Arg = Node->Op->Asl.Child; /* Get namepath */ + Arg = Arg->Asl.Next; /* Get actual buffer */ + Arg = Arg->Asl.Child; /* Buffer length */ + Arg = Arg->Asl.Next; /* RAW_DATA buffer */ + } + break; + default: /* All other opcodes go below */ @@ -467,7 +494,6 @@ LdNamespace1Begin ( ObjectType = AslMapNamedOpcodeToDataType (Op->Asl.AmlOpcode); break; - case PARSEOP_SCOPE: /* * The name referenced by Scope(Name) must already exist at this point. Modified: vendor-sys/acpica/dist/source/compiler/aslmain.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslmain.c Mon Sep 29 17:51:39 2014 (r272285) +++ vendor-sys/acpica/dist/source/compiler/aslmain.c Mon Sep 29 19:53:38 2014 (r272286) @@ -172,6 +172,7 @@ Usage ( printf ("\nOptional Listing Files:\n"); ACPI_OPTION ("-l", "Create mixed listing file (ASL source and AML) (*.lst)"); + ACPI_OPTION ("-lm", "Create hardware summary map file (*.map)"); ACPI_OPTION ("-ln", "Create namespace file (*.nsp)"); ACPI_OPTION ("-ls", "Create combined source file (expanded includes) (*.src)"); @@ -404,7 +405,6 @@ main ( CleanupAndExit: UtFreeLineBuffers (); - AslParserCleanup (); if (AcpiGbl_ExternalFileList) Added: vendor-sys/acpica/dist/source/compiler/aslmapenter.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor-sys/acpica/dist/source/compiler/aslmapenter.c Mon Sep 29 19:53:38 2014 (r272286) @@ -0,0 +1,346 @@ +/****************************************************************************** + * + * Module Name: aslmapenter - Build resource descriptor/device maps + * + *****************************************************************************/ + +/* + * Copyright (C) 2000 - 2014, Intel Corp. + * 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, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * 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 MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES. + */ + +#include "acpi.h" +#include "accommon.h" +#include "acapps.h" +#include "aslcompiler.h" + +/* This module used for application-level code only */ + +#define _COMPONENT ACPI_COMPILER + ACPI_MODULE_NAME ("aslmapenter") + +/* Local prototypes */ + +static ACPI_GPIO_INFO * +MpCreateGpioInfo ( + UINT16 PinNumber, + char *DeviceName); + +static ACPI_SERIAL_INFO * +MpCreateSerialInfo ( + char *DeviceName, + UINT16 Address); + + +/******************************************************************************* + * + * FUNCTION: MpSaveGpioInfo + * + * PARAMETERS: Resource - GPIO resource descriptor + * PinCount - From GPIO descriptor + * PinList - From GPIO descriptor + * DeviceName - The "ResourceSource" name + * + * RETURN: None + * + * DESCRIPTION: External Interface. + * Save GPIO resource descriptor information. + * Creates new GPIO info blocks, one for each pin defined by the + * GPIO descriptor. + * + ******************************************************************************/ + +void +MpSaveGpioInfo ( + ACPI_PARSE_OBJECT *Op, + AML_RESOURCE *Resource, + UINT32 PinCount, + UINT16 *PinList, + char *DeviceName) +{ + ACPI_GPIO_INFO *Info; + UINT32 i; + + + /* Mapfile option enabled? */ + + if (!Gbl_MapfileFlag) + { + return; + } + + /* Create an info block for each pin defined in the descriptor */ + + for (i = 0; i < PinCount; i++) + { + Info = MpCreateGpioInfo (PinList[i], DeviceName); + + Info->Op = Op; + Info->DeviceName = DeviceName; + Info->PinCount = PinCount; + Info->PinIndex = i; + Info->PinNumber = PinList[i]; + Info->Type = Resource->Gpio.ConnectionType; + Info->Direction = (UINT8) (Resource->Gpio.IntFlags & 0x0003); /* _IOR, for IO descriptor */ + Info->Polarity = (UINT8) ((Resource->Gpio.IntFlags >> 1) & 0x0003); /* _POL, for INT descriptor */ + } +} + + +/******************************************************************************* + * + * FUNCTION: MpSaveSerialInfo + * + * PARAMETERS: Resource - A Serial resource descriptor + * DeviceName - The "ResourceSource" name. + * + * RETURN: None + * + * DESCRIPTION: External Interface. + * Save serial resource descriptor information. + * Creates a new serial info block. + * + ******************************************************************************/ + +void +MpSaveSerialInfo ( + ACPI_PARSE_OBJECT *Op, + AML_RESOURCE *Resource, + char *DeviceName) +{ + ACPI_SERIAL_INFO *Info; + UINT16 Address; + UINT32 Speed; + + + /* Mapfile option enabled? */ + + if (!Gbl_MapfileFlag) + { + return; + } + + if (Resource->DescriptorType != ACPI_RESOURCE_NAME_SERIAL_BUS) + { + return; + } + + /* Extract address and speed from the resource descriptor */ + + switch (Resource->CommonSerialBus.Type) + { + case AML_RESOURCE_I2C_SERIALBUSTYPE: + + Address = Resource->I2cSerialBus.SlaveAddress; + Speed = Resource->I2cSerialBus.ConnectionSpeed; + break; + + case AML_RESOURCE_SPI_SERIALBUSTYPE: + + Address = Resource->SpiSerialBus.DeviceSelection; + Speed = Resource->SpiSerialBus.ConnectionSpeed; + break; + + case AML_RESOURCE_UART_SERIALBUSTYPE: + + Address = 0; + Speed = Resource->UartSerialBus.DefaultBaudRate; + break; + + default: /* Invalid bus subtype */ + return; + } + + Info = MpCreateSerialInfo (DeviceName, Address); + + Info->Op = Op; + Info->DeviceName = DeviceName; + Info->Resource = Resource; + Info->Address = Address; + Info->Speed = Speed; +} + + +/******************************************************************************* + * + * FUNCTION: MpCreateGpioInfo + * + * PARAMETERS: PinNumber - GPIO pin number + * DeviceName - The "ResourceSource" name + * + * RETURN: New GPIO info block. + * + * DESCRIPTION: Create a new GPIO info block and place it on the global list. + * The list is sorted by GPIO device names first, and pin numbers + * secondarily. + * + ******************************************************************************/ + +static ACPI_GPIO_INFO * +MpCreateGpioInfo ( + UINT16 PinNumber, + char *DeviceName) +{ + ACPI_GPIO_INFO *Info; + ACPI_GPIO_INFO *NextGpio; + ACPI_GPIO_INFO *PrevGpio; + + + /* + * Allocate a new info block and insert it into the global GPIO list + * sorted by both source device name and then the pin number. There is + * one block per pin. + */ + Info = ACPI_CAST_PTR (ACPI_GPIO_INFO, + UtStringCacheCalloc (sizeof (ACPI_GPIO_INFO))); + + NextGpio = Gbl_GpioList; + PrevGpio = NULL; + if (!Gbl_GpioList) + { + Gbl_GpioList = Info; + Info->Next = NULL; + return (Info); + } + + /* Sort on source DeviceName first */ + + while (NextGpio && + (ACPI_STRCMP (DeviceName, NextGpio->DeviceName) > 0)) + { + PrevGpio = NextGpio; + NextGpio = NextGpio->Next; + } + + /* Now sort on the PinNumber */ + + while (NextGpio && + (NextGpio->PinNumber < PinNumber) && + !ACPI_STRCMP (DeviceName, NextGpio->DeviceName)) + { + PrevGpio = NextGpio; + NextGpio = NextGpio->Next; + } + + /* Finish the list insertion */ + + if (PrevGpio) + { + PrevGpio->Next = Info; + } + else + { + Gbl_GpioList = Info; + } + + Info->Next = NextGpio; + return (Info); +} + + +/******************************************************************************* + * + * FUNCTION: MpCreateSerialInfo + * + * PARAMETERS: DeviceName - The "ResourceSource" name. + * Address - Physical address for the device + * + * RETURN: New Serial info block. + * + * DESCRIPTION: Create a new Serial info block and place it on the global list. + * The list is sorted by Serial device names first, and addresses + * secondarily. + * + ******************************************************************************/ + +static ACPI_SERIAL_INFO * +MpCreateSerialInfo ( + char *DeviceName, + UINT16 Address) +{ + ACPI_SERIAL_INFO *Info; + ACPI_SERIAL_INFO *NextSerial; + ACPI_SERIAL_INFO *PrevSerial; + + + /* + * Allocate a new info block and insert it into the global Serial list + * sorted by both source device name and then the address. + */ + Info = ACPI_CAST_PTR (ACPI_SERIAL_INFO, + UtStringCacheCalloc (sizeof (ACPI_SERIAL_INFO))); + + NextSerial = Gbl_SerialList; + PrevSerial = NULL; + if (!Gbl_SerialList) + { + Gbl_SerialList = Info; + Info->Next = NULL; + return (Info); + } + + /* Sort on source DeviceName */ + + while (NextSerial && + (ACPI_STRCMP (DeviceName, NextSerial->DeviceName) > 0)) + { + PrevSerial = NextSerial; + NextSerial = NextSerial->Next; + } + + /* Now sort on the Address */ + + while (NextSerial && + (NextSerial->Address < Address) && + !ACPI_STRCMP (DeviceName, NextSerial->DeviceName)) + { + PrevSerial = NextSerial; + NextSerial = NextSerial->Next; + } + + /* Finish the list insertion */ + + if (PrevSerial) + { + PrevSerial->Next = Info; + } + else + { + Gbl_SerialList = Info; + } + + Info->Next = NextSerial; + return (Info); +} Added: vendor-sys/acpica/dist/source/compiler/aslmapoutput.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor-sys/acpica/dist/source/compiler/aslmapoutput.c Mon Sep 29 19:53:38 2014 (r272286) @@ -0,0 +1,661 @@ +/****************************************************************************** + * + * Module Name: aslmapoutput - Output/emit the resource descriptor/device maps + * + *****************************************************************************/ + +/* + * Copyright (C) 2000 - 2014, Intel Corp. + * 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 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Sep 29 19:54:17 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D33C15A6; Mon, 29 Sep 2014 19:54:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A5F6EDC7; Mon, 29 Sep 2014 19:54:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8TJsHHM006481; Mon, 29 Sep 2014 19:54:17 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8TJsHkU006480; Mon, 29 Sep 2014 19:54:17 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201409291954.s8TJsHkU006480@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Mon, 29 Sep 2014 19:54:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r272287 - vendor-sys/acpica/20140926 X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Sep 2014 19:54:17 -0000 Author: jkim Date: Mon Sep 29 19:54:17 2014 New Revision: 272287 URL: http://svnweb.freebsd.org/changeset/base/272287 Log: Tag ACPICA 20140926. Added: vendor-sys/acpica/20140926/ - copied from r272286, vendor-sys/acpica/dist/ From owner-svn-src-all@FreeBSD.ORG Mon Sep 29 21:45:57 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DB559BFD; Mon, 29 Sep 2014 21:45:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C7F36C47; Mon, 29 Sep 2014 21:45:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8TLjvHI059567; Mon, 29 Sep 2014 21:45:57 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8TLjvr5059566; Mon, 29 Sep 2014 21:45:57 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201409292145.s8TLjvr5059566@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 29 Sep 2014 21:45:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272288 - head/usr.bin/at X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Sep 2014 21:45:58 -0000 Author: delphij Date: Mon Sep 29 21:45:57 2014 New Revision: 272288 URL: http://svnweb.freebsd.org/changeset/base/272288 Log: When setting environment variables in the atrun script, use the "export foo=bar" form instead of "foo=bar; export foo" since the former allows the shell to catch variable names that are not valid shell identifiers. This will cause /bin/sh to exit with an error (which gets mailed to the at user) and it will not run the script. Obtained from: OpenBSD (r1.63 millert) MFC after: 3 days Modified: head/usr.bin/at/at.c Modified: head/usr.bin/at/at.c ============================================================================== --- head/usr.bin/at/at.c Mon Sep 29 19:54:17 2014 (r272287) +++ head/usr.bin/at/at.c Mon Sep 29 21:45:57 2014 (r272288) @@ -367,6 +367,7 @@ writefile(time_t runtimer, char queue) if (export) { + (void)fputs("export ", fp); fwrite(*atenv, sizeof(char), eqp-*atenv, fp); for(ap = eqp;*ap != '\0'; ap++) { @@ -389,7 +390,6 @@ writefile(time_t runtimer, char queue) fputc(*ap, fp); } } - fputs("; export ", fp); fwrite(*atenv, sizeof(char), eqp-*atenv -1, fp); fputc('\n', fp); From owner-svn-src-all@FreeBSD.ORG Mon Sep 29 21:51:49 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E01A4DA7; Mon, 29 Sep 2014 21:51:49 +0000 (UTC) Received: from mail-wg0-x22c.google.com (mail-wg0-x22c.google.com [IPv6:2a00:1450:400c:c00::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0D491C80; Mon, 29 Sep 2014 21:51:48 +0000 (UTC) Received: by mail-wg0-f44.google.com with SMTP id y10so1793820wgg.3 for ; Mon, 29 Sep 2014 14:51:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=4fUVDWlUlxLfA1kBRuDZ7MiKylzbbCF3k8nN7cLODww=; b=q13agHdjgDnPtI1vIA18Q7iqUgq3r5oTrs6pW1sOxNc2JWjNaCkUbWXeoz7Tmnjyvx wlpAD6FlcajaKm9V6IMl3WRVNJG3p8HIimYihkQYprQzhJApg0TgQcysW4fL+1Bk0maX 0eow3PGf/LF/2evCQe1v7Ihplgy7/qIfpvyzQ+m1T/V8/vnHfvkfkSNBuJhfairm29xl UXxQStW9VDbBK4wfRGtiGazpMQlDiPzORWSCpdCSJUeONi5qC6zYm/LDrDC/Qy81wQ6B nAG5NaPk2Ii8qPXzkZ3P3spJmt+vjps87/cokwher5OysJAa62SGm5o35rJV5z27NZJQ gAZA== X-Received: by 10.194.187.241 with SMTP id fv17mr48588923wjc.13.1412027507170; Mon, 29 Sep 2014 14:51:47 -0700 (PDT) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by mx.google.com with ESMTPSA id fv1sm17040929wjb.35.2014.09.29.14.51.46 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 29 Sep 2014 14:51:46 -0700 (PDT) Date: Mon, 29 Sep 2014 23:51:44 +0200 From: Mateusz Guzik To: Xin LI Subject: Re: svn commit: r272288 - head/usr.bin/at Message-ID: <20140929215143.GA17622@dft-labs.eu> References: <201409292145.s8TLjvr5059566@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <201409292145.s8TLjvr5059566@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Sep 2014 21:51:50 -0000 On Mon, Sep 29, 2014 at 09:45:57PM +0000, Xin LI wrote: > Author: delphij > Date: Mon Sep 29 21:45:57 2014 > New Revision: 272288 > URL: http://svnweb.freebsd.org/changeset/base/272288 > > Log: > When setting environment variables in the atrun script, use the > "export foo=bar" form instead of "foo=bar; export foo" since the > former allows the shell to catch variable names that are not valid > shell identifiers. This will cause /bin/sh to exit with an error > (which gets mailed to the at user) and it will not run the script. > > Obtained from: OpenBSD (r1.63 millert) > MFC after: 3 days > > Modified: > head/usr.bin/at/at.c > > Modified: head/usr.bin/at/at.c > ============================================================================== > --- head/usr.bin/at/at.c Mon Sep 29 19:54:17 2014 (r272287) > +++ head/usr.bin/at/at.c Mon Sep 29 21:45:57 2014 (r272288) > @@ -367,6 +367,7 @@ writefile(time_t runtimer, char queue) > > if (export) > { > + (void)fputs("export ", fp); > fwrite(*atenv, sizeof(char), eqp-*atenv, fp); > for(ap = eqp;*ap != '\0'; ap++) > { > @@ -389,7 +390,6 @@ writefile(time_t runtimer, char queue) > fputc(*ap, fp); > } > } > - fputs("; export ", fp); > fwrite(*atenv, sizeof(char), eqp-*atenv -1, fp); Should not this line also be removed? > fputc('\n', fp); > > -- Mateusz Guzik From owner-svn-src-all@FreeBSD.ORG Mon Sep 29 21:54:47 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3B1E6309; Mon, 29 Sep 2014 21:54:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 27D9DD34; Mon, 29 Sep 2014 21:54:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8TLsl4D064034; Mon, 29 Sep 2014 21:54:47 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8TLslLA064033; Mon, 29 Sep 2014 21:54:47 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201409292154.s8TLslLA064033@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 29 Sep 2014 21:54:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272289 - head/usr.bin/at X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Sep 2014 21:54:47 -0000 Author: delphij Date: Mon Sep 29 21:54:46 2014 New Revision: 272289 URL: http://svnweb.freebsd.org/changeset/base/272289 Log: Sigh, remove a line that needs to be removed along with previous commit. Submitted by: mjg MFC after: 3 days X-MFC-with: 272288 Modified: head/usr.bin/at/at.c Modified: head/usr.bin/at/at.c ============================================================================== --- head/usr.bin/at/at.c Mon Sep 29 21:45:57 2014 (r272288) +++ head/usr.bin/at/at.c Mon Sep 29 21:54:46 2014 (r272289) @@ -390,7 +390,6 @@ writefile(time_t runtimer, char queue) fputc(*ap, fp); } } - fwrite(*atenv, sizeof(char), eqp-*atenv -1, fp); fputc('\n', fp); } From owner-svn-src-all@FreeBSD.ORG Mon Sep 29 23:59:20 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4765CBC7; Mon, 29 Sep 2014 23:59:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 346B0BE9; Mon, 29 Sep 2014 23:59:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8TNxKVg020427; Mon, 29 Sep 2014 23:59:20 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8TNxK1j020426; Mon, 29 Sep 2014 23:59:20 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201409292359.s8TNxK1j020426@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Mon, 29 Sep 2014 23:59:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272290 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Sep 2014 23:59:20 -0000 Author: mjg Date: Mon Sep 29 23:59:19 2014 New Revision: 272290 URL: http://svnweb.freebsd.org/changeset/base/272290 Log: Use bzero instead of explicitly zeroing stuff in do_execve. While strictly speaking this is not correct since some fields are pointers, it makes no difference on all supported archs and we already rely on it doing the right thing in other places. No functional changes. Modified: head/sys/kern/kern_exec.c Modified: head/sys/kern/kern_exec.c ============================================================================== --- head/sys/kern/kern_exec.c Mon Sep 29 21:54:46 2014 (r272289) +++ head/sys/kern/kern_exec.c Mon Sep 29 23:59:19 2014 (r272290) @@ -379,29 +379,10 @@ do_execve(td, args, mac_p) /* * Initialize part of the common data */ + bzero(imgp, sizeof(*imgp)); imgp->proc = p; - imgp->execlabel = NULL; imgp->attr = &attr; - imgp->entry_addr = 0; - imgp->reloc_base = 0; - imgp->vmspace_destroyed = 0; - imgp->interpreted = 0; - imgp->opened = 0; - imgp->interpreter_name = NULL; - imgp->auxargs = NULL; - imgp->vp = NULL; - imgp->object = NULL; - imgp->firstpage = NULL; - imgp->ps_strings = 0; - imgp->auxarg_size = 0; imgp->args = args; - imgp->execpath = imgp->freepath = NULL; - imgp->execpathp = 0; - imgp->canary = 0; - imgp->canarylen = 0; - imgp->pagesizes = 0; - imgp->pagesizeslen = 0; - imgp->stack_prot = 0; #ifdef MAC error = mac_execve_enter(imgp, mac_p); @@ -409,8 +390,6 @@ do_execve(td, args, mac_p) goto exec_fail; #endif - imgp->image_header = NULL; - /* * Translate the file name. namei() returns a vnode pointer * in ni_vp amoung other things. From owner-svn-src-all@FreeBSD.ORG Tue Sep 30 00:06:54 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CBD0FE74; Tue, 30 Sep 2014 00:06:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B839ECF3; Tue, 30 Sep 2014 00:06:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8U06s2C025822; Tue, 30 Sep 2014 00:06:54 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8U06sGX025821; Tue, 30 Sep 2014 00:06:54 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201409300006.s8U06sGX025821@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 30 Sep 2014 00:06:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272291 - head/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2014 00:06:54 -0000 Author: bdrewery Date: Tue Sep 30 00:06:53 2014 New Revision: 272291 URL: http://svnweb.freebsd.org/changeset/base/272291 Log: Document [EPERM] for UNIX sockets. MFC after: 2 weeks Modified: head/lib/libc/sys/connect.2 Modified: head/lib/libc/sys/connect.2 ============================================================================== --- head/lib/libc/sys/connect.2 Mon Sep 29 23:59:19 2014 (r272290) +++ head/lib/libc/sys/connect.2 Tue Sep 30 00:06:53 2014 (r272291) @@ -28,7 +28,7 @@ .\" @(#)connect.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd June 26, 2014 +.Dd September 29, 2014 .Dt CONNECT 2 .Os .Sh NAME @@ -160,6 +160,8 @@ Search permission is denied for a compon Write access to the named socket is denied. .It Bq Er ELOOP Too many symbolic links were encountered in translating the pathname. +.It Bq Er EPERM +Write access to the named socket is denied. .El .Sh SEE ALSO .Xr accept 2 , From owner-svn-src-all@FreeBSD.ORG Tue Sep 30 03:19:36 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 16CA7589; Tue, 30 Sep 2014 03:19:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EB6AEE73; Tue, 30 Sep 2014 03:19:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8U3JZQo005441; Tue, 30 Sep 2014 03:19:35 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8U3JTkm005411; Tue, 30 Sep 2014 03:19:29 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201409300319.s8U3JTkm005411@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 30 Sep 2014 03:19:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272292 - in head/sys: contrib/dev/ath/ath_hal/ar9300 dev/ath dev/ath/ath_hal dev/ath/ath_hal/ar5210 dev/ath/ath_hal/ar5211 dev/ath/ath_hal/ar5212 dev/ath/ath_hal/ar5312 dev/ath/ath_hal... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2014 03:19:36 -0000 Author: adrian Date: Tue Sep 30 03:19:29 2014 New Revision: 272292 URL: http://svnweb.freebsd.org/changeset/base/272292 Log: Add initial support for the AR9485 CUS198 / CUS230 variants. These variants have a few differences from the default AR9485 NIC, namely: * a non-default antenna switch config; * slightly different RX gain table setup; * an external XLNA hooked up to a GPIO pin; * (and not yet done) RSSI threshold differences when doing slow diversity. To make this possible: * Add the PCI device list from Linux ath9k, complete with vendor and sub-vendor IDs for various things to be enabled; * .. and until FreeBSD learns about a PCI device list like this, write a search function inspired by the USB device enumeration code; * add HAL_OPS_CONFIG to the HAL attach methods; the HAL can use this to initialise its local driver parameters upon attach; * copy these parameters over in the AR9300 HAL; * don't default to override the antenna switch - only do it for the chips that require it; * I brought over ar9300_attenuation_apply() from ath9k which is cleaner and easier to read for this particular NIC. This is a work in progress. I'm worried that there's some post-AR9380 NIC out there which doesn't work without the antenna override set as I currently haven't implemented bluetooth coexistence for the AR9380 and later HAL. But I'd rather have this code in the tree and fix it up before 11.0-RELEASE happens versus having a set of newer NICs in laptops be effectively RX deaf. Tested: * AR9380 (STA) * AR9485 CUS198 (STA) Obtained from: Qualcomm Atheros, Linux ath9k Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300.h head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_attach.c head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_eeprom.c head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.h head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_reset.c head/sys/dev/ath/ath_hal/ah.c head/sys/dev/ath/ath_hal/ah.h head/sys/dev/ath/ath_hal/ah_internal.h head/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c head/sys/dev/ath/ath_hal/ar5211/ar5211_attach.c head/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c head/sys/dev/ath/ath_hal/ar5312/ar5312_attach.c head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c head/sys/dev/ath/ath_hal/ar9001/ar9130_attach.c head/sys/dev/ath/ath_hal/ar9001/ar9160_attach.c head/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c head/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c head/sys/dev/ath/ath_hal/ar9002/ar9287_attach.c head/sys/dev/ath/if_ath.c head/sys/dev/ath/if_ath_lna_div.c head/sys/dev/ath/if_ath_pci.c head/sys/dev/ath/if_athvar.h Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300.h ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300.h Tue Sep 30 00:06:53 2014 (r272291) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300.h Tue Sep 30 03:19:29 2014 (r272292) @@ -1181,10 +1181,11 @@ struct ath_hal; extern struct ath_hal_9300 * ar9300_new_state(u_int16_t devid, HAL_SOFTC sc, HAL_BUS_TAG st, HAL_BUS_HANDLE sh, uint16_t *eepromdata, + HAL_OPS_CONFIG *ah_config, HAL_STATUS *status); extern struct ath_hal * ar9300_attach(u_int16_t devid, HAL_SOFTC sc, HAL_BUS_TAG st, HAL_BUS_HANDLE sh, uint16_t *eepromdata, - HAL_STATUS *status); + HAL_OPS_CONFIG *ah_config, HAL_STATUS *status); extern void ar9300_detach(struct ath_hal *ah); extern void ar9300_read_revisions(struct ath_hal *ah); extern HAL_BOOL ar9300_chip_test(struct ath_hal *ah); Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_attach.c ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_attach.c Tue Sep 30 00:06:53 2014 (r272291) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_attach.c Tue Sep 30 03:19:29 2014 (r272292) @@ -618,7 +618,8 @@ ar9300_read_revisions(struct ath_hal *ah */ struct ath_hal * ar9300_attach(u_int16_t devid, HAL_SOFTC sc, HAL_BUS_TAG st, - HAL_BUS_HANDLE sh, uint16_t *eepromdata, HAL_STATUS *status) + HAL_BUS_HANDLE sh, uint16_t *eepromdata, HAL_OPS_CONFIG *ah_config, + HAL_STATUS *status) { struct ath_hal_9300 *ahp; struct ath_hal *ah; @@ -628,7 +629,7 @@ ar9300_attach(u_int16_t devid, HAL_SOFTC HAL_NO_INTERSPERSED_READS; /* NB: memory is returned zero'd */ - ahp = ar9300_new_state(devid, sc, st, sh, eepromdata, status); + ahp = ar9300_new_state(devid, sc, st, sh, eepromdata, ah_config, status); if (ahp == AH_NULL) { return AH_NULL; } @@ -654,12 +655,6 @@ ar9300_attach(u_int16_t devid, HAL_SOFTC /* XXX FreeBSD: enable RX mitigation */ ah->ah_config.ath_hal_intr_mitigation_rx = 1; - /* - * XXX what's this do? Check in the qcamain driver code - * as to what it does. - */ - ah->ah_config.ath_hal_ext_atten_margin_cfg = 0; - /* interrupt mitigation */ #ifdef AR5416_INT_MITIGATION if (ah->ah_config.ath_hal_intr_mitigation_rx != 0) { @@ -2378,7 +2373,9 @@ ar9300_detach(struct ath_hal *ah) struct ath_hal_9300 * ar9300_new_state(u_int16_t devid, HAL_SOFTC sc, HAL_BUS_TAG st, HAL_BUS_HANDLE sh, - uint16_t *eepromdata, HAL_STATUS *status) + uint16_t *eepromdata, + HAL_OPS_CONFIG *ah_config, + HAL_STATUS *status) { static const u_int8_t defbssidmask[IEEE80211_ADDR_LEN] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; @@ -2430,7 +2427,7 @@ ar9300_new_state(u_int16_t devid, HAL_SO ** Initialize factory defaults in the private space */ // ath_hal_factory_defaults(AH_PRIVATE(ah), hal_conf_parm); - ar9300_config_defaults_freebsd(ah); + ar9300_config_defaults_freebsd(ah, ah_config); /* XXX FreeBSD: cal is always in EEPROM */ #if 0 @@ -2456,6 +2453,7 @@ ar9300_new_state(u_int16_t devid, HAL_SO AH_PRIVATE(ah)->ah_tpScale = HAL_TP_SCALE_MAX; /* no scaling */ ahp->ah_atim_window = 0; /* [0..1000] */ + ahp->ah_diversity_control = ah->ah_config.ath_hal_diversity_control; ahp->ah_antenna_switch_swap = @@ -3835,6 +3833,11 @@ ar9300_ant_div_comb_get_config(struct at } else { div_comb_conf->antdiv_configgroup = DEFAULT_ANTDIV_CONFIG_GROUP; } + + /* + * XXX TODO: allow the HAL to override the rssithres and fast_div_bias + * values (eg CUS198.) + */ } void Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_eeprom.c ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_eeprom.c Tue Sep 30 00:06:53 2014 (r272291) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_eeprom.c Tue Sep 30 03:19:29 2014 (r272292) @@ -1606,6 +1606,7 @@ HAL_BOOL ar9300_ant_ctrl_apply(struct at if ( AR_SREV_POSEIDON(ah) && (ahp->ah_lna_div_use_bt_ant_enable == TRUE) ) { value &= ~AR_SWITCH_TABLE_COM2_ALL; value |= ah->ah_config.ath_hal_ant_ctrl_comm2g_switch_enable; + HALDEBUG(ah, HAL_DEBUG_RESET, "%s: com2=0x%08x\n", __func__, value) } #endif /* ATH_ANT_DIV_COMB */ OS_REG_RMW_FIELD(ah, AR_PHY_SWITCH_COM_2, AR_SWITCH_TABLE_COM2_ALL, value); @@ -1711,6 +1712,8 @@ HAL_BOOL ar9300_ant_ctrl_apply(struct at /* For WB225, need to swith ANT2 from BT to Wifi * This will not affect HB125 LNA diversity feature. */ + HALDEBUG(ah, HAL_DEBUG_RESET, "%s: com2=0x%08x\n", __func__, + ah->ah_config.ath_hal_ant_ctrl_comm2g_switch_enable) OS_REG_RMW_FIELD(ah, AR_PHY_SWITCH_COM_2, AR_SWITCH_TABLE_COM2_ALL, ah->ah_config.ath_hal_ant_ctrl_comm2g_switch_enable); break; @@ -1776,6 +1779,7 @@ ar9300_attenuation_margin_chain_get(stru return 0; } +#if 0 HAL_BOOL ar9300_attenuation_apply(struct ath_hal *ah, u_int16_t channel) { u_int32_t value; @@ -1814,6 +1818,75 @@ HAL_BOOL ar9300_attenuation_apply(struct } return 0; } +#endif +HAL_BOOL +ar9300_attenuation_apply(struct ath_hal *ah, u_int16_t channel) +{ + int i; + uint32_t value; + uint32_t ext_atten_reg[3] = { + AR_PHY_EXT_ATTEN_CTL_0, + AR_PHY_EXT_ATTEN_CTL_1, + AR_PHY_EXT_ATTEN_CTL_2 + }; + + /* + * If it's an AR9462 and we're receiving on the second + * chain only, set the chain 0 details from chain 1 + * calibration. + * + * This is from ath9k. + */ + if (AR_SREV_JUPITER(ah) && (AH9300(ah)->ah_rx_chainmask == 0x2)) { + value = ar9300_attenuation_chain_get(ah, 1, channel); + OS_REG_RMW_FIELD(ah, ext_atten_reg[0], + AR_PHY_EXT_ATTEN_CTL_XATTEN1_DB, value); + value = ar9300_attenuation_margin_chain_get(ah, 1, channel); + OS_REG_RMW_FIELD(ah, ext_atten_reg[0], + AR_PHY_EXT_ATTEN_CTL_XATTEN1_MARGIN, value); + } + + /* + * Now, loop over the configured transmit chains and + * load in the attenuation/margin settings as appropriate. + */ + for (i = 0; i < 3; i++) { + if ((AH9300(ah)->ah_tx_chainmask & (1 << i)) == 0) + continue; + + value = ar9300_attenuation_chain_get(ah, i, channel); + OS_REG_RMW_FIELD(ah, ext_atten_reg[i], + AR_PHY_EXT_ATTEN_CTL_XATTEN1_DB, + value); + + if (AR_SREV_POSEIDON(ah) && + (ar9300_rx_gain_index_get(ah) == 0) && + ah->ah_config.ath_hal_ext_atten_margin_cfg) { + value = 5; + } else { + value = ar9300_attenuation_margin_chain_get(ah, 0, + channel); + } + + /* + * I'm not sure why it's loading in this setting into + * the chain 0 margin regardless of the current chain. + */ + if (ah->ah_config.ath_hal_min_gainidx) + OS_REG_RMW_FIELD(ah, + AR_PHY_EXT_ATTEN_CTL_0, + AR_PHY_EXT_ATTEN_CTL_XATTEN1_MARGIN, + value); + + OS_REG_RMW_FIELD(ah, + ext_atten_reg[i], + AR_PHY_EXT_ATTEN_CTL_XATTEN1_MARGIN, + value); + } + + return (0); +} + static u_int16_t ar9300_quick_drop_get(struct ath_hal *ah, int chain, u_int16_t channel) Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c Tue Sep 30 00:06:53 2014 (r272291) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c Tue Sep 30 03:19:29 2014 (r272292) @@ -254,7 +254,27 @@ ar9300_attach_freebsd_ops(struct ath_hal ah->ah_divLnaConfSet = ar9300_ant_div_comb_set_config; /* Setup HAL configuration defaults */ + /* XXX cus198 defaults from ath9k */ + /* xlna_gpio = 9 */ + /* xatten_margin_cfg = true */ + /* alt_mingainidx = true */ + /* comm2g_switch_enable = 0x000bbb88 */ + /* ant_comb.low_rssi_thresh = 20 */ + /* ant_comb.fast_div_bias = 3 */ + +#if 0 + /* + * The HAL code treats this as a mask. + * The ath9k code above treats it as a bit offset. + * So it should be set to 0x200, not 0x9. + */ + ah->ah_config.ath_hal_ext_lna_ctl_gpio = 0x200; /* bit 9 */ + ah->ah_config.ath_hal_ext_atten_margin_cfg = AH_TRUE; + ah->ah_config.ath_hal_min_gainidx = AH_TRUE; ah->ah_config.ath_hal_ant_ctrl_comm2g_switch_enable = 0x000bbb88; + /* XXX low_rssi_thresh */ + /* XXX fast_div_bias */ +#endif } HAL_BOOL @@ -338,9 +358,11 @@ ar9300_ani_poll_freebsd(struct ath_hal * * wants. */ void -ar9300_config_defaults_freebsd(struct ath_hal *ah) +ar9300_config_defaults_freebsd(struct ath_hal *ah, HAL_OPS_CONFIG *ah_config) { + /* Until FreeBSD's HAL does this by default - just copy */ + OS_MEMCPY(&ah->ah_config, ah_config, sizeof(HAL_OPS_CONFIG)); ah->ah_config.ath_hal_enable_ani = AH_TRUE; } Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.h ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.h Tue Sep 30 00:06:53 2014 (r272291) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.h Tue Sep 30 03:19:29 2014 (r272292) @@ -11,7 +11,8 @@ extern HAL_STATUS ar9300_eeprom_get_free extern HAL_BOOL ar9300_stop_tx_dma_freebsd(struct ath_hal *ah, u_int q); extern void ar9300_ani_poll_freebsd(struct ath_hal *ah, const struct ieee80211_channel *chan); -extern void ar9300_config_defaults_freebsd(struct ath_hal *ah); +extern void ar9300_config_defaults_freebsd(struct ath_hal *ah, + HAL_OPS_CONFIG *ah_config); extern HAL_BOOL ar9300_stop_dma_receive_freebsd(struct ath_hal *ah); extern HAL_BOOL ar9300_get_pending_interrupts_freebsd(struct ath_hal *ah, HAL_INT *masked); Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_reset.c ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_reset.c Tue Sep 30 00:06:53 2014 (r272291) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_reset.c Tue Sep 30 03:19:29 2014 (r272292) @@ -6151,6 +6151,7 @@ ar9300_ant_ctrl_set_lna_div_use_bt_ant(s value &= ~AR_SWITCH_TABLE_COM2_ALL; value |= ah->ah_config.ath_hal_ant_ctrl_comm2g_switch_enable; } + HALDEBUG(ah, HAL_DEBUG_RESET, "%s: com2=0x%08x\n", __func__, value); OS_REG_RMW_FIELD(ah, AR_PHY_SWITCH_COM_2, AR_SWITCH_TABLE_COM2_ALL, value); value = ar9300_eeprom_get(ahp, EEP_ANTDIV_control); Modified: head/sys/dev/ath/ath_hal/ah.c ============================================================================== --- head/sys/dev/ath/ath_hal/ah.c Tue Sep 30 00:06:53 2014 (r272291) +++ head/sys/dev/ath/ath_hal/ah.c Tue Sep 30 03:19:29 2014 (r272292) @@ -55,7 +55,9 @@ ath_hal_probe(uint16_t vendorid, uint16_ */ struct ath_hal* ath_hal_attach(uint16_t devid, HAL_SOFTC sc, - HAL_BUS_TAG st, HAL_BUS_HANDLE sh, uint16_t *eepromdata, HAL_STATUS *error) + HAL_BUS_TAG st, HAL_BUS_HANDLE sh, uint16_t *eepromdata, + HAL_OPS_CONFIG *ah_config, + HAL_STATUS *error) { struct ath_hal_chip * const *pchip; @@ -66,7 +68,8 @@ ath_hal_attach(uint16_t devid, HAL_SOFTC /* XXX don't have vendorid, assume atheros one works */ if (chip->probe(ATHEROS_VENDOR_ID, devid) == AH_NULL) continue; - ah = chip->attach(devid, sc, st, sh, eepromdata, error); + ah = chip->attach(devid, sc, st, sh, eepromdata, ah_config, + error); if (ah != AH_NULL) { /* copy back private state to public area */ ah->ah_devid = AH_PRIVATE(ah)->ah_devid; Modified: head/sys/dev/ath/ath_hal/ah.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah.h Tue Sep 30 00:06:53 2014 (r272291) +++ head/sys/dev/ath/ath_hal/ah.h Tue Sep 30 03:19:29 2014 (r272292) @@ -1264,6 +1264,7 @@ typedef struct int ath_hal_show_bb_panic; int ath_hal_ant_ctrl_comm2g_switch_enable; int ath_hal_ext_atten_margin_cfg; + int ath_hal_min_gainidx; int ath_hal_war70c; uint32_t ath_hal_mci_config; } HAL_OPS_CONFIG; @@ -1616,7 +1617,8 @@ extern const char *__ahdecl ath_hal_prob * be returned if the status parameter is non-zero. */ extern struct ath_hal * __ahdecl ath_hal_attach(uint16_t devid, HAL_SOFTC, - HAL_BUS_TAG, HAL_BUS_HANDLE, uint16_t *eepromdata, HAL_STATUS* status); + HAL_BUS_TAG, HAL_BUS_HANDLE, uint16_t *eepromdata, + HAL_OPS_CONFIG *ah_config, HAL_STATUS* status); extern const char *ath_hal_mac_name(struct ath_hal *); extern const char *ath_hal_rf_name(struct ath_hal *); Modified: head/sys/dev/ath/ath_hal/ah_internal.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_internal.h Tue Sep 30 00:06:53 2014 (r272291) +++ head/sys/dev/ath/ath_hal/ah_internal.h Tue Sep 30 03:19:29 2014 (r272292) @@ -91,6 +91,7 @@ struct ath_hal_chip { const char *(*probe)(uint16_t vendorid, uint16_t devid); struct ath_hal *(*attach)(uint16_t devid, HAL_SOFTC, HAL_BUS_TAG, HAL_BUS_HANDLE, uint16_t *eepromdata, + HAL_OPS_CONFIG *ah, HAL_STATUS *error); }; #ifndef AH_CHIP Modified: head/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c Tue Sep 30 00:06:53 2014 (r272291) +++ head/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c Tue Sep 30 03:19:29 2014 (r272292) @@ -183,7 +183,7 @@ static HAL_BOOL ar5210FillCapabilityInfo */ static struct ath_hal * ar5210Attach(uint16_t devid, HAL_SOFTC sc, HAL_BUS_TAG st, HAL_BUS_HANDLE sh, - uint16_t *eepromdata, HAL_STATUS *status) + uint16_t *eepromdata, HAL_OPS_CONFIG *ah_config, HAL_STATUS *status) { #define N(a) (sizeof(a)/sizeof(a[0])) struct ath_hal_5210 *ahp; Modified: head/sys/dev/ath/ath_hal/ar5211/ar5211_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5211/ar5211_attach.c Tue Sep 30 00:06:53 2014 (r272291) +++ head/sys/dev/ath/ath_hal/ar5211/ar5211_attach.c Tue Sep 30 03:19:29 2014 (r272292) @@ -203,7 +203,7 @@ ar5211GetRadioRev(struct ath_hal *ah) static struct ath_hal * ar5211Attach(uint16_t devid, HAL_SOFTC sc, HAL_BUS_TAG st, HAL_BUS_HANDLE sh, uint16_t *eepromdata, - HAL_STATUS *status) + HAL_OPS_CONFIG *ah_config, HAL_STATUS *status) { #define N(a) (sizeof(a)/sizeof(a[0])) struct ath_hal_5211 *ahp; Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c Tue Sep 30 00:06:53 2014 (r272291) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c Tue Sep 30 03:19:29 2014 (r272292) @@ -317,7 +317,7 @@ ar5212IsMacSupported(uint8_t macVersion, static struct ath_hal * ar5212Attach(uint16_t devid, HAL_SOFTC sc, HAL_BUS_TAG st, HAL_BUS_HANDLE sh, uint16_t *eepromdata, - HAL_STATUS *status) + HAL_OPS_CONFIG *ah_config, HAL_STATUS *status) { #define AH_EEPROM_PROTECT(ah) \ (AH_PRIVATE(ah)->ah_ispcie)? AR_EEPROM_PROTECT_PCIE : AR_EEPROM_PROTECT) Modified: head/sys/dev/ath/ath_hal/ar5312/ar5312_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5312/ar5312_attach.c Tue Sep 30 00:06:53 2014 (r272291) +++ head/sys/dev/ath/ath_hal/ar5312/ar5312_attach.c Tue Sep 30 03:19:29 2014 (r272292) @@ -62,7 +62,7 @@ ar5312AniSetup(struct ath_hal *ah) static struct ath_hal * ar5312Attach(uint16_t devid, HAL_SOFTC sc, HAL_BUS_TAG st, HAL_BUS_HANDLE sh, uint16_t *eepromdata, - HAL_STATUS *status) + HAL_OPS_CONFIG *ah_config, HAL_STATUS *status) { struct ath_hal_5212 *ahp = AH_NULL; struct ath_hal *ah; Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Tue Sep 30 00:06:53 2014 (r272291) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Tue Sep 30 03:19:29 2014 (r272292) @@ -297,7 +297,7 @@ ar5416GetRadioRev(struct ath_hal *ah) static struct ath_hal * ar5416Attach(uint16_t devid, HAL_SOFTC sc, HAL_BUS_TAG st, HAL_BUS_HANDLE sh, uint16_t *eepromdata, - HAL_STATUS *status) + HAL_OPS_CONFIG *ah_config, HAL_STATUS *status) { struct ath_hal_5416 *ahp5416; struct ath_hal_5212 *ahp; Modified: head/sys/dev/ath/ath_hal/ar9001/ar9130_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar9001/ar9130_attach.c Tue Sep 30 00:06:53 2014 (r272291) +++ head/sys/dev/ath/ath_hal/ar9001/ar9130_attach.c Tue Sep 30 03:19:29 2014 (r272292) @@ -69,7 +69,9 @@ static HAL_BOOL ar9130FillCapabilityInfo */ static struct ath_hal * ar9130Attach(uint16_t devid, HAL_SOFTC sc, - HAL_BUS_TAG st, HAL_BUS_HANDLE sh, uint16_t *eepromdata, HAL_STATUS *status) + HAL_BUS_TAG st, HAL_BUS_HANDLE sh, uint16_t *eepromdata, + HAL_OPS_CONFIG *ah_config, + HAL_STATUS *status) { struct ath_hal_5416 *ahp5416; struct ath_hal_5212 *ahp; Modified: head/sys/dev/ath/ath_hal/ar9001/ar9160_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar9001/ar9160_attach.c Tue Sep 30 00:06:53 2014 (r272291) +++ head/sys/dev/ath/ath_hal/ar9001/ar9160_attach.c Tue Sep 30 03:19:29 2014 (r272292) @@ -114,6 +114,7 @@ ar9160InitPLL(struct ath_hal *ah, const static struct ath_hal * ar9160Attach(uint16_t devid, HAL_SOFTC sc, HAL_BUS_TAG st, HAL_BUS_HANDLE sh, uint16_t *eepromdata, + HAL_OPS_CONFIG *ah_config, HAL_STATUS *status) { struct ath_hal_5416 *ahp5416; Modified: head/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c Tue Sep 30 00:06:53 2014 (r272291) +++ head/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c Tue Sep 30 03:19:29 2014 (r272292) @@ -148,6 +148,7 @@ ar9280InitPLL(struct ath_hal *ah, const static struct ath_hal * ar9280Attach(uint16_t devid, HAL_SOFTC sc, HAL_BUS_TAG st, HAL_BUS_HANDLE sh, uint16_t *eepromdata, + HAL_OPS_CONFIG *ah_config, HAL_STATUS *status) { struct ath_hal_9280 *ahp9280; Modified: head/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c Tue Sep 30 00:06:53 2014 (r272291) +++ head/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c Tue Sep 30 03:19:29 2014 (r272292) @@ -133,6 +133,7 @@ ar9285_eeprom_print_diversity_settings(s static struct ath_hal * ar9285Attach(uint16_t devid, HAL_SOFTC sc, HAL_BUS_TAG st, HAL_BUS_HANDLE sh, uint16_t *eepromdata, + HAL_OPS_CONFIG *ah_config, HAL_STATUS *status) { struct ath_hal_9285 *ahp9285; Modified: head/sys/dev/ath/ath_hal/ar9002/ar9287_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar9002/ar9287_attach.c Tue Sep 30 00:06:53 2014 (r272291) +++ head/sys/dev/ath/ath_hal/ar9002/ar9287_attach.c Tue Sep 30 03:19:29 2014 (r272292) @@ -111,6 +111,7 @@ ar9287AniSetup(struct ath_hal *ah) static struct ath_hal * ar9287Attach(uint16_t devid, HAL_SOFTC sc, HAL_BUS_TAG st, HAL_BUS_HANDLE sh, uint16_t *eepromdata, + HAL_OPS_CONFIG *ah_config, HAL_STATUS *status) { struct ath_hal_9287 *ahp9287; Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Tue Sep 30 00:06:53 2014 (r272291) +++ head/sys/dev/ath/if_ath.c Tue Sep 30 03:19:29 2014 (r272292) @@ -435,6 +435,81 @@ _ath_power_restore_power_state(struct at } +/* + * Configure the initial HAL configuration values based on bus + * specific parameters. + * + * Some PCI IDs and other information may need tweaking. + * + * XXX TODO: ath9k and the Atheros HAL only program comm2g_switch_enable + * if BT antenna diversity isn't enabled. + * + * So, let's also figure out how to enable BT diversity for AR9485. + */ +static void +ath_setup_hal_config(struct ath_softc *sc, HAL_OPS_CONFIG *ah_config) +{ + /* XXX TODO: only for PCI devices? */ + + if (sc->sc_pci_devinfo & (ATH_PCI_CUS198 | ATH_PCI_CUS230)) { + ah_config->ath_hal_ext_lna_ctl_gpio = 0x200; /* bit 9 */ + ah_config->ath_hal_ext_atten_margin_cfg = AH_TRUE; + ah_config->ath_hal_min_gainidx = AH_TRUE; + ah_config->ath_hal_ant_ctrl_comm2g_switch_enable = 0x000bbb88; + /* XXX low_rssi_thresh */ + /* XXX fast_div_bias */ + device_printf(sc->sc_dev, "configuring for %s\n", + (sc->sc_pci_devinfo & ATH_PCI_CUS198) ? + "CUS198" : "CUS230"); + } + + if (sc->sc_pci_devinfo & ATH_PCI_CUS217) + device_printf(sc->sc_dev, "CUS217 card detected\n"); + + if (sc->sc_pci_devinfo & ATH_PCI_CUS252) + device_printf(sc->sc_dev, "CUS252 card detected\n"); + + if (sc->sc_pci_devinfo & ATH_PCI_AR9565_1ANT) + device_printf(sc->sc_dev, "WB335 1-ANT card detected\n"); + + if (sc->sc_pci_devinfo & ATH_PCI_AR9565_2ANT) + device_printf(sc->sc_dev, "WB335 2-ANT card detected\n"); + + if (sc->sc_pci_devinfo & ATH_PCI_KILLER) + device_printf(sc->sc_dev, "Killer Wireless card detected\n"); + +#if 0 + /* + * Some WB335 cards do not support antenna diversity. Since + * we use a hardcoded value for AR9565 instead of using the + * EEPROM/OTP data, remove the combining feature from + * the HW capabilities bitmap. + */ + if (sc->sc_pci_devinfo & (ATH9K_PCI_AR9565_1ANT | ATH9K_PCI_AR9565_2ANT)) { + if (!(sc->sc_pci_devinfo & ATH9K_PCI_BT_ANT_DIV)) + pCap->hw_caps &= ~ATH9K_HW_CAP_ANT_DIV_COMB; + } + + if (sc->sc_pci_devinfo & ATH9K_PCI_BT_ANT_DIV) { + pCap->hw_caps |= ATH9K_HW_CAP_BT_ANT_DIV; + device_printf(sc->sc_dev, "Set BT/WLAN RX diversity capability\n"); + } +#endif + + if (sc->sc_pci_devinfo & ATH_PCI_D3_L1_WAR) { + ah_config->ath_hal_pcie_waen = 0x0040473b; + device_printf(sc->sc_dev, "Enable WAR for ASPM D3/L1\n"); + } + +#if 0 + if (sc->sc_pci_devinfo & ATH9K_PCI_NO_PLL_PWRSAVE) { + ah->config.no_pll_pwrsave = true; + device_printf(sc->sc_dev, "Disable PLL PowerSave\n"); + } +#endif + +} + #define HAL_MODE_HT20 (HAL_MODE_11NG_HT20 | HAL_MODE_11NA_HT20) #define HAL_MODE_HT40 \ (HAL_MODE_11NG_HT40PLUS | HAL_MODE_11NG_HT40MINUS | \ @@ -450,6 +525,7 @@ ath_attach(u_int16_t devid, struct ath_s u_int wmodes; uint8_t macaddr[IEEE80211_ADDR_LEN]; int rx_chainmask, tx_chainmask; + HAL_OPS_CONFIG ah_config; DPRINTF(sc, ATH_DEBUG_ANY, "%s: devid 0x%x\n", __func__, devid); @@ -468,8 +544,17 @@ ath_attach(u_int16_t devid, struct ath_s device_get_unit(sc->sc_dev)); CURVNET_RESTORE(); + /* + * Configure the initial configuration data. + * + * This is stuff that may be needed early during attach + * rather than done via configuration calls later. + */ + bzero(&ah_config, sizeof(ah_config)); + ath_setup_hal_config(sc, &ah_config); + ah = ath_hal_attach(devid, sc, sc->sc_st, sc->sc_sh, - sc->sc_eepromdata, &status); + sc->sc_eepromdata, &ah_config, &status); if (ah == NULL) { if_printf(ifp, "unable to attach hardware; HAL status %u\n", status); @@ -7101,6 +7186,6 @@ ath_node_recv_pspoll(struct ieee80211_no MODULE_VERSION(if_ath, 1); MODULE_DEPEND(if_ath, wlan, 1, 1, 1); /* 802.11 media layer */ -#if defined(IEEE80211_ALQ) || defined(AH_DEBUG_ALQ) +#if defined(IEEE80211_ALQ) || defined(AH_DEBUG_ALQ) || defined(ATH_DEBUG_ALQ) MODULE_DEPEND(if_ath, alq, 1, 1, 1); #endif Modified: head/sys/dev/ath/if_ath_lna_div.c ============================================================================== --- head/sys/dev/ath/if_ath_lna_div.c Tue Sep 30 00:06:53 2014 (r272291) +++ head/sys/dev/ath/if_ath_lna_div.c Tue Sep 30 03:19:29 2014 (r272292) @@ -209,6 +209,10 @@ bad: return (error); } +/* + * XXX need to low_rssi_thresh config from ath9k, to support CUS198 + * antenna diversity correctly. + */ static HAL_BOOL ath_is_alt_ant_ratio_better(int alt_ratio, int maxdelta, int mindelta, int main_rssi_avg, int alt_rssi_avg, int pkt_count) Modified: head/sys/dev/ath/if_ath_pci.c ============================================================================== --- head/sys/dev/ath/if_ath_pci.c Tue Sep 30 00:06:53 2014 (r272291) +++ head/sys/dev/ath/if_ath_pci.c Tue Sep 30 03:19:29 2014 (r272292) @@ -80,6 +80,98 @@ struct ath_pci_softc { void *sc_ih; /* interrupt handler */ }; +/* + * XXX eventually this should be some system level definition + * so modules will hvae probe/attach information like USB. + * But for now.. + */ +struct pci_device_id { + int vendor_id; + int device_id; + + int sub_vendor_id; + int sub_device_id; + + int driver_data; + + int match_populated:1; + int match_vendor_id:1; + int match_device_id:1; + int match_sub_vendor_id:1; + int match_sub_device_id:1; +}; + +#define PCI_VDEVICE(v, s) \ + .vendor_id = (v), \ + .device_id = (s), \ + .match_populated = 1, \ + .match_vendor_id = 1, \ + .match_device_id = 1 + +#define PCI_DEVICE_SUB(v, d, dv, ds) \ + .match_populated = 1, \ + .vendor_id = (v), .match_vendor_id = 1, \ + .device_id = (d), .match_device_id = 1, \ + .sub_vendor_id = (dv), .match_sub_vendor_id = 1, \ + .sub_device_id = (ds), .match_sub_device_id = 1 + +#define PCI_VENDOR_ID_ATHEROS 0x168c +#define PCI_VENDOR_ID_SAMSUNG 0x144d +#define PCI_VENDOR_ID_AZWAVE 0x1a3b +#define PCI_VENDOR_ID_FOXCONN 0x105b +#define PCI_VENDOR_ID_ATTANSIC 0x1969 +#define PCI_VENDOR_ID_ASUSTEK 0x1043 +#define PCI_VENDOR_ID_DELL 0x1028 +#define PCI_VENDOR_ID_QMI 0x1a32 +#define PCI_VENDOR_ID_LENOVO 0x17aa +#define PCI_VENDOR_ID_HP 0x103c + +#include "if_ath_pci_devlist.h" + +/* + * Attempt to find a match for the given device in + * the given device table. + * + * Returns the device structure or NULL if no matching + * PCI device is found. + */ +static const struct pci_device_id * +ath_pci_probe_device(device_t dev, const struct pci_device_id *dev_table, int nentries) +{ + int i; + int vendor_id, device_id; + int sub_vendor_id, sub_device_id; + + vendor_id = pci_get_vendor(dev); + device_id = pci_get_device(dev); + sub_vendor_id = pci_get_subvendor(dev); + sub_device_id = pci_get_subdevice(dev); + + for (i = 0; i < nentries; i++) { + /* Don't match on non-populated (eg empty) entries */ + if (! dev_table[i].match_populated) + continue; + + if (dev_table[i].match_vendor_id && + (dev_table[i].vendor_id != vendor_id)) + continue; + if (dev_table[i].match_device_id && + (dev_table[i].device_id != device_id)) + continue; + if (dev_table[i].match_sub_vendor_id && + (dev_table[i].sub_vendor_id != sub_vendor_id)) + continue; + if (dev_table[i].match_sub_device_id && + (dev_table[i].sub_device_id != sub_device_id)) + continue; + + /* Match */ + return (&dev_table[i]); + } + + return (NULL); +} + #define BS_BAR 0x10 #define PCIR_RETRY_TIMEOUT 0x41 #define PCIR_CFG_PMCSR 0x48 @@ -150,9 +242,15 @@ ath_pci_attach(device_t dev) const struct firmware *fw = NULL; const char *buf; #endif + const struct pci_device_id *pd; sc->sc_dev = dev; + /* Do this lookup anyway; figure out what to do with it later */ + pd = ath_pci_probe_device(dev, ath_pci_id_table, nitems(ath_pci_id_table)); + if (pd) + sc->sc_pci_devinfo = pd->driver_data; + /* * Enable bus mastering. */ Modified: head/sys/dev/ath/if_athvar.h ============================================================================== --- head/sys/dev/ath/if_athvar.h Tue Sep 30 00:06:53 2014 (r272291) +++ head/sys/dev/ath/if_athvar.h Tue Sep 30 03:19:29 2014 (r272292) @@ -82,6 +82,25 @@ #define ATH_BEACON_CWMAX_DEFAULT 0 /* default cwmax for ap beacon q */ /* + * The following bits can be set during the PCI (and perhaps non-PCI + * later) device probe path. + * + * It controls some of the driver and HAL behaviour. + */ + +#define ATH_PCI_CUS198 0x0001 +#define ATH_PCI_CUS230 0x0002 +#define ATH_PCI_CUS217 0x0004 +#define ATH_PCI_CUS252 0x0008 +#define ATH_PCI_WOW 0x0010 +#define ATH_PCI_BT_ANT_DIV 0x0020 +#define ATH_PCI_D3_L1_WAR 0x0040 +#define ATH_PCI_AR9565_1ANT 0x0080 +#define ATH_PCI_AR9565_2ANT 0x0100 +#define ATH_PCI_NO_PLL_PWRSAVE 0x0200 +#define ATH_PCI_KILLER 0x0400 + +/* * The key cache is used for h/w cipher state and also for * tracking station state such as the current tx antenna. * We also setup a mapping table between key cache slot indices @@ -884,6 +903,9 @@ struct ath_softc { HAL_POWER_MODE sc_cur_powerstate; int sc_powersave_refcnt; + + /* ATH_PCI_* flags */ + uint32_t sc_pci_devinfo; }; #define ATH_LOCK_INIT(_sc) \ From owner-svn-src-all@FreeBSD.ORG Tue Sep 30 03:29:47 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F0E94793; Tue, 30 Sep 2014 03:29:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DD281F43; Tue, 30 Sep 2014 03:29:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8U3Tk6p010077; Tue, 30 Sep 2014 03:29:46 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8U3TkaQ010076; Tue, 30 Sep 2014 03:29:46 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201409300329.s8U3TkaQ010076@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 30 Sep 2014 03:29:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272293 - head/sys/contrib/dev/ath/ath_hal/ar9300 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2014 03:29:47 -0000 Author: adrian Date: Tue Sep 30 03:29:46 2014 New Revision: 272293 URL: http://svnweb.freebsd.org/changeset/base/272293 Log: Remove this stuff - it's no longer needed here. Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c Tue Sep 30 03:19:29 2014 (r272292) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c Tue Sep 30 03:29:46 2014 (r272293) @@ -252,29 +252,6 @@ ar9300_attach_freebsd_ops(struct ath_hal /* LNA diversity functions */ ah->ah_divLnaConfGet = ar9300_ant_div_comb_get_config; ah->ah_divLnaConfSet = ar9300_ant_div_comb_set_config; - - /* Setup HAL configuration defaults */ - /* XXX cus198 defaults from ath9k */ - /* xlna_gpio = 9 */ - /* xatten_margin_cfg = true */ - /* alt_mingainidx = true */ - /* comm2g_switch_enable = 0x000bbb88 */ - /* ant_comb.low_rssi_thresh = 20 */ - /* ant_comb.fast_div_bias = 3 */ - -#if 0 - /* - * The HAL code treats this as a mask. - * The ath9k code above treats it as a bit offset. - * So it should be set to 0x200, not 0x9. - */ - ah->ah_config.ath_hal_ext_lna_ctl_gpio = 0x200; /* bit 9 */ - ah->ah_config.ath_hal_ext_atten_margin_cfg = AH_TRUE; - ah->ah_config.ath_hal_min_gainidx = AH_TRUE; - ah->ah_config.ath_hal_ant_ctrl_comm2g_switch_enable = 0x000bbb88; - /* XXX low_rssi_thresh */ - /* XXX fast_div_bias */ -#endif } HAL_BOOL From owner-svn-src-all@FreeBSD.ORG Tue Sep 30 05:36:17 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0906BA05; Tue, 30 Sep 2014 05:36:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CF80CCFC; Tue, 30 Sep 2014 05:36:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8U5aGZD069799; Tue, 30 Sep 2014 05:36:16 GMT (envelope-from gavin@FreeBSD.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8U5aG7U069798; Tue, 30 Sep 2014 05:36:16 GMT (envelope-from gavin@FreeBSD.org) Message-Id: <201409300536.s8U5aG7U069798@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gavin set sender to gavin@FreeBSD.org using -f From: Gavin Atkinson Date: Tue, 30 Sep 2014 05:36:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272294 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2014 05:36:17 -0000 Author: gavin Date: Tue Sep 30 05:36:16 2014 New Revision: 272294 URL: http://svnweb.freebsd.org/changeset/base/272294 Log: Make clear in the ipheth(4) hardware notes that this driver is for the tethering functionality only. Add a "bugs" section to give a pointer to usbconfig set_config if the device isn't automatically detected. MFC after: 3 days Modified: head/share/man/man4/ipheth.4 Modified: head/share/man/man4/ipheth.4 ============================================================================== --- head/share/man/man4/ipheth.4 Tue Sep 30 03:29:46 2014 (r272293) +++ head/share/man/man4/ipheth.4 Tue Sep 30 05:36:16 2014 (r272294) @@ -27,12 +27,12 @@ .\" .\" $FreeBSD$ .\" -.Dd September 25, 2014 +.Dd September 30, 2014 .Dt IPHETH 4 .Os .Sh NAME .Nm ipheth -.Nd "USB Apple iPhone/iPad Ethernet driver" +.Nd "USB Apple iPhone/iPad tethered Ethernet driver" .Sh SYNOPSIS To load the driver as a module at boot time, place the following line in @@ -61,6 +61,7 @@ In most cases this must be explicitly en .Pp For more information on configuring this device, see .Xr ifconfig 8 . +The device does not support different media types or options. .Sh HARDWARE The following devices are supported by the .Nm @@ -68,9 +69,9 @@ driver: .Pp .Bl -bullet -compact .It -Apple iPhone (all models) +Apple iPhone tethering (all models) .It -Apple iPad (all models) +Apple iPad tethering (all models) .El .Sh SEE ALSO .Xr arp 4 , @@ -80,6 +81,7 @@ Apple iPad (all models) .Xr urndis 4 , .Xr usb 4 , .Xr ifconfig 8 +.Xr usbconfig 8 .Sh HISTORY The .Nm @@ -91,3 +93,14 @@ The .Nm driver was written by .An Hans Petter Selasky Aq Mt hselasky@FreeBSD.org . +.Sh BUGS +Some devices may need to be manually configured to use an alternative +configuration with the +.Xr usbconfig 8 +utility. +A command similar to +.Dl usbconfig -u 1 -a 2 set_config 3 +may be required if the device is not recognised automatically by +.Nm +after it is connected. + From owner-svn-src-all@FreeBSD.ORG Tue Sep 30 05:50:35 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8FB1DD80; Tue, 30 Sep 2014 05:50:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 70B6EDF3; Tue, 30 Sep 2014 05:50:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8U5oZnv075369; Tue, 30 Sep 2014 05:50:35 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8U5oZXn075368; Tue, 30 Sep 2014 05:50:35 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201409300550.s8U5oZXn075368@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 30 Sep 2014 05:50:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272295 - head/sys/dev/ath X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2014 05:50:35 -0000 Author: adrian Date: Tue Sep 30 05:50:34 2014 New Revision: 272295 URL: http://svnweb.freebsd.org/changeset/base/272295 Log: Add a missing file from the last commit. Noticed by: jhibbits Added: head/sys/dev/ath/if_ath_pci_devlist.h (contents, props changed) Added: head/sys/dev/ath/if_ath_pci_devlist.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/ath/if_ath_pci_devlist.h Tue Sep 30 05:50:34 2014 (r272295) @@ -0,0 +1,669 @@ +/*- + * Copyright (c) 2014 Qualcomm Atheros. + * 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, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any + * redistribution must be conditioned upon including a substantially + * similar Disclaimer requirement for further binary redistribution. + * + * NO WARRANTY + * 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 NONINFRINGEMENT, MERCHANTIBILITY + * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES. + * + * $FreeBSD$ + */ + +static const struct pci_device_id ath_pci_id_table[] = { + { PCI_VDEVICE(PCI_VENDOR_ID_ATHEROS, 0x0023) }, /* PCI */ + { PCI_VDEVICE(PCI_VENDOR_ID_ATHEROS, 0x0024) }, /* PCI-E */ + { PCI_VDEVICE(PCI_VENDOR_ID_ATHEROS, 0x0027) }, /* PCI */ + { PCI_VDEVICE(PCI_VENDOR_ID_ATHEROS, 0x0029) }, /* PCI */ + { PCI_VDEVICE(PCI_VENDOR_ID_ATHEROS, 0x002A) }, /* PCI-E */ + + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x002A, + PCI_VENDOR_ID_AZWAVE, + 0x1C71), + .driver_data = ATH_PCI_D3_L1_WAR }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x002A, + PCI_VENDOR_ID_FOXCONN, + 0xE01F), + .driver_data = ATH_PCI_D3_L1_WAR }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x002A, + 0x11AD, /* LITEON */ + 0x6632), + .driver_data = ATH_PCI_D3_L1_WAR }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x002A, + 0x11AD, /* LITEON */ + 0x6642), + .driver_data = ATH_PCI_D3_L1_WAR }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x002A, + PCI_VENDOR_ID_QMI, + 0x0306), + .driver_data = ATH_PCI_D3_L1_WAR }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x002A, + 0x185F, /* WNC */ + 0x309D), + .driver_data = ATH_PCI_D3_L1_WAR }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x002A, + 0x10CF, /* Fujitsu */ + 0x147C), + .driver_data = ATH_PCI_D3_L1_WAR }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x002A, + 0x10CF, /* Fujitsu */ + 0x147D), + .driver_data = ATH_PCI_D3_L1_WAR }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x002A, + 0x10CF, /* Fujitsu */ + 0x1536), + .driver_data = ATH_PCI_D3_L1_WAR }, + + /* AR9285 card for Asus */ + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x002B, + PCI_VENDOR_ID_AZWAVE, + 0x2C37), + .driver_data = ATH_PCI_BT_ANT_DIV }, + + { PCI_VDEVICE(PCI_VENDOR_ID_ATHEROS, 0x002B) }, /* PCI-E */ + { PCI_VDEVICE(PCI_VENDOR_ID_ATHEROS, 0x002C) }, /* PCI-E 802.11n bonded out */ + { PCI_VDEVICE(PCI_VENDOR_ID_ATHEROS, 0x002D) }, /* PCI */ + { PCI_VDEVICE(PCI_VENDOR_ID_ATHEROS, 0x002E) }, /* PCI-E */ + + /* Killer Wireless (3x3) */ + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0030, + 0x1A56, + 0x2000), + .driver_data = ATH_PCI_KILLER }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0030, + 0x1A56, + 0x2001), + .driver_data = ATH_PCI_KILLER }, + + { PCI_VDEVICE(PCI_VENDOR_ID_ATHEROS, 0x0030) }, /* PCI-E AR9300 */ + + /* PCI-E CUS198 */ + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0032, + PCI_VENDOR_ID_AZWAVE, + 0x2086), + .driver_data = ATH_PCI_CUS198 | ATH_PCI_BT_ANT_DIV }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0032, + PCI_VENDOR_ID_AZWAVE, + 0x1237), + .driver_data = ATH_PCI_CUS198 | ATH_PCI_BT_ANT_DIV }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0032, + PCI_VENDOR_ID_AZWAVE, + 0x2126), + .driver_data = ATH_PCI_CUS198 | ATH_PCI_BT_ANT_DIV }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0032, + PCI_VENDOR_ID_AZWAVE, + 0x126A), + .driver_data = ATH_PCI_CUS198 | ATH_PCI_BT_ANT_DIV }, + + /* PCI-E CUS230 */ + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0032, + PCI_VENDOR_ID_AZWAVE, + 0x2152), + .driver_data = ATH_PCI_CUS230 | ATH_PCI_BT_ANT_DIV }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0032, + PCI_VENDOR_ID_FOXCONN, + 0xE075), + .driver_data = ATH_PCI_CUS230 | ATH_PCI_BT_ANT_DIV }, + + /* WB225 */ + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0032, + PCI_VENDOR_ID_ATHEROS, + 0x3119), + .driver_data = ATH_PCI_BT_ANT_DIV }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0032, + PCI_VENDOR_ID_ATHEROS, + 0x3122), + .driver_data = ATH_PCI_BT_ANT_DIV }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0032, + 0x185F, /* WNC */ + 0x3119), + .driver_data = ATH_PCI_BT_ANT_DIV }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0032, + 0x185F, /* WNC */ + 0x3027), + .driver_data = ATH_PCI_BT_ANT_DIV }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0032, + PCI_VENDOR_ID_SAMSUNG, + 0x4105), + .driver_data = ATH_PCI_BT_ANT_DIV }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0032, + PCI_VENDOR_ID_SAMSUNG, + 0x4106), + .driver_data = ATH_PCI_BT_ANT_DIV }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0032, + PCI_VENDOR_ID_SAMSUNG, + 0x410D), + .driver_data = ATH_PCI_BT_ANT_DIV }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0032, + PCI_VENDOR_ID_SAMSUNG, + 0x410E), + .driver_data = ATH_PCI_BT_ANT_DIV }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0032, + PCI_VENDOR_ID_SAMSUNG, + 0x410F), + .driver_data = ATH_PCI_BT_ANT_DIV }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0032, + PCI_VENDOR_ID_SAMSUNG, + 0xC706), + .driver_data = ATH_PCI_BT_ANT_DIV }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0032, + PCI_VENDOR_ID_SAMSUNG, + 0xC680), + .driver_data = ATH_PCI_BT_ANT_DIV }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0032, + PCI_VENDOR_ID_SAMSUNG, + 0xC708), + .driver_data = ATH_PCI_BT_ANT_DIV }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0032, + PCI_VENDOR_ID_LENOVO, + 0x3218), + .driver_data = ATH_PCI_BT_ANT_DIV }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0032, + PCI_VENDOR_ID_LENOVO, + 0x3219), + .driver_data = ATH_PCI_BT_ANT_DIV }, + + /* AR9485 cards with PLL power-save disabled by default. */ + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0032, + PCI_VENDOR_ID_AZWAVE, + 0x2C97), + .driver_data = ATH_PCI_NO_PLL_PWRSAVE }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0032, + PCI_VENDOR_ID_AZWAVE, + 0x2100), + .driver_data = ATH_PCI_NO_PLL_PWRSAVE }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0032, + 0x1C56, /* ASKEY */ + 0x4001), + .driver_data = ATH_PCI_NO_PLL_PWRSAVE }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0032, + 0x11AD, /* LITEON */ + 0x6627), + .driver_data = ATH_PCI_NO_PLL_PWRSAVE }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0032, + 0x11AD, /* LITEON */ + 0x6628), + .driver_data = ATH_PCI_NO_PLL_PWRSAVE }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0032, + PCI_VENDOR_ID_FOXCONN, + 0xE04E), + .driver_data = ATH_PCI_NO_PLL_PWRSAVE }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0032, + PCI_VENDOR_ID_FOXCONN, + 0xE04F), + .driver_data = ATH_PCI_NO_PLL_PWRSAVE }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0032, + 0x144F, /* ASKEY */ + 0x7197), + .driver_data = ATH_PCI_NO_PLL_PWRSAVE }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0032, + 0x1B9A, /* XAVI */ + 0x2000), + .driver_data = ATH_PCI_NO_PLL_PWRSAVE }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0032, + 0x1B9A, /* XAVI */ + 0x2001), + .driver_data = ATH_PCI_NO_PLL_PWRSAVE }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0032, + PCI_VENDOR_ID_AZWAVE, + 0x1186), + .driver_data = ATH_PCI_NO_PLL_PWRSAVE }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0032, + PCI_VENDOR_ID_AZWAVE, + 0x1F86), + .driver_data = ATH_PCI_NO_PLL_PWRSAVE }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0032, + PCI_VENDOR_ID_AZWAVE, + 0x1195), + .driver_data = ATH_PCI_NO_PLL_PWRSAVE }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0032, + PCI_VENDOR_ID_AZWAVE, + 0x1F95), + .driver_data = ATH_PCI_NO_PLL_PWRSAVE }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0032, + 0x1B9A, /* XAVI */ + 0x1C00), + .driver_data = ATH_PCI_NO_PLL_PWRSAVE }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0032, + 0x1B9A, /* XAVI */ + 0x1C01), + .driver_data = ATH_PCI_NO_PLL_PWRSAVE }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0032, + PCI_VENDOR_ID_ASUSTEK, + 0x850D), + .driver_data = ATH_PCI_NO_PLL_PWRSAVE }, + + { PCI_VDEVICE(PCI_VENDOR_ID_ATHEROS, 0x0032) }, /* PCI-E AR9485 */ + { PCI_VDEVICE(PCI_VENDOR_ID_ATHEROS, 0x0033) }, /* PCI-E AR9580 */ + + /* PCI-E CUS217 */ + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0034, + PCI_VENDOR_ID_AZWAVE, + 0x2116), + .driver_data = ATH_PCI_CUS217 }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0034, + 0x11AD, /* LITEON */ + 0x6661), + .driver_data = ATH_PCI_CUS217 }, + + /* AR9462 with WoW support */ + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0034, + PCI_VENDOR_ID_ATHEROS, + 0x3117), + .driver_data = ATH_PCI_WOW }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0034, + PCI_VENDOR_ID_LENOVO, + 0x3214), + .driver_data = ATH_PCI_WOW }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0034, + PCI_VENDOR_ID_ATTANSIC, + 0x0091), + .driver_data = ATH_PCI_WOW }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0034, + PCI_VENDOR_ID_AZWAVE, + 0x2110), + .driver_data = ATH_PCI_WOW }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0034, + PCI_VENDOR_ID_ASUSTEK, + 0x850E), + .driver_data = ATH_PCI_WOW }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0034, + 0x11AD, /* LITEON */ + 0x6631), + .driver_data = ATH_PCI_WOW }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0034, + 0x11AD, /* LITEON */ + 0x6641), + .driver_data = ATH_PCI_WOW }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0034, + PCI_VENDOR_ID_HP, + 0x1864), + .driver_data = ATH_PCI_WOW }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0034, + 0x14CD, /* USI */ + 0x0063), + .driver_data = ATH_PCI_WOW }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0034, + 0x14CD, /* USI */ + 0x0064), + .driver_data = ATH_PCI_WOW }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0034, + 0x10CF, /* Fujitsu */ + 0x1783), + .driver_data = ATH_PCI_WOW }, + + /* Killer Wireless (2x2) */ + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0030, + 0x1A56, + 0x2003), + .driver_data = ATH_PCI_KILLER }, + + { PCI_VDEVICE(PCI_VENDOR_ID_ATHEROS, 0x0034) }, /* PCI-E AR9462 */ + { PCI_VDEVICE(PCI_VENDOR_ID_ATHEROS, 0x0037) }, /* PCI-E AR1111/AR9485 */ + + /* CUS252 */ + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0036, + PCI_VENDOR_ID_ATHEROS, + 0x3028), + .driver_data = ATH_PCI_CUS252 | + ATH_PCI_AR9565_2ANT | + ATH_PCI_BT_ANT_DIV }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0036, + PCI_VENDOR_ID_AZWAVE, + 0x2176), + .driver_data = ATH_PCI_CUS252 | + ATH_PCI_AR9565_2ANT | + ATH_PCI_BT_ANT_DIV }, + + /* WB335 1-ANT */ + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0036, + PCI_VENDOR_ID_FOXCONN, + 0xE068), + .driver_data = ATH_PCI_AR9565_1ANT }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0036, + 0x185F, /* WNC */ + 0xA119), + .driver_data = ATH_PCI_AR9565_1ANT }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0036, + 0x11AD, /* LITEON */ + 0x0632), + .driver_data = ATH_PCI_AR9565_1ANT }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0036, + 0x11AD, /* LITEON */ + 0x06B2), + .driver_data = ATH_PCI_AR9565_1ANT }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0036, + 0x11AD, /* LITEON */ + 0x0842), + .driver_data = ATH_PCI_AR9565_1ANT }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0036, + 0x11AD, /* LITEON */ + 0x6671), + .driver_data = ATH_PCI_AR9565_1ANT }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0036, + 0x1B9A, /* XAVI */ + 0x2811), + .driver_data = ATH_PCI_AR9565_1ANT }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0036, + 0x1B9A, /* XAVI */ + 0x2812), + .driver_data = ATH_PCI_AR9565_1ANT }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0036, + 0x1B9A, /* XAVI */ + 0x28A1), + .driver_data = ATH_PCI_AR9565_1ANT }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0036, + PCI_VENDOR_ID_AZWAVE, + 0x218A), + .driver_data = ATH_PCI_AR9565_1ANT }, + + /* WB335 1-ANT / Antenna Diversity */ + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0036, + PCI_VENDOR_ID_ATHEROS, + 0x3025), + .driver_data = ATH_PCI_AR9565_1ANT | ATH_PCI_BT_ANT_DIV }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0036, + PCI_VENDOR_ID_ATHEROS, + 0x3026), + .driver_data = ATH_PCI_AR9565_1ANT | ATH_PCI_BT_ANT_DIV }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0036, + PCI_VENDOR_ID_ATHEROS, + 0x302B), + .driver_data = ATH_PCI_AR9565_1ANT | ATH_PCI_BT_ANT_DIV }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0036, + PCI_VENDOR_ID_FOXCONN, + 0xE069), + .driver_data = ATH_PCI_AR9565_1ANT | ATH_PCI_BT_ANT_DIV }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0036, + 0x185F, /* WNC */ + 0x3028), + .driver_data = ATH_PCI_AR9565_1ANT | ATH_PCI_BT_ANT_DIV }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0036, + 0x11AD, /* LITEON */ + 0x0622), + .driver_data = ATH_PCI_AR9565_1ANT | ATH_PCI_BT_ANT_DIV }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0036, + 0x11AD, /* LITEON */ + 0x0672), + .driver_data = ATH_PCI_AR9565_1ANT | ATH_PCI_BT_ANT_DIV }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0036, + 0x11AD, /* LITEON */ + 0x0662), + .driver_data = ATH_PCI_AR9565_1ANT | ATH_PCI_BT_ANT_DIV }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0036, + 0x11AD, /* LITEON */ + 0x06A2), + .driver_data = ATH_PCI_AR9565_1ANT | ATH_PCI_BT_ANT_DIV }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0036, + 0x11AD, /* LITEON */ + 0x0682), + .driver_data = ATH_PCI_AR9565_1ANT | ATH_PCI_BT_ANT_DIV }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0036, + PCI_VENDOR_ID_AZWAVE, + 0x213A), + .driver_data = ATH_PCI_AR9565_1ANT | ATH_PCI_BT_ANT_DIV }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0036, + PCI_VENDOR_ID_HP, + 0x18E3), + .driver_data = ATH_PCI_AR9565_1ANT | ATH_PCI_BT_ANT_DIV }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0036, + PCI_VENDOR_ID_HP, + 0x217F), + .driver_data = ATH_PCI_AR9565_1ANT | ATH_PCI_BT_ANT_DIV }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0036, + PCI_VENDOR_ID_HP, + 0x2005), + .driver_data = ATH_PCI_AR9565_1ANT | ATH_PCI_BT_ANT_DIV }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0036, + PCI_VENDOR_ID_DELL, + 0x020C), + .driver_data = ATH_PCI_AR9565_1ANT | ATH_PCI_BT_ANT_DIV }, + + /* WB335 2-ANT / Antenna-Diversity */ + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0036, + PCI_VENDOR_ID_SAMSUNG, + 0x411A), + .driver_data = ATH_PCI_AR9565_2ANT | ATH_PCI_BT_ANT_DIV }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0036, + PCI_VENDOR_ID_SAMSUNG, + 0x411B), + .driver_data = ATH_PCI_AR9565_2ANT | ATH_PCI_BT_ANT_DIV }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0036, + PCI_VENDOR_ID_SAMSUNG, + 0x411C), + .driver_data = ATH_PCI_AR9565_2ANT | ATH_PCI_BT_ANT_DIV }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0036, + PCI_VENDOR_ID_SAMSUNG, + 0x411D), + .driver_data = ATH_PCI_AR9565_2ANT | ATH_PCI_BT_ANT_DIV }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0036, + PCI_VENDOR_ID_SAMSUNG, + 0x411E), + .driver_data = ATH_PCI_AR9565_2ANT | ATH_PCI_BT_ANT_DIV }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0036, + PCI_VENDOR_ID_ATHEROS, + 0x3027), + .driver_data = ATH_PCI_AR9565_2ANT | ATH_PCI_BT_ANT_DIV }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0036, + PCI_VENDOR_ID_ATHEROS, + 0x302C), + .driver_data = ATH_PCI_AR9565_2ANT | ATH_PCI_BT_ANT_DIV }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0036, + 0x11AD, /* LITEON */ + 0x0642), + .driver_data = ATH_PCI_AR9565_2ANT | ATH_PCI_BT_ANT_DIV }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0036, + 0x11AD, /* LITEON */ + 0x0652), + .driver_data = ATH_PCI_AR9565_2ANT | ATH_PCI_BT_ANT_DIV }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0036, + 0x11AD, /* LITEON */ + 0x0612), + .driver_data = ATH_PCI_AR9565_2ANT | ATH_PCI_BT_ANT_DIV }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0036, + 0x11AD, /* LITEON */ + 0x0832), + .driver_data = ATH_PCI_AR9565_2ANT | ATH_PCI_BT_ANT_DIV }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0036, + 0x11AD, /* LITEON */ + 0x0692), + .driver_data = ATH_PCI_AR9565_2ANT | ATH_PCI_BT_ANT_DIV }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0036, + PCI_VENDOR_ID_AZWAVE, + 0x2130), + .driver_data = ATH_PCI_AR9565_2ANT | ATH_PCI_BT_ANT_DIV }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0036, + PCI_VENDOR_ID_AZWAVE, + 0x213B), + .driver_data = ATH_PCI_AR9565_2ANT | ATH_PCI_BT_ANT_DIV }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0036, + PCI_VENDOR_ID_AZWAVE, + 0x2182), + .driver_data = ATH_PCI_AR9565_2ANT | ATH_PCI_BT_ANT_DIV }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0036, + 0x144F, /* ASKEY */ + 0x7202), + .driver_data = ATH_PCI_AR9565_2ANT | ATH_PCI_BT_ANT_DIV }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0036, + 0x1B9A, /* XAVI */ + 0x2810), + .driver_data = ATH_PCI_AR9565_2ANT | ATH_PCI_BT_ANT_DIV }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0036, + 0x1B9A, /* XAVI */ + 0x28A2), + .driver_data = ATH_PCI_AR9565_2ANT | ATH_PCI_BT_ANT_DIV }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0036, + 0x185F, /* WNC */ + 0x3027), + .driver_data = ATH_PCI_AR9565_2ANT | ATH_PCI_BT_ANT_DIV }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0036, + 0x185F, /* WNC */ + 0xA120), + .driver_data = ATH_PCI_AR9565_2ANT | ATH_PCI_BT_ANT_DIV }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0036, + PCI_VENDOR_ID_FOXCONN, + 0xE07F), + .driver_data = ATH_PCI_AR9565_2ANT | ATH_PCI_BT_ANT_DIV }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0036, + PCI_VENDOR_ID_FOXCONN, + 0xE081), + .driver_data = ATH_PCI_AR9565_2ANT | ATH_PCI_BT_ANT_DIV }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0036, + PCI_VENDOR_ID_LENOVO, + 0x3026), + .driver_data = ATH_PCI_AR9565_2ANT | ATH_PCI_BT_ANT_DIV }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0036, + PCI_VENDOR_ID_LENOVO, + 0x4026), + .driver_data = ATH_PCI_AR9565_2ANT | ATH_PCI_BT_ANT_DIV }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0036, + PCI_VENDOR_ID_ASUSTEK, + 0x85F2), + .driver_data = ATH_PCI_AR9565_2ANT | ATH_PCI_BT_ANT_DIV }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, + 0x0036, + PCI_VENDOR_ID_DELL, + 0x020E), + .driver_data = ATH_PCI_AR9565_2ANT | ATH_PCI_BT_ANT_DIV }, + + /* PCI-E AR9565 (WB335) */ + { PCI_VDEVICE(PCI_VENDOR_ID_ATHEROS, 0x0036), + .driver_data = ATH_PCI_BT_ANT_DIV }, + + { 0 } +}; + From owner-svn-src-all@FreeBSD.ORG Tue Sep 30 07:28:31 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EE2E1397; Tue, 30 Sep 2014 07:28:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DB632AC3; Tue, 30 Sep 2014 07:28:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8U7SVso020884; Tue, 30 Sep 2014 07:28:31 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8U7SVd8020883; Tue, 30 Sep 2014 07:28:31 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201409300728.s8U7SVd8020883@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Tue, 30 Sep 2014 07:28:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272296 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2014 07:28:32 -0000 Author: kevlo Date: Tue Sep 30 07:28:31 2014 New Revision: 272296 URL: http://svnweb.freebsd.org/changeset/base/272296 Log: When plen != ulen, it should only be checked when this is UDP. Spotted by: bryanv Modified: head/sys/netinet6/udp6_usrreq.c Modified: head/sys/netinet6/udp6_usrreq.c ============================================================================== --- head/sys/netinet6/udp6_usrreq.c Tue Sep 30 05:50:34 2014 (r272295) +++ head/sys/netinet6/udp6_usrreq.c Tue Sep 30 07:28:31 2014 (r272296) @@ -232,7 +232,7 @@ udp6_input(struct mbuf **mp, int *offp, ulen = plen; cscov_partial = 0; } - if (plen != ulen) { + if (nxt == IPPROTO_UDP && plen != ulen) { UDPSTAT_INC(udps_badlen); goto badunlocked; } From owner-svn-src-all@FreeBSD.ORG Tue Sep 30 09:41:16 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F3A3C593; Tue, 30 Sep 2014 09:41:15 +0000 (UTC) Received: from mail110.syd.optusnet.com.au (mail110.syd.optusnet.com.au [211.29.132.97]) by mx1.freebsd.org (Postfix) with ESMTP id 20B28CDB; Tue, 30 Sep 2014 09:41:15 +0000 (UTC) Received: from c122-106-147-133.carlnfd1.nsw.optusnet.com.au (c122-106-147-133.carlnfd1.nsw.optusnet.com.au [122.106.147.133]) by mail110.syd.optusnet.com.au (Postfix) with ESMTPS id 07BF9789B8D; Tue, 30 Sep 2014 17:18:45 +1000 (EST) Date: Tue, 30 Sep 2014 17:18:45 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: John Baldwin Subject: Re: svn commit: r272207 - in head/games: factor primes In-Reply-To: <5561525.GofWoxIbJB@ralph.baldwin.cx> Message-ID: <20140930161447.S1804@besplex.bde.org> References: <201409270900.s8R90dWl029070@svn.freebsd.org> <1576403.4iOOFWFkUs@ralph.baldwin.cx> <5426B4EC.9040102@freebsd.org> <5561525.GofWoxIbJB@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=BdjhjNd2 c=1 sm=1 tr=0 a=7NqvjVvQucbO2RlWB8PEog==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=M6_0HiynEphOaEauVIcA:9 a=YkOdBkwIIxu9_-Dj:21 a=syUD13BPXRGfbw91:21 a=CjuIK1q_8ugA:10 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Colin Percival X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2014 09:41:16 -0000 On Mon, 29 Sep 2014, John Baldwin wrote: > On Saturday, September 27, 2014 06:00:28 AM Colin Percival wrote: >> On 09/27/14 05:52, John Baldwin wrote: >>> On Saturday, September 27, 2014 09:00:39 AM Colin Percival wrote: >>>> #define BIG ULONG_MAX /* largest value will sieve */ >>> >>> Should this be UINT64_MAX (or however that is spelled) instead of >>> ULONG_MAX >>> now? (or is it even still used? I know your change removed its use in at >>> least one place.) >> >> It's not used any more. I was resisting the urge to spend time going >> through and removing ancient history (which is why I kept ubig instead of >> changing it to uint64_t everywhere). > > It's kind of misleading though as the value is wrong and the comment for it no > longer applies. How about this: > > Index: primes.c > =================================================================== > --- primes.c (revision 272281) > +++ primes.c (working copy) > @@ -169,7 +169,7 @@ > > /* > * read_num_buf -- > - * This routine returns a number n, where 0 <= n && n <= BIG. > + * This routine returns a non-negative number n > */ Syntax error (lost punctuation). > static ubig > read_num_buf(void) The comment is almost completely useless now. It is fairly obvious that the function returns a non-negative number. It cannot return anything else, since its return type is an unsigned integer type. The main action of this function is not commented on. It reads a number from stdin. The '_buf' in the name of this function is garbage. The only buffers involved are a local buffer in the function and any buffer for stdin. These are implementation details. It looks like an old version did the reading from stdin and passed the buffer as an arg. 'n' in the description is unused now. > @@ -214,7 +214,7 @@ > /* > * A number of systems can not convert double values into unsigned > * longs when the values are larger than the largest signed value. > - * We don't have this problem, so we can go all the way to BIG. > + * We don't have this problem, so we can go all the way. > */ > if (start < 3) { > start = (ubig)2; All the way where? This comment, and the code, is much more broken than the above. First, it is machine-dependent. Some systems, including ones supported by FreeBSD but probably not ones supported by 4.4BSD when the comment was written, do have a problem. Second, the problem is with conversion in the opposite direction. When this comment was written, most systems has only 32-bit unsigned longs and it was just impossible to convert large 53-bit doubles values to them without producing garbage. (I think the behaviour is on overflow of such conversions is undefined. gcc at least used to produce very machine-dependent garbage.) However, this program only supports numbers up to ULONG_MAX. It converts these to doubles and adds a few, and needs these calculations to be exact. Since 53 is much larger than 32, they used to be exact. It never converts in the opposite direction. So the comment was sort of backwards. After fixing only the backwardness, the comment remains machine-dependent. It became false with 64-bit ulongs (since 64 > 53). However, the limit is now SIEVE_MAX (or something near the square of this?), not UBIG = UINT64_MAX. Provided SIEVE_MAX (squared?) fits in strictly less than 53 bits, the comment corrected to give the limit of SIEVE_MAX (squared?) becomes correct again, and also not machine-dependent, provided no one expands SIEVE_MAX. Here is some (all?) of the buggy code that uses doubles: very old version: % /* % * sieve for primes 17 and higher % */ % /* note highest useful factor and sieve spot */ % if (stop-start > TABSIZE+TABSIZE) { % tab_lim = &table[TABSIZE]; /* sieve it all */ % fact_lim = (int)sqrt( % (double)(start)+TABSIZE+TABSIZE+1.0); % } else { % tab_lim = &table[(stop-start)/2]; /* partial sieve */ % fact_lim = (int)sqrt((double)(stop)+1.0); % } This has excessive casts and other style bugs, but the casts to double make it clear where the doubles are. When 'start' is larger than 2**53, converting it to double loses precision and adding TABSIZE, etc., to it might have no effect. Thus the value of sqrt() might be wrong. Casting this value to signed int is unecessarily broken, but works in most cases where the double calculation isn't already broken (the int cast breaks at 2**31, but the sqrt() calculation breaks at 2**26.5). Similarly for 'stop', except only 1 is added so the addition is even more likely to have no effect. The previous version has the bogus casts removed and some line-splitting style bugs fixed. It still has the precision bugs and no spaces around binary operators: % /* % * sieve for primes 17 and higher % */ % /* note highest useful factor and sieve spot */ % if (stop-start > TABSIZE+TABSIZE) { % tab_lim = &table[TABSIZE]; /* sieve it all */ % fact_lim = sqrt(start+1.0+TABSIZE+TABSIZE); % } else { % tab_lim = &table[(stop-start)/2]; /* partial sieve */ % fact_lim = sqrt(stop+1.0); % } I don't have the latest version to quote. Perhaps it modified these sqrt() calculations. Using floating point is still the easiest way to determine the limit. To actually find the correct limit for 64-bit numbers, this could use sqrt() and then add a few for safety, or square the approximate square root and increase it by 1 at a time until it is large enough. > Index: primes.h > =================================================================== > --- primes.h (revision 272281) > +++ primes.h (working copy) > @@ -45,7 +45,6 @@ > > /* ubig is the type that holds a large unsigned value */ It would be more useful to say that it holds the largest supported unsigned value, not just 1 large value. > typedef uint64_t ubig; /* must be >=32 bit unsigned value */ This comment was last correct when no machine had 64-bit longs. Except it was nonsense then too (ubig is a type, not a value). The previous comment says the same thing more clearly and without any machine-dependent limites, unless there is some magic requiring the type being at least 32 bits even when "a large unsigned value" takes less than 32 bits. > -#define BIG ULONG_MAX /* largest value will sieve */ > > /* bytes in sieve table (must be > 3*5*7*11) */ > #define TABSIZE 256*1024 Bruce From owner-svn-src-all@FreeBSD.ORG Tue Sep 30 09:45:51 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B97A27D2; Tue, 30 Sep 2014 09:45:51 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 40022D1F; Tue, 30 Sep 2014 09:45:50 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id s8U9jk0N073575 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 30 Sep 2014 13:45:46 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id s8U9jkD1073574; Tue, 30 Sep 2014 13:45:46 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 30 Sep 2014 13:45:46 +0400 From: Gleb Smirnoff To: Ryan Stone Subject: Re: svn commit: r272284 - head/usr.bin/systat Message-ID: <20140930094546.GA73266@FreeBSD.org> References: <201409291738.s8THcpxo038996@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201409291738.s8THcpxo038996@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2014 09:45:51 -0000 On Mon, Sep 29, 2014 at 05:38:51PM +0000, Ryan Stone wrote: R> Author: rstone R> Date: Mon Sep 29 17:38:50 2014 R> New Revision: 272284 R> URL: http://svnweb.freebsd.org/changeset/base/272284 R> R> Log: R> Fix integer truncation in affecting systat -ifstat R> R> The "systat -ifstat" command was using a u_int to store byte counters. R> With a 10Gbps or faster interface, this overflows within the default R> 5 second refresh period. Switch to using a uint64_t across the board, R> which matches the size used for all counters as of r263102. R> R> PR: 182448 R> MFC after: 1 week R> Sponsored by: Sandvine Inc Thanks, Ryan. I'm always surprised finding people using systat(1) for anything instead of netstat, top, vmstat and the rest. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Tue Sep 30 11:51:33 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 593FB5E7; Tue, 30 Sep 2014 11:51:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2C154CF6; Tue, 30 Sep 2014 11:51:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8UBpXXs043909; Tue, 30 Sep 2014 11:51:33 GMT (envelope-from pjd@FreeBSD.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8UBpXYo043908; Tue, 30 Sep 2014 11:51:33 GMT (envelope-from pjd@FreeBSD.org) Message-Id: <201409301151.s8UBpXYo043908@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pjd set sender to pjd@FreeBSD.org using -f From: Pawel Jakub Dawidek Date: Tue, 30 Sep 2014 11:51:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272297 - head/sys/geom X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2014 11:51:33 -0000 Author: pjd Date: Tue Sep 30 11:51:32 2014 New Revision: 272297 URL: http://svnweb.freebsd.org/changeset/base/272297 Log: Style fixes. Modified: head/sys/geom/geom_dev.c Modified: head/sys/geom/geom_dev.c ============================================================================== --- head/sys/geom/geom_dev.c Tue Sep 30 07:28:31 2014 (r272296) +++ head/sys/geom/geom_dev.c Tue Sep 30 11:51:32 2014 (r272297) @@ -281,7 +281,7 @@ g_dev_open(struct cdev *dev, int flags, cp = dev->si_drv2; if (cp == NULL) - return(ENXIO); /* g_dev_taste() not done yet */ + return (ENXIO); /* g_dev_taste() not done yet */ g_trace(G_T_ACCESS, "g_dev_open(%s, %d, %d, %p)", cp->geom->name, flags, fmt, td); @@ -312,7 +312,7 @@ g_dev_open(struct cdev *dev, int flags, sc->sc_open += r + w + e; mtx_unlock(&sc->sc_mtx); } - return(error); + return (error); } static int @@ -324,10 +324,10 @@ g_dev_close(struct cdev *dev, int flags, cp = dev->si_drv2; if (cp == NULL) - return(ENXIO); + return (ENXIO); g_trace(G_T_ACCESS, "g_dev_close(%s, %d, %d, %p)", cp->geom->name, flags, fmt, td); - + r = flags & FREAD ? -1 : 0; w = flags & FWRITE ? -1 : 0; #ifdef notyet @@ -361,7 +361,6 @@ g_dev_ioctl(struct cdev *dev, u_long cmd struct g_kerneldump kd; off_t offset, length, chunk; int i, error; - u_int u; cp = dev->si_drv2; pp = cp->provider; @@ -396,8 +395,7 @@ g_dev_ioctl(struct cdev *dev, u_long cmd error = g_io_getattr("GEOM::frontstuff", cp, &i, data); break; case DIOCSKERNELDUMP: - u = *((u_int *)data); - if (!u) { + if (*(u_int *)data != 0) { set_dumper(NULL, NULL); error = 0; break; @@ -406,9 +404,9 @@ g_dev_ioctl(struct cdev *dev, u_long cmd kd.length = OFF_MAX; i = sizeof kd; error = g_io_getattr("GEOM::kerneldump", cp, &i, &kd); - if (!error) { + if (error == 0) { error = set_dumper(&kd.di, devtoname(dev)); - if (!error) + if (error == 0) dev->si_flags |= SI_DUMPDEV; } break; @@ -425,7 +423,7 @@ g_dev_ioctl(struct cdev *dev, u_long cmd error = EINVAL; break; } - while (length > 0) { + while (length > 0) { chunk = length; if (g_dev_del_max_sectors != 0 && chunk > g_dev_del_max_sectors * cp->provider->sectorsize) { From owner-svn-src-all@FreeBSD.ORG Tue Sep 30 12:00:51 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3BDBBAAA; Tue, 30 Sep 2014 12:00:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 289C1EA7; Tue, 30 Sep 2014 12:00:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8UC0pss047145; Tue, 30 Sep 2014 12:00:51 GMT (envelope-from pjd@FreeBSD.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8UC0p7Q047144; Tue, 30 Sep 2014 12:00:51 GMT (envelope-from pjd@FreeBSD.org) Message-Id: <201409301200.s8UC0p7Q047144@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pjd set sender to pjd@FreeBSD.org using -f From: Pawel Jakub Dawidek Date: Tue, 30 Sep 2014 12:00:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272298 - head/sys/geom X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2014 12:00:51 -0000 Author: pjd Date: Tue Sep 30 12:00:50 2014 New Revision: 272298 URL: http://svnweb.freebsd.org/changeset/base/272298 Log: Be prepared that set_dumper() might fail even when resetting it or prefix the call with (void) to document that we intentionally ignore the return value - no way to handle an error in case of device disappearing. Modified: head/sys/geom/geom_dev.c Modified: head/sys/geom/geom_dev.c ============================================================================== --- head/sys/geom/geom_dev.c Tue Sep 30 11:51:32 2014 (r272297) +++ head/sys/geom/geom_dev.c Tue Sep 30 12:00:50 2014 (r272298) @@ -396,8 +396,7 @@ g_dev_ioctl(struct cdev *dev, u_long cmd break; case DIOCSKERNELDUMP: if (*(u_int *)data != 0) { - set_dumper(NULL, NULL); - error = 0; + error = set_dumper(NULL, NULL); break; } kd.offset = 0; @@ -616,7 +615,7 @@ g_dev_orphan(struct g_consumer *cp) /* Reset any dump-area set on this device */ if (dev->si_flags & SI_DUMPDEV) - set_dumper(NULL, NULL); + (void)set_dumper(NULL, NULL); /* Destroy the struct cdev *so we get no more requests */ destroy_dev_sched_cb(dev, g_dev_callback, cp); From owner-svn-src-all@FreeBSD.ORG Tue Sep 30 13:15:20 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0BA7860E; Tue, 30 Sep 2014 13:15:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EC1A29B0; Tue, 30 Sep 2014 13:15:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8UDFJ6S085507; Tue, 30 Sep 2014 13:15:19 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8UDFJrQ085506; Tue, 30 Sep 2014 13:15:19 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201409301315.s8UDFJrQ085506@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Tue, 30 Sep 2014 13:15:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272299 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2014 13:15:20 -0000 Author: ae Date: Tue Sep 30 13:15:19 2014 New Revision: 272299 URL: http://svnweb.freebsd.org/changeset/base/272299 Log: Remove redundant call to ipsec_getpolicybyaddr(). ipsec_hdrsiz() will call it internally. Sponsored by: Yandex LLC Modified: head/sys/netinet6/ip6_forward.c Modified: head/sys/netinet6/ip6_forward.c ============================================================================== --- head/sys/netinet6/ip6_forward.c Tue Sep 30 12:00:50 2014 (r272298) +++ head/sys/netinet6/ip6_forward.c Tue Sep 30 13:15:19 2014 (r272299) @@ -422,8 +422,6 @@ again2: if (mcopy) { u_long mtu; #ifdef IPSEC - struct secpolicy *sp; - int ipsecerror; size_t ipsechdrsiz; #endif /* IPSEC */ @@ -436,15 +434,10 @@ again2: * case, as we have the outgoing interface for * encapsulated packet as "rt->rt_ifp". */ - sp = ipsec_getpolicybyaddr(mcopy, IPSEC_DIR_OUTBOUND, - IP_FORWARDING, &ipsecerror); - if (sp) { - ipsechdrsiz = ipsec_hdrsiz(mcopy, - IPSEC_DIR_OUTBOUND, NULL); - if (ipsechdrsiz < mtu) - mtu -= ipsechdrsiz; - } - + ipsechdrsiz = ipsec_hdrsiz(mcopy, IPSEC_DIR_OUTBOUND, + NULL); + if (ipsechdrsiz < mtu) + mtu -= ipsechdrsiz; /* * if mtu becomes less than minimum MTU, * tell minimum MTU (and I'll need to fragment it). From owner-svn-src-all@FreeBSD.ORG Tue Sep 30 13:32:46 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A1707C53; Tue, 30 Sep 2014 13:32:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8D88AC09; Tue, 30 Sep 2014 13:32:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8UDWk0H095221; Tue, 30 Sep 2014 13:32:46 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8UDWkjD095220; Tue, 30 Sep 2014 13:32:46 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201409301332.s8UDWkjD095220@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 30 Sep 2014 13:32:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272300 - head/sys/arm/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2014 13:32:46 -0000 Author: andrew Date: Tue Sep 30 13:32:45 2014 New Revision: 272300 URL: http://svnweb.freebsd.org/changeset/base/272300 Log: Make sure __ARM_ARCH is defined in sysreg.h by including acle-compat.h Modified: head/sys/arm/include/sysreg.h Modified: head/sys/arm/include/sysreg.h ============================================================================== --- head/sys/arm/include/sysreg.h Tue Sep 30 13:15:19 2014 (r272299) +++ head/sys/arm/include/sysreg.h Tue Sep 30 13:32:45 2014 (r272300) @@ -34,6 +34,8 @@ #ifndef MACHINE_SYSREG_H #define MACHINE_SYSREG_H +#include + /* * CP15 C0 registers */ From owner-svn-src-all@FreeBSD.ORG Tue Sep 30 13:45:21 2014 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3597425E; Tue, 30 Sep 2014 13:45:21 +0000 (UTC) Received: from nibbler.fubar.geek.nz (nibbler.fubar.geek.nz [199.48.134.198]) by mx1.freebsd.org (Postfix) with ESMTP id 17DBFD3B; Tue, 30 Sep 2014 13:45:21 +0000 (UTC) Received: from bender.lan (97e07ab1.skybroadband.com [151.224.122.177]) by nibbler.fubar.geek.nz (Postfix) with ESMTPSA id B16555CF66; Tue, 30 Sep 2014 13:38:07 +0000 (UTC) Date: Tue, 30 Sep 2014 14:37:58 +0100 From: Andrew Turner To: Andreas Tobler Subject: Re: svn commit: r272209 - in head/sys/arm: arm include Message-ID: <20140930143758.27d26ab9@bender.lan> In-Reply-To: <5429A58E.2030508@FreeBSD.org> References: <201409270957.s8R9vYrw056987@svn.freebsd.org> <5429A58E.2030508@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Andrew Turner , svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2014 13:45:21 -0000 On Mon, 29 Sep 2014 20:31:42 +0200 Andreas Tobler wrote: > Hi Andrew, > > On 27.09.14 11:57, Andrew Turner wrote: > > Author: andrew > > Date: Sat Sep 27 09:57:34 2014 > > New Revision: 272209 > > URL: http://svnweb.freebsd.org/changeset/base/272209 > > > > Log: > > Add machine/sysreg.h to simplify accessing the system control > > coprocessor registers and use it in the ARMv7 CPU functions. > > > > The sysreg.h file has been checked by hand, however it may > > contain errors with the comments on when a register was first > > introduced. The ARMv7 cpu functions have been checked by compiling > > both the previous and this version and comparing the md5 of the > > object files. > > > > Submitted by: Svatopluk Kraus > > Submitted by: Michal Meloun > > Reviewed by: ian, rpaulo > > Differential Revision: https://reviews.freebsd.org/D795 > > > > Added: > > head/sys/arm/include/sysreg.h (contents, props changed) > > This one breaks kernel build with gcc-4.2.1. > > __ARM_ARCH not defined. On gcc-4.2.1 there is no __ARM_ARCH builtin. > Later gcc do have it. > > The include below fixes the build. Fixed in r272300. Andrew From owner-svn-src-all@FreeBSD.ORG Tue Sep 30 13:56:33 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 75F29BB8; Tue, 30 Sep 2014 13:56:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5E8A5E7C; Tue, 30 Sep 2014 13:56:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8UDuXj1005945; Tue, 30 Sep 2014 13:56:33 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8UDuX76005944; Tue, 30 Sep 2014 13:56:33 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409301356.s8UDuX76005944@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 30 Sep 2014 13:56:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272301 - stable/10/sys/boot/efi/include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2014 13:56:33 -0000 Author: emaste Date: Tue Sep 30 13:56:32 2014 New Revision: 272301 URL: http://svnweb.freebsd.org/changeset/base/272301 Log: MFC r272105: Remove duplicated header content Approved by: re (gjb, kib) Modified: stable/10/sys/boot/efi/include/eficonsctl.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/efi/include/eficonsctl.h ============================================================================== --- stable/10/sys/boot/efi/include/eficonsctl.h Tue Sep 30 13:32:45 2014 (r272300) +++ stable/10/sys/boot/efi/include/eficonsctl.h Tue Sep 30 13:56:32 2014 (r272301) @@ -132,122 +132,3 @@ struct _EFI_CONSOLE_CONTROL_PROTOCOL { extern EFI_GUID gEfiConsoleControlProtocolGuid; #endif -/*- - * Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved. - * - * This program and the accompanying materials are licensed and made available - * under the terms and conditions of the BSD License which accompanies this - * distribution. The full text of the license may be found at - * http://opensource.org/licenses/bsd-license.php - * - * THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - * WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR - * IMPLIED. - * - * Original Module Name: ConsoleControl.h - * Abstract: Abstraction of a Text mode or GOP/UGA screen - */ - -/* $FreeBSD */ - -#ifndef _EFI_CONS_CTL_H -#define _EFI_CONS_CTL_H - -#define EFI_CONSOLE_CONTROL_PROTOCOL_GUID \ - { 0xf42f7782, 0x12e, 0x4c12, {0x99, 0x56, 0x49, 0xf9, 0x43, 0x4, 0xf7, 0x21} } - -typedef struct _EFI_CONSOLE_CONTROL_PROTOCOL EFI_CONSOLE_CONTROL_PROTOCOL; - - -typedef enum { - EfiConsoleControlScreenText, - EfiConsoleControlScreenGraphics, - EfiConsoleControlScreenMaxValue -} EFI_CONSOLE_CONTROL_SCREEN_MODE; - - -typedef -EFI_STATUS -(EFIAPI *EFI_CONSOLE_CONTROL_PROTOCOL_GET_MODE) ( - IN EFI_CONSOLE_CONTROL_PROTOCOL *This, - OUT EFI_CONSOLE_CONTROL_SCREEN_MODE *Mode, - OUT BOOLEAN *GopUgaExists, OPTIONAL - OUT BOOLEAN *StdInLocked OPTIONAL - ) -/*++ - - Routine Description: - Return the current video mode information. Also returns info about existence - of Graphics Output devices or UGA Draw devices in system, and if the Std In - device is locked. All the arguments are optional and only returned if a non - NULL pointer is passed in. - - Arguments: - This - Protocol instance pointer. - Mode - Are we in text of grahics mode. - GopUgaExists - TRUE if Console Spliter has found a GOP or UGA device - StdInLocked - TRUE if StdIn device is keyboard locked - - Returns: - EFI_SUCCESS - Mode information returned. - ---*/ -; - - -typedef -EFI_STATUS -(EFIAPI *EFI_CONSOLE_CONTROL_PROTOCOL_SET_MODE) ( - IN EFI_CONSOLE_CONTROL_PROTOCOL *This, - IN EFI_CONSOLE_CONTROL_SCREEN_MODE Mode - ) -/*++ - - Routine Description: - Set the current mode to either text or graphics. Graphics is - for Quiet Boot. - - Arguments: - This - Protocol instance pointer. - Mode - Mode to set the - - Returns: - EFI_SUCCESS - Mode information returned. - ---*/ -; - - -typedef -EFI_STATUS -(EFIAPI *EFI_CONSOLE_CONTROL_PROTOCOL_LOCK_STD_IN) ( - IN EFI_CONSOLE_CONTROL_PROTOCOL *This, - IN CHAR16 *Password - ) -/*++ - - Routine Description: - Lock Std In devices until Password is typed. - - Arguments: - This - Protocol instance pointer. - Password - Password needed to unlock screen. NULL means unlock keyboard - - Returns: - EFI_SUCCESS - Mode information returned. - EFI_DEVICE_ERROR - Std In not locked - ---*/ -; - - - -struct _EFI_CONSOLE_CONTROL_PROTOCOL { - EFI_CONSOLE_CONTROL_PROTOCOL_GET_MODE GetMode; - EFI_CONSOLE_CONTROL_PROTOCOL_SET_MODE SetMode; - EFI_CONSOLE_CONTROL_PROTOCOL_LOCK_STD_IN LockStdIn; -}; - -extern EFI_GUID gEfiConsoleControlProtocolGuid; - -#endif From owner-svn-src-all@FreeBSD.ORG Tue Sep 30 15:05:28 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 74FE8C9A; Tue, 30 Sep 2014 15:05:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6060F978; Tue, 30 Sep 2014 15:05:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8UF5Sb1041038; Tue, 30 Sep 2014 15:05:28 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8UF5SAd041037; Tue, 30 Sep 2014 15:05:28 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409301505.s8UF5SAd041037@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 30 Sep 2014 15:05:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r272302 - stable/9/contrib/llvm/tools/clang/lib/CodeGen X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2014 15:05:28 -0000 Author: emaste Date: Tue Sep 30 15:05:27 2014 New Revision: 272302 URL: http://svnweb.freebsd.org/changeset/base/272302 Log: MFC r271432: Merge upstream Clang rev 205331 debuginfo crash fix: Debug info: fix a crash when emitting IndirectFieldDecls, which were previously not handled at all. rdar://problem/16348575 Modified: stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp Directory Properties: stable/9/contrib/llvm/ (props changed) stable/9/contrib/llvm/tools/clang/ (props changed) Modified: stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp ============================================================================== --- stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp Tue Sep 30 13:56:32 2014 (r272301) +++ stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp Tue Sep 30 15:05:27 2014 (r272302) @@ -1239,7 +1239,7 @@ CollectTemplateParams(const TemplatePara V = CGM.GetAddrOfFunction(FD); // Member data pointers have special handling too to compute the fixed // offset within the object. - if (isa(D)) { + if (isa(D) || isa(D)) { // These five lines (& possibly the above member function pointer // handling) might be able to be refactored to use similar code in // CodeGenModule::getMemberPointerConstant From owner-svn-src-all@FreeBSD.ORG Tue Sep 30 15:07:07 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ABE66DEF; Tue, 30 Sep 2014 15:07:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8D777996; Tue, 30 Sep 2014 15:07:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8UF77ix041345; Tue, 30 Sep 2014 15:07:07 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8UF77am041344; Tue, 30 Sep 2014 15:07:07 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409301507.s8UF77am041344@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 30 Sep 2014 15:07:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r272303 - stable/9/contrib/llvm/patches X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2014 15:07:07 -0000 Author: emaste Date: Tue Sep 30 15:07:06 2014 New Revision: 272303 URL: http://svnweb.freebsd.org/changeset/base/272303 Log: MFC r271433: Add clang patch corresponding to r271432 Added: stable/9/contrib/llvm/patches/patch-r271432-clang-r205331-debug-info-crash.diff - copied unchanged from r271433, head/contrib/llvm/patches/patch-r271432-clang-r205331-debug-info-crash.diff Modified: Directory Properties: stable/9/contrib/llvm/ (props changed) Copied: stable/9/contrib/llvm/patches/patch-r271432-clang-r205331-debug-info-crash.diff (from r271433, head/contrib/llvm/patches/patch-r271432-clang-r205331-debug-info-crash.diff) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/contrib/llvm/patches/patch-r271432-clang-r205331-debug-info-crash.diff Tue Sep 30 15:07:06 2014 (r272303, copy of r271433, head/contrib/llvm/patches/patch-r271432-clang-r205331-debug-info-crash.diff) @@ -0,0 +1,46 @@ +commit 96365aef99ec463375dfdaf6eb260823e0477b6a +Author: Adrian Prantl +Date: Tue Apr 1 17:52:06 2014 +0000 + + Debug info: fix a crash when emitting IndirectFieldDecls, which were + previously not handled at all. + rdar://problem/16348575 + + git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205331 91177308-0d34-0410-b5e6-96231b3b80d8 + +diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp +index 82db942..2556cf9 100644 +--- tools/clang/lib/CodeGen/CGDebugInfo.cpp ++++ tools/clangb/lib/CodeGen/CGDebugInfo.cpp +@@ -1252,7 +1252,7 @@ CollectTemplateParams(const TemplateParameterList *TPList, + V = CGM.GetAddrOfFunction(FD); + // Member data pointers have special handling too to compute the fixed + // offset within the object. +- if (isa(D)) { ++ if (isa(D) || isa(D)) { + // These five lines (& possibly the above member function pointer + // handling) might be able to be refactored to use similar code in + // CodeGenModule::getMemberPointerConstant +diff --git a/test/CodeGenCXX/debug-info-indirect-field-decl.cpp b/test/CodeGenCXX/debug-info-indirect-field-decl.cpp +new file mode 100644 +index 0000000..131ceba +--- /dev/null ++++ tools/clang/test/CodeGenCXX/debug-info-indirect-field-decl.cpp +@@ -0,0 +1,17 @@ ++// RUN: %clang_cc1 -emit-llvm -g -triple x86_64-apple-darwin %s -o - | FileCheck %s ++// ++// Test that indirect field decls are handled gracefully. ++// rdar://problem/16348575 ++// ++template class Foo { }; ++ ++struct Bar { ++ int i1; ++ // CHECK: [ DW_TAG_member ] [line [[@LINE+1]], size 32, align 32, offset 32] [from _ZTSN3BarUt_E] ++ union { ++ // CHECK: [ DW_TAG_member ] [i2] [line [[@LINE+1]], size 32, align 32, offset 0] [from int] ++ int i2; ++ }; ++}; ++ ++Foo the_foo; From owner-svn-src-all@FreeBSD.ORG Tue Sep 30 15:10:41 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D6A2BF8; Tue, 30 Sep 2014 15:10:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B7676A8F; Tue, 30 Sep 2014 15:10:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8UFAf1Q044909; Tue, 30 Sep 2014 15:10:41 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8UFAfQr044906; Tue, 30 Sep 2014 15:10:41 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409301510.s8UFAfQr044906@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 30 Sep 2014 15:10:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r272304 - in stable/9/contrib/llvm: patches tools/clang/lib/CodeGen X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2014 15:10:42 -0000 Author: emaste Date: Tue Sep 30 15:10:40 2014 New Revision: 272304 URL: http://svnweb.freebsd.org/changeset/base/272304 Log: MFC Clang debug info crash fix 271282: Merge Clang debug info crash fix rev 200797: Debug info: fix a crasher when when emitting debug info for not-yet-completed templated types. getTypeSize() needs a complete type. rdar://problem/15931354 271283: Add clang patch for r271282 Note that r271282 contains only the src change from Clang rev 200797. This patch file includes two follow-on changes to the test case, which do not apply to the copy in the FreeBSD tree. Upstream Clang revisions: 200797: Debug info: fix a crasher when when emitting debug info for not-yet-completed templated types. getTypeSize() needs a complete type. rdar://problem/15931354 200798: Simplify testcase from r200797 some more. 200805: Further simplify r200797 and add an explanatory comment. PR: 193347 Added: stable/9/contrib/llvm/patches/patch-r271282-clang-r200797-r200798-r200805-debug-info-crash.diff - copied unchanged from r271283, head/contrib/llvm/patches/patch-r271282-clang-r200797-r200798-r200805-debug-info-crash.diff Modified: stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp Directory Properties: stable/9/contrib/llvm/ (props changed) stable/9/contrib/llvm/tools/clang/ (props changed) Copied: stable/9/contrib/llvm/patches/patch-r271282-clang-r200797-r200798-r200805-debug-info-crash.diff (from r271283, head/contrib/llvm/patches/patch-r271282-clang-r200797-r200798-r200805-debug-info-crash.diff) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/contrib/llvm/patches/patch-r271282-clang-r200797-r200798-r200805-debug-info-crash.diff Tue Sep 30 15:10:40 2014 (r272304, copy of r271283, head/contrib/llvm/patches/patch-r271282-clang-r200797-r200798-r200805-debug-info-crash.diff) @@ -0,0 +1,51 @@ +diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp +index 59ba47c..dddc7e7 100644 +--- a/lib/CodeGen/CGDebugInfo.cpp ++++ b/lib/CodeGen/CGDebugInfo.cpp +@@ -2251,9 +2251,10 @@ llvm::DICompositeType CGDebugInfo::CreateLimitedType(const RecordType *Ty) { + if (T && (!T.isForwardDecl() || !RD->getDefinition())) + return T; + +- // If this is just a forward declaration, construct an appropriately +- // marked node and just return it. +- if (!RD->getDefinition()) ++ // If this is just a forward or incomplete declaration, construct an ++ // appropriately marked node and just return it. ++ const RecordDecl *D = RD->getDefinition(); ++ if (!D || !D->isCompleteDefinition()) + return getOrCreateRecordFwdDecl(Ty, RDContext); + + uint64_t Size = CGM.getContext().getTypeSize(Ty); +diff --git a/test/CodeGenCXX/debug-info-template-fwd.cpp b/test/CodeGenCXX/debug-info-template-fwd.cpp +new file mode 100644 +index 0000000..b2b7073 +--- /dev/null ++++ b/test/CodeGenCXX/debug-info-template-fwd.cpp +@@ -0,0 +1,27 @@ ++// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -g -emit-llvm -o - | FileCheck %s ++// This test is for a crash when emitting debug info for not-yet-completed ++// types. ++// Test that we don't actually emit a forward decl for the offending class: ++// CHECK: [ DW_TAG_structure_type ] [Derived] {{.*}} [def] ++// rdar://problem/15931354 ++template class Derived; ++ ++template class Base { ++ static Derived *create(); ++}; ++ ++template struct Derived : Base { ++}; ++ ++Base *f; ++ ++// During the instantiation of Derived, Base becomes required to be ++// complete - since the declaration has already been emitted (due to 'f', ++// above), we immediately try to build debug info for Base which then ++// requires the (incomplete definition) of Derived which is problematic. ++// ++// (if 'f' is not present, the point at which Base becomes required to be ++// complete during the instantiation of Derived is a no-op because ++// Base was never emitted so we ignore it and carry on until we ++// wire up the base class of Derived in the debug info later on) ++Derived d; Modified: stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp ============================================================================== --- stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp Tue Sep 30 15:07:06 2014 (r272303) +++ stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp Tue Sep 30 15:10:40 2014 (r272304) @@ -2233,9 +2233,10 @@ llvm::DICompositeType CGDebugInfo::Creat if (T && (!T.isForwardDecl() || !RD->getDefinition())) return T; - // If this is just a forward declaration, construct an appropriately - // marked node and just return it. - if (!RD->getDefinition()) + // If this is just a forward or incomplete declaration, construct an + // appropriately marked node and just return it. + const RecordDecl *D = RD->getDefinition(); + if (!D || !D->isCompleteDefinition()) return getOrCreateRecordFwdDecl(Ty, RDContext); uint64_t Size = CGM.getContext().getTypeSize(Ty); From owner-svn-src-all@FreeBSD.ORG Tue Sep 30 15:27:50 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4949F9BA; Tue, 30 Sep 2014 15:27:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2A682C24; Tue, 30 Sep 2014 15:27:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8UFRort054124; Tue, 30 Sep 2014 15:27:50 GMT (envelope-from rodrigc@FreeBSD.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8UFRnRY054122; Tue, 30 Sep 2014 15:27:49 GMT (envelope-from rodrigc@FreeBSD.org) Message-Id: <201409301527.s8UFRnRY054122@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rodrigc set sender to rodrigc@FreeBSD.org using -f From: Craig Rodrigues Date: Tue, 30 Sep 2014 15:27:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272305 - head/bin/pkill/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2014 15:27:50 -0000 Author: rodrigc Date: Tue Sep 30 15:27:49 2014 New Revision: 272305 URL: http://svnweb.freebsd.org/changeset/base/272305 Log: Fix pkill unit tests. - use daemon(8) to write out a pid file for processes, and check for for the existence of that file after killing processes - use explict named parameters to jail(8) Modified: head/bin/pkill/tests/pgrep-j_test.sh head/bin/pkill/tests/pkill-j_test.sh Modified: head/bin/pkill/tests/pgrep-j_test.sh ============================================================================== --- head/bin/pkill/tests/pgrep-j_test.sh Tue Sep 30 15:10:40 2014 (r272304) +++ head/bin/pkill/tests/pgrep-j_test.sh Tue Sep 30 15:27:49 2014 (r272305) @@ -1,7 +1,23 @@ #!/bin/sh # $FreeBSD$ -base=`basename $0` +jail_name_to_jid() +{ + local check_name="$1" + ( + line="$(jls -n 2> /dev/null | grep name=$check_name )" + for nv in $line; do + local name="${nv%=*}" + if [ "${name}" = "jid" ]; then + eval $nv + echo $jid + break + fi + done + ) +} + +base=pgrep_j_test echo "1..3" @@ -9,21 +25,25 @@ name="pgrep -j " if [ `id -u` -eq 0 ]; then sleep=$(pwd)/sleep.txt ln -sf /bin/sleep $sleep - jail / $base-1 127.0.0.1 $sleep 5 & - chpid=$! - jail / $base-2 127.0.0.1 $sleep 5 & - chpid2=$! - $sleep 5 & - chpid3=$! - sleep 0.5 - jid=`jls | awk "/127\\.0\\.0\\.1.*${base}-1/ {print \$1}"` - pid=`pgrep -f -j $jid $sleep` - if [ "$pid" = "$chpid" ]; then + jail -c path=/ name=${base}_1_1 ip4.addr=127.0.0.1 \ + command=daemon -p ${PWD}/${base}_1_1.pid $sleep 5 & + + jail -c path=/ name=${base}_1_2 ip4.addr=127.0.0.1 \ + command=daemon -p ${PWD}/${base}_1_2.pid $sleep 5 & + + jid1=$(jail_name_to_jid ${base}_1_1) + jid2=$(jail_name_to_jid ${base}_1_2) + jid="${jid1},${jid2}" + pid1="$(pgrep -f -x -j $jid "$sleep 5" | sort)" + pid2=$(printf "%s\n%s" "$(cat ${PWD}/${base}_1_1.pid)" \ + $(cat ${PWD}/${base}_1_2.pid) | sort) + if [ "$pid1" = "$pid2" ]; then echo "ok 1 - $name" else echo "not ok 1 - $name" fi - kill $chpid $chpid2 $chpid3 + [ -f ${PWD}/${base}_1_1.pid ] && kill $(cat ${PWD}/${base}_1_1.pid) + [ -f ${PWD}/${base}_1_2.pid ] && kill $(cat ${PWD}/${base}_1_2.pid) rm -f $sleep else echo "ok 1 - $name # skip Test needs uid 0." @@ -33,21 +53,23 @@ name="pgrep -j any" if [ `id -u` -eq 0 ]; then sleep=$(pwd)/sleep.txt ln -sf /bin/sleep $sleep - jail / $base-1 127.0.0.1 $sleep 5 & - chpid=$! - jail / $base-2 127.0.0.1 $sleep 5 & - chpid2=$! - $sleep 5 & - chpid3=$! - sleep 0.5 - pids=`pgrep -f -j any $sleep | sort` - refpids=`{ echo $chpid; echo $chpid2; } | sort` - if [ "$pids" = "$refpids" ]; then + jail -c path=/ name=${base}_2_1 ip4.addr=127.0.0.1 \ + command=daemon -p ${PWD}/${base}_2_1.pid $sleep 5 & + + jail -c path=/ name=${base}_2_2 ip4.addr=127.0.0.1 \ + command=daemon -p ${PWD}/${base}_2_2.pid $sleep 5 & + + sleep 2 + pid1="$(pgrep -f -x -j any "$sleep 5" | sort)" + pid2=$(printf "%s\n%s" "$(cat ${PWD}/${base}_2_1.pid)" \ + $(cat ${PWD}/${base}_2_2.pid) | sort) + if [ "$pid1" = "$pid2" ]; then echo "ok 2 - $name" else echo "not ok 2 - $name" fi - kill $chpid $chpid2 $chpid3 + [ -f ${PWD}/${base}_2_1.pid ] && kill $(cat ${PWD}/${base}_2_1.pid) + [ -f ${PWD}/${base}_2_2.pid ] && kill $(cat ${PWD}/${base}_2_2.pid) rm -f $sleep else echo "ok 2 - $name # skip Test needs uid 0." @@ -57,19 +79,19 @@ name="pgrep -j none" if [ `id -u` -eq 0 ]; then sleep=$(pwd)/sleep.txt ln -sf /bin/sleep $sleep - $sleep 5 & - chpid=$! - jail / $base 127.0.0.1 $sleep 5 & - chpid2=$! - sleep 0.5 - pid=`pgrep -f -j none $sleep` - if [ "$pid" = "$chpid" ]; then + daemon -p ${PWD}/${base}_3_1.pid $sleep 5 & + jail -c path=/ name=${base}_3_2 ip4.addr=127.0.0.1 \ + command=daemon -p ${PWD}/${base}_3_2.pid $sleep 5 & + sleep 2 + pid="$(pgrep -f -x -j none "$sleep 5")" + if [ "$pid" = "$(cat ${PWD}/${base}_3_1.pid)" ]; then echo "ok 3 - $name" else echo "not ok 3 - $name" fi - kill $chpid $chpid2 rm -f $sleep + [ -f ${PWD}/${base}_3_1.pid ] && kill $(cat $PWD/${base}_3_1.pid) + [ -f ${PWD}/${base}_3_2.pid ] && kill $(cat $PWD/${base}_3_2.pid) else echo "ok 3 - $name # skip Test needs uid 0." fi Modified: head/bin/pkill/tests/pkill-j_test.sh ============================================================================== --- head/bin/pkill/tests/pkill-j_test.sh Tue Sep 30 15:10:40 2014 (r272304) +++ head/bin/pkill/tests/pkill-j_test.sh Tue Sep 30 15:27:49 2014 (r272305) @@ -1,7 +1,23 @@ #!/bin/sh # $FreeBSD$ -base=`basename $0` +jail_name_to_jid() +{ + local check_name="$1" + ( + line="$(jls -n 2> /dev/null | grep name=$check_name )" + for nv in $line; do + local name="${nv%=*}" + if [ "${name}" = "jid" ]; then + eval $nv + echo $jid + break + fi + done + ) +} + +base=pkill_j_test echo "1..3" @@ -9,21 +25,28 @@ name="pkill -j " if [ `id -u` -eq 0 ]; then sleep=$(pwd)/sleep.txt ln -sf /bin/sleep $sleep - jail / $base-1 127.0.0.1 $sleep 5 & - chpid=$! - jail / $base-2 127.0.0.1 $sleep 5 & - chpid2=$! + jail -c path=/ name=${base}_1_1 ip4.addr=127.0.0.1 \ + command=daemon -p ${PWD}/${base}_1_1.pid $sleep 5 & + + jail -c path=/ name=${base}_1_2 ip4.addr=127.0.0.1 \ + command=daemon -p ${PWD}/${base}_1_2.pid $sleep 5 & + $sleep 5 & - chpid3=$! sleep 0.5 - jid=`jls | awk "/127\\.0\\.0\\.1.*${base}-1/ {print \$1}"` - if pkill -f -j $jid $sleep && sleep 0.5 && - ! kill $chpid && kill $chpid2 $chpid3; then + jid1=$(jail_name_to_jid ${base}_1_1) + jid2=$(jail_name_to_jid ${base}_1_2) + jid="${jid1},${jid2}" + if pkill -f -j "$jid" $sleep && sleep 0.5 && + ! -f ${PWD}/${base}_1_1.pid && + ! -f ${PWD}/${base}_1_2.pid ; then echo "ok 1 - $name" else echo "not ok 1 - $name" fi 2>/dev/null rm -f $sleep + [ -f ${PWD}/${base}_1_1.pid ] && kill $(cat ${PWD}/${base}_1_1.pid) + [ -f ${PWD}/${base}_1_2.pid ] && kill $(cat ${PWD}/${base}_1_2.pid) + wait else echo "ok 1 - $name # skip Test needs uid 0." fi @@ -32,20 +55,26 @@ name="pkill -j any" if [ `id -u` -eq 0 ]; then sleep=$(pwd)/sleep.txt ln -sf /bin/sleep $sleep - jail / $base-1 127.0.0.1 $sleep 5 & - chpid=$! - jail / $base-2 127.0.0.1 $sleep 5 & - chpid2=$! + jail -c path=/ name=${base}_2_1 ip4.addr=127.0.0.1 \ + command=daemon -p ${PWD}/${base}_2_1.pid $sleep 5 & + + jail -c path=/ name=${base}_2_2 ip4.addr=127.0.0.1 \ + command=daemon -p ${PWD}/${base}_2_2.pid $sleep 5 & + $sleep 5 & - chpid3=$! sleep 0.5 + chpid3=$! if pkill -f -j any $sleep && sleep 0.5 && - ! kill $chpid && ! kill $chpid2 && kill $chpid3; then + [ ! -f ${PWD}/${base}_2_1.pid -a + ! -f ${PWD}/${base}_2_2.pid ] && kill $chpid3; then echo "ok 2 - $name" else echo "not ok 2 - $name" fi 2>/dev/null rm -f $sleep + [ -f ${PWD}/${base}_2_1.pid ] && kill $(cat ${PWD}/${base}_2_1.pid) + [ -f ${PWD}/${base}_2_2.pid ] && kill $(cat ${PWD}/${base}_2_2.pid) + wait else echo "ok 2 - $name # skip Test needs uid 0." fi @@ -54,18 +83,20 @@ name="pkill -j none" if [ `id -u` -eq 0 ]; then sleep=$(pwd)/sleep.txt ln -sf /bin/sleep $sleep - $sleep 5 & - chpid=$! - jail / $base 127.0.0.1 $sleep 5 & - chpid2=$! - sleep 0.5 - if pkill -f -j none $sleep && sleep 0.5 && - ! kill $chpid && kill $chpid2; then + daemon -p ${PWD}/${base}_3_1.pid $sleep 5 + jail -c path=/ name=${base}_3_2 ip4.addr=127.0.0.1 \ + command=daemon -p ${PWD}/${base}_3_2.pid $sleep 5 & + sleep 1 + if pkill -f -j none "$sleep 5" && sleep 1 && + [ ! -f ${PWD}/${base}_3_1.pid -a -f ${PWD}/${base}_3_2.pid ] ; then echo "ok 3 - $name" else + ls ${PWD}/*.pid echo "not ok 3 - $name" fi 2>/dev/null rm -f $sleep + [ -f ${PWD}/${base}_3_1.pid ] && kill $(cat ${base}_3_1.pid) + [ -f ${PWD}/${base}_3_2.pid ] && kill $(cat ${base}_3_2.pid) else echo "ok 3 - $name # skip Test needs uid 0." fi From owner-svn-src-all@FreeBSD.ORG Tue Sep 30 16:14:06 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DF00F9E3; Tue, 30 Sep 2014 16:14:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AEF701EC; Tue, 30 Sep 2014 16:14:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8UGE5o3077771; Tue, 30 Sep 2014 16:14:05 GMT (envelope-from rodrigc@FreeBSD.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8UGE3wS077754; Tue, 30 Sep 2014 16:14:03 GMT (envelope-from rodrigc@FreeBSD.org) Message-Id: <201409301614.s8UGE3wS077754@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rodrigc set sender to rodrigc@FreeBSD.org using -f From: Craig Rodrigues Date: Tue, 30 Sep 2014 16:14:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272307 - in stable/10/contrib/atf: . atf-c atf-c++ atf-sh doc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2014 16:14:06 -0000 Author: rodrigc Date: Tue Sep 30 16:14:02 2014 New Revision: 272307 URL: http://svnweb.freebsd.org/changeset/base/272307 Log: MFC r271875, r272046, r272049, r272056 -> Reference the test case "packs" to fix warnings -> Delete mentions to removed manpages -> Minor fixes to docs Approved by: re (gjb) Modified: stable/10/contrib/atf/FREEBSD-upgrade stable/10/contrib/atf/NEWS stable/10/contrib/atf/atf-c++/atf-c++-api.3 stable/10/contrib/atf/atf-c/atf-c-api.3 stable/10/contrib/atf/atf-c/macros_h_test.c stable/10/contrib/atf/atf-sh/atf-check.1 stable/10/contrib/atf/atf-sh/atf-sh-api.3 stable/10/contrib/atf/atf-sh/atf-sh.1 stable/10/contrib/atf/doc/atf-test-case.4 stable/10/contrib/atf/doc/atf-test-program.1 Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/atf/FREEBSD-upgrade ============================================================================== --- stable/10/contrib/atf/FREEBSD-upgrade Tue Sep 30 16:10:49 2014 (r272306) +++ stable/10/contrib/atf/FREEBSD-upgrade Tue Sep 30 16:14:02 2014 (r272307) @@ -7,10 +7,9 @@ branches and you are supposed to follow http://www.freebsd.org/doc/en/articles/committers-guide/subversion-primer.html -The ATF source code is hosted on Google Code as a subcomponent of the -Kyua project: +The ATF source code is hosted on GitHub: - http://code.google.com/p/kyua/downloads/list + https://github.com/jmmv/atf and is imported into the atf vendor branch (see base/vendor/atf/). @@ -42,7 +41,7 @@ the vendor branch as you easily risk com tree. Lastly, with the list of old and new files in this import, make sure -to udpate the reachover Makefiles accordingly. +to update the reachover Makefiles accordingly. Test the build (keeping in mind the WITH_TESTS/WITHOUT_TESTS knobs) and, if all looks good, you are ready to commit all the changes in one go. Modified: stable/10/contrib/atf/NEWS ============================================================================== --- stable/10/contrib/atf/NEWS Tue Sep 30 16:10:49 2014 (r272306) +++ stable/10/contrib/atf/NEWS Tue Sep 30 16:14:02 2014 (r272307) @@ -14,6 +14,9 @@ the 'tools' directory for your own consu * Removed the deprecated tools. This includes atf-config, atf-report, atf-run and atf-version. +* Issue #8: Fixed atf-c/macros_test:use test failures spotted by the clang + that ships with FreeBSD 11.0-CURRENT. + Changes in version 0.19 *********************** Modified: stable/10/contrib/atf/atf-c++/atf-c++-api.3 ============================================================================== --- stable/10/contrib/atf/atf-c++/atf-c++-api.3 Tue Sep 30 16:10:49 2014 (r272306) +++ stable/10/contrib/atf/atf-c++/atf-c++-api.3 Tue Sep 30 16:14:02 2014 (r272307) @@ -26,7 +26,7 @@ .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd November 15, 2013 +.Dd March 2, 2014 .Dt ATF-C++-API 3 .Os .Sh NAME @@ -330,9 +330,8 @@ If .Va exitcode is not .Sq -1 , -.Xr atf-run 1 -will validate that the exit code of the test case matches the one provided -in this call. +the runtime engine will validate that the exit code of the test case +matches the one provided in this call. Otherwise, the exact value will be ignored. .It Fn expect_fail "reason" Any failure (be it fatal or non-fatal) raised in this mode is recorded. @@ -368,9 +367,8 @@ If .Va signo is not .Sq -1 , -.Xr atf-run 1 -will validate that the signal that terminated the test case matches the one -provided in this call. +the runtime engine will validate that the signal that terminated the test +case matches the one provided in this call. Otherwise, the exact value will be ignored. .It Fn expect_timeout "reason" Expects the test case to execute for longer than its timeout. @@ -631,5 +629,4 @@ ATF_INIT_TEST_CASES(tcs) .Ed .Sh SEE ALSO .Xr atf-test-program 1 , -.Xr atf-test-case 4 , -.Xr atf 7 +.Xr atf-test-case 4 Modified: stable/10/contrib/atf/atf-c/atf-c-api.3 ============================================================================== --- stable/10/contrib/atf/atf-c/atf-c-api.3 Tue Sep 30 16:10:49 2014 (r272306) +++ stable/10/contrib/atf/atf-c/atf-c-api.3 Tue Sep 30 16:14:02 2014 (r272307) @@ -26,7 +26,7 @@ .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd November 15, 2013 +.Dd March 2, 2014 .Dt ATF-C-API 3 .Os .Sh NAME @@ -409,9 +409,8 @@ If .Va exitcode is not .Sq -1 , -.Xr atf-run 1 -will validate that the exit code of the test case matches the one provided -in this call. +the runtime engine will validate that the exit code of the test case +matches the one provided in this call. Otherwise, the exact value will be ignored. .It Fn atf_tc_expect_fail "reason" "..." Any failure (be it fatal or non-fatal) raised in this mode is recorded. @@ -443,9 +442,8 @@ If .Va signo is not .Sq -1 , -.Xr atf-run 1 -will validate that the signal that terminated the test case matches the one -provided in this call. +the runtime engine will validate that the signal that terminated the test +case matches the one provided in this call. Otherwise, the exact value will be ignored. .It Fn atf_tc_expect_timeout "reason" "..." Expects the test case to execute for longer than its timeout. @@ -771,5 +769,4 @@ ATF_TP_ADD_TCS(tp) .Ed .Sh SEE ALSO .Xr atf-test-program 1 , -.Xr atf-test-case 4 , -.Xr atf 7 +.Xr atf-test-case 4 Modified: stable/10/contrib/atf/atf-c/macros_h_test.c ============================================================================== --- stable/10/contrib/atf/atf-c/macros_h_test.c Tue Sep 30 16:10:49 2014 (r272306) +++ stable/10/contrib/atf/atf-c/macros_h_test.c Tue Sep 30 16:14:02 2014 (r272307) @@ -87,6 +87,7 @@ ATF_TC(TEST_MACRO_1); ATF_TC_HEAD(TEST_MACRO_1, tc) { if (tc != NULL) {} } ATF_TC_BODY(TEST_MACRO_1, tc) { if (tc != NULL) {} } atf_tc_t *test_name_1 = &ATF_TC_NAME(TEST_MACRO_1); +atf_tc_pack_t *test_pack_1 = &ATF_TC_PACK_NAME(TEST_MACRO_1); void (*head_1)(atf_tc_t *) = ATF_TC_HEAD_NAME(TEST_MACRO_1); void (*body_1)(const atf_tc_t *) = ATF_TC_BODY_NAME(TEST_MACRO_1); ATF_TC_WITH_CLEANUP(TEST_MACRO_2); @@ -94,10 +95,12 @@ ATF_TC_HEAD(TEST_MACRO_2, tc) { if (tc ! ATF_TC_BODY(TEST_MACRO_2, tc) { if (tc != NULL) {} } ATF_TC_CLEANUP(TEST_MACRO_2, tc) { if (tc != NULL) {} } atf_tc_t *test_name_2 = &ATF_TC_NAME(TEST_MACRO_2); +atf_tc_pack_t *test_pack_2 = &ATF_TC_PACK_NAME(TEST_MACRO_2); void (*head_2)(atf_tc_t *) = ATF_TC_HEAD_NAME(TEST_MACRO_2); void (*body_2)(const atf_tc_t *) = ATF_TC_BODY_NAME(TEST_MACRO_2); void (*cleanup_2)(const atf_tc_t *) = ATF_TC_CLEANUP_NAME(TEST_MACRO_2); ATF_TC_WITHOUT_HEAD(TEST_MACRO_3); ATF_TC_BODY(TEST_MACRO_3, tc) { if (tc != NULL) {} } atf_tc_t *test_name_3 = &ATF_TC_NAME(TEST_MACRO_3); +atf_tc_pack_t *test_pack_3 = &ATF_TC_PACK_NAME(TEST_MACRO_3); void (*body_3)(const atf_tc_t *) = ATF_TC_BODY_NAME(TEST_MACRO_3); Modified: stable/10/contrib/atf/atf-sh/atf-check.1 ============================================================================== --- stable/10/contrib/atf/atf-sh/atf-check.1 Tue Sep 30 16:10:49 2014 (r272306) +++ stable/10/contrib/atf/atf-sh/atf-check.1 Tue Sep 30 16:14:02 2014 (r272307) @@ -26,7 +26,7 @@ .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd June 27, 2010 +.Dd March 2, 2014 .Dt ATF-CHECK 1 .Os .Sh NAME @@ -118,15 +118,20 @@ Analyzes standard error (syntax identica Executes .Ar command as a shell command line, executing it with the system shell defined by -.Va ATF_SHELL -in -.Xr atf-config 1 . +.Va ATF_SHELL . You should avoid using this flag if at all possible to prevent shell quoting issues. .El .Sh EXIT STATUS .Nm exits 0 on success, and other (unspecified) value on failure. +.Sh ENVIRONMENT +.Bl -tag -width ATFXSHELLXX -compact +.It Va ATF_SHELL +Path to the system shell to be used when the +.Fl x +is given to run commands. +.El .Sh EXAMPLES .Bd -literal -offset indent # Exit code 0, nothing on stdout/stderr @@ -146,6 +151,3 @@ atf-check -s signal:sigsegv my_program # Combined checks atf-check -o match:foo -o not-match:bar echo foo baz .Ed -.Sh SEE ALSO -.Xr atf-config 1 , -.Xr atf 7 Modified: stable/10/contrib/atf/atf-sh/atf-sh-api.3 ============================================================================== --- stable/10/contrib/atf/atf-sh/atf-sh-api.3 Tue Sep 30 16:10:49 2014 (r272306) +++ stable/10/contrib/atf/atf-sh/atf-sh-api.3 Tue Sep 30 16:14:02 2014 (r272307) @@ -26,7 +26,7 @@ .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd October 13, 2013 +.Dd March 2, 2014 .Dt ATF-SH-API 3 .Os .Sh NAME @@ -224,9 +224,8 @@ If .Va exitcode is not .Sq -1 , -.Xr atf-run 1 -will validate that the exit code of the test case matches the one provided -in this call. +the runtime engine will validate that the exit code of the test case +matches the one provided in this call. Otherwise, the exact value will be ignored. .It Fn atf_expect_fail "reason" Any failure raised in this mode is recorded, but such failures do not report @@ -258,9 +257,8 @@ If .Va signo is not .Sq -1 , -.Xr atf-run 1 -will validate that the signal that terminated the test case matches the one -provided in this call. +the runtime engine will validate that the signal that terminated the test +case matches the one provided in this call. Otherwise, the exact value will be ignored. .It Fn atf_expect_timeout "reason" "..." Expects the test case to execute for longer than its timeout. @@ -339,5 +337,4 @@ atf_check -s exit:0 -o match:"^foo$" -e .Sh SEE ALSO .Xr atf-sh 1 , .Xr atf-test-program 1 , -.Xr atf-test-case 4 , -.Xr atf 7 +.Xr atf-test-case 4 Modified: stable/10/contrib/atf/atf-sh/atf-sh.1 ============================================================================== --- stable/10/contrib/atf/atf-sh/atf-sh.1 Tue Sep 30 16:10:49 2014 (r272306) +++ stable/10/contrib/atf/atf-sh/atf-sh.1 Tue Sep 30 16:14:02 2014 (r272307) @@ -26,7 +26,7 @@ .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd October 15, 2013 +.Dd March 2, 2014 .Dt ATF-SH 1 .Os .Sh NAME @@ -47,10 +47,8 @@ library. .Pp .Nm is not a real interpreter though: it is just a wrapper around -the system-wide shell defined by the -.Sq atf_shell -configuration value in -.Xr atf-config 1 . +the system-wide shell defined by +.Va ATF_SHELL . .Nm executes the interpreter, loads the .Xr atf-sh-api 3 @@ -68,7 +66,10 @@ The following options are available: .It Fl h Shows a short summary of all available options and their purpose. .El +.Sh ENVIRONMENT +.Bl -tag -width ATFXSHELLXX -compact +.It Va ATF_SHELL +Path to the system shell to be used in the generated scripts. +.El .Sh SEE ALSO -.Xr atf-config 1 , -.Xr atf-sh-api 3 , -.Xr atf 7 +.Xr atf-sh-api 3 Modified: stable/10/contrib/atf/doc/atf-test-case.4 ============================================================================== --- stable/10/contrib/atf/doc/atf-test-case.4 Tue Sep 30 16:10:49 2014 (r272306) +++ stable/10/contrib/atf/doc/atf-test-case.4 Tue Sep 30 16:14:02 2014 (r272307) @@ -26,7 +26,7 @@ .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd January 13, 2011 +.Dd March 2, 2014 .Dt ATF-TEST-CASE 4 .Os .Sh NAME @@ -171,9 +171,7 @@ Type: boolean. Optional. .Pp If set to true, specifies that the test case has a cleanup routine that has -to be executed by -.Xr atf-run 1 -during the cleanup phase of the execution. +to be executed by the runtime engine during the cleanup phase of the execution. This property is automatically set by the framework when defining a test case with a cleanup routine, so it should never be set by hand. .It ident @@ -251,8 +249,7 @@ the test case is .Pp If the test case is running as root and this property is .Sq unprivileged , -.Xr atf-run 1 -will automatically drop the privileges if the +the runtime engine will automatically drop the privileges if the .Sq unprivileged-user configuration property is set; otherwise the test case is .Em skipped . @@ -314,7 +311,4 @@ Test cases are always executed with a fi .Sq 0022 . The test case's code is free to change this during execution. .Sh SEE ALSO -.Xr atf-run 1 , -.Xr atf-test-program 1 , -.Xr atf-formats 5 , -.Xr atf 7 +.Xr atf-test-program 1 Modified: stable/10/contrib/atf/doc/atf-test-program.1 ============================================================================== --- stable/10/contrib/atf/doc/atf-test-program.1 Tue Sep 30 16:10:49 2014 (r272306) +++ stable/10/contrib/atf/doc/atf-test-program.1 Tue Sep 30 16:14:02 2014 (r272307) @@ -26,7 +26,7 @@ .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd February 6, 2011 +.Dd March 2, 2014 .Dt ATF-TEST-PROGRAM 1 .Os .Sh NAME @@ -61,16 +61,17 @@ instead of the test case body; see Note that the test case is .Em executed without isolation , so it can and probably will create and modify files in the current directory. -To execute test cases in a controller manner, refer to -.Xr atf-run 1 , -which is the preferred way to run test cases. +To execute test cases in a controller manner, you need a runtime engine +that understands the ATF interface. +The recommended runtime engine is +.Xr kyua 1 . You should only execute test cases by hand for debugging purposes. .Pp In the second synopsis form, the test program will list all available test cases alongside their meta-data properties in a format that is machine parseable. This list is processed by -.Xr atf-run 1 +.Xr kyua 1 to know how to execute the test cases of a given test program. .Pp The following options are available: @@ -99,5 +100,4 @@ to the value .Ar value . .El .Sh SEE ALSO -.Xr atf-run 1 , -.Xr atf 7 +.Xr kyua 1 From owner-svn-src-all@FreeBSD.ORG Tue Sep 30 16:17:13 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A835DB70; Tue, 30 Sep 2014 16:17:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7AF7520C; Tue, 30 Sep 2014 16:17:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8UGHDTW078247; Tue, 30 Sep 2014 16:17:13 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8UGHDxK078246; Tue, 30 Sep 2014 16:17:13 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201409301617.s8UGHDxK078246@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 30 Sep 2014 16:17:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272308 - head/sys/dev/iscsi_initiator X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2014 16:17:13 -0000 Author: mav Date: Tue Sep 30 16:17:12 2014 New Revision: 272308 URL: http://svnweb.freebsd.org/changeset/base/272308 Log: Fix old iSCSI initiator to work with new CAM locking. This switches code to using xpt_scan() routine, irrelevant to locking. Using xpt_action() directly requires knowledge about higher level locks, that SIM does not need to have. This code is obsoleted, but that is not a reason to crash. MFC after: 3 days Modified: head/sys/dev/iscsi_initiator/isc_cam.c Modified: head/sys/dev/iscsi_initiator/isc_cam.c ============================================================================== --- head/sys/dev/iscsi_initiator/isc_cam.c Tue Sep 30 16:14:02 2014 (r272307) +++ head/sys/dev/iscsi_initiator/isc_cam.c Tue Sep 30 16:17:12 2014 (r272308) @@ -125,7 +125,7 @@ scan_callback(struct cam_periph *periph, debug_called(8); - free(ccb, M_TEMP); + xpt_free_ccb(ccb); if(sp->flags & ISC_SCANWAIT) { sp->flags &= ~ISC_SCANWAIT; @@ -141,30 +141,15 @@ ic_scan(isc_session_t *sp) debug_called(8); sdebug(2, "scanning sid=%d", sp->sid); - if((ccb = malloc(sizeof(union ccb), M_TEMP, M_WAITOK | M_ZERO)) == NULL) { - xdebug("scan failed (can't allocate CCB)"); - return ENOMEM; // XXX - } - sp->flags &= ~ISC_CAMDEVS; sp->flags |= ISC_SCANWAIT; - CAM_LOCK(sp); - if(xpt_create_path(&sp->cam_path, NULL, cam_sim_path(sp->cam_sim), - 0, CAM_LUN_WILDCARD) != CAM_REQ_CMP) { - xdebug("can't create cam path"); - CAM_UNLOCK(sp); - free(ccb, M_TEMP); - return ENODEV; // XXX - } - xpt_setup_ccb(&ccb->ccb_h, sp->cam_path, 5/*priority (low)*/); - ccb->ccb_h.func_code = XPT_SCAN_BUS; + ccb = xpt_alloc_ccb(); + ccb->ccb_h.path = sp->cam_path; ccb->ccb_h.cbfcnp = scan_callback; - ccb->crcn.flags = CAM_FLAG_NONE; ccb->ccb_h.spriv_ptr0 = sp; - xpt_action(ccb); - CAM_UNLOCK(sp); + xpt_rescan(ccb); while(sp->flags & ISC_SCANWAIT) tsleep(sp, PRIBIO, "ffp", 5*hz); // the timeout time should @@ -374,6 +359,16 @@ ic_init(isc_session_t *sp) return ENXIO; } sp->cam_sim = sim; + if(xpt_create_path(&sp->cam_path, NULL, cam_sim_path(sp->cam_sim), + CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD) != CAM_REQ_CMP) { + xpt_bus_deregister(cam_sim_path(sp->cam_sim)); + cam_sim_free(sim, /*free_devq*/TRUE); + CAM_UNLOCK(sp); +#if __FreeBSD_version >= 700000 + mtx_destroy(&sp->cam_mtx); +#endif + return ENXIO; + } CAM_UNLOCK(sp); sdebug(1, "cam subsystem initialized"); From owner-svn-src-all@FreeBSD.ORG Tue Sep 30 16:36:51 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 02B65565; Tue, 30 Sep 2014 16:36:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E2E46690; Tue, 30 Sep 2014 16:36:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8UGaoq9087923; Tue, 30 Sep 2014 16:36:50 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8UGaolq087922; Tue, 30 Sep 2014 16:36:50 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409301636.s8UGaolq087922@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 30 Sep 2014 16:36:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272309 - stable/10/release X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2014 16:36:51 -0000 Author: emaste Date: Tue Sep 30 16:36:50 2014 New Revision: 272309 URL: http://svnweb.freebsd.org/changeset/base/272309 Log: MFC r271549 (nwhitehorn): Create /tmp/bsdinstall_etc even if we aren't starting the installer so that dhclient can write resolv.conf when used from the live environment. PR: 176078 Approved by: re Modified: stable/10/release/rc.local Directory Properties: stable/10/ (props changed) Modified: stable/10/release/rc.local ============================================================================== --- stable/10/release/rc.local Tue Sep 30 16:17:12 2014 (r272308) +++ stable/10/release/rc.local Tue Sep 30 16:36:50 2014 (r272309) @@ -10,6 +10,9 @@ MACHINE=`uname -m` +# resolv.conf from DHCP ends up in here, so make sure the directory exists +mkdir /tmp/bsdinstall_etc + kbdcontrol -d >/dev/null 2>&1 if [ $? -eq 0 ]; then # Syscons: use xterm, start interesting things on other VTYs From owner-svn-src-all@FreeBSD.ORG Tue Sep 30 16:46:50 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2F0B4957; Tue, 30 Sep 2014 16:46:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 18A36819; Tue, 30 Sep 2014 16:46:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8UGkoVF092624; Tue, 30 Sep 2014 16:46:50 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8UGkkNZ092605; Tue, 30 Sep 2014 16:46:46 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201409301646.s8UGkkNZ092605@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: Roger Pau Monné Date: Tue, 30 Sep 2014 16:46:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272310 - in head/sys: amd64/amd64 conf dev/acpica i386/i386 x86/include x86/x86 x86/xen xen xen/interface X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2014 16:46:50 -0000 Author: royger Date: Tue Sep 30 16:46:45 2014 New Revision: 272310 URL: http://svnweb.freebsd.org/changeset/base/272310 Log: msi: add Xen MSI implementation This patch adds support for MSI interrupts when running on Xen. Apart from adding the Xen related code needed in order to register MSI interrupts this patch also makes the msi_init function a hook in init_ops, so different MSI implementations can have different initialization functions. Sponsored by: Citrix Systems R&D xen/interface/physdev.h: - Add the MAP_PIRQ_TYPE_MULTI_MSI to map multi-vector MSI to the Xen public interface. x86/include/init.h: - Add a hook for setting custom msi_init methods. amd64/amd64/machdep.c: i386/i386/machdep.c: - Set the default msi_init hook to point to the native MSI initialization method. x86/xen/pv.c: - Set the Xen MSI init hook when running as a Xen guest. x86/x86/local_apic.c: - Call the msi_init hook instead of directly calling msi_init. xen/xen_intr.h: x86/xen/xen_intr.c: - Introduce support for registering/releasing MSI interrupts with Xen. - The MSI interrupts will use the same PIC as the IO APIC interrupts. xen/xen_msi.h: x86/xen/xen_msi.c: - Introduce a Xen MSI implementation. x86/xen/xen_nexus.c: - Overwrite the default MSI hooks in the Xen Nexus to use the Xen MSI implementation. x86/xen/xen_pci.c: - Introduce a Xen specific PCI bus that inherits from the ACPI PCI bus and overwrites the native MSI methods. - This is needed because when running under Xen the MSI messages used to configure MSI interrupts on PCI devices are written by Xen itself. dev/acpica/acpi_pci.c: - Lower the quality of the ACPI PCI bus so the newly introduced Xen PCI bus can take over when needed. conf/files.i386: conf/files.amd64: - Add the newly created files to the build process. Added: head/sys/x86/xen/xen_msi.c (contents, props changed) head/sys/x86/xen/xen_pci.c (contents, props changed) head/sys/xen/xen_msi.h (contents, props changed) Modified: head/sys/amd64/amd64/machdep.c head/sys/conf/files.amd64 head/sys/conf/files.i386 head/sys/dev/acpica/acpi_pci.c head/sys/i386/i386/machdep.c head/sys/x86/include/init.h head/sys/x86/x86/local_apic.c head/sys/x86/xen/pv.c head/sys/x86/xen/xen_intr.c head/sys/x86/xen/xen_nexus.c head/sys/xen/interface/physdev.h head/sys/xen/xen_intr.h Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Tue Sep 30 16:36:50 2014 (r272309) +++ head/sys/amd64/amd64/machdep.c Tue Sep 30 16:46:45 2014 (r272310) @@ -177,6 +177,7 @@ struct init_ops init_ops = { .mp_bootaddress = mp_bootaddress, .start_all_aps = native_start_all_aps, #endif + .msi_init = msi_init, }; /* Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Tue Sep 30 16:36:50 2014 (r272309) +++ head/sys/conf/files.amd64 Tue Sep 30 16:46:45 2014 (r272310) @@ -582,3 +582,5 @@ x86/xen/pvcpu_enum.c optional xenhvm x86/xen/xen_apic.c optional xenhvm x86/xen/xenpv.c optional xenhvm x86/xen/xen_nexus.c optional xenhvm +x86/xen/xen_msi.c optional xenhvm +x86/xen/xen_pci.c optional xenhvm Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Tue Sep 30 16:36:50 2014 (r272309) +++ head/sys/conf/files.i386 Tue Sep 30 16:46:45 2014 (r272310) @@ -599,3 +599,4 @@ x86/xen/xen_intr.c optional xen | xenhv x86/xen/xen_apic.c optional xenhvm x86/xen/xenpv.c optional xen | xenhvm x86/xen/xen_nexus.c optional xen | xenhvm +x86/xen/xen_msi.c optional xen | xenhvm Modified: head/sys/dev/acpica/acpi_pci.c ============================================================================== --- head/sys/dev/acpica/acpi_pci.c Tue Sep 30 16:36:50 2014 (r272309) +++ head/sys/dev/acpica/acpi_pci.c Tue Sep 30 16:46:45 2014 (r272310) @@ -282,7 +282,7 @@ acpi_pci_probe(device_t dev) if (acpi_get_handle(dev) == NULL) return (ENXIO); device_set_desc(dev, "ACPI PCI bus"); - return (0); + return (BUS_PROBE_DEFAULT); } static int Modified: head/sys/i386/i386/machdep.c ============================================================================== --- head/sys/i386/i386/machdep.c Tue Sep 30 16:36:50 2014 (r272309) +++ head/sys/i386/i386/machdep.c Tue Sep 30 16:46:45 2014 (r272310) @@ -248,6 +248,9 @@ struct mem_range_softc mem_range_softc; struct init_ops init_ops = { .early_clock_source_init = i8254_init, .early_delay = i8254_delay, +#ifdef DEV_APIC + .msi_init = msi_init, +#endif }; static void Modified: head/sys/x86/include/init.h ============================================================================== --- head/sys/x86/include/init.h Tue Sep 30 16:36:50 2014 (r272309) +++ head/sys/x86/include/init.h Tue Sep 30 16:46:45 2014 (r272310) @@ -41,6 +41,7 @@ struct init_ops { void (*parse_memmap)(caddr_t, vm_paddr_t *, int *); u_int (*mp_bootaddress)(u_int); int (*start_all_aps)(void); + void (*msi_init)(void); }; extern struct init_ops init_ops; Modified: head/sys/x86/x86/local_apic.c ============================================================================== --- head/sys/x86/x86/local_apic.c Tue Sep 30 16:36:50 2014 (r272309) +++ head/sys/x86/x86/local_apic.c Tue Sep 30 16:46:45 2014 (r272310) @@ -63,6 +63,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #ifdef DDB #include @@ -1438,7 +1439,7 @@ apic_setup_io(void *dummy __unused) lapic_dump("BSP"); /* Enable the MSI "pic". */ - msi_init(); + init_ops.msi_init(); } SYSINIT(apic_setup_io, SI_SUB_INTR, SI_ORDER_THIRD, apic_setup_io, NULL); Modified: head/sys/x86/xen/pv.c ============================================================================== --- head/sys/x86/xen/pv.c Tue Sep 30 16:36:50 2014 (r272309) +++ head/sys/x86/xen/pv.c Tue Sep 30 16:46:45 2014 (r272310) @@ -60,11 +60,13 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include #include +#include #include @@ -117,6 +119,7 @@ struct init_ops xen_init_ops = { #ifdef SMP .start_all_aps = xen_pv_start_all_aps, #endif + .msi_init = xen_msi_init, }; static struct bios_smap xen_smap[MAX_E820_ENTRIES]; Modified: head/sys/x86/xen/xen_intr.c ============================================================================== --- head/sys/x86/xen/xen_intr.c Tue Sep 30 16:36:50 2014 (r272309) +++ head/sys/x86/xen/xen_intr.c Tue Sep 30 16:46:45 2014 (r272310) @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -63,6 +64,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #ifdef DDB #include @@ -1373,6 +1375,64 @@ xen_register_pirq(int vector, enum intr_ } int +xen_register_msi(device_t dev, int vector, int count) +{ + struct physdev_map_pirq msi_irq; + struct xenisrc *isrc; + int ret; + + memset(&msi_irq, 0, sizeof(msi_irq)); + msi_irq.domid = DOMID_SELF; + msi_irq.type = count == 1 ? + MAP_PIRQ_TYPE_MSI_SEG : MAP_PIRQ_TYPE_MULTI_MSI; + msi_irq.index = -1; + msi_irq.pirq = -1; + msi_irq.bus = pci_get_bus(dev) | (pci_get_domain(dev) << 16); + msi_irq.devfn = (pci_get_slot(dev) << 3) | pci_get_function(dev); + msi_irq.entry_nr = count; + + ret = HYPERVISOR_physdev_op(PHYSDEVOP_map_pirq, &msi_irq); + if (ret != 0) + return (ret); + if (count != msi_irq.entry_nr) { + panic("unable to setup all requested MSI vectors " + "(expected %d got %d)", count, msi_irq.entry_nr); + } + + mtx_lock(&xen_intr_isrc_lock); + for (int i = 0; i < count; i++) { + isrc = xen_intr_alloc_isrc(EVTCHN_TYPE_PIRQ, vector + i); + KASSERT(isrc != NULL, + ("xen: unable to allocate isrc for interrupt")); + isrc->xi_pirq = msi_irq.pirq + i; + } + mtx_unlock(&xen_intr_isrc_lock); + + return (0); +} + +int +xen_release_msi(int vector) +{ + struct physdev_unmap_pirq unmap; + struct xenisrc *isrc; + int ret; + + isrc = (struct xenisrc *)intr_lookup_source(vector); + if (isrc == NULL) + return (ENXIO); + + unmap.pirq = isrc->xi_pirq; + ret = HYPERVISOR_physdev_op(PHYSDEVOP_unmap_pirq, &unmap); + if (ret != 0) + return (ret); + + xen_intr_release_isrc(isrc); + + return (0); +} + +int xen_intr_describe(xen_intr_handle_t port_handle, const char *fmt, ...) { char descr[MAXCOMLEN + 1]; Added: head/sys/x86/xen/xen_msi.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/x86/xen/xen_msi.c Tue Sep 30 16:46:45 2014 (r272310) @@ -0,0 +1,125 @@ +/* + * Copyright (c) 2014 Roger Pau Monné + * 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +static struct mtx msi_lock; +static int msi_last_irq; + +void +xen_msi_init(void) +{ + + mtx_init(&msi_lock, "msi", NULL, MTX_DEF); +} + +/* + * Try to allocate 'count' interrupt sources with contiguous IDT values. + */ +int +xen_msi_alloc(device_t dev, int count, int maxcount, int *irqs) +{ + int i, ret = 0; + + mtx_lock(&msi_lock); + + /* If we would exceed the max, give up. */ + if ((msi_last_irq + count) > NUM_MSI_INTS) { + mtx_unlock(&msi_lock); + return (ENXIO); + } + + /* Allocate MSI vectors */ + for (i = 0; i < count; i++) + irqs[i] = FIRST_MSI_INT + msi_last_irq++; + + mtx_unlock(&msi_lock); + + ret = xen_register_msi(dev, irqs[0], count); + if (ret != 0) + return (ret); + + for (i = 0; i < count; i++) + nexus_add_irq(irqs[i]); + + return (0); +} + +int +xen_msi_release(int *irqs, int count) +{ + int i, ret; + + for (i = 0; i < count; i++) { + ret = xen_release_msi(irqs[i]); + if (ret != 0) + return (ret); + } + + return (0); +} + +int +xen_msi_map(int irq, uint64_t *addr, uint32_t *data) +{ + + return (0); +} + +int +xen_msix_alloc(device_t dev, int *irq) +{ + + return (ENXIO); +} + +int +xen_msix_release(int irq) +{ + + return (ENOENT); +} Modified: head/sys/x86/xen/xen_nexus.c ============================================================================== --- head/sys/x86/xen/xen_nexus.c Tue Sep 30 16:36:50 2014 (r272309) +++ head/sys/x86/xen/xen_nexus.c Tue Sep 30 16:46:45 2014 (r272310) @@ -45,6 +45,9 @@ __FBSDID("$FreeBSD$"); #include #include +#include + +#include "pcib_if.h" /* * Xen nexus(4) driver. @@ -111,6 +114,41 @@ nexus_xen_config_intr(device_t dev, int return (intr_config_intr(irq, trig, pol)); } +static int +nexus_xen_alloc_msix(device_t pcib, device_t dev, int *irq) +{ + + return (xen_msix_alloc(dev, irq)); +} + +static int +nexus_xen_release_msix(device_t pcib, device_t dev, int irq) +{ + + return (xen_msix_release(irq)); +} + +static int +nexus_xen_alloc_msi(device_t pcib, device_t dev, int count, int maxcount, int *irqs) +{ + + return (xen_msi_alloc(dev, count, maxcount, irqs)); +} + +static int +nexus_xen_release_msi(device_t pcib, device_t dev, int count, int *irqs) +{ + + return (xen_msi_release(irqs, count)); +} + +static int +nexus_xen_map_msi(device_t pcib, device_t dev, int irq, uint64_t *addr, uint32_t *data) +{ + + return (xen_msi_map(irq, addr, data)); +} + static device_method_t nexus_xen_methods[] = { /* Device interface */ DEVMETHOD(device_probe, nexus_xen_probe), @@ -119,6 +157,13 @@ static device_method_t nexus_xen_methods /* INTR */ DEVMETHOD(bus_config_intr, nexus_xen_config_intr), + /* MSI */ + DEVMETHOD(pcib_alloc_msi, nexus_xen_alloc_msi), + DEVMETHOD(pcib_release_msi, nexus_xen_release_msi), + DEVMETHOD(pcib_alloc_msix, nexus_xen_alloc_msix), + DEVMETHOD(pcib_release_msix, nexus_xen_release_msix), + DEVMETHOD(pcib_map_msi, nexus_xen_map_msi), + { 0, 0 } }; Added: head/sys/x86/xen/xen_pci.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/x86/xen/xen_pci.c Tue Sep 30 16:46:45 2014 (r272310) @@ -0,0 +1,108 @@ +/* + * Copyright (c) 2014 Roger Pau Monné + * 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include + +#include "pcib_if.h" +#include "pci_if.h" + +static int xen_pci_probe(device_t dev); + +static void xen_pci_enable_msi_method(device_t dev, device_t child, + uint64_t address, uint16_t data); +static void xen_pci_disable_msi_method(device_t dev, device_t child); + +static device_method_t xen_pci_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, xen_pci_probe), + + /* PCI interface overwrites */ + DEVMETHOD(pci_enable_msi, xen_pci_enable_msi_method), + DEVMETHOD(pci_disable_msi, xen_pci_disable_msi_method), + + DEVMETHOD_END +}; + +static devclass_t pci_devclass; + +DECLARE_CLASS(acpi_pci_driver); +DEFINE_CLASS_1(pci, xen_pci_driver, xen_pci_methods, sizeof(struct pci_softc), + acpi_pci_driver); +DRIVER_MODULE(xen_pci, pcib, xen_pci_driver, pci_devclass, 0, 0); +MODULE_DEPEND(xen_pci, pci, 1, 1, 1); +MODULE_DEPEND(xen_pci, acpi, 1, 1, 1); +MODULE_VERSION(xen_pci, 1); + +static int +xen_pci_probe(device_t dev) +{ + + device_set_desc(dev, "Xen PCI bus"); + + if (!xen_pv_domain()) + return (ENXIO); + + return (BUS_PROBE_SPECIFIC); +} + +static void +xen_pci_enable_msi_method(device_t dev, device_t child, uint64_t address, + uint16_t data) +{ + struct pci_devinfo *dinfo = device_get_ivars(child); + struct pcicfg_msi *msi = &dinfo->cfg.msi; + + /* Enable MSI in the control register. */ + msi->msi_ctrl |= PCIM_MSICTRL_MSI_ENABLE; + pci_write_config(child, msi->msi_location + PCIR_MSI_CTRL, + msi->msi_ctrl, 2); +} + +static void +xen_pci_disable_msi_method(device_t dev, device_t child) +{ + struct pci_devinfo *dinfo = device_get_ivars(child); + struct pcicfg_msi *msi = &dinfo->cfg.msi; + + msi->msi_ctrl &= ~PCIM_MSICTRL_MSI_ENABLE; + pci_write_config(child, msi->msi_location + PCIR_MSI_CTRL, + msi->msi_ctrl, 2); +} Modified: head/sys/xen/interface/physdev.h ============================================================================== --- head/sys/xen/interface/physdev.h Tue Sep 30 16:36:50 2014 (r272309) +++ head/sys/xen/interface/physdev.h Tue Sep 30 16:46:45 2014 (r272310) @@ -151,6 +151,7 @@ DEFINE_XEN_GUEST_HANDLE(physdev_irq_t); #define MAP_PIRQ_TYPE_GSI 0x1 #define MAP_PIRQ_TYPE_UNKNOWN 0x2 #define MAP_PIRQ_TYPE_MSI_SEG 0x3 +#define MAP_PIRQ_TYPE_MULTI_MSI 0x4 #define PHYSDEVOP_map_pirq 13 struct physdev_map_pirq { Modified: head/sys/xen/xen_intr.h ============================================================================== --- head/sys/xen/xen_intr.h Tue Sep 30 16:36:50 2014 (r272309) +++ head/sys/xen/xen_intr.h Tue Sep 30 16:46:45 2014 (r272310) @@ -224,4 +224,26 @@ void xen_intr_signal(xen_intr_handle_t h */ evtchn_port_t xen_intr_port(xen_intr_handle_t handle); +/** + * Setup MSI vector interrupt(s). + * + * \param dev The device that requests the binding. + * + * \param vector Requested initial vector to bind the MSI interrupt(s) to. + * + * \param count Number of vectors to allocate. + * + * \returns 0 on success, otherwise an errno. + */ +int xen_register_msi(device_t dev, int vector, int count); + +/** + * Teardown a MSI vector interrupt. + * + * \param vector Requested vector to release. + * + * \returns 0 on success, otherwise an errno. + */ +int xen_release_msi(int vector); + #endif /* _XEN_INTR_H_ */ Added: head/sys/xen/xen_msi.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/xen/xen_msi.h Tue Sep 30 16:46:45 2014 (r272310) @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2014 Roger Pau Monné + * 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 __XEN_MSI_H__ +#define __XEN_MSI_H__ + +void xen_msi_init(void); +int xen_msi_map(int irq, uint64_t *addr, uint32_t *data); +int xen_msi_alloc(device_t dev, int count, int maxcount, int *irqs); +int xen_msi_release(int *irqs, int count); +int xen_msix_alloc(device_t dev, int *irq); +int xen_msix_release(int irq); + +#endif /* !__XEN_MSI_H__ */ \ No newline at end of file From owner-svn-src-all@FreeBSD.ORG Tue Sep 30 16:49:18 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9F9E7BA2; Tue, 30 Sep 2014 16:49:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 73DA9831; Tue, 30 Sep 2014 16:49:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8UGnIXS093129; Tue, 30 Sep 2014 16:49:18 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8UGnIlO093128; Tue, 30 Sep 2014 16:49:18 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201409301649.s8UGnIlO093128@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: Roger Pau Monné Date: Tue, 30 Sep 2014 16:49:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272311 - head/sys/x86/xen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2014 16:49:18 -0000 Author: royger Date: Tue Sep 30 16:49:17 2014 New Revision: 272311 URL: http://svnweb.freebsd.org/changeset/base/272311 Log: xen: add the Xen implementation of pci_child_added method Add the Xen specific implementation of pci_child_added to the Xen PCI bus. This is needed so FreeBSD can register the devices it finds with the hypervisor. Sponsored by: Citrix Systems R&D x86/xen/xen_pci.c: - Add the Xen pci_child_added method. Modified: head/sys/x86/xen/xen_pci.c Modified: head/sys/x86/xen/xen_pci.c ============================================================================== --- head/sys/x86/xen/xen_pci.c Tue Sep 30 16:46:45 2014 (r272310) +++ head/sys/x86/xen/xen_pci.c Tue Sep 30 16:49:17 2014 (r272311) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include "pcib_if.h" #include "pci_if.h" @@ -49,6 +50,7 @@ static int xen_pci_probe(device_t dev); static void xen_pci_enable_msi_method(device_t dev, device_t child, uint64_t address, uint16_t data); static void xen_pci_disable_msi_method(device_t dev, device_t child); +static void xen_pci_child_added_method(device_t dev, device_t child); static device_method_t xen_pci_methods[] = { /* Device interface */ @@ -57,6 +59,7 @@ static device_method_t xen_pci_methods[] /* PCI interface overwrites */ DEVMETHOD(pci_enable_msi, xen_pci_enable_msi_method), DEVMETHOD(pci_disable_msi, xen_pci_disable_msi_method), + DEVMETHOD(pci_child_added, xen_pci_child_added_method), DEVMETHOD_END }; @@ -106,3 +109,24 @@ xen_pci_disable_msi_method(device_t dev, pci_write_config(child, msi->msi_location + PCIR_MSI_CTRL, msi->msi_ctrl, 2); } + +static void +xen_pci_child_added_method(device_t dev, device_t child) +{ + struct pci_devinfo *dinfo; + struct physdev_pci_device_add add_pci; + int error; + + dinfo = device_get_ivars(child); + KASSERT((dinfo != NULL), + ("xen_pci_add_child_method called with NULL dinfo")); + + bzero(&add_pci, sizeof(add_pci)); + add_pci.seg = dinfo->cfg.domain; + add_pci.bus = dinfo->cfg.bus; + add_pci.devfn = (dinfo->cfg.slot << 3) | dinfo->cfg.func; + error = HYPERVISOR_physdev_op(PHYSDEVOP_pci_device_add, &add_pci); + if (error) + panic("unable to add device bus %u devfn %u error: %d\n", + add_pci.bus, add_pci.devfn, error); +} From owner-svn-src-all@FreeBSD.ORG Tue Sep 30 16:53:09 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A0052FAF; Tue, 30 Sep 2014 16:53:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8C01F90F; Tue, 30 Sep 2014 16:53:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8UGr9Y2097237; Tue, 30 Sep 2014 16:53:09 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8UGr9MP097236; Tue, 30 Sep 2014 16:53:09 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201409301653.s8UGr9MP097236@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: Roger Pau Monné Date: Tue, 30 Sep 2014 16:53:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272312 - head/sys/dev/xen/balloon X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2014 16:53:09 -0000 Author: royger Date: Tue Sep 30 16:53:08 2014 New Revision: 272312 URL: http://svnweb.freebsd.org/changeset/base/272312 Log: xen: make xen balloon a driver that depends on xenstore This is done so we can prevent the Xen Balloon driver from attaching before xenstore is setup. Sponsored by: Citrix Systems R&D dev/xen/balloon/balloon.c: - Make xen balloon a driver that depends on xenstore. Modified: head/sys/dev/xen/balloon/balloon.c Modified: head/sys/dev/xen/balloon/balloon.c ============================================================================== --- head/sys/dev/xen/balloon/balloon.c Tue Sep 30 16:49:17 2014 (r272311) +++ head/sys/dev/xen/balloon/balloon.c Tue Sep 30 16:53:08 2014 (r272312) @@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -348,25 +349,50 @@ watch_target(struct xs_watch *watch, set_new_target(new_target >> KB_TO_PAGE_SHIFT); } -static void -balloon_init_watcher(void *arg) +/*------------------ Private Device Attachment Functions --------------------*/ +/** + * \brief Identify instances of this device type in the system. + * + * \param driver The driver performing this identify action. + * \param parent The NewBus parent device for any devices this method adds. + */ +static void +xenballoon_identify(driver_t *driver __unused, device_t parent) { - int err; - - if (!is_running_on_xen()) - return; + /* + * A single device instance for our driver is always present + * in a system operating under Xen. + */ + BUS_ADD_CHILD(parent, 0, driver->name, 0); +} - err = xs_register_watch(&target_watch); - if (err) - printf("Failed to set balloon watcher\n"); +/** + * \brief Probe for the existance of the Xen Balloon device + * + * \param dev NewBus device_t for this Xen control instance. + * + * \return Always returns 0 indicating success. + */ +static int +xenballoon_probe(device_t dev) +{ + device_set_desc(dev, "Xen Balloon Device"); + return (0); } -SYSINIT(balloon_init_watcher, SI_SUB_PSEUDO, SI_ORDER_ANY, - balloon_init_watcher, NULL); -static void -balloon_init(void *arg) +/** + * \brief Attach the Xen Balloon device. + * + * \param dev NewBus device_t for this Xen control instance. + * + * \return On success, 0. Otherwise an errno value indicating the + * type of failure. + */ +static int +xenballoon_attach(device_t dev) { + int err; #ifndef XENHVM vm_page_t page; unsigned long pfn; @@ -374,9 +400,6 @@ balloon_init(void *arg) #define max_pfn HYPERVISOR_shared_info->arch.max_pfn #endif - if (!is_running_on_xen()) - return; - mtx_init(&balloon_mutex, "balloon_mutex", NULL, MTX_DEF); #ifndef XENHVM @@ -403,17 +426,27 @@ balloon_init(void *arg) #endif target_watch.callback = watch_target; - - return; -} -SYSINIT(balloon_init, SI_SUB_PSEUDO, SI_ORDER_ANY, balloon_init, NULL); -void balloon_update_driver_allowance(long delta); + err = xs_register_watch(&target_watch); + if (err) + device_printf(dev, + "xenballon: failed to set balloon watcher\n"); -void -balloon_update_driver_allowance(long delta) -{ - mtx_lock(&balloon_mutex); - bs.driver_pages += delta; - mtx_unlock(&balloon_mutex); + return (err); } + +/*-------------------- Private Device Attachment Data -----------------------*/ +static device_method_t xenballoon_methods[] = { + /* Device interface */ + DEVMETHOD(device_identify, xenballoon_identify), + DEVMETHOD(device_probe, xenballoon_probe), + DEVMETHOD(device_attach, xenballoon_attach), + + DEVMETHOD_END +}; + +DEFINE_CLASS_0(xenballoon, xenballoon_driver, xenballoon_methods, 0); +devclass_t xenballoon_devclass; + +DRIVER_MODULE(xenballoon, xenstore, xenballoon_driver, xenballoon_devclass, + NULL, NULL); From owner-svn-src-all@FreeBSD.ORG Tue Sep 30 16:55:23 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 507E6393; Tue, 30 Sep 2014 16:55:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3B90A92C; Tue, 30 Sep 2014 16:55:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8UGtNbW097610; Tue, 30 Sep 2014 16:55:23 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8UGtKFg097599; Tue, 30 Sep 2014 16:55:20 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201409301655.s8UGtKFg097599@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Tue, 30 Sep 2014 16:55:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272313 - in stable/10/sys: amd64/conf conf dev/ixl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2014 16:55:23 -0000 Author: bz Date: Tue Sep 30 16:55:19 2014 New Revision: 272313 URL: http://svnweb.freebsd.org/changeset/base/272313 Log: MFC 271745,271834,271899,271900,271913,272022,272023: Revert changes to shared code of the ixl and ixlv drivers to allow for easier long-term maintainability. Restrict the drivers to building on amd64 for now as it is only tested on that 64bit architecture. Just depend on PCI and neither INET nor INET6; also make sure we can build individual drivers and they do not depend on each other anymore. Reviewed by: gnn, eric.joyner intel.com PR: 193824 Approved by: re (gjb) Modified: stable/10/sys/amd64/conf/GENERIC stable/10/sys/amd64/conf/NOTES stable/10/sys/conf/NOTES stable/10/sys/conf/files.amd64 stable/10/sys/dev/ixl/i40e_alloc.h stable/10/sys/dev/ixl/i40e_common.c stable/10/sys/dev/ixl/i40e_osdep.c stable/10/sys/dev/ixl/i40e_osdep.h stable/10/sys/dev/ixl/if_ixl.c stable/10/sys/dev/ixl/if_ixlv.c stable/10/sys/dev/ixl/ixl_txrx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/conf/GENERIC ============================================================================== --- stable/10/sys/amd64/conf/GENERIC Tue Sep 30 16:53:08 2014 (r272312) +++ stable/10/sys/amd64/conf/GENERIC Tue Sep 30 16:55:19 2014 (r272313) @@ -208,6 +208,8 @@ device de # DEC/Intel DC21x4x (``Tuli device em # Intel PRO/1000 Gigabit Ethernet Family device igb # Intel PRO/1000 PCIE Server Gigabit Family device ixgbe # Intel PRO/10GbE PCIE Ethernet Family +device ixl # Intel XL710 40Gbe PCIE Ethernet +device ixlv # Intel XL710 40Gbe VF PCIE Ethernet device le # AMD Am7900 LANCE and Am79C9xx PCnet device ti # Alteon Networks Tigon I/II gigabit Ethernet device txp # 3Com 3cR990 (``Typhoon'') Modified: stable/10/sys/amd64/conf/NOTES ============================================================================== --- stable/10/sys/amd64/conf/NOTES Tue Sep 30 16:53:08 2014 (r272312) +++ stable/10/sys/amd64/conf/NOTES Tue Sep 30 16:55:19 2014 (r272313) @@ -305,6 +305,8 @@ options DRM_DEBUG # Include debug print # Requires the iwi firmware module # iwn: Intel Wireless WiFi Link 4965/1000/5000/6000 802.11 network adapters # Requires the iwn firmware module +# ixl: Intel XL710 40Gbe PCIE Ethernet +# ixlv: Intel XL710 40Gbe VF PCIE Ethernet # mlx4ib: Mellanox ConnectX HCA InfiniBand # mlxen: Mellanox ConnectX HCA Ethernet # mthca: Mellanox HCA InfiniBand @@ -323,6 +325,8 @@ options ED_SIC device ipw # Intel 2100 wireless NICs. device iwi # Intel 2200BG/2225BG/2915ABG wireless NICs. device iwn # Intel 4965/1000/5000/6000 wireless NICs. +device ixl # Intel XL710 40Gbe PCIE Ethernet +device ixlv # Intel XL710 40Gbe VF PCIE Ethernet device mlx4ib # Mellanox ConnectX HCA InfiniBand device mlxen # Mellanox ConnectX HCA Ethernet device mthca # Mellanox HCA InfiniBand Modified: stable/10/sys/conf/NOTES ============================================================================== --- stable/10/sys/conf/NOTES Tue Sep 30 16:53:08 2014 (r272312) +++ stable/10/sys/conf/NOTES Tue Sep 30 16:55:19 2014 (r272313) @@ -2090,8 +2090,6 @@ device em # Intel Pro/1000 Gigabit Eth device igb # Intel Pro/1000 PCIE Gigabit Ethernet device ixgb # Intel Pro/10Gbe PCI-X Ethernet device ixgbe # Intel Pro/10Gbe PCIE Ethernet -device ixl # Intel XL710 40Gbe PCIE Ethernet -device ixlv # Intel XL710 40Gbe VF PCIE Ethernet device le # AMD Am7900 LANCE and Am79C9xx PCnet device mxge # Myricom Myri-10G 10GbE NIC device nxge # Neterion Xframe 10GbE Server/Storage Adapter Modified: stable/10/sys/conf/files.amd64 ============================================================================== --- stable/10/sys/conf/files.amd64 Tue Sep 30 16:53:08 2014 (r272312) +++ stable/10/sys/conf/files.amd64 Tue Sep 30 16:55:19 2014 (r272313) @@ -203,6 +203,26 @@ dev/ipmi/ipmi_smbios.c optional ipmi dev/ipmi/ipmi_ssif.c optional ipmi smbus dev/ipmi/ipmi_pci.c optional ipmi pci dev/ipmi/ipmi_linux.c optional ipmi compat_linux32 +dev/ixl/if_ixl.c optional ixl pci \ + compile-with "${NORMAL_C} -I$S/dev/ixl" +dev/ixl/if_ixlv.c optional ixlv pci \ + compile-with "${NORMAL_C} -I$S/dev/ixl" +dev/ixl/ixlvc.c optional ixlv pci \ + compile-with "${NORMAL_C} -I$S/dev/ixl" +dev/ixl/ixl_txrx.c optional ixl pci | ixlv pci \ + compile-with "${NORMAL_C} -I$S/dev/ixl" +dev/ixl/i40e_osdep.c optional ixl pci | ixlv pci \ + compile-with "${NORMAL_C} -I$S/dev/ixl" +dev/ixl/i40e_lan_hmc.c optional ixl pci | ixlv pci \ + compile-with "${NORMAL_C} -I$S/dev/ixl" +dev/ixl/i40e_hmc.c optional ixl pci | ixlv pci \ + compile-with "${NORMAL_C} -I$S/dev/ixl" +dev/ixl/i40e_common.c optional ixl pci | ixlv pci \ + compile-with "${NORMAL_C} -I$S/dev/ixl" +dev/ixl/i40e_nvm.c optional ixl pci | ixlv pci \ + compile-with "${NORMAL_C} -I$S/dev/ixl" +dev/ixl/i40e_adminq.c optional ixl pci | ixlv pci \ + compile-with "${NORMAL_C} -I$S/dev/ixl" dev/fdc/fdc.c optional fdc dev/fdc/fdc_acpi.c optional fdc dev/fdc/fdc_isa.c optional fdc isa Modified: stable/10/sys/dev/ixl/i40e_alloc.h ============================================================================== --- stable/10/sys/dev/ixl/i40e_alloc.h Tue Sep 30 16:53:08 2014 (r272312) +++ stable/10/sys/dev/ixl/i40e_alloc.h Tue Sep 30 16:55:19 2014 (r272313) @@ -51,15 +51,16 @@ enum i40e_memory_type { }; /* prototype for functions used for dynamic memory allocation */ -enum i40e_status_code i40e_allocate_dma(struct i40e_hw *hw, +enum i40e_status_code i40e_allocate_dma_mem(struct i40e_hw *hw, struct i40e_dma_mem *mem, - bus_size_t size, u32 alignment); -enum i40e_status_code i40e_free_dma(struct i40e_hw *hw, + enum i40e_memory_type type, + u64 size, u32 alignment); +enum i40e_status_code i40e_free_dma_mem(struct i40e_hw *hw, struct i40e_dma_mem *mem); -enum i40e_status_code i40e_allocate_virt(struct i40e_hw *hw, +enum i40e_status_code i40e_allocate_virt_mem(struct i40e_hw *hw, struct i40e_virt_mem *mem, u32 size); -enum i40e_status_code i40e_free_virt(struct i40e_hw *hw, +enum i40e_status_code i40e_free_virt_mem(struct i40e_hw *hw, struct i40e_virt_mem *mem); #endif /* _I40E_ALLOC_H_ */ Modified: stable/10/sys/dev/ixl/i40e_common.c ============================================================================== --- stable/10/sys/dev/ixl/i40e_common.c Tue Sep 30 16:53:08 2014 (r272312) +++ stable/10/sys/dev/ixl/i40e_common.c Tue Sep 30 16:55:19 2014 (r272313) @@ -4375,8 +4375,8 @@ enum i40e_status_code i40e_aq_alternate_ cmd_resp->address = CPU_TO_LE32(addr); cmd_resp->length = CPU_TO_LE32(dw_count); - cmd_resp->addr_high = CPU_TO_LE32(I40E_HI_WORD((u64)(uintptr_t)buffer)); - cmd_resp->addr_low = CPU_TO_LE32(I40E_LO_DWORD((u64)(uintptr_t)buffer)); + cmd_resp->addr_high = CPU_TO_LE32(I40E_HI_WORD((u64)buffer)); + cmd_resp->addr_low = CPU_TO_LE32(I40E_LO_DWORD((u64)buffer)); status = i40e_asq_send_command(hw, &desc, buffer, I40E_LO_DWORD(4*dw_count), NULL); @@ -4458,8 +4458,8 @@ enum i40e_status_code i40e_aq_alternate_ cmd_resp->address = CPU_TO_LE32(addr); cmd_resp->length = CPU_TO_LE32(dw_count); - cmd_resp->addr_high = CPU_TO_LE32(I40E_HI_DWORD((u64)(uintptr_t)buffer)); - cmd_resp->addr_low = CPU_TO_LE32(I40E_LO_DWORD((u64)(uintptr_t)buffer)); + cmd_resp->addr_high = CPU_TO_LE32(I40E_HI_DWORD((u64)buffer)); + cmd_resp->addr_low = CPU_TO_LE32(I40E_LO_DWORD((u64)buffer)); status = i40e_asq_send_command(hw, &desc, buffer, I40E_LO_DWORD(4*dw_count), NULL); Modified: stable/10/sys/dev/ixl/i40e_osdep.c ============================================================================== --- stable/10/sys/dev/ixl/i40e_osdep.c Tue Sep 30 16:53:08 2014 (r272312) +++ stable/10/sys/dev/ixl/i40e_osdep.c Tue Sep 30 16:55:19 2014 (r272313) @@ -49,22 +49,22 @@ i40e_dmamap_cb(void *arg, bus_dma_segmen } i40e_status -i40e_allocate_virt(struct i40e_hw *hw, struct i40e_virt_mem *m, u32 size) +i40e_allocate_virt_mem(struct i40e_hw *hw, struct i40e_virt_mem *mem, u32 size) { - m->va = malloc(size, M_DEVBUF, M_NOWAIT | M_ZERO); - return(m->va == NULL); + mem->va = malloc(size, M_DEVBUF, M_NOWAIT | M_ZERO); + return(mem->va == NULL); } i40e_status -i40e_free_virt(struct i40e_hw *hw, struct i40e_virt_mem *m) +i40e_free_virt_mem(struct i40e_hw *hw, struct i40e_virt_mem *mem) { - free(m->va, M_DEVBUF); + free(mem->va, M_DEVBUF); return(0); } i40e_status -i40e_allocate_dma(struct i40e_hw *hw, struct i40e_dma_mem *dma, - bus_size_t size, u32 alignment) +i40e_allocate_dma_mem(struct i40e_hw *hw, struct i40e_dma_mem *mem, + enum i40e_memory_type type __unused, u64 size, u32 alignment) { device_t dev = ((struct i40e_osdep *)hw->back)->dev; int err; @@ -81,25 +81,25 @@ i40e_allocate_dma(struct i40e_hw *hw, st BUS_DMA_ALLOCNOW, /* flags */ NULL, /* lockfunc */ NULL, /* lockfuncarg */ - &dma->tag); + &mem->tag); if (err != 0) { device_printf(dev, "i40e_allocate_dma: bus_dma_tag_create failed, " "error %u\n", err); goto fail_0; } - err = bus_dmamem_alloc(dma->tag, (void **)&dma->va, - BUS_DMA_NOWAIT | BUS_DMA_ZERO, &dma->map); + err = bus_dmamem_alloc(mem->tag, (void **)&mem->va, + BUS_DMA_NOWAIT | BUS_DMA_ZERO, &mem->map); if (err != 0) { device_printf(dev, "i40e_allocate_dma: bus_dmamem_alloc failed, " "error %u\n", err); goto fail_1; } - err = bus_dmamap_load(dma->tag, dma->map, dma->va, + err = bus_dmamap_load(mem->tag, mem->map, mem->va, size, i40e_dmamap_cb, - &dma->pa, + &mem->pa, BUS_DMA_NOWAIT); if (err != 0) { device_printf(dev, @@ -107,28 +107,28 @@ i40e_allocate_dma(struct i40e_hw *hw, st "error %u\n", err); goto fail_2; } - dma->size = size; - bus_dmamap_sync(dma->tag, dma->map, + mem->size = size; + bus_dmamap_sync(mem->tag, mem->map, BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE); return (0); fail_2: - bus_dmamem_free(dma->tag, dma->va, dma->map); + bus_dmamem_free(mem->tag, mem->va, mem->map); fail_1: - bus_dma_tag_destroy(dma->tag); + bus_dma_tag_destroy(mem->tag); fail_0: - dma->map = NULL; - dma->tag = NULL; + mem->map = NULL; + mem->tag = NULL; return (err); } i40e_status -i40e_free_dma(struct i40e_hw *hw, struct i40e_dma_mem *dma) +i40e_free_dma_mem(struct i40e_hw *hw, struct i40e_dma_mem *mem) { - bus_dmamap_sync(dma->tag, dma->map, + bus_dmamap_sync(mem->tag, mem->map, BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); - bus_dmamap_unload(dma->tag, dma->map); - bus_dmamem_free(dma->tag, dma->va, dma->map); - bus_dma_tag_destroy(dma->tag); + bus_dmamap_unload(mem->tag, mem->map); + bus_dmamem_free(mem->tag, mem->va, mem->map); + bus_dma_tag_destroy(mem->tag); return (0); } Modified: stable/10/sys/dev/ixl/i40e_osdep.h ============================================================================== --- stable/10/sys/dev/ixl/i40e_osdep.h Tue Sep 30 16:53:08 2014 (r272312) +++ stable/10/sys/dev/ixl/i40e_osdep.h Tue Sep 30 16:55:19 2014 (r272313) @@ -170,9 +170,6 @@ struct i40e_hw; /* forward decl */ u16 i40e_read_pci_cfg(struct i40e_hw *, u32); void i40e_write_pci_cfg(struct i40e_hw *, u32, u16); -#define i40e_allocate_dma_mem(h, m, unused, s, a) i40e_allocate_dma(h, m, s, a) -#define i40e_free_dma_mem(h, m) i40e_free_dma(h, m) - #define i40e_debug(h, m, s, ...) i40e_debug_d(h, m, s, ##__VA_ARGS__) extern void i40e_debug_d(void *hw, u32 mask, char *fmt_str, ...); @@ -180,8 +177,6 @@ struct i40e_virt_mem { void *va; u32 size; }; -#define i40e_allocate_virt_mem(h, m, s) i40e_allocate_virt(h, m, s) -#define i40e_free_virt_mem(h, m) i40e_free_virt(h, m) /* ** This hardware supports either 16 or 32 byte rx descriptors Modified: stable/10/sys/dev/ixl/if_ixl.c ============================================================================== --- stable/10/sys/dev/ixl/if_ixl.c Tue Sep 30 16:53:08 2014 (r272312) +++ stable/10/sys/dev/ixl/if_ixl.c Tue Sep 30 16:55:19 2014 (r272313) @@ -921,8 +921,10 @@ ixl_ioctl(struct ifnet * ifp, u_long com ifp->if_flags |= IFF_UP; if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) ixl_init(pf); +#ifdef INET if (!(ifp->if_flags & IFF_NOARP)) arp_ifinit(ifp, ifa); +#endif } else error = ether_ioctl(ifp, command, data); break; @@ -2591,7 +2593,7 @@ ixl_free_vsi(struct ixl_vsi *vsi) IXL_TX_LOCK(txr); ixl_free_que_tx(que); if (txr->base) - i40e_free_dma(&pf->hw, &txr->dma); + i40e_free_dma_mem(&pf->hw, &txr->dma); IXL_TX_UNLOCK(txr); IXL_TX_LOCK_DESTROY(txr); @@ -2600,7 +2602,7 @@ ixl_free_vsi(struct ixl_vsi *vsi) IXL_RX_LOCK(rxr); ixl_free_que_rx(que); if (rxr->base) - i40e_free_dma(&pf->hw, &rxr->dma); + i40e_free_dma_mem(&pf->hw, &rxr->dma); IXL_RX_UNLOCK(rxr); IXL_RX_LOCK_DESTROY(rxr); @@ -2668,8 +2670,8 @@ ixl_setup_stations(struct ixl_pf *pf) tsize = roundup2((que->num_desc * sizeof(struct i40e_tx_desc)) + sizeof(u32), DBA_ALIGN); - if (i40e_allocate_dma(&pf->hw, - &txr->dma, tsize, DBA_ALIGN)) { + if (i40e_allocate_dma_mem(&pf->hw, + &txr->dma, i40e_mem_reserved, tsize, DBA_ALIGN)) { device_printf(dev, "Unable to allocate TX Descriptor memory\n"); error = ENOMEM; @@ -2708,8 +2710,8 @@ ixl_setup_stations(struct ixl_pf *pf) device_get_nameunit(dev), que->me); mtx_init(&rxr->mtx, rxr->mtx_name, NULL, MTX_DEF); - if (i40e_allocate_dma(&pf->hw, - &rxr->dma, rsize, 4096)) { + if (i40e_allocate_dma_mem(&pf->hw, + &rxr->dma, i40e_mem_reserved, rsize, 4096)) { device_printf(dev, "Unable to allocate RX Descriptor memory\n"); error = ENOMEM; @@ -2735,9 +2737,9 @@ fail: rxr = &que->rxr; txr = &que->txr; if (rxr->base) - i40e_free_dma(&pf->hw, &rxr->dma); + i40e_free_dma_mem(&pf->hw, &rxr->dma); if (txr->base) - i40e_free_dma(&pf->hw, &txr->dma); + i40e_free_dma_mem(&pf->hw, &txr->dma); } early: Modified: stable/10/sys/dev/ixl/if_ixlv.c ============================================================================== --- stable/10/sys/dev/ixl/if_ixlv.c Tue Sep 30 16:53:08 2014 (r272312) +++ stable/10/sys/dev/ixl/if_ixlv.c Tue Sep 30 16:55:19 2014 (r272313) @@ -755,8 +755,10 @@ ixlv_ioctl(struct ifnet *ifp, u_long com ifp->if_flags |= IFF_UP; if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) ixlv_init(sc); +#ifdef INET if (!(ifp->if_flags & IFF_NOARP)) arp_ifinit(ifp, ifa); +#endif } else error = ether_ioctl(ifp, command, data); break; @@ -1457,8 +1459,8 @@ ixlv_setup_queues(struct ixlv_sc *sc) tsize = roundup2((que->num_desc * sizeof(struct i40e_tx_desc)) + sizeof(u32), DBA_ALIGN); - if (i40e_allocate_dma(&sc->hw, - &txr->dma, tsize, DBA_ALIGN)) { + if (i40e_allocate_dma_mem(&sc->hw, + &txr->dma, i40e_mem_reserved, tsize, DBA_ALIGN)) { device_printf(dev, "Unable to allocate TX Descriptor memory\n"); error = ENOMEM; @@ -1497,8 +1499,8 @@ ixlv_setup_queues(struct ixlv_sc *sc) device_get_nameunit(dev), que->me); mtx_init(&rxr->mtx, rxr->mtx_name, NULL, MTX_DEF); - if (i40e_allocate_dma(&sc->hw, - &rxr->dma, rsize, 4096)) { //JFV - should this be DBA? + if (i40e_allocate_dma_mem(&sc->hw, + &rxr->dma, i40e_mem_reserved, rsize, 4096)) { //JFV - should this be DBA? device_printf(dev, "Unable to allocate RX Descriptor memory\n"); error = ENOMEM; @@ -1525,9 +1527,9 @@ fail: rxr = &que->rxr; txr = &que->txr; if (rxr->base) - i40e_free_dma(&sc->hw, &rxr->dma); + i40e_free_dma_mem(&sc->hw, &rxr->dma); if (txr->base) - i40e_free_dma(&sc->hw, &txr->dma); + i40e_free_dma_mem(&sc->hw, &txr->dma); } early: @@ -2346,7 +2348,7 @@ ixlv_free_queues(struct ixl_vsi *vsi) IXL_TX_LOCK(txr); ixl_free_que_tx(que); if (txr->base) - i40e_free_dma(&sc->hw, &txr->dma); + i40e_free_dma_mem(&sc->hw, &txr->dma); IXL_TX_UNLOCK(txr); IXL_TX_LOCK_DESTROY(txr); @@ -2355,7 +2357,7 @@ ixlv_free_queues(struct ixl_vsi *vsi) IXL_RX_LOCK(rxr); ixl_free_que_rx(que); if (rxr->base) - i40e_free_dma(&sc->hw, &rxr->dma); + i40e_free_dma_mem(&sc->hw, &rxr->dma); IXL_RX_UNLOCK(rxr); IXL_RX_LOCK_DESTROY(rxr); Modified: stable/10/sys/dev/ixl/ixl_txrx.c ============================================================================== --- stable/10/sys/dev/ixl/ixl_txrx.c Tue Sep 30 16:53:08 2014 (r272312) +++ stable/10/sys/dev/ixl/ixl_txrx.c Tue Sep 30 16:55:19 2014 (r272313) @@ -1085,10 +1085,12 @@ ixl_allocate_rx_data(struct ixl_queue *q int ixl_init_rx_ring(struct ixl_queue *que) { + struct rx_ring *rxr = &que->rxr; +#if defined(INET6) || defined(INET) struct ixl_vsi *vsi = que->vsi; struct ifnet *ifp = vsi->ifp; - struct rx_ring *rxr = &que->rxr; struct lro_ctrl *lro = &rxr->lro; +#endif struct ixl_rx_buf *buf; bus_dma_segment_t pseg[1], hseg[1]; int rsize, nsegs, error = 0; @@ -1187,6 +1189,7 @@ skip_head: rxr->bytes = 0; rxr->discard = FALSE; +#if defined(INET6) || defined(INET) /* ** Now set up the LRO interface: */ @@ -1200,6 +1203,7 @@ skip_head: rxr->lro_enabled = TRUE; lro->ifp = vsi->ifp; } +#endif bus_dmamap_sync(rxr->dma.tag, rxr->dma.map, BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); @@ -1274,6 +1278,8 @@ ixl_free_que_rx(struct ixl_queue *que) static __inline void ixl_rx_input(struct rx_ring *rxr, struct ifnet *ifp, struct mbuf *m, u8 ptype) { + +#if defined(INET6) || defined(INET) /* * ATM LRO is only for IPv4/TCP packets and TCP checksum of the packet * should be computed by hardware. Also it should not have VLAN tag in @@ -1293,6 +1299,7 @@ ixl_rx_input(struct rx_ring *rxr, struct if (tcp_lro_rx(&rxr->lro, m, 0) == 0) return; } +#endif IXL_RX_UNLOCK(rxr); (*ifp->if_input)(ifp, m); IXL_RX_LOCK(rxr); @@ -1350,8 +1357,10 @@ ixl_rxeof(struct ixl_queue *que, int cou struct ixl_vsi *vsi = que->vsi; struct rx_ring *rxr = &que->rxr; struct ifnet *ifp = vsi->ifp; +#if defined(INET6) || defined(INET) struct lro_ctrl *lro = &rxr->lro; struct lro_entry *queued; +#endif int i, nextp, processed = 0; union i40e_rx_desc *cur; struct ixl_rx_buf *rbuf, *nbuf; @@ -1559,6 +1568,7 @@ next_desc: rxr->next_check = i; +#if defined(INET6) || defined(INET) /* * Flush any outstanding LRO work */ @@ -1566,6 +1576,7 @@ next_desc: SLIST_REMOVE_HEAD(&lro->lro_active, next); tcp_lro_flush(lro, queued); } +#endif IXL_RX_UNLOCK(rxr); return (FALSE); From owner-svn-src-all@FreeBSD.ORG Tue Sep 30 17:14:13 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 07DB7B2; Tue, 30 Sep 2014 17:14:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DD01BC0D; Tue, 30 Sep 2014 17:14:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8UHECd3007293; Tue, 30 Sep 2014 17:14:12 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8UHECCa007289; Tue, 30 Sep 2014 17:14:12 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201409301714.s8UHECCa007289@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: Roger Pau Monné Date: Tue, 30 Sep 2014 17:14:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272314 - in head/sys: conf dev/xen/xenstore xen/xenstore X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2014 17:14:13 -0000 Author: royger Date: Tue Sep 30 17:14:11 2014 New Revision: 272314 URL: http://svnweb.freebsd.org/changeset/base/272314 Log: xen: move xenstore devices Move xenstore related devices (xenstore.c and xenstore_dev.c) from xen/xenstore to dev/xen/xenstore. This is just code motion, no functional changes. Sponsored by: Citrix Systems R&D Added: head/sys/dev/xen/xenstore/ head/sys/dev/xen/xenstore/xenstore.c - copied unchanged from r272308, head/sys/xen/xenstore/xenstore.c head/sys/dev/xen/xenstore/xenstore_dev.c - copied unchanged from r272308, head/sys/xen/xenstore/xenstore_dev.c Deleted: head/sys/xen/xenstore/xenstore.c head/sys/xen/xenstore/xenstore_dev.c Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Tue Sep 30 16:55:19 2014 (r272313) +++ head/sys/conf/files Tue Sep 30 17:14:11 2014 (r272314) @@ -2638,6 +2638,8 @@ dev/xen/netfront/netfront.c optional xen dev/xen/xenpci/xenpci.c optional xenpci dev/xen/timer/timer.c optional xen | xenhvm dev/xen/pvcpu/pvcpu.c optional xen | xenhvm +dev/xen/xenstore/xenstore.c optional xen | xenhvm +dev/xen/xenstore/xenstore_dev.c optional xen | xenhvm dev/xl/if_xl.c optional xl pci dev/xl/xlphy.c optional xl pci fs/autofs/autofs.c optional autofs @@ -3976,8 +3978,6 @@ xen/xenbus/xenbusb_if.m optional xen | xen/xenbus/xenbusb.c optional xen | xenhvm xen/xenbus/xenbusb_front.c optional xen | xenhvm xen/xenbus/xenbusb_back.c optional xen | xenhvm -xen/xenstore/xenstore.c optional xen | xenhvm -xen/xenstore/xenstore_dev.c optional xen | xenhvm xdr/xdr.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd xdr/xdr_array.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd xdr/xdr_mbuf.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd Copied: head/sys/dev/xen/xenstore/xenstore.c (from r272308, head/sys/xen/xenstore/xenstore.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/xen/xenstore/xenstore.c Tue Sep 30 17:14:11 2014 (r272314, copy of r272308, head/sys/xen/xenstore/xenstore.c) @@ -0,0 +1,1640 @@ +/****************************************************************************** + * xenstore.c + * + * Low-level kernel interface to the XenStore. + * + * Copyright (C) 2005 Rusty Russell, IBM Corporation + * Copyright (C) 2009,2010 Spectra Logic Corporation + * + * This file may be distributed separately from the Linux kernel, or + * incorporated into other software packages, subject to the following license: + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this source file (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, copy, modify, + * merge, publish, distribute, sublicense, and/or sell copies of the Software, + * and to permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ + + +#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 + +/** + * \file xenstore.c + * \brief XenStore interface + * + * The XenStore interface is a simple storage system that is a means of + * communicating state and configuration data between the Xen Domain 0 + * and the various guest domains. All configuration data other than + * a small amount of essential information required during the early + * boot process of launching a Xen aware guest, is managed using the + * XenStore. + * + * The XenStore is ASCII string based, and has a structure and semantics + * similar to a filesystem. There are files and directories, the directories + * able to contain files or other directories. The depth of the hierachy + * is only limited by the XenStore's maximum path length. + * + * The communication channel between the XenStore service and other + * domains is via two, guest specific, ring buffers in a shared memory + * area. One ring buffer is used for communicating in each direction. + * The grant table references for this shared memory are given to the + * guest either via the xen_start_info structure for a fully para- + * virtualized guest, or via HVM hypercalls for a hardware virtualized + * guest. + * + * The XenStore communication relies on an event channel and thus + * interrupts. For this reason, the attachment of the XenStore + * relies on an interrupt driven configuration hook to hold off + * boot processing until communication with the XenStore service + * can be established. + * + * Several Xen services depend on the XenStore, most notably the + * XenBus used to discover and manage Xen devices. These services + * are implemented as NewBus child attachments to a bus exported + * by this XenStore driver. + */ + +static struct xs_watch *find_watch(const char *token); + +MALLOC_DEFINE(M_XENSTORE, "xenstore", "XenStore data and results"); + +/** + * Pointer to shared memory communication structures allowing us + * to communicate with the XenStore service. + * + * When operating in full PV mode, this pointer is set early in kernel + * startup from within xen_machdep.c. In HVM mode, we use hypercalls + * to get the guest frame number for the shared page and then map it + * into kva. See xs_init() for details. + */ +struct xenstore_domain_interface *xen_store; + +/*-------------------------- Private Data Structures ------------------------*/ + +/** + * Structure capturing messages received from the XenStore service. + */ +struct xs_stored_msg { + TAILQ_ENTRY(xs_stored_msg) list; + + struct xsd_sockmsg hdr; + + union { + /* Queued replies. */ + struct { + char *body; + } reply; + + /* Queued watch events. */ + struct { + struct xs_watch *handle; + const char **vec; + u_int vec_size; + } watch; + } u; +}; +TAILQ_HEAD(xs_stored_msg_list, xs_stored_msg); + +/** + * Container for all XenStore related state. + */ +struct xs_softc { + /** Newbus device for the XenStore. */ + device_t xs_dev; + + /** + * Lock serializing access to ring producer/consumer + * indexes. Use of this lock guarantees that wakeups + * of blocking readers/writers are not missed due to + * races with the XenStore service. + */ + struct mtx ring_lock; + + /* + * Mutex used to insure exclusive access to the outgoing + * communication ring. We use a lock type that can be + * held while sleeping so that xs_write() can block waiting + * for space in the ring to free up, without allowing another + * writer to come in and corrupt a partial message write. + */ + struct sx request_mutex; + + /** + * A list of replies to our requests. + * + * The reply list is filled by xs_rcv_thread(). It + * is consumed by the context that issued the request + * to which a reply is made. The requester blocks in + * xs_read_reply(). + * + * /note Only one requesting context can be active at a time. + * This is guaranteed by the request_mutex and insures + * that the requester sees replies matching the order + * of its requests. + */ + struct xs_stored_msg_list reply_list; + + /** Lock protecting the reply list. */ + struct mtx reply_lock; + + /** + * List of registered watches. + */ + struct xs_watch_list registered_watches; + + /** Lock protecting the registered watches list. */ + struct mtx registered_watches_lock; + + /** + * List of pending watch callback events. + */ + struct xs_stored_msg_list watch_events; + + /** Lock protecting the watch calback list. */ + struct mtx watch_events_lock; + + /** + * Sleepable lock used to prevent VM suspension while a + * xenstore transaction is outstanding. + * + * Each active transaction holds a shared lock on the + * suspend mutex. Our suspend method blocks waiting + * to acquire an exclusive lock. This guarantees that + * suspend processing will only proceed once all active + * transactions have been retired. + */ + struct sx suspend_mutex; + + /** + * The processid of the xenwatch thread. + */ + pid_t xenwatch_pid; + + /** + * Sleepable mutex used to gate the execution of XenStore + * watch event callbacks. + * + * xenwatch_thread holds an exclusive lock on this mutex + * while delivering event callbacks, and xenstore_unregister_watch() + * uses an exclusive lock of this mutex to guarantee that no + * callbacks of the just unregistered watch are pending + * before returning to its caller. + */ + struct sx xenwatch_mutex; + + /** + * The HVM guest pseudo-physical frame number. This is Xen's mapping + * of the true machine frame number into our "physical address space". + */ + unsigned long gpfn; + + /** + * The event channel for communicating with the + * XenStore service. + */ + int evtchn; + + /** Handle for XenStore interrupts. */ + xen_intr_handle_t xen_intr_handle; + + /** + * Interrupt driven config hook allowing us to defer + * attaching children until interrupts (and thus communication + * with the XenStore service) are available. + */ + struct intr_config_hook xs_attachcb; +}; + +/*-------------------------------- Global Data ------------------------------*/ +static struct xs_softc xs; + +/*------------------------- Private Utility Functions -----------------------*/ + +/** + * Count and optionally record pointers to a number of NUL terminated + * strings in a buffer. + * + * \param strings A pointer to a contiguous buffer of NUL terminated strings. + * \param dest An array to store pointers to each string found in strings. + * \param len The length of the buffer pointed to by strings. + * + * \return A count of the number of strings found. + */ +static u_int +extract_strings(const char *strings, const char **dest, u_int len) +{ + u_int num; + const char *p; + + for (p = strings, num = 0; p < strings + len; p += strlen(p) + 1) { + if (dest != NULL) + *dest++ = p; + num++; + } + + return (num); +} + +/** + * Convert a contiguous buffer containing a series of NUL terminated + * strings into an array of pointers to strings. + * + * The returned pointer references the array of string pointers which + * is followed by the storage for the string data. It is the client's + * responsibility to free this storage. + * + * The storage addressed by strings is free'd prior to split returning. + * + * \param strings A pointer to a contiguous buffer of NUL terminated strings. + * \param len The length of the buffer pointed to by strings. + * \param num The number of strings found and returned in the strings + * array. + * + * \return An array of pointers to the strings found in the input buffer. + */ +static const char ** +split(char *strings, u_int len, u_int *num) +{ + const char **ret; + + /* Protect against unterminated buffers. */ + if (len > 0) + strings[len - 1] = '\0'; + + /* Count the strings. */ + *num = extract_strings(strings, /*dest*/NULL, len); + + /* Transfer to one big alloc for easy freeing by the caller. */ + ret = malloc(*num * sizeof(char *) + len, M_XENSTORE, M_WAITOK); + memcpy(&ret[*num], strings, len); + free(strings, M_XENSTORE); + + /* Extract pointers to newly allocated array. */ + strings = (char *)&ret[*num]; + (void)extract_strings(strings, /*dest*/ret, len); + + return (ret); +} + +/*------------------------- Public Utility Functions -------------------------*/ +/*------- API comments for these methods can be found in xenstorevar.h -------*/ +struct sbuf * +xs_join(const char *dir, const char *name) +{ + struct sbuf *sb; + + sb = sbuf_new_auto(); + sbuf_cat(sb, dir); + if (name[0] != '\0') { + sbuf_putc(sb, '/'); + sbuf_cat(sb, name); + } + sbuf_finish(sb); + + return (sb); +} + +/*-------------------- Low Level Communication Management --------------------*/ +/** + * Interrupt handler for the XenStore event channel. + * + * XenStore reads and writes block on "xen_store" for buffer + * space. Wakeup any blocking operations when the XenStore + * service has modified the queues. + */ +static void +xs_intr(void * arg __unused /*__attribute__((unused))*/) +{ + + /* + * Hold ring lock across wakeup so that clients + * cannot miss a wakeup. + */ + mtx_lock(&xs.ring_lock); + wakeup(xen_store); + mtx_unlock(&xs.ring_lock); +} + +/** + * Verify that the indexes for a ring are valid. + * + * The difference between the producer and consumer cannot + * exceed the size of the ring. + * + * \param cons The consumer index for the ring to test. + * \param prod The producer index for the ring to test. + * + * \retval 1 If indexes are in range. + * \retval 0 If the indexes are out of range. + */ +static int +xs_check_indexes(XENSTORE_RING_IDX cons, XENSTORE_RING_IDX prod) +{ + + return ((prod - cons) <= XENSTORE_RING_SIZE); +} + +/** + * Return a pointer to, and the length of, the contiguous + * free region available for output in a ring buffer. + * + * \param cons The consumer index for the ring. + * \param prod The producer index for the ring. + * \param buf The base address of the ring's storage. + * \param len The amount of contiguous storage available. + * + * \return A pointer to the start location of the free region. + */ +static void * +xs_get_output_chunk(XENSTORE_RING_IDX cons, XENSTORE_RING_IDX prod, + char *buf, uint32_t *len) +{ + + *len = XENSTORE_RING_SIZE - MASK_XENSTORE_IDX(prod); + if ((XENSTORE_RING_SIZE - (prod - cons)) < *len) + *len = XENSTORE_RING_SIZE - (prod - cons); + return (buf + MASK_XENSTORE_IDX(prod)); +} + +/** + * Return a pointer to, and the length of, the contiguous + * data available to read from a ring buffer. + * + * \param cons The consumer index for the ring. + * \param prod The producer index for the ring. + * \param buf The base address of the ring's storage. + * \param len The amount of contiguous data available to read. + * + * \return A pointer to the start location of the available data. + */ +static const void * +xs_get_input_chunk(XENSTORE_RING_IDX cons, XENSTORE_RING_IDX prod, + const char *buf, uint32_t *len) +{ + + *len = XENSTORE_RING_SIZE - MASK_XENSTORE_IDX(cons); + if ((prod - cons) < *len) + *len = prod - cons; + return (buf + MASK_XENSTORE_IDX(cons)); +} + +/** + * Transmit data to the XenStore service. + * + * \param tdata A pointer to the contiguous data to send. + * \param len The amount of data to send. + * + * \return On success 0, otherwise an errno value indicating the + * cause of failure. + * + * \invariant Called from thread context. + * \invariant The buffer pointed to by tdata is at least len bytes + * in length. + * \invariant xs.request_mutex exclusively locked. + */ +static int +xs_write_store(const void *tdata, unsigned len) +{ + XENSTORE_RING_IDX cons, prod; + const char *data = (const char *)tdata; + int error; + + sx_assert(&xs.request_mutex, SX_XLOCKED); + while (len != 0) { + void *dst; + u_int avail; + + /* Hold lock so we can't miss wakeups should we block. */ + mtx_lock(&xs.ring_lock); + cons = xen_store->req_cons; + prod = xen_store->req_prod; + if ((prod - cons) == XENSTORE_RING_SIZE) { + /* + * Output ring is full. Wait for a ring event. + * + * Note that the events from both queues + * are combined, so being woken does not + * guarantee that data exist in the read + * ring. + * + * To simplify error recovery and the retry, + * we specify PDROP so our lock is *not* held + * when msleep returns. + */ + error = msleep(xen_store, &xs.ring_lock, PCATCH|PDROP, + "xbwrite", /*timeout*/0); + if (error && error != EWOULDBLOCK) + return (error); + + /* Try again. */ + continue; + } + mtx_unlock(&xs.ring_lock); + + /* Verify queue sanity. */ + if (!xs_check_indexes(cons, prod)) { + xen_store->req_cons = xen_store->req_prod = 0; + return (EIO); + } + + dst = xs_get_output_chunk(cons, prod, xen_store->req, &avail); + if (avail > len) + avail = len; + + memcpy(dst, data, avail); + data += avail; + len -= avail; + + /* + * The store to the producer index, which indicates + * to the other side that new data has arrived, must + * be visible only after our copy of the data into the + * ring has completed. + */ + wmb(); + xen_store->req_prod += avail; + + /* + * xen_intr_signal() implies mb(). The other side will see + * the change to req_prod at the time of the interrupt. + */ + xen_intr_signal(xs.xen_intr_handle); + } + + return (0); +} + +/** + * Receive data from the XenStore service. + * + * \param tdata A pointer to the contiguous buffer to receive the data. + * \param len The amount of data to receive. + * + * \return On success 0, otherwise an errno value indicating the + * cause of failure. + * + * \invariant Called from thread context. + * \invariant The buffer pointed to by tdata is at least len bytes + * in length. + * + * \note xs_read does not perform any internal locking to guarantee + * serial access to the incoming ring buffer. However, there + * is only one context processing reads: xs_rcv_thread(). + */ +static int +xs_read_store(void *tdata, unsigned len) +{ + XENSTORE_RING_IDX cons, prod; + char *data = (char *)tdata; + int error; + + while (len != 0) { + u_int avail; + const char *src; + + /* Hold lock so we can't miss wakeups should we block. */ + mtx_lock(&xs.ring_lock); + cons = xen_store->rsp_cons; + prod = xen_store->rsp_prod; + if (cons == prod) { + /* + * Nothing to read. Wait for a ring event. + * + * Note that the events from both queues + * are combined, so being woken does not + * guarantee that data exist in the read + * ring. + * + * To simplify error recovery and the retry, + * we specify PDROP so our lock is *not* held + * when msleep returns. + */ + error = msleep(xen_store, &xs.ring_lock, PCATCH|PDROP, + "xbread", /*timeout*/0); + if (error && error != EWOULDBLOCK) + return (error); + continue; + } + mtx_unlock(&xs.ring_lock); + + /* Verify queue sanity. */ + if (!xs_check_indexes(cons, prod)) { + xen_store->rsp_cons = xen_store->rsp_prod = 0; + return (EIO); + } + + src = xs_get_input_chunk(cons, prod, xen_store->rsp, &avail); + if (avail > len) + avail = len; + + /* + * Insure the data we read is related to the indexes + * we read above. + */ + rmb(); + + memcpy(data, src, avail); + data += avail; + len -= avail; + + /* + * Insure that the producer of this ring does not see + * the ring space as free until after we have copied it + * out. + */ + mb(); + xen_store->rsp_cons += avail; + + /* + * xen_intr_signal() implies mb(). The producer will see + * the updated consumer index when the event is delivered. + */ + xen_intr_signal(xs.xen_intr_handle); + } + + return (0); +} + +/*----------------------- Received Message Processing ------------------------*/ +/** + * Block reading the next message from the XenStore service and + * process the result. + * + * \param type The returned type of the XenStore message received. + * + * \return 0 on success. Otherwise an errno value indicating the + * type of failure encountered. + */ +static int +xs_process_msg(enum xsd_sockmsg_type *type) +{ + struct xs_stored_msg *msg; + char *body; + int error; + + msg = malloc(sizeof(*msg), M_XENSTORE, M_WAITOK); + error = xs_read_store(&msg->hdr, sizeof(msg->hdr)); + if (error) { + free(msg, M_XENSTORE); + return (error); + } + + body = malloc(msg->hdr.len + 1, M_XENSTORE, M_WAITOK); + error = xs_read_store(body, msg->hdr.len); + if (error) { + free(body, M_XENSTORE); + free(msg, M_XENSTORE); + return (error); + } + body[msg->hdr.len] = '\0'; + + *type = msg->hdr.type; + if (msg->hdr.type == XS_WATCH_EVENT) { + msg->u.watch.vec = split(body, msg->hdr.len, + &msg->u.watch.vec_size); + + mtx_lock(&xs.registered_watches_lock); + msg->u.watch.handle = find_watch( + msg->u.watch.vec[XS_WATCH_TOKEN]); + if (msg->u.watch.handle != NULL) { + mtx_lock(&xs.watch_events_lock); + TAILQ_INSERT_TAIL(&xs.watch_events, msg, list); + wakeup(&xs.watch_events); + mtx_unlock(&xs.watch_events_lock); + } else { + free(msg->u.watch.vec, M_XENSTORE); + free(msg, M_XENSTORE); + } + mtx_unlock(&xs.registered_watches_lock); + } else { + msg->u.reply.body = body; + mtx_lock(&xs.reply_lock); + TAILQ_INSERT_TAIL(&xs.reply_list, msg, list); + wakeup(&xs.reply_list); + mtx_unlock(&xs.reply_lock); + } + + return (0); +} + +/** + * Thread body of the XenStore receive thread. + * + * This thread blocks waiting for data from the XenStore service + * and processes and received messages. + */ +static void +xs_rcv_thread(void *arg __unused) +{ + int error; + enum xsd_sockmsg_type type; + + for (;;) { + error = xs_process_msg(&type); + if (error) + printf("XENSTORE error %d while reading message\n", + error); + } +} + +/*---------------- XenStore Message Request/Reply Processing -----------------*/ +/** + * Filter invoked before transmitting any message to the XenStore service. + * + * The role of the filter may expand, but currently serves to manage + * the interactions of messages with transaction state. + * + * \param request_msg_type The message type for the request. + */ +static inline void +xs_request_filter(uint32_t request_msg_type) +{ + if (request_msg_type == XS_TRANSACTION_START) + sx_slock(&xs.suspend_mutex); +} + +/** + * Filter invoked after transmitting any message to the XenStore service. + * + * The role of the filter may expand, but currently serves to manage + * the interactions of messages with transaction state. + * + * \param request_msg_type The message type for the original request. + * \param reply_msg_type The message type for any received reply. + * \param request_reply_error The error status from the attempt to send + * the request or retrieve the reply. + */ +static inline void +xs_reply_filter(uint32_t request_msg_type, + uint32_t reply_msg_type, int request_reply_error) +{ + /* + * The count of transactions drops if we attempted + * to end a transaction (even if that attempt fails + * in error), we receive a transaction end acknowledgement, + * or if our attempt to begin a transaction fails. + */ + if (request_msg_type == XS_TRANSACTION_END + || (request_reply_error == 0 && reply_msg_type == XS_TRANSACTION_END) + || (request_msg_type == XS_TRANSACTION_START + && (request_reply_error != 0 || reply_msg_type == XS_ERROR))) + sx_sunlock(&xs.suspend_mutex); + +} + +#define xsd_error_count (sizeof(xsd_errors) / sizeof(xsd_errors[0])) + +/** + * Convert a XenStore error string into an errno number. + * + * \param errorstring The error string to convert. + * + * \return The errno best matching the input string. + * + * \note Unknown error strings are converted to EINVAL. + */ +static int +xs_get_error(const char *errorstring) +{ + u_int i; + + for (i = 0; i < xsd_error_count; i++) { + if (!strcmp(errorstring, xsd_errors[i].errstring)) + return (xsd_errors[i].errnum); + } + log(LOG_WARNING, "XENSTORE xen store gave: unknown error %s", + errorstring); + return (EINVAL); +} + +/** + * Block waiting for a reply to a message request. + * + * \param type The returned type of the reply. + * \param len The returned body length of the reply. + * \param result The returned body of the reply. + * + * \return 0 on success. Otherwise an errno indicating the + * cause of failure. + */ +static int +xs_read_reply(enum xsd_sockmsg_type *type, u_int *len, void **result) +{ + struct xs_stored_msg *msg; + char *body; + int error; + + mtx_lock(&xs.reply_lock); + while (TAILQ_EMPTY(&xs.reply_list)) { + error = mtx_sleep(&xs.reply_list, &xs.reply_lock, + PCATCH, "xswait", hz/10); + if (error && error != EWOULDBLOCK) { + mtx_unlock(&xs.reply_lock); + return (error); + } + } + msg = TAILQ_FIRST(&xs.reply_list); + TAILQ_REMOVE(&xs.reply_list, msg, list); + mtx_unlock(&xs.reply_lock); + + *type = msg->hdr.type; + if (len) + *len = msg->hdr.len; + body = msg->u.reply.body; + + free(msg, M_XENSTORE); + *result = body; + return (0); +} + +/** + * Pass-thru interface for XenStore access by userland processes + * via the XenStore device. + * + * Reply type and length data are returned by overwriting these + * fields in the passed in request message. + * + * \param msg A properly formatted message to transmit to + * the XenStore service. + * \param result The returned body of the reply. + * + * \return 0 on success. Otherwise an errno indicating the cause + * of failure. + * + * \note The returned result is provided in malloced storage and thus + * must be free'd by the caller with 'free(result, M_XENSTORE); + */ +int +xs_dev_request_and_reply(struct xsd_sockmsg *msg, void **result) +{ + uint32_t request_type; + int error; + + request_type = msg->type; + xs_request_filter(request_type); + + sx_xlock(&xs.request_mutex); + if ((error = xs_write_store(msg, sizeof(*msg) + msg->len)) == 0) + error = xs_read_reply(&msg->type, &msg->len, result); + sx_xunlock(&xs.request_mutex); + + xs_reply_filter(request_type, msg->type, error); + + return (error); +} + +/** + * Send a message with an optionally muti-part body to the XenStore service. + * + * \param t The transaction to use for this request. + * \param request_type The type of message to send. + * \param iovec Pointers to the body sections of the request. + * \param num_vecs The number of body sections in the request. + * \param len The returned length of the reply. + * \param result The returned body of the reply. + * + * \return 0 on success. Otherwise an errno indicating + * the cause of failure. + * + * \note The returned result is provided in malloced storage and thus + * must be free'd by the caller with 'free(*result, M_XENSTORE); + */ +static int +xs_talkv(struct xs_transaction t, enum xsd_sockmsg_type request_type, + const struct iovec *iovec, u_int num_vecs, u_int *len, void **result) +{ + struct xsd_sockmsg msg; + void *ret = NULL; + u_int i; + int error; + + msg.tx_id = t.id; + msg.req_id = 0; + msg.type = request_type; + msg.len = 0; + for (i = 0; i < num_vecs; i++) + msg.len += iovec[i].iov_len; + + xs_request_filter(request_type); + + sx_xlock(&xs.request_mutex); + error = xs_write_store(&msg, sizeof(msg)); + if (error) { + printf("xs_talkv failed %d\n", error); + goto error_lock_held; + } + + for (i = 0; i < num_vecs; i++) { + error = xs_write_store(iovec[i].iov_base, iovec[i].iov_len); + if (error) { + printf("xs_talkv failed %d\n", error); + goto error_lock_held; + } + } + + error = xs_read_reply(&msg.type, len, &ret); + +error_lock_held: + sx_xunlock(&xs.request_mutex); + xs_reply_filter(request_type, msg.type, error); + if (error) + return (error); + + if (msg.type == XS_ERROR) { + error = xs_get_error(ret); + free(ret, M_XENSTORE); + return (error); + } + + /* Reply is either error or an echo of our request message type. */ + KASSERT(msg.type == request_type, ("bad xenstore message type")); + + if (result) + *result = ret; + else + free(ret, M_XENSTORE); + + return (0); +} + +/** + * Wrapper for xs_talkv allowing easy transmission of a message with + * a single, contiguous, message body. + * + * \param t The transaction to use for this request. + * \param request_type The type of message to send. + * \param body The body of the request. + * \param len The returned length of the reply. + * \param result The returned body of the reply. + * + * \return 0 on success. Otherwise an errno indicating + * the cause of failure. + * + * \note The returned result is provided in malloced storage and thus + * must be free'd by the caller with 'free(*result, M_XENSTORE); + */ +static int +xs_single(struct xs_transaction t, enum xsd_sockmsg_type request_type, + const char *body, u_int *len, void **result) +{ + struct iovec iovec; + + iovec.iov_base = (void *)(uintptr_t)body; + iovec.iov_len = strlen(body) + 1; + + return (xs_talkv(t, request_type, &iovec, 1, len, result)); +} + +/*------------------------- XenStore Watch Support ---------------------------*/ +/** + * Transmit a watch request to the XenStore service. + * + * \param path The path in the XenStore to watch. + * \param tocken A unique identifier for this watch. + * + * \return 0 on success. Otherwise an errno indicating the + * cause of failure. + */ +static int +xs_watch(const char *path, const char *token) +{ + struct iovec iov[2]; + + iov[0].iov_base = (void *)(uintptr_t) path; + iov[0].iov_len = strlen(path) + 1; + iov[1].iov_base = (void *)(uintptr_t) token; + iov[1].iov_len = strlen(token) + 1; + + return (xs_talkv(XST_NIL, XS_WATCH, iov, 2, NULL, NULL)); +} + +/** + * Transmit an uwatch request to the XenStore service. + * + * \param path The path in the XenStore to watch. + * \param tocken A unique identifier for this watch. + * + * \return 0 on success. Otherwise an errno indicating the + * cause of failure. + */ +static int +xs_unwatch(const char *path, const char *token) +{ + struct iovec iov[2]; + + iov[0].iov_base = (void *)(uintptr_t) path; + iov[0].iov_len = strlen(path) + 1; + iov[1].iov_base = (void *)(uintptr_t) token; + iov[1].iov_len = strlen(token) + 1; + + return (xs_talkv(XST_NIL, XS_UNWATCH, iov, 2, NULL, NULL)); +} *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Sep 30 17:19:08 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1237835F; Tue, 30 Sep 2014 17:19:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F37DAC52; Tue, 30 Sep 2014 17:19:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8UHJ75s007936; Tue, 30 Sep 2014 17:19:07 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8UHJ7cw007935; Tue, 30 Sep 2014 17:19:07 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201409301719.s8UHJ7cw007935@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 30 Sep 2014 17:19:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272315 - head/tools/sched X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2014 17:19:08 -0000 Author: jhb Date: Tue Sep 30 17:19:07 2014 New Revision: 272315 URL: http://svnweb.freebsd.org/changeset/base/272315 Log: Explicitly return None for negative event indices. Prior to this, eventat(-1) would return the next-to-last event causing the back button to cycle back to the end of an event source instead of stopping at the start. Modified: head/tools/sched/schedgraph.py Modified: head/tools/sched/schedgraph.py ============================================================================== --- head/tools/sched/schedgraph.py Tue Sep 30 17:14:11 2014 (r272314) +++ head/tools/sched/schedgraph.py Tue Sep 30 17:19:07 2014 (r272315) @@ -856,7 +856,7 @@ class EventSource: return (Y_EVENTSOURCE) def eventat(self, i): - if (i >= len(self.events)): + if (i >= len(self.events) or i < 0): return (None) event = self.events[i] return (event) From owner-svn-src-all@FreeBSD.ORG Tue Sep 30 17:26:35 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 07CD67B2; Tue, 30 Sep 2014 17:26:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E895AD60; Tue, 30 Sep 2014 17:26:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8UHQYfL012274; Tue, 30 Sep 2014 17:26:34 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8UHQYAm012273; Tue, 30 Sep 2014 17:26:34 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201409301726.s8UHQYAm012273@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 30 Sep 2014 17:26:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272316 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2014 17:26:35 -0000 Author: jhb Date: Tue Sep 30 17:26:34 2014 New Revision: 272316 URL: http://svnweb.freebsd.org/changeset/base/272316 Log: Only define the full inm_print() if KTR_IGMPV3 is enabled at compile time. Modified: head/sys/netinet/in_mcast.c Modified: head/sys/netinet/in_mcast.c ============================================================================== --- head/sys/netinet/in_mcast.c Tue Sep 30 17:19:07 2014 (r272315) +++ head/sys/netinet/in_mcast.c Tue Sep 30 17:26:34 2014 (r272316) @@ -2928,7 +2928,7 @@ sysctl_ip_mcast_filters(SYSCTL_HANDLER_A return (retval); } -#ifdef KTR +#if defined(KTR) && (KTR_COMPILE & KTR_IGMPV3) static const char *inm_modestrs[] = { "un", "in", "ex" }; @@ -3000,7 +3000,7 @@ inm_print(const struct in_multi *inm) printf("%s: --- end inm %p ---\n", __func__, inm); } -#else /* !KTR */ +#else /* !KTR || !(KTR_COMPILE & KTR_IGMPV3) */ void inm_print(const struct in_multi *inm) @@ -3008,6 +3008,6 @@ inm_print(const struct in_multi *inm) } -#endif /* KTR */ +#endif /* KTR && (KTR_COMPILE & KTR_IGMPV3) */ RB_GENERATE(ip_msource_tree, ip_msource, ims_link, ip_msource_cmp); From owner-svn-src-all@FreeBSD.ORG Tue Sep 30 17:27:57 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7F23293B; Tue, 30 Sep 2014 17:27:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6B196D79; Tue, 30 Sep 2014 17:27:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8UHRvjD012478; Tue, 30 Sep 2014 17:27:57 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8UHRvQu012477; Tue, 30 Sep 2014 17:27:57 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201409301727.s8UHRvQu012477@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: Roger Pau Monné Date: Tue, 30 Sep 2014 17:27:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272317 - head/sys/dev/xen/xenstore X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2014 17:27:57 -0000 Author: royger Date: Tue Sep 30 17:27:56 2014 New Revision: 272317 URL: http://svnweb.freebsd.org/changeset/base/272317 Log: xen: defer xenstore initialization until xenstored is started The xenstore related devices in the kernel cannot be started until xenstored is running, which will happen later in the Dom0 case. If start_info_t doesn't contain a valid xenstore event channel, defer all xenstore related devices attachment to later. Sponsored by: Citrix Systems R&D dev/xen/xenstore/xenstore.c: - Prevent xenstore from trying to attach it's descendant devices if xenstore is not initialized. - Add a callback in the xenstore interrupt filter that will trigger the plug of xenstore descendant devices on the first received interrupt. This interrupt is generated when xenstored attaches to the event channel, and serves as a notification that xenstored is running. Modified: head/sys/dev/xen/xenstore/xenstore.c Modified: head/sys/dev/xen/xenstore/xenstore.c ============================================================================== --- head/sys/dev/xen/xenstore/xenstore.c Tue Sep 30 17:26:34 2014 (r272316) +++ head/sys/dev/xen/xenstore/xenstore.c Tue Sep 30 17:27:56 2014 (r272317) @@ -48,6 +48,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include @@ -249,6 +251,20 @@ struct xs_softc { * with the XenStore service) are available. */ struct intr_config_hook xs_attachcb; + + /** + * Xenstore is a user-space process that usually runs in Dom0, + * so if this domain is booting as Dom0, xenstore wont we accessible, + * and we have to defer the initialization of xenstore related + * devices to later (when xenstore is started). + */ + bool initialized; + + /** + * Task to run when xenstore is initialized (Dom0 only), will + * take care of attaching xenstore related devices. + */ + struct task xs_late_init; }; /*-------------------------------- Global Data ------------------------------*/ @@ -352,6 +368,16 @@ static void xs_intr(void * arg __unused /*__attribute__((unused))*/) { + /* If xenstore has not been initialized, initialize it now */ + if (!xs.initialized) { + xs.initialized = true; + /* + * Since this task is probing and attaching devices we + * have to hold the Giant lock. + */ + taskqueue_enqueue(taskqueue_swi_giant, &xs.xs_late_init); + } + /* * Hold ring lock across wakeup so that clients * cannot miss a wakeup. @@ -1112,6 +1138,15 @@ xs_attach_deferred(void *arg) config_intrhook_disestablish(&xs.xs_attachcb); } +static void +xs_attach_late(void *arg, int pending) +{ + + KASSERT((pending == 1), ("xs late attach queued several times")); + bus_generic_probe(xs.xs_dev); + bus_generic_attach(xs.xs_dev); +} + /** * Attach to the XenStore. * @@ -1130,12 +1165,37 @@ xs_attach(device_t dev) /* Initialize the interface to xenstore. */ struct proc *p; + xs.initialized = false; if (xen_hvm_domain()) { xs.evtchn = hvm_get_parameter(HVM_PARAM_STORE_EVTCHN); xs.gpfn = hvm_get_parameter(HVM_PARAM_STORE_PFN); xen_store = pmap_mapdev(xs.gpfn * PAGE_SIZE, PAGE_SIZE); + xs.initialized = true; } else if (xen_pv_domain()) { - xs.evtchn = HYPERVISOR_start_info->store_evtchn; + if (HYPERVISOR_start_info->store_evtchn == 0) { + struct evtchn_alloc_unbound alloc_unbound; + + /* Allocate a local event channel for xenstore */ + alloc_unbound.dom = DOMID_SELF; + alloc_unbound.remote_dom = DOMID_SELF; + error = HYPERVISOR_event_channel_op( + EVTCHNOP_alloc_unbound, &alloc_unbound); + if (error != 0) + panic( + "unable to alloc event channel for Dom0: %d", + error); + + HYPERVISOR_start_info->store_evtchn = + alloc_unbound.port; + xs.evtchn = alloc_unbound.port; + + /* Allocate memory for the xs shared ring */ + xen_store = malloc(PAGE_SIZE, M_XENSTORE, + M_WAITOK | M_ZERO); + } else { + xs.evtchn = HYPERVISOR_start_info->store_evtchn; + xs.initialized = true; + } } else { panic("Unknown domain type, cannot initialize xenstore."); } @@ -1167,7 +1227,11 @@ xs_attach(device_t dev) xs.xs_attachcb.ich_func = xs_attach_deferred; xs.xs_attachcb.ich_arg = NULL; - config_intrhook_establish(&xs.xs_attachcb); + if (xs.initialized) { + config_intrhook_establish(&xs.xs_attachcb); + } else { + TASK_INIT(&xs.xs_late_init, 0, xs_attach_late, NULL); + } return (error); } From owner-svn-src-all@FreeBSD.ORG Tue Sep 30 17:31:05 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 76708B55; Tue, 30 Sep 2014 17:31:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6243DE2C; Tue, 30 Sep 2014 17:31:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8UHV5lR015777; Tue, 30 Sep 2014 17:31:05 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8UHV4oQ015773; Tue, 30 Sep 2014 17:31:04 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201409301731.s8UHV4oQ015773@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: Roger Pau Monné Date: Tue, 30 Sep 2014 17:31:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272318 - in head/sys: dev/xen/xenstore xen/xenstore X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2014 17:31:05 -0000 Author: royger Date: Tue Sep 30 17:31:04 2014 New Revision: 272318 URL: http://svnweb.freebsd.org/changeset/base/272318 Log: xen: convert the xenstore user-space char device to a newbus device Convert the xenstore user-space device (/dev/xen/xenstore) to a device using the newbus interface. This allows us to make the device initialization dependant on the initialization of xenstore itself in the kernel. Sponsored by: Citrix Systems R&D dev/xen/xenstore/xenstore.c: - Convert to a newbus device, this removes the xs_dev_init function. xen/xenstore/xenstore_internal.h: - Remove xs_dev_init prototype. dev/xen/xenstore/xenstore.c: - Don't call xs_dev_init anymore, the device will attach itself when xenstore is started. Modified: head/sys/dev/xen/xenstore/xenstore.c head/sys/dev/xen/xenstore/xenstore_dev.c head/sys/xen/xenstore/xenstore_internal.h Modified: head/sys/dev/xen/xenstore/xenstore.c ============================================================================== --- head/sys/dev/xen/xenstore/xenstore.c Tue Sep 30 17:27:56 2014 (r272317) +++ head/sys/dev/xen/xenstore/xenstore.c Tue Sep 30 17:31:04 2014 (r272318) @@ -1130,7 +1130,6 @@ xs_probe(device_t dev) static void xs_attach_deferred(void *arg) { - xs_dev_init(); bus_generic_probe(xs.xs_dev); bus_generic_attach(xs.xs_dev); Modified: head/sys/dev/xen/xenstore/xenstore_dev.c ============================================================================== --- head/sys/dev/xen/xenstore/xenstore_dev.c Tue Sep 30 17:27:56 2014 (r272317) +++ head/sys/dev/xen/xenstore/xenstore_dev.c Tue Sep 30 17:31:04 2014 (r272318) @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include @@ -216,9 +217,71 @@ static struct cdevsw xs_dev_cdevsw = { .d_name = "xs_dev", }; -void -xs_dev_init() +/*------------------ Private Device Attachment Functions --------------------*/ +/** + * \brief Identify instances of this device type in the system. + * + * \param driver The driver performing this identify action. + * \param parent The NewBus parent device for any devices this method adds. + */ +static void +xs_dev_identify(driver_t *driver __unused, device_t parent) +{ + /* + * A single device instance for our driver is always present + * in a system operating under Xen. + */ + BUS_ADD_CHILD(parent, 0, driver->name, 0); +} + +/** + * \brief Probe for the existance of the Xenstore device + * + * \param dev NewBus device_t for this instance. + * + * \return Always returns 0 indicating success. + */ +static int +xs_dev_probe(device_t dev) +{ + + device_set_desc(dev, "Xenstore user-space device"); + return (0); +} + +/** + * \brief Attach the Xenstore device. + * + * \param dev NewBus device_t for this instance. + * + * \return On success, 0. Otherwise an errno value indicating the + * type of failure. + */ +static int +xs_dev_attach(device_t dev) { - make_dev(&xs_dev_cdevsw, 0, UID_ROOT, GID_WHEEL, 0400, + struct cdev *xs_cdev; + + xs_cdev = make_dev(&xs_dev_cdevsw, 0, UID_ROOT, GID_WHEEL, 0400, "xen/xenstore"); + if (xs_cdev == NULL) + return (EINVAL); + + return (0); } + +/*-------------------- Private Device Attachment Data -----------------------*/ +static device_method_t xs_dev_methods[] = { + /* Device interface */ + DEVMETHOD(device_identify, xs_dev_identify), + DEVMETHOD(device_probe, xs_dev_probe), + DEVMETHOD(device_attach, xs_dev_attach), + + DEVMETHOD_END +}; + +DEFINE_CLASS_0(xs_dev, xs_dev_driver, xs_dev_methods, 0); +devclass_t xs_dev_devclass; + +DRIVER_MODULE(xs_dev, xenstore, xs_dev_driver, xs_dev_devclass, + NULL, NULL); Modified: head/sys/xen/xenstore/xenstore_internal.h ============================================================================== --- head/sys/xen/xenstore/xenstore_internal.h Tue Sep 30 17:27:56 2014 (r272317) +++ head/sys/xen/xenstore/xenstore_internal.h Tue Sep 30 17:31:04 2014 (r272318) @@ -32,8 +32,5 @@ * $FreeBSD$ */ -/* Initialize support for userspace access to the XenStore. */ -void xs_dev_init(void); - /* Used by the XenStore character device to borrow kernel's store connection. */ int xs_dev_request_and_reply(struct xsd_sockmsg *msg, void **result); From owner-svn-src-all@FreeBSD.ORG Tue Sep 30 17:37:27 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3DCE1E37; Tue, 30 Sep 2014 17:37:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 296B6E80; Tue, 30 Sep 2014 17:37:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8UHbQL9017192; Tue, 30 Sep 2014 17:37:26 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8UHbQXL017190; Tue, 30 Sep 2014 17:37:26 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201409301737.s8UHbQXL017190@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: Roger Pau Monné Date: Tue, 30 Sep 2014 17:37:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272319 - in head/sys: conf dev/xen/xenstore X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2014 17:37:27 -0000 Author: royger Date: Tue Sep 30 17:37:26 2014 New Revision: 272319 URL: http://svnweb.freebsd.org/changeset/base/272319 Log: xen: add xenstored user-space device This device is used by the user-space daemon that runs xenstore (xenstored). It allows xenstored to map the xenstore memory page, and reports the event channel xenstore is using. Sponsored by: Citrix Systems R&D dev/xen/xenstore/xenstored_dev.c: - Add the xenstored character device that's used to map the xenstore memory into user-space, and to report the event channel used by xenstore. conf/files: - Add the device to the build process. Added: head/sys/dev/xen/xenstore/xenstored_dev.c (contents, props changed) Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Tue Sep 30 17:31:04 2014 (r272318) +++ head/sys/conf/files Tue Sep 30 17:37:26 2014 (r272319) @@ -2640,6 +2640,7 @@ dev/xen/timer/timer.c optional xen | xe dev/xen/pvcpu/pvcpu.c optional xen | xenhvm dev/xen/xenstore/xenstore.c optional xen | xenhvm dev/xen/xenstore/xenstore_dev.c optional xen | xenhvm +dev/xen/xenstore/xenstored_dev.c optional xen | xenhvm dev/xl/if_xl.c optional xl pci dev/xl/xlphy.c optional xl pci fs/autofs/autofs.c optional autofs Added: head/sys/dev/xen/xenstore/xenstored_dev.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/xen/xenstore/xenstored_dev.c Tue Sep 30 17:37:26 2014 (r272319) @@ -0,0 +1,169 @@ +/* + * Copyright (c) 2014 Roger Pau Monné + * 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include + +#include +#include + +#define XSD_READ_SIZE 20 + +static int xsd_dev_read(struct cdev *dev, struct uio *uio, int ioflag); +static int xsd_dev_mmap(struct cdev *dev, vm_ooffset_t offset, + vm_paddr_t *paddr, int nprot, vm_memattr_t *memattr); + + +static struct cdevsw xsd_dev_cdevsw = { + .d_version = D_VERSION, + .d_read = xsd_dev_read, + .d_mmap = xsd_dev_mmap, + .d_name = "xsd_dev", +}; + +static int +xsd_dev_read(struct cdev *dev, struct uio *uio, int ioflag) +{ + char evtchn[XSD_READ_SIZE]; + int error, len; + + len = snprintf(evtchn, sizeof(evtchn), "%u", + HYPERVISOR_start_info->store_evtchn); + if (len < 0 || len > uio->uio_resid) + return (EINVAL); + + error = uiomove(evtchn, len, uio); + if (error) + return (error); + + return (0); +} + +static int +xsd_dev_mmap(struct cdev *dev, vm_ooffset_t offset, vm_paddr_t *paddr, + int nprot, vm_memattr_t *memattr) +{ + + if (offset != 0) + return (EINVAL); + + *paddr = pmap_kextract((vm_offset_t)xen_store); + + return (0); +} + +/*------------------ Private Device Attachment Functions --------------------*/ +/** + * \brief Identify instances of this device type in the system. + * + * \param driver The driver performing this identify action. + * \param parent The NewBus parent device for any devices this method adds. + */ +static void +xsd_dev_identify(driver_t *driver __unused, device_t parent) +{ + + if (!xen_pv_domain()) + return; + if (HYPERVISOR_start_info->store_mfn != 0) + return; + + /* + * Only attach if xenstore is not available, because we are the + * domain that's supposed to run it. + */ + BUS_ADD_CHILD(parent, 0, driver->name, 0); +} + +/** + * \brief Probe for the existence of the Xenstored device + * + * \param dev NewBus device_t for this instance. + * + * \return Always returns 0 indicating success. + */ +static int +xsd_dev_probe(device_t dev) +{ + + device_set_desc(dev, "Xenstored user-space device"); + return (BUS_PROBE_NOWILDCARD); +} + +/** + * \brief Attach the Xenstored device. + * + * \param dev NewBus device_t for this instance. + * + * \return On success, 0. Otherwise an errno value indicating the + * type of failure. + */ +static int +xsd_dev_attach(device_t dev) +{ + struct cdev *xsd_cdev; + + xsd_cdev = make_dev(&xsd_dev_cdevsw, 0, UID_ROOT, GID_WHEEL, 0400, + "xen/xenstored"); + if (xsd_cdev == NULL) + return (EINVAL); + + return (0); +} + +/*-------------------- Private Device Attachment Data -----------------------*/ +static device_method_t xsd_dev_methods[] = { + /* Device interface */ + DEVMETHOD(device_identify, xsd_dev_identify), + DEVMETHOD(device_probe, xsd_dev_probe), + DEVMETHOD(device_attach, xsd_dev_attach), + + DEVMETHOD_END +}; + +DEFINE_CLASS_0(xsd_dev, xsd_dev_driver, xsd_dev_methods, 0); +devclass_t xsd_dev_devclass; + +DRIVER_MODULE(xsd_dev, xenpv, xsd_dev_driver, xsd_dev_devclass, + NULL, NULL); From owner-svn-src-all@FreeBSD.ORG Tue Sep 30 17:38:22 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3B0DAF81; Tue, 30 Sep 2014 17:38:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 27CDBE89; Tue, 30 Sep 2014 17:38:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8UHcM6Y017353; Tue, 30 Sep 2014 17:38:22 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8UHcMmB017352; Tue, 30 Sep 2014 17:38:22 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201409301738.s8UHcMmB017352@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: Roger Pau Monné Date: Tue, 30 Sep 2014 17:38:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272320 - head/sys/dev/xen/balloon X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2014 17:38:22 -0000 Author: royger Date: Tue Sep 30 17:38:21 2014 New Revision: 272320 URL: http://svnweb.freebsd.org/changeset/base/272320 Log: xen/balloon: fix accounting of current memory pages on PVH Using realmem on PVH is not realiable, since in this case the realmem value is computed from Maxmem, which contains the higher memory address found. Use HYPERVISOR_start_info->nr_pages instead, which is set by the hypervisor and contains the exact number of memory pages assigned to the domain. Sponsored by: Citrix Systems R&D Modified: head/sys/dev/xen/balloon/balloon.c Modified: head/sys/dev/xen/balloon/balloon.c ============================================================================== --- head/sys/dev/xen/balloon/balloon.c Tue Sep 30 17:37:26 2014 (r272319) +++ head/sys/dev/xen/balloon/balloon.c Tue Sep 30 17:38:21 2014 (r272320) @@ -405,7 +405,8 @@ xenballoon_attach(device_t dev) #ifndef XENHVM bs.current_pages = min(xen_start_info->nr_pages, max_pfn); #else - bs.current_pages = realmem; + bs.current_pages = xen_pv_domain() ? + HYPERVISOR_start_info->nr_pages : realmem; #endif bs.target_pages = bs.current_pages; bs.balloon_low = 0; From owner-svn-src-all@FreeBSD.ORG Tue Sep 30 17:41:17 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 46243295; Tue, 30 Sep 2014 17:41:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 31939EAD; Tue, 30 Sep 2014 17:41:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8UHfGNo018811; Tue, 30 Sep 2014 17:41:16 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8UHfG6k018810; Tue, 30 Sep 2014 17:41:16 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201409301741.s8UHfG6k018810@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: Roger Pau Monné Date: Tue, 30 Sep 2014 17:41:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272321 - head/sys/dev/xen/blkback X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2014 17:41:17 -0000 Author: royger Date: Tue Sep 30 17:41:16 2014 New Revision: 272321 URL: http://svnweb.freebsd.org/changeset/base/272321 Log: xen: fix blkback pushing responses before releasing internal resources Fix a problem where the blockback driver could run out of requests, despite the fact that we allocate enough request and reqlist structures to satisfy the maximum possible number of requests. The problem was that we were sending responses back to the other end (blockfront) before freeing resources. The Citrix Windows driver is pretty agressive about queueing, and would queue more I/O to us immediately after we sent responses to it. We would run into a resource shortage and stall out I/O until we freed resources. It isn't clear whether the request shortage condition was an indirect cause of the I/O hangs we've been seeing between Windows with the Citrix PV drivers and FreeBSD's blockback, but the above problem is certainly a bug. Sponsored by: Spectra Logic Submitted by: ken Reviewed by: royger dev/xen/blkback/blkback.c: - Break xbb_send_response() into two sub-functions, xbb_queue_response() and xbb_push_responses(). Remove xbb_send_response(), because it is no longer used. - Adjust xbb_complete_reqlist() so that it calls the two new functions, and holds the mutex around both calls. The mutex insures that another context can't come along and push responses before we've freed our resources. - Change xbb_release_reqlist() so that it requires the mutex to be held instead of acquiring the mutex itself. Both callers could easily hold the mutex while calling it, and one really needs to hold the mutex during the call. - Add two new counters, accessible via sysctl variables. The first one counts the number of I/Os that are queued and waiting to be pushed (reqs_queued_for_completion). The second one (reqs_completed_with_error) counts the number of requests we've completed with an error status. Modified: head/sys/dev/xen/blkback/blkback.c Modified: head/sys/dev/xen/blkback/blkback.c ============================================================================== --- head/sys/dev/xen/blkback/blkback.c Tue Sep 30 17:38:21 2014 (r272320) +++ head/sys/dev/xen/blkback/blkback.c Tue Sep 30 17:41:16 2014 (r272321) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009-2011 Spectra Logic Corporation + * Copyright (c) 2009-2012 Spectra Logic Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -784,6 +784,12 @@ struct xbb_softc { /** Number of requests we have completed*/ uint64_t reqs_completed; + /** Number of requests we queued but not pushed*/ + uint64_t reqs_queued_for_completion; + + /** Number of requests we completed with an error status*/ + uint64_t reqs_completed_with_error; + /** How many forced dispatches (i.e. without coalescing) have happend */ uint64_t forced_dispatch; @@ -1143,7 +1149,7 @@ xbb_release_reqlist(struct xbb_softc *xb int wakeup) { - mtx_lock(&xbb->lock); + mtx_assert(&xbb->lock, MA_OWNED); if (wakeup) { wakeup = xbb->flags & XBBF_RESOURCE_SHORTAGE; @@ -1167,8 +1173,6 @@ xbb_release_reqlist(struct xbb_softc *xb xbb_shutdown(xbb); } - mtx_unlock(&xbb->lock); - if (wakeup != 0) taskqueue_enqueue(xbb->io_taskqueue, &xbb->io_task); } @@ -1261,16 +1265,16 @@ bailout_error: if (nreq != NULL) xbb_release_req(xbb, nreq); - mtx_unlock(&xbb->lock); - if (nreqlist != NULL) xbb_release_reqlist(xbb, nreqlist, /*wakeup*/ 0); + mtx_unlock(&xbb->lock); + return (1); } /** - * Create and transmit a response to a blkif request. + * Create and queue a response to a blkif request. * * \param xbb Per-instance xbb configuration structure. * \param req The request structure to which to respond. @@ -1278,20 +1282,28 @@ bailout_error: * in sys/xen/interface/io/blkif.h. */ static void -xbb_send_response(struct xbb_softc *xbb, struct xbb_xen_req *req, int status) +xbb_queue_response(struct xbb_softc *xbb, struct xbb_xen_req *req, int status) { blkif_response_t *resp; - int more_to_do; - int notify; - more_to_do = 0; + /* + * The mutex is required here, and should be held across this call + * until after the subsequent call to xbb_push_responses(). This + * is to guarantee that another context won't queue responses and + * push them while we're active. + * + * That could lead to the other end being notified of responses + * before the resources have been freed on this end. The other end + * would then be able to queue additional I/O, and we may run out + * of resources because we haven't freed them all yet. + */ + mtx_assert(&xbb->lock, MA_OWNED); /* * Place on the response ring for the relevant domain. * For now, only the spacing between entries is different * in the different ABIs, not the response entry layout. */ - mtx_lock(&xbb->lock); switch (xbb->abi) { case BLKIF_PROTOCOL_NATIVE: resp = RING_GET_RESPONSE(&xbb->rings.native, @@ -1315,8 +1327,38 @@ xbb_send_response(struct xbb_softc *xbb, resp->operation = req->operation; resp->status = status; + if (status != BLKIF_RSP_OKAY) + xbb->reqs_completed_with_error++; + xbb->rings.common.rsp_prod_pvt += BLKIF_SEGS_TO_BLOCKS(req->nr_pages); - RING_PUSH_RESPONSES_AND_CHECK_NOTIFY(&xbb->rings.common, notify); + + xbb->reqs_queued_for_completion++; + +} + +/** + * Send queued responses to blkif requests. + * + * \param xbb Per-instance xbb configuration structure. + * \param run_taskqueue Flag that is set to 1 if the taskqueue + * should be run, 0 if it does not need to be run. + * \param notify Flag that is set to 1 if the other end should be + * notified via irq, 0 if the other end should not be + * notified. + */ +static void +xbb_push_responses(struct xbb_softc *xbb, int *run_taskqueue, int *notify) +{ + int more_to_do; + + /* + * The mutex is required here. + */ + mtx_assert(&xbb->lock, MA_OWNED); + + more_to_do = 0; + + RING_PUSH_RESPONSES_AND_CHECK_NOTIFY(&xbb->rings.common, *notify); if (xbb->rings.common.rsp_prod_pvt == xbb->rings.common.req_cons) { @@ -1331,15 +1373,10 @@ xbb_send_response(struct xbb_softc *xbb, more_to_do = 1; } - xbb->reqs_completed++; + xbb->reqs_completed += xbb->reqs_queued_for_completion; + xbb->reqs_queued_for_completion = 0; - mtx_unlock(&xbb->lock); - - if (more_to_do) - taskqueue_enqueue(xbb->io_taskqueue, &xbb->io_task); - - if (notify) - xen_intr_signal(xbb->xen_intr_handle); + *run_taskqueue = more_to_do; } /** @@ -1353,23 +1390,29 @@ xbb_complete_reqlist(struct xbb_softc *x { struct xbb_xen_req *nreq; off_t sectors_sent; + int notify, run_taskqueue; sectors_sent = 0; if (reqlist->flags & XBB_REQLIST_MAPPED) xbb_unmap_reqlist(reqlist); + mtx_lock(&xbb->lock); + /* - * All I/O is done, send the response. A lock should not be - * necessary here because the request list is complete, and - * therefore this is the only context accessing this request - * right now. The functions we call do their own locking if - * necessary. + * All I/O is done, send the response. A lock is not necessary + * to protect the request list, because all requests have + * completed. Therefore this is the only context accessing this + * reqlist right now. However, in order to make sure that no one + * else queues responses onto the queue or pushes them to the other + * side while we're active, we need to hold the lock across the + * calls to xbb_queue_response() and xbb_push_responses(). */ STAILQ_FOREACH(nreq, &reqlist->contig_req_list, links) { off_t cur_sectors_sent; - xbb_send_response(xbb, nreq, reqlist->status); + /* Put this response on the ring, but don't push yet */ + xbb_queue_response(xbb, nreq, reqlist->status); /* We don't report bytes sent if there is an error. */ if (reqlist->status == BLKIF_RSP_OKAY) @@ -1404,6 +1447,16 @@ xbb_complete_reqlist(struct xbb_softc *x /*then*/&reqlist->ds_t0); xbb_release_reqlist(xbb, reqlist, /*wakeup*/ 1); + + xbb_push_responses(xbb, &run_taskqueue, ¬ify); + + mtx_unlock(&xbb->lock); + + if (run_taskqueue) + taskqueue_enqueue(xbb->io_taskqueue, &xbb->io_task); + + if (notify) + xen_intr_signal(xbb->xen_intr_handle); } /** @@ -3589,6 +3642,16 @@ xbb_setup_sysctl(struct xbb_softc *xbb) "how many I/O requests have been completed"); SYSCTL_ADD_UQUAD(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), OID_AUTO, + "reqs_queued_for_completion", CTLFLAG_RW, + &xbb->reqs_queued_for_completion, + "how many I/O requests queued but not yet pushed"); + + SYSCTL_ADD_UQUAD(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), OID_AUTO, + "reqs_completed_with_error", CTLFLAG_RW, + &xbb->reqs_completed_with_error, + "how many I/O requests completed with error status"); + + SYSCTL_ADD_UQUAD(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), OID_AUTO, "forced_dispatch", CTLFLAG_RW, &xbb->forced_dispatch, "how many I/O dispatches were forced"); From owner-svn-src-all@FreeBSD.ORG Tue Sep 30 17:55:01 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6EEC77DB; Tue, 30 Sep 2014 17:55:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 57141FA; Tue, 30 Sep 2014 17:55:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8UHt1qg026470; Tue, 30 Sep 2014 17:55:01 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8UHswqh026385; Tue, 30 Sep 2014 17:54:58 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201409301754.s8UHswqh026385@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 30 Sep 2014 17:54:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272322 - in stable/10: . contrib/hyperv contrib/hyperv/tools etc/devd etc/mtree libexec libexec/hyperv share/mk sys/conf sys/dev/hyperv/include sys/dev/hyperv/utilities sys/modules/hyp... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2014 17:55:01 -0000 Author: delphij Date: Tue Sep 30 17:54:57 2014 New Revision: 272322 URL: http://svnweb.freebsd.org/changeset/base/272322 Log: MFC r271493,271688-271689,271696,271854,272139-272143: Import HyperV Key-Value Pair (KVP) driver and daemon code by Microsoft, many thanks for their continued support of FreeBSD. While I'm there, also implement a new build knob, WITHOUT_HYPERV to disable building and installing of the HyperV utilities when necessary. The HyperV utilities are only built for i386 and amd64 targets. Approved by: re (gjb) Added: stable/10/contrib/hyperv/ - copied from r271493, head/contrib/hyperv/ stable/10/etc/devd/hyperv.conf - copied, changed from r271696, head/etc/devd/hyperv.conf stable/10/libexec/hyperv/ - copied from r271493, head/libexec/hyperv/ stable/10/sys/dev/hyperv/utilities/hv_kvp.c - copied unchanged from r271493, head/sys/dev/hyperv/utilities/hv_kvp.c stable/10/sys/dev/hyperv/utilities/unicode.h - copied unchanged from r271493, head/sys/dev/hyperv/utilities/unicode.h stable/10/tools/build/options/WITHOUT_HYPERV - copied unchanged from r271493, head/tools/build/options/WITHOUT_HYPERV stable/10/tools/build/options/WITH_HYPERV - copied unchanged from r271493, head/tools/build/options/WITH_HYPERV stable/10/usr.sbin/hyperv/ - copied from r271493, head/usr.sbin/hyperv/ Modified: stable/10/ObsoleteFiles.inc stable/10/contrib/hyperv/tools/hv_kvp_daemon.c stable/10/etc/devd/Makefile stable/10/etc/mtree/BSD.usr.dist stable/10/etc/mtree/BSD.var.dist stable/10/libexec/Makefile stable/10/share/mk/bsd.own.mk stable/10/sys/conf/files.amd64 stable/10/sys/conf/files.i386 stable/10/sys/dev/hyperv/include/hyperv.h stable/10/sys/dev/hyperv/utilities/hv_kvp.h stable/10/sys/dev/hyperv/utilities/hv_util.c stable/10/sys/modules/hyperv/utilities/Makefile stable/10/tools/build/mk/OptionalObsoleteFiles.inc stable/10/usr.sbin/Makefile.amd64 stable/10/usr.sbin/Makefile.i386 Directory Properties: stable/10/ (props changed) Modified: stable/10/ObsoleteFiles.inc ============================================================================== --- stable/10/ObsoleteFiles.inc Tue Sep 30 17:41:16 2014 (r272321) +++ stable/10/ObsoleteFiles.inc Tue Sep 30 17:54:57 2014 (r272322) @@ -38,6 +38,8 @@ # xargs -n1 | sort | uniq -d; # done +# 20140917: hv_kvpd rc.d script removed in favor of devd configuration +OLD_FILES+=etc/rc.d/hv_kvpd # 20140814: libopie version bump OLD_LIBS+=usr/lib/libopie.so.7 OLD_LIBS+=usr/lib32/libopie.so.7 Modified: stable/10/contrib/hyperv/tools/hv_kvp_daemon.c ============================================================================== --- head/contrib/hyperv/tools/hv_kvp_daemon.c Sat Sep 13 02:15:31 2014 (r271493) +++ stable/10/contrib/hyperv/tools/hv_kvp_daemon.c Tue Sep 30 17:54:57 2014 (r272322) @@ -284,12 +284,10 @@ kvp_file_init(void) int i; int alloc_unit = sizeof(struct kvp_record) * ENTRIES_PER_BLOCK; - if (access("/var/db/hyperv/pool", F_OK)) { - if (mkdir("/var/db/hyperv/pool", - S_IRUSR | S_IWUSR | S_IROTH)) { - KVP_LOG(LOG_ERR, " Failed to create /var/db/hyperv/pool\n"); - exit(EXIT_FAILURE); - } + if (mkdir("/var/db/hyperv/pool", S_IRUSR | S_IWUSR | S_IROTH) < 0 && + errno != EISDIR) { + KVP_LOG(LOG_ERR, " Failed to create /var/db/hyperv/pool\n"); + exit(EXIT_FAILURE); } for (i = 0; i < HV_KVP_POOL_COUNT; i++) @@ -307,11 +305,13 @@ kvp_file_init(void) filep = fopen(fname, "r"); if (!filep) { + close(fd); return (1); } record = malloc(alloc_unit * num_blocks); if (record == NULL) { + close(fd); fclose(filep); return (1); } @@ -336,6 +336,7 @@ kvp_file_init(void) record = realloc(record, alloc_unit * num_blocks); if (record == NULL) { + close(fd); fclose(filep); return (1); } @@ -600,8 +601,7 @@ kvp_mac_to_if_name(char *mac) struct ifaddrs *head_ifaddrs_ptr; struct sockaddr_dl *sdl; int status; - size_t i; - char *buf_ptr; + char *buf_ptr, *p; status = getifaddrs(&ifaddrs_ptr); @@ -611,18 +611,17 @@ kvp_mac_to_if_name(char *mac) sdl = (struct sockaddr_dl *)(uintptr_t)ifaddrs_ptr->ifa_addr; if (sdl->sdl_type == IFT_ETHER) { buf_ptr = strdup(ether_ntoa((struct ether_addr *)(LLADDR(sdl)))); - for (i = 0; i < strlen(buf_ptr); i++) - { - buf_ptr[i] = toupper(buf_ptr[i]); - } - - if (strncmp(buf_ptr, mac, strlen(mac)) == 0) { - /* Caller will free the memory */ - if_name = strdup(ifaddrs_ptr->ifa_name); - free(buf_ptr); - break; - }else if (buf_ptr != NULL) { - free(buf_ptr); + if (buf_ptr != NULL) { + for (p = buf_ptr; *p != '\0'; p++) + *p = toupper(*p); + + if (strncmp(buf_ptr, mac, strlen(mac)) == 0) { + /* Caller will free the memory */ + if_name = strdup(ifaddrs_ptr->ifa_name); + free(buf_ptr); + break; + } else + free(buf_ptr); } } } while ((ifaddrs_ptr = ifaddrs_ptr->ifa_next) != NULL); @@ -1249,7 +1248,7 @@ kvp_op_enumerate(struct hv_kvp_msg *op_m case IntegrationServicesVersion: strcpy(key_name, "IntegrationServicesVersion"); - strcpy(key_value, lic_version); + strlcpy(key_value, lic_version, HV_KVP_EXCHANGE_MAX_VALUE_SIZE); break; case NetworkAddressIPv4: @@ -1265,32 +1264,32 @@ kvp_op_enumerate(struct hv_kvp_msg *op_m break; case OSBuildNumber: - strcpy(key_value, os_build); + strlcpy(key_value, os_build, HV_KVP_EXCHANGE_MAX_VALUE_SIZE); strcpy(key_name, "OSBuildNumber"); break; case OSName: - strcpy(key_value, os_name); + strlcpy(key_value, os_name, HV_KVP_EXCHANGE_MAX_VALUE_SIZE); strcpy(key_name, "OSName"); break; case OSMajorVersion: - strcpy(key_value, os_major); + strlcpy(key_value, os_major, HV_KVP_EXCHANGE_MAX_VALUE_SIZE); strcpy(key_name, "OSMajorVersion"); break; case OSMinorVersion: - strcpy(key_value, os_minor); + strlcpy(key_value, os_minor, HV_KVP_EXCHANGE_MAX_VALUE_SIZE); strcpy(key_name, "OSMinorVersion"); break; case OSVersion: - strcpy(key_value, os_build); + strlcpy(key_value, os_build, HV_KVP_EXCHANGE_MAX_VALUE_SIZE); strcpy(key_name, "OSVersion"); break; case ProcessorArchitecture: - strcpy(key_value, processor_arch); + strlcpy(key_value, processor_arch, HV_KVP_EXCHANGE_MAX_VALUE_SIZE); strcpy(key_name, "ProcessorArchitecture"); break; Modified: stable/10/etc/devd/Makefile ============================================================================== --- stable/10/etc/devd/Makefile Tue Sep 30 17:41:16 2014 (r272321) +++ stable/10/etc/devd/Makefile Tue Sep 30 17:54:57 2014 (r272322) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + FILES= uath.conf usb.conf .if ${MACHINE} == "powerpc" @@ -10,6 +12,10 @@ FILES+= apple.conf FILES+= asus.conf .endif +.if ${MK_HYPERV} != "no" +FILES+= hyperv.conf +.endif + NO_OBJ= FILESDIR= /etc/devd FILESMODE= 644 Copied and modified: stable/10/etc/devd/hyperv.conf (from r271696, head/etc/devd/hyperv.conf) ============================================================================== --- head/etc/devd/hyperv.conf Wed Sep 17 02:32:22 2014 (r271696, copy source) +++ stable/10/etc/devd/hyperv.conf Tue Sep 30 17:54:57 2014 (r272322) @@ -6,7 +6,7 @@ notify 10 { match "system" "DEVFS"; match "subsystem" "CDEV"; match "type" "CREATE"; - match "cdev" "/dev/hv_kvp_dev"; + match "cdev" "hv_kvp_dev"; action "/usr/sbin/hv_kvp_daemon"; }; @@ -14,6 +14,6 @@ notify 10 { match "system" "DEVFS"; match "subsystem" "CDEV"; match "type" "DESTROY"; - match "cdev" "/dev/hv_kvp_dev"; + match "cdev" "hv_kvp_dev"; action "pkill -x hv_kvp_daemon"; }; Modified: stable/10/etc/mtree/BSD.usr.dist ============================================================================== --- stable/10/etc/mtree/BSD.usr.dist Tue Sep 30 17:41:16 2014 (r272321) +++ stable/10/etc/mtree/BSD.usr.dist Tue Sep 30 17:54:57 2014 (r272322) @@ -108,6 +108,8 @@ .. bsdinstall .. + hyperv + .. lpr ru .. Modified: stable/10/etc/mtree/BSD.var.dist ============================================================================== --- stable/10/etc/mtree/BSD.var.dist Tue Sep 30 17:41:16 2014 (r272321) +++ stable/10/etc/mtree/BSD.var.dist Tue Sep 30 17:54:57 2014 (r272322) @@ -42,6 +42,8 @@ .. freebsd-update mode=0700 .. + hyperv mode=0700 + .. ipf mode=0700 .. pkg Modified: stable/10/libexec/Makefile ============================================================================== --- stable/10/libexec/Makefile Tue Sep 30 17:41:16 2014 (r272321) +++ stable/10/libexec/Makefile Tue Sep 30 17:54:57 2014 (r272322) @@ -10,6 +10,7 @@ SUBDIR= ${_atf} \ fingerd \ ftpd \ getty \ + ${_hyperv} \ ${_mail.local} \ ${_mknetid} \ ${_pppoed} \ @@ -42,6 +43,10 @@ _atrun= atrun _comsat= comsat .endif +.if ${MK_HYPERV} != "no" +_hyperv= hyperv +.endif + .if ${MK_NIS} != "no" _mknetid= mknetid _ypxfr= ypxfr Modified: stable/10/share/mk/bsd.own.mk ============================================================================== --- stable/10/share/mk/bsd.own.mk Tue Sep 30 17:41:16 2014 (r272321) +++ stable/10/share/mk/bsd.own.mk Tue Sep 30 17:54:57 2014 (r272322) @@ -438,6 +438,12 @@ __DEFAULT_YES_OPTIONS+=FDT .else __DEFAULT_NO_OPTIONS+=FDT .endif +# HyperV is only available for x86 and amd64. +.if ${__T} == "amd64" || ${__T} == "i386" +__DEFAULT_YES_OPTIONS+=HYPERV +.else +__DEFAULT_NO_OPTIONS+=HYPERV +.endif .undef __T # Modified: stable/10/sys/conf/files.amd64 ============================================================================== --- stable/10/sys/conf/files.amd64 Tue Sep 30 17:41:16 2014 (r272321) +++ stable/10/sys/conf/files.amd64 Tue Sep 30 17:54:57 2014 (r272322) @@ -254,6 +254,7 @@ dev/hyperv/netvsc/hv_netvsc_drv_freebsd. dev/hyperv/netvsc/hv_rndis_filter.c optional hyperv dev/hyperv/stordisengage/hv_ata_pci_disengage.c optional hyperv dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c optional hyperv +dev/hyperv/utilities/hv_kvp.c optional hyperv dev/hyperv/utilities/hv_util.c optional hyperv dev/hyperv/vmbus/hv_channel.c optional hyperv dev/hyperv/vmbus/hv_channel_mgmt.c optional hyperv Modified: stable/10/sys/conf/files.i386 ============================================================================== --- stable/10/sys/conf/files.i386 Tue Sep 30 17:41:16 2014 (r272321) +++ stable/10/sys/conf/files.i386 Tue Sep 30 17:54:57 2014 (r272322) @@ -227,6 +227,7 @@ dev/hyperv/netvsc/hv_netvsc_drv_freebsd. dev/hyperv/netvsc/hv_rndis_filter.c optional hyperv dev/hyperv/stordisengage/hv_ata_pci_disengage.c optional hyperv dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c optional hyperv +dev/hyperv/utilities/hv_kvp.c optional hyperv dev/hyperv/utilities/hv_util.c optional hyperv dev/hyperv/vmbus/hv_channel.c optional hyperv dev/hyperv/vmbus/hv_channel_mgmt.c optional hyperv Modified: stable/10/sys/dev/hyperv/include/hyperv.h ============================================================================== --- stable/10/sys/dev/hyperv/include/hyperv.h Tue Sep 30 17:41:16 2014 (r272321) +++ stable/10/sys/dev/hyperv/include/hyperv.h Tue Sep 30 17:54:57 2014 (r272322) @@ -795,5 +795,34 @@ hv_get_phys_addr(void *virt) return (ret); } + +/** + * KVP related structures + * + */ +typedef struct hv_vmbus_service { + hv_guid guid; /* Hyper-V GUID */ + char *name; /* name of service */ + boolean_t enabled; /* service enabled */ + hv_work_queue *work_queue; /* background work queue */ + + /* + * function to initialize service + */ + int (*init)(struct hv_vmbus_service *); + + /* + * function to process Hyper-V messages + */ + void (*callback)(void *); +} hv_vmbus_service; + +extern uint8_t* receive_buffer[]; +extern hv_vmbus_service service_table[]; + +void hv_kvp_callback(void *context); +int hv_kvp_init(hv_vmbus_service *serv); +void hv_kvp_deinit(void); + #endif /* __HYPERV_H__ */ Copied: stable/10/sys/dev/hyperv/utilities/hv_kvp.c (from r271493, head/sys/dev/hyperv/utilities/hv_kvp.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/dev/hyperv/utilities/hv_kvp.c Tue Sep 30 17:54:57 2014 (r272322, copy of r271493, head/sys/dev/hyperv/utilities/hv_kvp.c) @@ -0,0 +1,1001 @@ +/*- + * Copyright (c) 2014 Microsoft Corp. + * 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 unmodified, this list of conditions, and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * Author: Sainath Varanasi. + * Date: 4/2012 + * Email: bsdic@microsoft.com + */ + +#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 "unicode.h" +#include "hv_kvp.h" + +/* hv_kvp defines */ +#define BUFFERSIZE sizeof(struct hv_kvp_msg) +#define KVP_SUCCESS 0 +#define KVP_ERROR 1 +#define kvp_hdr hdr.kvp_hdr + +/* hv_kvp debug control */ +static int hv_kvp_log = 0; +SYSCTL_INT(_dev, OID_AUTO, hv_kvp_log, CTLFLAG_RW, &hv_kvp_log, 0, + "hv_kvp log"); + +#define hv_kvp_log_error(...) do { \ + if (hv_kvp_log > 0) \ + log(LOG_ERR, "hv_kvp: " __VA_ARGS__); \ +} while (0) + +#define hv_kvp_log_info(...) do { \ + if (hv_kvp_log > 1) \ + log(LOG_INFO, "hv_kvp: " __VA_ARGS__); \ +} while (0) + +/* character device prototypes */ +static d_open_t hv_kvp_dev_open; +static d_close_t hv_kvp_dev_close; +static d_read_t hv_kvp_dev_daemon_read; +static d_write_t hv_kvp_dev_daemon_write; +static d_poll_t hv_kvp_dev_daemon_poll; + +/* hv_kvp prototypes */ +static int hv_kvp_req_in_progress(void); +static void hv_kvp_transaction_init(uint32_t, hv_vmbus_channel *, uint64_t, uint8_t *); +static void hv_kvp_send_msg_to_daemon(void); +static void hv_kvp_process_request(void *context); + +/* hv_kvp character device structure */ +static struct cdevsw hv_kvp_cdevsw = +{ + .d_version = D_VERSION, + .d_open = hv_kvp_dev_open, + .d_close = hv_kvp_dev_close, + .d_read = hv_kvp_dev_daemon_read, + .d_write = hv_kvp_dev_daemon_write, + .d_poll = hv_kvp_dev_daemon_poll, + .d_name = "hv_kvp_dev", +}; +static struct cdev *hv_kvp_dev; +static struct hv_kvp_msg *hv_kvp_dev_buf; +struct proc *daemon_task; + +/* + * Global state to track and synchronize multiple + * KVP transaction requests from the host. + */ +static struct { + + /* Pre-allocated work item for queue */ + hv_work_item work_item; + + /* Unless specified the pending mutex should be + * used to alter the values of the following paramters: + * 1. req_in_progress + * 2. req_timed_out + * 3. pending_reqs. + */ + struct mtx pending_mutex; + + /* To track if transaction is active or not */ + boolean_t req_in_progress; + /* Tracks if daemon did not reply back in time */ + boolean_t req_timed_out; + /* Tracks if daemon is serving a request currently */ + boolean_t daemon_busy; + /* Count of KVP requests from Hyper-V. */ + uint64_t pending_reqs; + + + /* Length of host message */ + uint32_t host_msg_len; + + /* Pointer to channel */ + hv_vmbus_channel *channelp; + + /* Host message id */ + uint64_t host_msg_id; + + /* Current kvp message from the host */ + struct hv_kvp_msg *host_kvp_msg; + + /* Current kvp message for daemon */ + struct hv_kvp_msg daemon_kvp_msg; + + /* Rcv buffer for communicating with the host*/ + uint8_t *rcv_buf; + + /* Device semaphore to control communication */ + struct sema dev_sema; + + /* Indicates if daemon registered with driver */ + boolean_t register_done; + + /* Character device status */ + boolean_t dev_accessed; +} kvp_globals; + +/* global vars */ +MALLOC_DECLARE(M_HV_KVP_DEV_BUF); +MALLOC_DEFINE(M_HV_KVP_DEV_BUF, "hv_kvp_dev buffer", "buffer for hv_kvp_dev module"); + +/* + * hv_kvp low level functions + */ + +/* + * Check if kvp transaction is in progres + */ +static int +hv_kvp_req_in_progress(void) +{ + + return (kvp_globals.req_in_progress); +} + + +/* + * This routine is called whenever a message is received from the host + */ +static void +hv_kvp_transaction_init(uint32_t rcv_len, hv_vmbus_channel *rcv_channel, + uint64_t request_id, uint8_t *rcv_buf) +{ + + /* Store all the relevant message details in the global structure */ + /* Do not need to use mutex for req_in_progress here */ + kvp_globals.req_in_progress = true; + kvp_globals.host_msg_len = rcv_len; + kvp_globals.channelp = rcv_channel; + kvp_globals.host_msg_id = request_id; + kvp_globals.rcv_buf = rcv_buf; + kvp_globals.host_kvp_msg = (struct hv_kvp_msg *)&rcv_buf[ + sizeof(struct hv_vmbus_pipe_hdr) + + sizeof(struct hv_vmbus_icmsg_hdr)]; +} + + +/* + * hv_kvp - version neogtiation function + */ +static void +hv_kvp_negotiate_version(struct hv_vmbus_icmsg_hdr *icmsghdrp, + struct hv_vmbus_icmsg_negotiate *negop, + uint8_t *buf) +{ + int icframe_vercnt; + int icmsg_vercnt; + + icmsghdrp->icmsgsize = 0x10; + + negop = (struct hv_vmbus_icmsg_negotiate *)&buf[ + sizeof(struct hv_vmbus_pipe_hdr) + + sizeof(struct hv_vmbus_icmsg_hdr)]; + icframe_vercnt = negop->icframe_vercnt; + icmsg_vercnt = negop->icmsg_vercnt; + + /* + * Select the framework version number we will support + */ + if ((icframe_vercnt >= 2) && (negop->icversion_data[1].major == 3)) { + icframe_vercnt = 3; + if (icmsg_vercnt >= 2) + icmsg_vercnt = 4; + else + icmsg_vercnt = 3; + } else { + icframe_vercnt = 1; + icmsg_vercnt = 1; + } + + negop->icframe_vercnt = 1; + negop->icmsg_vercnt = 1; + negop->icversion_data[0].major = icframe_vercnt; + negop->icversion_data[0].minor = 0; + negop->icversion_data[1].major = icmsg_vercnt; + negop->icversion_data[1].minor = 0; +} + + +/* + * Convert ip related info in umsg from utf8 to utf16 and store in hmsg + */ +static int +hv_kvp_convert_utf8_ipinfo_to_utf16(struct hv_kvp_msg *umsg, + struct hv_kvp_ip_msg *host_ip_msg) +{ + int err_ip, err_subnet, err_gway, err_dns, err_adap; + int UNUSED_FLAG = 1; + + utf8_to_utf16((uint16_t *)host_ip_msg->kvp_ip_val.ip_addr, + MAX_IP_ADDR_SIZE, + (char *)umsg->body.kvp_ip_val.ip_addr, + strlen((char *)umsg->body.kvp_ip_val.ip_addr), + UNUSED_FLAG, + &err_ip); + utf8_to_utf16((uint16_t *)host_ip_msg->kvp_ip_val.sub_net, + MAX_IP_ADDR_SIZE, + (char *)umsg->body.kvp_ip_val.sub_net, + strlen((char *)umsg->body.kvp_ip_val.sub_net), + UNUSED_FLAG, + &err_subnet); + utf8_to_utf16((uint16_t *)host_ip_msg->kvp_ip_val.gate_way, + MAX_GATEWAY_SIZE, + (char *)umsg->body.kvp_ip_val.gate_way, + strlen((char *)umsg->body.kvp_ip_val.gate_way), + UNUSED_FLAG, + &err_gway); + utf8_to_utf16((uint16_t *)host_ip_msg->kvp_ip_val.dns_addr, + MAX_IP_ADDR_SIZE, + (char *)umsg->body.kvp_ip_val.dns_addr, + strlen((char *)umsg->body.kvp_ip_val.dns_addr), + UNUSED_FLAG, + &err_dns); + utf8_to_utf16((uint16_t *)host_ip_msg->kvp_ip_val.adapter_id, + MAX_IP_ADDR_SIZE, + (char *)umsg->body.kvp_ip_val.adapter_id, + strlen((char *)umsg->body.kvp_ip_val.adapter_id), + UNUSED_FLAG, + &err_adap); + + host_ip_msg->kvp_ip_val.dhcp_enabled = umsg->body.kvp_ip_val.dhcp_enabled; + host_ip_msg->kvp_ip_val.addr_family = umsg->body.kvp_ip_val.addr_family; + + return (err_ip | err_subnet | err_gway | err_dns | err_adap); +} + + +/* + * Convert ip related info in hmsg from utf16 to utf8 and store in umsg + */ +static int +hv_kvp_convert_utf16_ipinfo_to_utf8(struct hv_kvp_ip_msg *host_ip_msg, + struct hv_kvp_msg *umsg) +{ + int err_ip, err_subnet, err_gway, err_dns, err_adap; + int UNUSED_FLAG = 1; + int guid_index; + struct hv_device *hv_dev; /* GUID Data Structure */ + hn_softc_t *sc; /* hn softc structure */ + char if_name[4]; + unsigned char guid_instance[40]; + char *guid_data = NULL; + char buf[39]; + + struct guid_extract { + char a1[2]; + char a2[2]; + char a3[2]; + char a4[2]; + char b1[2]; + char b2[2]; + char c1[2]; + char c2[2]; + char d[4]; + char e[12]; + }; + + struct guid_extract *id; + device_t *devs; + int devcnt; + + /* IP Address */ + utf16_to_utf8((char *)umsg->body.kvp_ip_val.ip_addr, + MAX_IP_ADDR_SIZE, + (uint16_t *)host_ip_msg->kvp_ip_val.ip_addr, + MAX_IP_ADDR_SIZE, + UNUSED_FLAG, + &err_ip); + + /* Adapter ID : GUID */ + utf16_to_utf8((char *)umsg->body.kvp_ip_val.adapter_id, + MAX_ADAPTER_ID_SIZE, + (uint16_t *)host_ip_msg->kvp_ip_val.adapter_id, + MAX_ADAPTER_ID_SIZE, + UNUSED_FLAG, + &err_adap); + + if (devclass_get_devices(devclass_find("hn"), &devs, &devcnt) == 0) { + for (devcnt = devcnt - 1; devcnt >= 0; devcnt--) { + sc = device_get_softc(devs[devcnt]); + + /* Trying to find GUID of Network Device */ + hv_dev = sc->hn_dev_obj; + + for (guid_index = 0; guid_index < 16; guid_index++) { + sprintf(&guid_instance[guid_index * 2], "%02x", + hv_dev->device_id.data[guid_index]); + } + + guid_data = (char *)guid_instance; + id = (struct guid_extract *)guid_data; + snprintf(buf, sizeof(buf), "{%.2s%.2s%.2s%.2s-%.2s%.2s-%.2s%.2s-%.4s-%s}", + id->a4, id->a3, id->a2, id->a1, + id->b2, id->b1, id->c2, id->c1, id->d, id->e); + guid_data = NULL; + sprintf(if_name, "%s%d", "hn", device_get_unit(devs[devcnt])); + + if (strncmp(buf, (char *)umsg->body.kvp_ip_val.adapter_id, 39) == 0) { + strcpy((char *)umsg->body.kvp_ip_val.adapter_id, if_name); + break; + } + } + free(devs, M_TEMP); + } + + /* Address Family , DHCP , SUBNET, Gateway, DNS */ + umsg->kvp_hdr.operation = host_ip_msg->operation; + umsg->body.kvp_ip_val.addr_family = host_ip_msg->kvp_ip_val.addr_family; + umsg->body.kvp_ip_val.dhcp_enabled = host_ip_msg->kvp_ip_val.dhcp_enabled; + utf16_to_utf8((char *)umsg->body.kvp_ip_val.sub_net, MAX_IP_ADDR_SIZE, + (uint16_t *)host_ip_msg->kvp_ip_val.sub_net, + MAX_IP_ADDR_SIZE, + UNUSED_FLAG, + &err_subnet); + + utf16_to_utf8((char *)umsg->body.kvp_ip_val.gate_way, MAX_GATEWAY_SIZE, + (uint16_t *)host_ip_msg->kvp_ip_val.gate_way, + MAX_GATEWAY_SIZE, + UNUSED_FLAG, + &err_gway); + + utf16_to_utf8((char *)umsg->body.kvp_ip_val.dns_addr, MAX_IP_ADDR_SIZE, + (uint16_t *)host_ip_msg->kvp_ip_val.dns_addr, + MAX_IP_ADDR_SIZE, + UNUSED_FLAG, + &err_dns); + + return (err_ip | err_subnet | err_gway | err_dns | err_adap); +} + + +/* + * Prepare a user kvp msg based on host kvp msg (utf16 to utf8) + * Ensure utf16_utf8 takes care of the additional string terminating char!! + */ +static void +hv_kvp_convert_hostmsg_to_usermsg(void) +{ + int utf_err = 0; + uint32_t value_type; + struct hv_kvp_ip_msg *host_ip_msg = (struct hv_kvp_ip_msg *) + kvp_globals.host_kvp_msg; + + struct hv_kvp_msg *hmsg = kvp_globals.host_kvp_msg; + struct hv_kvp_msg *umsg = &kvp_globals.daemon_kvp_msg; + + memset(umsg, 0, sizeof(struct hv_kvp_msg)); + + umsg->kvp_hdr.operation = hmsg->kvp_hdr.operation; + umsg->kvp_hdr.pool = hmsg->kvp_hdr.pool; + + switch (umsg->kvp_hdr.operation) { + case HV_KVP_OP_SET_IP_INFO: + hv_kvp_convert_utf16_ipinfo_to_utf8(host_ip_msg, umsg); + break; + + case HV_KVP_OP_GET_IP_INFO: + utf16_to_utf8((char *)umsg->body.kvp_ip_val.adapter_id, + MAX_ADAPTER_ID_SIZE, + (uint16_t *)host_ip_msg->kvp_ip_val.adapter_id, + MAX_ADAPTER_ID_SIZE, 1, &utf_err); + + umsg->body.kvp_ip_val.addr_family = + host_ip_msg->kvp_ip_val.addr_family; + break; + + case HV_KVP_OP_SET: + value_type = hmsg->body.kvp_set.data.value_type; + + switch (value_type) { + case HV_REG_SZ: + umsg->body.kvp_set.data.value_size = + utf16_to_utf8( + (char *)umsg->body.kvp_set.data.msg_value.value, + HV_KVP_EXCHANGE_MAX_VALUE_SIZE - 1, + (uint16_t *)hmsg->body.kvp_set.data.msg_value.value, + hmsg->body.kvp_set.data.value_size, + 1, &utf_err); + /* utf8 encoding */ + umsg->body.kvp_set.data.value_size = + umsg->body.kvp_set.data.value_size / 2; + break; + + case HV_REG_U32: + umsg->body.kvp_set.data.value_size = + sprintf(umsg->body.kvp_set.data.msg_value.value, "%d", + hmsg->body.kvp_set.data.msg_value.value_u32) + 1; + break; + + case HV_REG_U64: + umsg->body.kvp_set.data.value_size = + sprintf(umsg->body.kvp_set.data.msg_value.value, "%llu", + (unsigned long long) + hmsg->body.kvp_set.data.msg_value.value_u64) + 1; + break; + } + + umsg->body.kvp_set.data.key_size = + utf16_to_utf8( + umsg->body.kvp_set.data.key, + HV_KVP_EXCHANGE_MAX_KEY_SIZE - 1, + (uint16_t *)hmsg->body.kvp_set.data.key, + hmsg->body.kvp_set.data.key_size, + 1, &utf_err); + + /* utf8 encoding */ + umsg->body.kvp_set.data.key_size = + umsg->body.kvp_set.data.key_size / 2; + break; + + case HV_KVP_OP_GET: + umsg->body.kvp_get.data.key_size = + utf16_to_utf8(umsg->body.kvp_get.data.key, + HV_KVP_EXCHANGE_MAX_KEY_SIZE - 1, + (uint16_t *)hmsg->body.kvp_get.data.key, + hmsg->body.kvp_get.data.key_size, + 1, &utf_err); + /* utf8 encoding */ + umsg->body.kvp_get.data.key_size = + umsg->body.kvp_get.data.key_size / 2; + break; + + case HV_KVP_OP_DELETE: + umsg->body.kvp_delete.key_size = + utf16_to_utf8(umsg->body.kvp_delete.key, + HV_KVP_EXCHANGE_MAX_KEY_SIZE - 1, + (uint16_t *)hmsg->body.kvp_delete.key, + hmsg->body.kvp_delete.key_size, + 1, &utf_err); + /* utf8 encoding */ + umsg->body.kvp_delete.key_size = + umsg->body.kvp_delete.key_size / 2; + break; + + case HV_KVP_OP_ENUMERATE: + umsg->body.kvp_enum_data.index = + hmsg->body.kvp_enum_data.index; + break; + + default: + hv_kvp_log_info("%s: daemon_kvp_msg: Invalid operation : %d\n", + __func__, umsg->kvp_hdr.operation); + } +} + + +/* + * Prepare a host kvp msg based on user kvp msg (utf8 to utf16) + */ +static int +hv_kvp_convert_usermsg_to_hostmsg(void) +{ + int hkey_len = 0, hvalue_len = 0, utf_err = 0; + struct hv_kvp_exchg_msg_value *host_exchg_data; + char *key_name, *value; + + struct hv_kvp_msg *umsg = &kvp_globals.daemon_kvp_msg; + struct hv_kvp_msg *hmsg = kvp_globals.host_kvp_msg; + struct hv_kvp_ip_msg *host_ip_msg = (struct hv_kvp_ip_msg *)hmsg; + + switch (hmsg->kvp_hdr.operation) { + case HV_KVP_OP_GET_IP_INFO: + return (hv_kvp_convert_utf8_ipinfo_to_utf16(umsg, host_ip_msg)); + + case HV_KVP_OP_SET_IP_INFO: + case HV_KVP_OP_SET: + case HV_KVP_OP_DELETE: + return (KVP_SUCCESS); + + case HV_KVP_OP_ENUMERATE: + host_exchg_data = &hmsg->body.kvp_enum_data.data; + key_name = umsg->body.kvp_enum_data.data.key; + hkey_len = utf8_to_utf16((uint16_t *)host_exchg_data->key, + ((HV_KVP_EXCHANGE_MAX_KEY_SIZE / 2) - 2), + key_name, strlen(key_name), + 1, &utf_err); + /* utf16 encoding */ + host_exchg_data->key_size = 2 * (hkey_len + 1); + value = umsg->body.kvp_enum_data.data.msg_value.value; + hvalue_len = utf8_to_utf16( + (uint16_t *)host_exchg_data->msg_value.value, + ((HV_KVP_EXCHANGE_MAX_VALUE_SIZE / 2) - 2), + value, strlen(value), + 1, &utf_err); + host_exchg_data->value_size = 2 * (hvalue_len + 1); + host_exchg_data->value_type = HV_REG_SZ; + + if ((hkey_len < 0) || (hvalue_len < 0)) + return (HV_KVP_E_FAIL); + + return (KVP_SUCCESS); + + case HV_KVP_OP_GET: + host_exchg_data = &hmsg->body.kvp_get.data; + value = umsg->body.kvp_get.data.msg_value.value; + hvalue_len = utf8_to_utf16( + (uint16_t *)host_exchg_data->msg_value.value, + ((HV_KVP_EXCHANGE_MAX_VALUE_SIZE / 2) - 2), + value, strlen(value), + 1, &utf_err); + /* Convert value size to uft16 */ + host_exchg_data->value_size = 2 * (hvalue_len + 1); + /* Use values by string */ + host_exchg_data->value_type = HV_REG_SZ; + + if ((hkey_len < 0) || (hvalue_len < 0)) + return (HV_KVP_E_FAIL); + + return (KVP_SUCCESS); + + default: + return (HV_KVP_E_FAIL); + } +} + + +/* + * Send the response back to the host. + */ +static void +hv_kvp_respond_host(int error) +{ + struct hv_vmbus_icmsg_hdr *hv_icmsg_hdrp; + + hv_icmsg_hdrp = (struct hv_vmbus_icmsg_hdr *) + &kvp_globals.rcv_buf[sizeof(struct hv_vmbus_pipe_hdr)]; + + if (error) + error = HV_KVP_E_FAIL; + + hv_icmsg_hdrp->status = error; + hv_icmsg_hdrp->icflags = HV_ICMSGHDRFLAG_TRANSACTION | HV_ICMSGHDRFLAG_RESPONSE; + + error = hv_vmbus_channel_send_packet(kvp_globals.channelp, + kvp_globals.rcv_buf, + kvp_globals.host_msg_len, kvp_globals.host_msg_id, + HV_VMBUS_PACKET_TYPE_DATA_IN_BAND, 0); + + if (error) + hv_kvp_log_info("%s: hv_kvp_respond_host: sendpacket error:%d\n", + __func__, error); +} + + +/* + * This is the main kvp kernel process that interacts with both user daemon + * and the host + */ +static void +hv_kvp_send_msg_to_daemon(void) +{ + /* Prepare kvp_msg to be sent to user */ + hv_kvp_convert_hostmsg_to_usermsg(); + + /* Send the msg to user via function deamon_read - setting sema */ + sema_post(&kvp_globals.dev_sema); +} + + +/* + * Function to read the kvp request buffer from host + * and interact with daemon + */ +static void +hv_kvp_process_request(void *context) +{ + uint8_t *kvp_buf; + hv_vmbus_channel *channel = context; + uint32_t recvlen = 0; + uint64_t requestid; + struct hv_vmbus_icmsg_hdr *icmsghdrp; + int ret = 0; + uint64_t pending_cnt = 1; + + hv_kvp_log_info("%s: entering hv_kvp_process_request\n", __func__); + kvp_buf = receive_buffer[HV_KVP]; + ret = hv_vmbus_channel_recv_packet(channel, kvp_buf, 2 * PAGE_SIZE, + &recvlen, &requestid); + + /* + * We start counting only after the daemon registers + * and therefore there could be requests pending in + * the VMBus that are not reflected in pending_cnt. + * Therefore we continue reading as long as either of + * the below conditions is true. + */ + + while ((pending_cnt>0) || ((ret == 0) && (recvlen > 0))) { + + if ((ret == 0) && (recvlen>0)) { + + icmsghdrp = (struct hv_vmbus_icmsg_hdr *) + &kvp_buf[sizeof(struct hv_vmbus_pipe_hdr)]; + + hv_kvp_transaction_init(recvlen, channel, requestid, kvp_buf); + if (icmsghdrp->icmsgtype == HV_ICMSGTYPE_NEGOTIATE) { + hv_kvp_negotiate_version(icmsghdrp, NULL, kvp_buf); + hv_kvp_respond_host(ret); + + /* + * It is ok to not acquire the mutex before setting + * req_in_progress here because negotiation is the + * first thing that happens and hence there is no + * chance of a race condition. + */ + + kvp_globals.req_in_progress = false; + hv_kvp_log_info("%s :version negotiated\n", __func__); + + } else { + if (!kvp_globals.daemon_busy) { + + hv_kvp_log_info("%s: issuing qury to daemon\n", __func__); + mtx_lock(&kvp_globals.pending_mutex); + kvp_globals.req_timed_out = false; + kvp_globals.daemon_busy = true; + mtx_unlock(&kvp_globals.pending_mutex); + + hv_kvp_send_msg_to_daemon(); + hv_kvp_log_info("%s: waiting for daemon\n", __func__); + } + + /* Wait 5 seconds for daemon to respond back */ + tsleep(&kvp_globals, 0, "kvpworkitem", 5 * hz); + hv_kvp_log_info("%s: came out of wait\n", __func__); + } + } + + mtx_lock(&kvp_globals.pending_mutex); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Sep 30 18:17:29 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D59561F7; Tue, 30 Sep 2014 18:17:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C209F385; Tue, 30 Sep 2014 18:17:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8UIHTgR036421; Tue, 30 Sep 2014 18:17:29 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8UIHTAf036419; Tue, 30 Sep 2014 18:17:29 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201409301817.s8UIHTAf036419@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Tue, 30 Sep 2014 18:17:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272323 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2014 18:17:29 -0000 Author: tuexen Date: Tue Sep 30 18:17:28 2014 New Revision: 272323 URL: http://svnweb.freebsd.org/changeset/base/272323 Log: If the checksum coverage field in the UDPLITE header is the length of the complete UDPLITE packet, the packet has full checksum coverage. SO fix the condition. Reviewed by: kevlo MFC after: 3 days Modified: head/sys/netinet/udp_usrreq.c head/sys/netinet6/udp6_usrreq.c Modified: head/sys/netinet/udp_usrreq.c ============================================================================== --- head/sys/netinet/udp_usrreq.c Tue Sep 30 17:54:57 2014 (r272322) +++ head/sys/netinet/udp_usrreq.c Tue Sep 30 18:17:28 2014 (r272323) @@ -444,9 +444,10 @@ udp_input(struct mbuf **mp, int *offp, i */ len = ntohs((u_short)uh->uh_ulen); ip_len = ntohs(ip->ip_len) - iphlen; - if (proto == IPPROTO_UDPLITE && len == 0) { + if (proto == IPPROTO_UDPLITE && (len == 0 || len == ip_len)) { /* Zero means checksum over the complete packet. */ - len = ip_len; + if (len == 0) + len = ip_len; cscov_partial = 0; } if (ip_len != len) { Modified: head/sys/netinet6/udp6_usrreq.c ============================================================================== --- head/sys/netinet6/udp6_usrreq.c Tue Sep 30 17:54:57 2014 (r272322) +++ head/sys/netinet6/udp6_usrreq.c Tue Sep 30 18:17:28 2014 (r272323) @@ -227,9 +227,10 @@ udp6_input(struct mbuf **mp, int *offp, nxt = ip6->ip6_nxt; cscov_partial = (nxt == IPPROTO_UDPLITE) ? 1 : 0; - if (nxt == IPPROTO_UDPLITE && ulen == 0) { + if (nxt == IPPROTO_UDPLITE && (ulen == 0 || ulen == plen)) { /* Zero means checksum over the complete packet. */ - ulen = plen; + if (ulen == 0) + ulen = plen; cscov_partial = 0; } if (nxt == IPPROTO_UDP && plen != ulen) { From owner-svn-src-all@FreeBSD.ORG Tue Sep 30 18:50:46 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 736D1D1C; Tue, 30 Sep 2014 18:50:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5F6429B0; Tue, 30 Sep 2014 18:50:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8UIokk4051152; Tue, 30 Sep 2014 18:50:46 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8UIokXo051151; Tue, 30 Sep 2014 18:50:46 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201409301850.s8UIokXo051151@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 30 Sep 2014 18:50:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272324 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2014 18:50:46 -0000 Author: delphij Date: Tue Sep 30 18:50:45 2014 New Revision: 272324 URL: http://svnweb.freebsd.org/changeset/base/272324 Log: Fix a mismerge in r260183 which prevents snapshot zvol devices being removed and re-instate the fix in r242862. Reported by: Leon Dang , smh MFC after: 3 days Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Tue Sep 30 18:17:28 2014 (r272323) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Tue Sep 30 18:50:45 2014 (r272324) @@ -3550,7 +3550,12 @@ zfs_ioc_destroy_snaps(const char *poolna for (pair = nvlist_next_nvpair(snaps, NULL); pair != NULL; pair = nvlist_next_nvpair(snaps, pair)) { - (void) zfs_unmount_snap(nvpair_name(pair)); + const char *name = nvpair_name(pair); + + (void) zfs_unmount_snap(name); +#if defined(__FreeBSD__) + (void) zvol_remove_minor(name); +#endif } return (dsl_destroy_snapshots_nvl(snaps, defer, outnvl)); @@ -3644,7 +3649,6 @@ zfs_ioc_destroy_bookmarks(const char *po if (strncmp(name, poolname, poollen) != 0 || (name[poollen] != '/' && name[poollen] != '#')) return (SET_ERROR(EXDEV)); - (void) zvol_remove_minor(name); } error = dsl_bookmark_destroy(innvl, outnvl); From owner-svn-src-all@FreeBSD.ORG Tue Sep 30 20:18:13 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 57A2BE99; Tue, 30 Sep 2014 20:18:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 43679785; Tue, 30 Sep 2014 20:18:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8UKIDMR093734; Tue, 30 Sep 2014 20:18:13 GMT (envelope-from gnn@FreeBSD.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8UKIA8W093720; Tue, 30 Sep 2014 20:18:10 GMT (envelope-from gnn@FreeBSD.org) Message-Id: <201409302018.s8UKIA8W093720@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gnn set sender to gnn@FreeBSD.org using -f From: "George V. Neville-Neil" Date: Tue, 30 Sep 2014 20:18:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272325 - in head/sys/dev/sfxge: . common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2014 20:18:13 -0000 Author: gnn Date: Tue Sep 30 20:18:10 2014 New Revision: 272325 URL: http://svnweb.freebsd.org/changeset/base/272325 Log: cleanup: code style fixes Remove trailing whitespaces and tabs. Enclose value in return statements in parentheses. Use tabs after #define. Do not skip comparison with 0/NULL in boolean expressions. Submitted by: Andrew Rybchenko Sponsored by: Solarflare Communications, Inc. Modified: head/sys/dev/sfxge/common/efsys.h head/sys/dev/sfxge/sfxge.c head/sys/dev/sfxge/sfxge.h head/sys/dev/sfxge/sfxge_dma.c head/sys/dev/sfxge/sfxge_ev.c head/sys/dev/sfxge/sfxge_intr.c head/sys/dev/sfxge/sfxge_port.c head/sys/dev/sfxge/sfxge_rx.c head/sys/dev/sfxge/sfxge_rx.h head/sys/dev/sfxge/sfxge_tx.c head/sys/dev/sfxge/sfxge_tx.h Modified: head/sys/dev/sfxge/common/efsys.h ============================================================================== --- head/sys/dev/sfxge/common/efsys.h Tue Sep 30 18:50:45 2014 (r272324) +++ head/sys/dev/sfxge/common/efsys.h Tue Sep 30 20:18:10 2014 (r272325) @@ -53,44 +53,44 @@ extern "C" { #define EFSYS_HAS_UINT64 1 #define EFSYS_USE_UINT64 0 #if _BYTE_ORDER == _BIG_ENDIAN -#define EFSYS_IS_BIG_ENDIAN 1 -#define EFSYS_IS_LITTLE_ENDIAN 0 +#define EFSYS_IS_BIG_ENDIAN 1 +#define EFSYS_IS_LITTLE_ENDIAN 0 #elif _BYTE_ORDER == _LITTLE_ENDIAN -#define EFSYS_IS_BIG_ENDIAN 0 -#define EFSYS_IS_LITTLE_ENDIAN 1 +#define EFSYS_IS_BIG_ENDIAN 0 +#define EFSYS_IS_LITTLE_ENDIAN 1 #endif #include "efx_types.h" /* Common code requires this */ #if __FreeBSD_version < 800068 -#define memmove(d, s, l) bcopy(s, d, l) +#define memmove(d, s, l) bcopy(s, d, l) #endif - + /* FreeBSD equivalents of Solaris things */ #ifndef _NOTE -#define _NOTE(s) +#define _NOTE(s) #endif #ifndef B_FALSE -#define B_FALSE FALSE +#define B_FALSE FALSE #endif #ifndef B_TRUE -#define B_TRUE TRUE +#define B_TRUE TRUE #endif #ifndef IS_P2ALIGNED -#define IS_P2ALIGNED(v, a) ((((uintptr_t)(v)) & ((uintptr_t)(a) - 1)) == 0) +#define IS_P2ALIGNED(v, a) ((((uintptr_t)(v)) & ((uintptr_t)(a) - 1)) == 0) #endif #ifndef P2ROUNDUP -#define P2ROUNDUP(x, align) (-(-(x) & -(align))) +#define P2ROUNDUP(x, align) (-(-(x) & -(align))) #endif #ifndef IS2P -#define ISP2(x) (((x) & ((x) - 1)) == 0) +#define ISP2(x) (((x) & ((x) - 1)) == 0) #endif -#define ENOTACTIVE EINVAL +#define ENOTACTIVE EINVAL /* Memory type to use on FreeBSD */ MALLOC_DECLARE(M_SFXGE); @@ -242,7 +242,7 @@ sfxge_map_mbuf_fast(bus_dma_tag_t tag, b #define EFSYS_OPT_PHY_PROPS 0 #define EFSYS_OPT_PHY_BIST 1 #define EFSYS_OPT_PHY_LED_CONTROL 1 -#define EFSYS_OPT_PHY_FLAGS 0 +#define EFSYS_OPT_PHY_FLAGS 0 #define EFSYS_OPT_VPD 1 #define EFSYS_OPT_NVRAM 1 @@ -256,8 +256,8 @@ sfxge_map_mbuf_fast(bus_dma_tag_t tag, b #define EFSYS_OPT_WOL 1 #define EFSYS_OPT_RX_SCALE 1 #define EFSYS_OPT_QSTATS 1 -#define EFSYS_OPT_FILTER 0 -#define EFSYS_OPT_RX_SCATTER 0 +#define EFSYS_OPT_FILTER 0 +#define EFSYS_OPT_RX_SCATTER 0 #define EFSYS_OPT_RX_HDR_SPLIT 0 #define EFSYS_OPT_EV_PREFETCH 0 @@ -272,7 +272,7 @@ typedef struct __efsys_identifier_s efsy #ifndef DTRACE_PROBE -#define EFSYS_PROBE(_name) +#define EFSYS_PROBE(_name) #define EFSYS_PROBE1(_name, _type1, _arg1) @@ -815,16 +815,16 @@ extern void sfxge_err(efsys_identifier_t panic(#_exp); \ } while (0) -#define EFSYS_ASSERT3(_x, _op, _y, _t) do { \ +#define EFSYS_ASSERT3(_x, _op, _y, _t) do { \ const _t __x = (_t)(_x); \ const _t __y = (_t)(_y); \ if (!(__x _op __y)) \ - panic("assertion failed at %s:%u", __FILE__, __LINE__); \ + panic("assertion failed at %s:%u", __FILE__, __LINE__); \ } while(0) -#define EFSYS_ASSERT3U(_x, _op, _y) EFSYS_ASSERT3(_x, _op, _y, uint64_t) -#define EFSYS_ASSERT3S(_x, _op, _y) EFSYS_ASSERT3(_x, _op, _y, int64_t) -#define EFSYS_ASSERT3P(_x, _op, _y) EFSYS_ASSERT3(_x, _op, _y, uintptr_t) +#define EFSYS_ASSERT3U(_x, _op, _y) EFSYS_ASSERT3(_x, _op, _y, uint64_t) +#define EFSYS_ASSERT3S(_x, _op, _y) EFSYS_ASSERT3(_x, _op, _y, int64_t) +#define EFSYS_ASSERT3P(_x, _op, _y) EFSYS_ASSERT3(_x, _op, _y, uintptr_t) #ifdef __cplusplus } Modified: head/sys/dev/sfxge/sfxge.c ============================================================================== --- head/sys/dev/sfxge/sfxge.c Tue Sep 30 18:50:45 2014 (r272324) +++ head/sys/dev/sfxge/sfxge.c Tue Sep 30 20:18:10 2014 (r272325) @@ -57,12 +57,12 @@ __FBSDID("$FreeBSD$"); #include "sfxge.h" #include "sfxge_rx.h" -#define SFXGE_CAP (IFCAP_VLAN_MTU | \ +#define SFXGE_CAP (IFCAP_VLAN_MTU | \ IFCAP_HWCSUM | IFCAP_VLAN_HWCSUM | IFCAP_TSO | \ IFCAP_JUMBO_MTU | IFCAP_LRO | \ IFCAP_VLAN_HWTSO | IFCAP_LINKSTATE) -#define SFXGE_CAP_ENABLE SFXGE_CAP -#define SFXGE_CAP_FIXED (IFCAP_VLAN_MTU | IFCAP_HWCSUM | IFCAP_VLAN_HWCSUM | \ +#define SFXGE_CAP_ENABLE SFXGE_CAP +#define SFXGE_CAP_FIXED (IFCAP_VLAN_MTU | IFCAP_HWCSUM | IFCAP_VLAN_HWCSUM | \ IFCAP_JUMBO_MTU | IFCAP_LINKSTATE) MALLOC_DEFINE(M_SFXGE, "sfxge", "Solarflare 10GigE driver"); @@ -78,7 +78,7 @@ sfxge_start(struct sfxge_softc *sc) sx_assert(&sc->softc_lock, LA_XLOCKED); if (sc->init_state == SFXGE_STARTED) - return 0; + return (0); if (sc->init_state != SFXGE_REGISTERED) { rc = EINVAL; @@ -223,7 +223,7 @@ sfxge_if_ioctl(struct ifnet *ifp, unsign ifp->if_mtu = ifr->ifr_mtu; error = sfxge_start(sc); sx_xunlock(&sc->softc_lock); - if (error) { + if (error != 0) { ifp->if_flags &= ~IFF_UP; ifp->if_drv_flags &= ~IFF_DRV_RUNNING; if_down(ifp); @@ -287,7 +287,7 @@ sfxge_ifnet_fini(struct ifnet *ifp) if_free(ifp); } -static int +static int sfxge_ifnet_init(struct ifnet *ifp, struct sfxge_softc *sc) { const efx_nic_cfg_t *encp = efx_nic_cfg_get(sc->enp); @@ -324,11 +324,11 @@ sfxge_ifnet_init(struct ifnet *ifp, stru if ((rc = sfxge_port_ifmedia_init(sc)) != 0) goto fail; - return 0; + return (0); fail: ether_ifdetach(sc->ifnet); - return rc; + return (rc); } void @@ -347,7 +347,7 @@ sfxge_bar_init(struct sfxge_softc *sc) { efsys_bar_t *esbp = &sc->bar; - esbp->esb_rid = PCIR_BAR(EFX_MEM_BAR); + esbp->esb_rid = PCIR_BAR(EFX_MEM_BAR); if ((esbp->esb_res = bus_alloc_resource_any(sc->dev, SYS_RES_MEMORY, &esbp->esb_rid, RF_ACTIVE)) == NULL) { device_printf(sc->dev, "Cannot allocate BAR region %d\n", @@ -386,7 +386,7 @@ sfxge_create(struct sfxge_softc *sc) device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "stats", CTLFLAG_RD, NULL, "Statistics"); - if (!sc->stats_node) { + if (sc->stats_node == NULL) { error = ENOMEM; goto fail; } @@ -554,14 +554,14 @@ sfxge_vpd_handler(SYSCTL_HANDLER_ARGS) struct sfxge_softc *sc = arg1; efx_vpd_value_t value; int rc; - + value.evv_tag = arg2 >> 16; value.evv_keyword = arg2 & 0xffff; if ((rc = efx_vpd_get(sc->enp, sc->vpd_data, sc->vpd_size, &value)) != 0) - return rc; + return (rc); - return SYSCTL_OUT(req, value.evv_value, value.evv_length); + return (SYSCTL_OUT(req, value.evv_value, value.evv_length)); } static void @@ -623,12 +623,12 @@ sfxge_vpd_init(struct sfxge_softc *sc) for (keyword[1] = 'A'; keyword[1] <= 'Z'; keyword[1]++) sfxge_vpd_try_add(sc, vpd_list, EFX_VPD_RO, keyword); - return 0; - + return (0); + fail2: free(sc->vpd_data, M_SFXGE); fail: - return rc; + return (rc); } static void @@ -745,12 +745,12 @@ sfxge_probe(device_t dev) pci_device_id = pci_get_device(dev); rc = efx_family(pci_vendor_id, pci_device_id, &family); - if (rc) - return ENXIO; + if (rc != 0) + return (ENXIO); KASSERT(family == EFX_FAMILY_SIENA, ("impossible controller family")); device_set_desc(dev, "Solarflare SFC9000 family"); - return 0; + return (0); } static device_method_t sfxge_methods[] = { Modified: head/sys/dev/sfxge/sfxge.h ============================================================================== --- head/sys/dev/sfxge/sfxge.h Tue Sep 30 18:50:45 2014 (r272324) +++ head/sys/dev/sfxge/sfxge.h Tue Sep 30 20:18:10 2014 (r272325) @@ -30,7 +30,7 @@ */ #ifndef _SFXGE_H -#define _SFXGE_H +#define _SFXGE_H #include #include @@ -53,43 +53,43 @@ /* This should be right on most machines the driver will be used on, and * we needn't care too much about wasting a few KB per interface. */ -#define CACHE_LINE_SIZE 128 +#define CACHE_LINE_SIZE 128 #endif #ifndef IFCAP_LINKSTATE -#define IFCAP_LINKSTATE 0 +#define IFCAP_LINKSTATE 0 #endif #ifndef IFCAP_VLAN_HWTSO -#define IFCAP_VLAN_HWTSO 0 +#define IFCAP_VLAN_HWTSO 0 #endif #ifndef IFM_10G_T -#define IFM_10G_T IFM_UNKNOWN +#define IFM_10G_T IFM_UNKNOWN #endif #ifndef IFM_10G_KX4 -#define IFM_10G_KX4 IFM_10G_CX4 +#define IFM_10G_KX4 IFM_10G_CX4 #endif #if __FreeBSD_version >= 800054 /* Networking core is multiqueue aware. We can manage our own TX * queues and use m_pkthdr.flowid. */ -#define SFXGE_HAVE_MQ +#define SFXGE_HAVE_MQ #endif #if (__FreeBSD_version >= 800501 && __FreeBSD_version < 900000) || \ __FreeBSD_version >= 900003 -#define SFXGE_HAVE_DESCRIBE_INTR +#define SFXGE_HAVE_DESCRIBE_INTR #endif #ifdef IFM_ETH_RXPAUSE -#define SFXGE_HAVE_PAUSE_MEDIAOPTS +#define SFXGE_HAVE_PAUSE_MEDIAOPTS #endif #ifndef CTLTYPE_U64 -#define CTLTYPE_U64 CTLTYPE_QUAD +#define CTLTYPE_U64 CTLTYPE_QUAD #endif #include "sfxge_rx.h" #include "sfxge_tx.h" -#define SFXGE_IP_ALIGN 2 +#define SFXGE_IP_ALIGN 2 -#define SFXGE_ETHERTYPE_LOOPBACK 0x9000 /* Xerox loopback */ +#define SFXGE_ETHERTYPE_LOOPBACK 0x9000 /* Xerox loopback */ enum sfxge_evq_state { SFXGE_EVQ_UNINITIALIZED = 0, @@ -133,9 +133,9 @@ enum sfxge_intr_state { }; struct sfxge_intr_hdl { - int eih_rid; - void *eih_tag; - struct resource *eih_res; + int eih_rid; + void *eih_tag; + struct resource *eih_res; }; struct sfxge_intr { @@ -197,7 +197,7 @@ struct sfxge_softc { device_t dev; struct sx softc_lock; enum sfxge_softc_state init_state; - struct ifnet *ifnet; + struct ifnet *ifnet; unsigned int if_flags; struct sysctl_oid *stats_node; @@ -209,7 +209,7 @@ struct sfxge_softc { efx_nic_t *enp; struct mtx enp_lock; - bus_dma_tag_t parent_dma_tag; + bus_dma_tag_t parent_dma_tag; efsys_bar_t bar; struct sfxge_intr intr; @@ -243,8 +243,8 @@ struct sfxge_softc { #endif }; -#define SFXGE_LINK_UP(sc) ((sc)->port.link_mode != EFX_LINK_DOWN) -#define SFXGE_RUNNING(sc) ((sc)->ifnet->if_drv_flags & IFF_DRV_RUNNING) +#define SFXGE_LINK_UP(sc) ((sc)->port.link_mode != EFX_LINK_DOWN) +#define SFXGE_RUNNING(sc) ((sc)->ifnet->if_drv_flags & IFF_DRV_RUNNING) /* * From sfxge.c. @@ -299,6 +299,6 @@ extern void sfxge_mac_link_update(struct extern int sfxge_mac_filter_set(struct sfxge_softc *sc); extern int sfxge_port_ifmedia_init(struct sfxge_softc *sc); -#define SFXGE_MAX_MTU (9 * 1024) +#define SFXGE_MAX_MTU (9 * 1024) #endif /* _SFXGE_H */ Modified: head/sys/dev/sfxge/sfxge_dma.c ============================================================================== --- head/sys/dev/sfxge/sfxge_dma.c Tue Sep 30 18:50:45 2014 (r272324) +++ head/sys/dev/sfxge/sfxge_dma.c Tue Sep 30 20:18:10 2014 (r272325) @@ -50,7 +50,7 @@ sfxge_dma_cb(void *arg, bus_dma_segment_ addr = arg; - if (error) { + if (error != 0) { *addr = 0; return; } @@ -82,7 +82,7 @@ retry: return (0); } #if defined(__i386__) || defined(__amd64__) - while (m && seg_count < maxsegs) { + while (m != NULL && seg_count < maxsegs) { /* * firmware doesn't like empty segments */ @@ -197,7 +197,7 @@ sfxge_dma_init(struct sfxge_softc *sc) BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ 0, /* flags */ NULL, NULL, /* lock, lockarg */ - &sc->parent_dma_tag)) { + &sc->parent_dma_tag) != 0) { device_printf(sc->dev, "Cannot allocate parent DMA tag\n"); return (ENOMEM); } Modified: head/sys/dev/sfxge/sfxge_ev.c ============================================================================== --- head/sys/dev/sfxge/sfxge_ev.c Tue Sep 30 18:50:45 2014 (r272324) +++ head/sys/dev/sfxge/sfxge_ev.c Tue Sep 30 20:18:10 2014 (r272325) @@ -226,7 +226,7 @@ sfxge_get_txq_by_label(struct sfxge_evq KASSERT((evq->index == 0 && label < SFXGE_TXQ_NTYPES) || (label == SFXGE_TXQ_IP_TCP_UDP_CKSUM), ("unexpected txq label")); index = (evq->index == 0) ? label : (evq->index - 1 + SFXGE_TXQ_NTYPES); - return evq->sc->txq[index]; + return (evq->sc->txq[index]); } static boolean_t @@ -443,7 +443,7 @@ sfxge_ev_stat_handler(SYSCTL_HANDLER_ARG sfxge_ev_stat_update(sc); - return SYSCTL_OUT(req, &sc->ev_stats[id], sizeof(sc->ev_stats[id])); + return (SYSCTL_OUT(req, &sc->ev_stats[id], sizeof(sc->ev_stats[id]))); } static void @@ -493,7 +493,7 @@ sfxge_int_mod_handler(SYSCTL_HANDLER_ARG sx_xlock(&sc->softc_lock); - if (req->newptr) { + if (req->newptr != NULL) { if ((error = SYSCTL_IN(req, &moderation, sizeof(moderation))) != 0) goto out; @@ -520,14 +520,14 @@ sfxge_int_mod_handler(SYSCTL_HANDLER_ARG out: sx_xunlock(&sc->softc_lock); - return error; + return (error); } static boolean_t sfxge_ev_initialized(void *arg) { struct sfxge_evq *evq; - + evq = (struct sfxge_evq *)arg; KASSERT(evq->init_state == SFXGE_EVQ_STARTING, @@ -746,7 +746,7 @@ sfxge_ev_start(struct sfxge_softc *sc) /* Initialize the event module */ if ((rc = efx_ev_init(sc->enp)) != 0) - return rc; + return (rc); /* Start the event queues */ for (index = 0; index < intr->n_alloc; index++) { Modified: head/sys/dev/sfxge/sfxge_intr.c ============================================================================== --- head/sys/dev/sfxge/sfxge_intr.c Tue Sep 30 18:50:45 2014 (r272324) +++ head/sys/dev/sfxge/sfxge_intr.c Tue Sep 30 20:18:10 2014 (r272325) @@ -70,19 +70,19 @@ sfxge_intr_line_filter(void *arg) ("intr->type != EFX_INTR_LINE")); if (intr->state != SFXGE_INTR_STARTED) - return FILTER_STRAY; + return (FILTER_STRAY); (void)efx_intr_status_line(enp, &fatal, &qmask); if (fatal) { (void) efx_intr_disable(enp); (void) efx_intr_fatal(enp); - return FILTER_HANDLED; + return (FILTER_HANDLED); } if (qmask != 0) { intr->zero_count = 0; - return FILTER_SCHEDULE_THREAD; + return (FILTER_SCHEDULE_THREAD); } /* SF bug 15783: If the function is not asserting its IRQ and @@ -97,13 +97,13 @@ sfxge_intr_line_filter(void *arg) if (intr->zero_count++ == 0) { if (evq->init_state == SFXGE_EVQ_STARTED) { if (efx_ev_qpending(evq->common, evq->read_ptr)) - return FILTER_SCHEDULE_THREAD; + return (FILTER_SCHEDULE_THREAD); efx_ev_qprime(evq->common, evq->read_ptr); - return FILTER_HANDLED; + return (FILTER_HANDLED); } } - return FILTER_STRAY; + return (FILTER_STRAY); } static void @@ -175,7 +175,7 @@ sfxge_intr_bus_enable(struct sfxge_softc default: KASSERT(0, ("Invalid interrupt type")); - return EINVAL; + return (EINVAL); } /* Try to add the handlers */ @@ -254,7 +254,7 @@ sfxge_intr_alloc(struct sfxge_softc *sc, table[i].eih_res = res; } - if (error) { + if (error != 0) { count = i - 1; for (i = 0; i < count; i++) bus_release_resource(dev, SYS_RES_IRQ, @@ -349,7 +349,7 @@ sfxge_intr_setup_msi(struct sfxge_softc if (count == 0) return (EINVAL); - if ((error = pci_alloc_msi(dev, &count)) != 0) + if ((error = pci_alloc_msi(dev, &count)) != 0) return (ENOMEM); /* Allocate interrupt handler. */ @@ -424,7 +424,7 @@ void sfxge_intr_stop(struct sfxge_softc *sc) { struct sfxge_intr *intr; - + intr = &sc->intr; KASSERT(intr->state == SFXGE_INTR_STARTED, Modified: head/sys/dev/sfxge/sfxge_port.c ============================================================================== --- head/sys/dev/sfxge/sfxge_port.c Tue Sep 30 18:50:45 2014 (r272324) +++ head/sys/dev/sfxge/sfxge_port.c Tue Sep 30 20:18:10 2014 (r272325) @@ -74,7 +74,7 @@ sfxge_mac_stat_update(struct sfxge_softc /* Try to update the cached counters */ if ((rc = efx_mac_stats_update(sc->enp, esmp, - port->mac_stats.decode_buf, NULL)) != EAGAIN) + port->mac_stats.decode_buf, NULL)) != EAGAIN) goto out; DELAY(100); @@ -83,7 +83,7 @@ sfxge_mac_stat_update(struct sfxge_softc rc = ETIMEDOUT; out: mtx_unlock(&port->lock); - return rc; + return (rc); } static int @@ -94,11 +94,11 @@ sfxge_mac_stat_handler(SYSCTL_HANDLER_AR int rc; if ((rc = sfxge_mac_stat_update(sc)) != 0) - return rc; + return (rc); - return SYSCTL_OUT(req, + return (SYSCTL_OUT(req, (uint64_t *)sc->port.mac_stats.decode_buf + id, - sizeof(uint64_t)); + sizeof(uint64_t))); } static void @@ -130,9 +130,9 @@ sfxge_port_wanted_fc(struct sfxge_softc struct ifmedia_entry *ifm = sc->media.ifm_cur; if (ifm->ifm_media == (IFM_ETHER | IFM_AUTO)) - return EFX_FCNTL_RESPOND | EFX_FCNTL_GENERATE; - return ((ifm->ifm_media & IFM_ETH_RXPAUSE) ? EFX_FCNTL_RESPOND : 0) | - ((ifm->ifm_media & IFM_ETH_TXPAUSE) ? EFX_FCNTL_GENERATE : 0); + return (EFX_FCNTL_RESPOND | EFX_FCNTL_GENERATE); + return (((ifm->ifm_media & IFM_ETH_RXPAUSE) ? EFX_FCNTL_RESPOND : 0) | + ((ifm->ifm_media & IFM_ETH_TXPAUSE) ? EFX_FCNTL_GENERATE : 0)); } static unsigned int @@ -150,13 +150,13 @@ sfxge_port_link_fc_ifm(struct sfxge_soft static unsigned int sfxge_port_wanted_fc(struct sfxge_softc *sc) { - return sc->port.wanted_fc; + return (sc->port.wanted_fc); } static unsigned int sfxge_port_link_fc_ifm(struct sfxge_softc *sc) { - return 0; + return (0); } static int @@ -172,7 +172,7 @@ sfxge_port_wanted_fc_handler(SYSCTL_HAND mtx_lock(&port->lock); - if (req->newptr) { + if (req->newptr != NULL) { if ((error = SYSCTL_IN(req, &fcntl, sizeof(fcntl))) != 0) goto out; @@ -235,7 +235,7 @@ sfxge_mac_link_update(struct sfxge_softc { struct sfxge_port *port; int link_state; - + port = &sc->port; if (port->link_mode == mode) @@ -289,7 +289,7 @@ sfxge_mac_filter_set_locked(struct sfxge /* Set promisc-unicast and broadcast filter bits */ if ((rc = efx_mac_filter_set(enp, !!(ifp->if_flags & IFF_PROMISC), B_TRUE)) != 0) - return rc; + return (rc); /* Set multicast hash filter */ if (ifp->if_flags & (IFF_PROMISC | IFF_ALLMULTI)) { @@ -311,7 +311,7 @@ sfxge_mac_filter_set_locked(struct sfxge } if_maddr_runlock(ifp); } - return efx_mac_hash_set(enp, bucket); + return (efx_mac_hash_set(enp, bucket)); } int @@ -336,7 +336,7 @@ sfxge_mac_filter_set(struct sfxge_softc else rc = 0; mtx_unlock(&port->lock); - return rc; + return (rc); } void @@ -413,7 +413,7 @@ sfxge_port_start(struct sfxge_softc *sc) /* Update MAC stats by DMA every second */ if ((rc = efx_mac_stats_periodic(enp, &port->mac_stats.dma_buf, - 1000, B_FALSE)) != 0) + 1000, B_FALSE)) != 0) goto fail2; if ((rc = efx_mac_drain(enp, B_FALSE)) != 0) @@ -435,7 +435,7 @@ fail4: (void)efx_mac_drain(enp, B_TRUE); fail3: (void)efx_mac_stats_periodic(enp, &port->mac_stats.dma_buf, - 0, B_FALSE); + 0, B_FALSE); fail2: efx_port_fini(sc->enp); fail: @@ -488,7 +488,7 @@ sfxge_phy_stat_update(struct sfxge_softc rc = ETIMEDOUT; out: mtx_unlock(&port->lock); - return rc; + return (rc); } static int @@ -499,11 +499,11 @@ sfxge_phy_stat_handler(SYSCTL_HANDLER_AR int rc; if ((rc = sfxge_phy_stat_update(sc)) != 0) - return rc; + return (rc); - return SYSCTL_OUT(req, + return (SYSCTL_OUT(req, (uint32_t *)sc->port.phy_stats.decode_buf + id, - sizeof(uint32_t)); + sizeof(uint32_t))); } static void @@ -619,7 +619,7 @@ fail: free(port->phy_stats.decode_buf, M_SFXGE); (void)mtx_destroy(&port->lock); port->sc = NULL; - return rc; + return (rc); } static int sfxge_link_mode[EFX_PHY_MEDIA_NTYPES][EFX_LINK_NMODES] = { @@ -697,9 +697,9 @@ sfxge_media_change(struct ifnet *ifp) rc = efx_phy_adv_cap_set(sc->enp, ifm->ifm_data); out: - sx_xunlock(&sc->softc_lock); + sx_xunlock(&sc->softc_lock); - return rc; + return (rc); } int sfxge_port_ifmedia_init(struct sfxge_softc *sc) @@ -788,7 +788,7 @@ int sfxge_port_ifmedia_init(struct sfxge best_mode_ifm = mode_ifm; } - if (best_mode_ifm) + if (best_mode_ifm != 0) ifmedia_set(&sc->media, best_mode_ifm); /* Now discard port state until interface is started. */ @@ -796,5 +796,5 @@ int sfxge_port_ifmedia_init(struct sfxge out2: efx_nic_fini(sc->enp); out: - return rc; + return (rc); } Modified: head/sys/dev/sfxge/sfxge_rx.c ============================================================================== --- head/sys/dev/sfxge/sfxge_rx.c Tue Sep 30 18:50:45 2014 (r272324) +++ head/sys/dev/sfxge/sfxge_rx.c Tue Sep 30 20:18:10 2014 (r272325) @@ -54,8 +54,8 @@ __FBSDID("$FreeBSD$"); #include "sfxge.h" #include "sfxge_rx.h" -#define RX_REFILL_THRESHOLD (EFX_RXQ_LIMIT(SFXGE_NDESCS) * 9 / 10) -#define RX_REFILL_THRESHOLD_2 (RX_REFILL_THRESHOLD / 2) +#define RX_REFILL_THRESHOLD (EFX_RXQ_LIMIT(SFXGE_NDESCS) * 9 / 10) +#define RX_REFILL_THRESHOLD_2 (RX_REFILL_THRESHOLD / 2) /* Size of the LRO hash table. Must be a power of 2. A larger table * means we can accelerate a larger number of streams. @@ -87,10 +87,10 @@ static int lro_slow_start_packets = 2000 static int lro_loss_packets = 20; /* Flags for sfxge_lro_conn::l2_id; must not collide with EVL_VLID_MASK */ -#define SFXGE_LRO_L2_ID_VLAN 0x4000 -#define SFXGE_LRO_L2_ID_IPV6 0x8000 -#define SFXGE_LRO_CONN_IS_VLAN_ENCAP(c) ((c)->l2_id & SFXGE_LRO_L2_ID_VLAN) -#define SFXGE_LRO_CONN_IS_TCPIPV4(c) (!((c)->l2_id & SFXGE_LRO_L2_ID_IPV6)) +#define SFXGE_LRO_L2_ID_VLAN 0x4000 +#define SFXGE_LRO_L2_ID_IPV6 0x8000 +#define SFXGE_LRO_CONN_IS_VLAN_ENCAP(c) ((c)->l2_id & SFXGE_LRO_L2_ID_VLAN) +#define SFXGE_LRO_CONN_IS_TCPIPV4(c) (!((c)->l2_id & SFXGE_LRO_L2_ID_IPV6)) /* Compare IPv6 addresses, avoiding conditional branches */ static __inline unsigned long ipv6_addr_cmp(const struct in6_addr *left, @@ -179,12 +179,12 @@ static inline struct mbuf *sfxge_rx_allo m = (struct mbuf *)uma_zalloc_arg(zone_mbuf, &args, M_NOWAIT); /* Allocate (and attach) packet buffer */ - if (m && !uma_zalloc_arg(sc->rx_buffer_zone, m, M_NOWAIT)) { + if (m != NULL && !uma_zalloc_arg(sc->rx_buffer_zone, m, M_NOWAIT)) { uma_zfree(zone_mbuf, m); m = NULL; } - return m; + return (m); } #define SFXGE_REFILL_BATCH 64 @@ -370,7 +370,7 @@ static void sfxge_lro_drop(struct sfxge_ KASSERT(!c->mbuf, ("found orphaned mbuf")); - if (c->next_buf.mbuf) { + if (c->next_buf.mbuf != NULL) { sfxge_rx_deliver(rxq->sc, &c->next_buf); LIST_REMOVE(c, active_link); } @@ -510,7 +510,7 @@ sfxge_lro_try_merge(struct sfxge_rxq *rx if (__predict_false(th_seq != c->next_seq)) { /* Out-of-order, so start counting again. */ - if (c->mbuf) + if (c->mbuf != NULL) sfxge_lro_deliver(&rxq->lro, c); c->n_in_order_pkts -= lro_loss_packets; c->next_seq = th_seq + data_length; @@ -522,10 +522,10 @@ sfxge_lro_try_merge(struct sfxge_rxq *rx now = ticks; if (now - c->last_pkt_ticks > lro_idle_ticks) { ++rxq->lro.n_drop_idle; - if (c->mbuf) + if (c->mbuf != NULL) sfxge_lro_deliver(&rxq->lro, c); sfxge_lro_drop(rxq, c); - return 0; + return (0); } c->last_pkt_ticks = ticks; @@ -537,12 +537,12 @@ sfxge_lro_try_merge(struct sfxge_rxq *rx } if (__predict_false(dont_merge)) { - if (c->mbuf) + if (c->mbuf != NULL) sfxge_lro_deliver(&rxq->lro, c); if (th->th_flags & (TH_FIN | TH_RST)) { ++rxq->lro.n_drop_closed; sfxge_lro_drop(rxq, c); - return 0; + return (0); } goto deliver_buf_out; } @@ -563,11 +563,11 @@ sfxge_lro_try_merge(struct sfxge_rxq *rx } rx_buf->mbuf = NULL; - return 1; + return (1); deliver_buf_out: sfxge_rx_deliver(rxq->sc, rx_buf); - return 1; + return (1); } static void sfxge_lro_new_conn(struct sfxge_lro_state *st, uint32_t conn_hash, @@ -621,7 +621,7 @@ sfxge_lro(struct sfxge_rxq *rxq, struct struct sfxge_lro_conn *c; uint16_t l2_id; uint16_t l3_proto; - void *nh; + void *nh; struct tcphdr *th; uint32_t conn_hash; unsigned bucket; @@ -671,7 +671,7 @@ sfxge_lro(struct sfxge_rxq *rxq, struct continue; if ((c->source - th->th_sport) | (c->dest - th->th_dport)) continue; - if (c->mbuf) { + if (c->mbuf != NULL) { if (SFXGE_LRO_CONN_IS_TCPIPV4(c)) { struct ip *c_iph, *iph = nh; c_iph = c->nh; @@ -691,7 +691,7 @@ sfxge_lro(struct sfxge_rxq *rxq, struct TAILQ_REMOVE(&rxq->lro.conns[bucket], c, link); TAILQ_INSERT_HEAD(&rxq->lro.conns[bucket], c, link); - if (c->next_buf.mbuf) { + if (c->next_buf.mbuf != NULL) { if (!sfxge_lro_try_merge(rxq, c)) goto deliver_now; } else { @@ -720,10 +720,10 @@ static void sfxge_lro_end_of_burst(struc while (!LIST_EMPTY(&st->active_conns)) { c = LIST_FIRST(&st->active_conns); - if (!c->delivered && c->mbuf) + if (!c->delivered && c->mbuf != NULL) sfxge_lro_deliver(st, c); if (sfxge_lro_try_merge(rxq, c)) { - if (c->mbuf) + if (c->mbuf != NULL) sfxge_lro_deliver(st, c); LIST_REMOVE(c, active_link); } @@ -836,7 +836,7 @@ sfxge_rx_qstop(struct sfxge_softc *sc, u evq = sc->evq[index]; mtx_lock(&evq->lock); - + KASSERT(rxq->init_state == SFXGE_RXQ_STARTED, ("rxq not started")); @@ -881,7 +881,7 @@ again: rxq->loopback = 0; /* Destroy the common code receive queue. */ - efx_rx_qdestroy(rxq->common); + efx_rx_qdestroy(rxq->common); efx_sram_buf_tbl_clear(sc->enp, rxq->buf_base_id, EFX_RXQ_NBUFS(SFXGE_NDESCS)); @@ -1136,7 +1136,7 @@ static const struct { const char *name; size_t offset; } sfxge_rx_stats[] = { -#define SFXGE_RX_STAT(name, member) \ +#define SFXGE_RX_STAT(name, member) \ { #name, offsetof(struct sfxge_rxq, member) } SFXGE_RX_STAT(lro_merges, lro.n_merges), SFXGE_RX_STAT(lro_bursts, lro.n_bursts), @@ -1161,7 +1161,7 @@ sfxge_rx_stat_handler(SYSCTL_HANDLER_ARG sum += *(unsigned int *)((caddr_t)sc->rxq[index] + sfxge_rx_stats[id].offset); - return SYSCTL_OUT(req, &sum, sizeof(sum)); + return (SYSCTL_OUT(req, &sum, sizeof(sum))); } static void Modified: head/sys/dev/sfxge/sfxge_rx.h ============================================================================== --- head/sys/dev/sfxge/sfxge_rx.h Tue Sep 30 18:50:45 2014 (r272324) +++ head/sys/dev/sfxge/sfxge_rx.h Tue Sep 30 20:18:10 2014 (r272325) @@ -30,25 +30,25 @@ */ #ifndef _SFXGE_RX_H -#define _SFXGE_RX_H +#define _SFXGE_RX_H -#define SFXGE_MAGIC_RESERVED 0x8000 +#define SFXGE_MAGIC_RESERVED 0x8000 -#define SFXGE_MAGIC_DMAQ_LABEL_WIDTH 6 -#define SFXGE_MAGIC_DMAQ_LABEL_MASK \ - ((1 << SFXGE_MAGIC_DMAQ_LABEL_WIDTH) - 1) +#define SFXGE_MAGIC_DMAQ_LABEL_WIDTH 6 +#define SFXGE_MAGIC_DMAQ_LABEL_MASK \ + ((1 << SFXGE_MAGIC_DMAQ_LABEL_WIDTH) - 1) -#define SFXGE_MAGIC_RX_QFLUSH_DONE \ - (SFXGE_MAGIC_RESERVED | (1 << SFXGE_MAGIC_DMAQ_LABEL_WIDTH)) +#define SFXGE_MAGIC_RX_QFLUSH_DONE \ + (SFXGE_MAGIC_RESERVED | (1 << SFXGE_MAGIC_DMAQ_LABEL_WIDTH)) -#define SFXGE_MAGIC_RX_QFLUSH_FAILED \ - (SFXGE_MAGIC_RESERVED | (2 << SFXGE_MAGIC_DMAQ_LABEL_WIDTH)) +#define SFXGE_MAGIC_RX_QFLUSH_FAILED \ + (SFXGE_MAGIC_RESERVED | (2 << SFXGE_MAGIC_DMAQ_LABEL_WIDTH)) -#define SFXGE_MAGIC_RX_QREFILL \ - (SFXGE_MAGIC_RESERVED | (3 << SFXGE_MAGIC_DMAQ_LABEL_WIDTH)) +#define SFXGE_MAGIC_RX_QREFILL \ + (SFXGE_MAGIC_RESERVED | (3 << SFXGE_MAGIC_DMAQ_LABEL_WIDTH)) -#define SFXGE_MAGIC_TX_QFLUSH_DONE \ - (SFXGE_MAGIC_RESERVED | (4 << SFXGE_MAGIC_DMAQ_LABEL_WIDTH)) +#define SFXGE_MAGIC_TX_QFLUSH_DONE \ + (SFXGE_MAGIC_RESERVED | (4 << SFXGE_MAGIC_DMAQ_LABEL_WIDTH)) #define SFXGE_RX_SCALE_MAX EFX_MAXRSS Modified: head/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- head/sys/dev/sfxge/sfxge_tx.c Tue Sep 30 18:50:45 2014 (r272324) +++ head/sys/dev/sfxge/sfxge_tx.c Tue Sep 30 20:18:10 2014 (r272325) @@ -74,8 +74,8 @@ __FBSDID("$FreeBSD$"); * the output at a packet boundary. Allow for a reasonable * minimum MSS of 512. */ -#define SFXGE_TSO_MAX_DESC ((65535 / 512) * 2 + SFXGE_TX_MAPPING_MAX_SEG - 1) -#define SFXGE_TXQ_BLOCK_LEVEL (SFXGE_NDESCS - SFXGE_TSO_MAX_DESC) +#define SFXGE_TSO_MAX_DESC ((65535 / 512) * 2 + SFXGE_TX_MAPPING_MAX_SEG - 1) +#define SFXGE_TXQ_BLOCK_LEVEL (SFXGE_NDESCS - SFXGE_TSO_MAX_DESC) /* Forward declarations. */ static inline void sfxge_tx_qdpl_service(struct sfxge_txq *txq); @@ -343,7 +343,7 @@ static int sfxge_tx_queue_mbuf(struct sf /* Post the fragment list. */ sfxge_tx_qlist_post(txq); - return 0; + return (0); reject_mapped: bus_dmamap_unload(txq->packet_dma_tag, *used_map); @@ -352,7 +352,7 @@ reject: m_freem(mbuf); ++txq->drops; - return rc; + return (rc); } #ifdef SFXGE_HAVE_MQ @@ -426,8 +426,8 @@ sfxge_tx_qdpl_drain(struct sfxge_txq *tx ("queue unblocked but count is non-zero")); } -#define SFXGE_TX_QDPL_PENDING(_txq) \ - ((_txq)->dpl.std_put != 0) +#define SFXGE_TX_QDPL_PENDING(_txq) \ + ((_txq)->dpl.std_put != 0) /* * Service the deferred packet list. @@ -493,7 +493,7 @@ sfxge_tx_qdpl_put(struct sfxge_txq *txq, do { old = *putp; - if (old) { + if (old != 0) { struct mbuf *mp = (struct mbuf *)old; old_len = mp->m_pkthdr.csum_data; } else @@ -559,7 +559,6 @@ fail: m_freem(m); atomic_add_long(&txq->early_drops, 1); return (rc); - } static void @@ -577,7 +576,7 @@ sfxge_tx_qdpl_flush(struct sfxge_txq *tx } stdp->std_get = NULL; stdp->std_count = 0; - stdp->std_getp = &stdp->std_get; + stdp->std_getp = &stdp->std_get; mtx_unlock(&txq->lock); } @@ -599,7 +598,7 @@ sfxge_if_qflush(struct ifnet *ifp) */ int sfxge_if_transmit(struct ifnet *ifp, struct mbuf *m) -{ +{ struct sfxge_softc *sc; struct sfxge_txq *txq; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Sep 30 20:29:59 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 93091479; Tue, 30 Sep 2014 20:29:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7FB58904; Tue, 30 Sep 2014 20:29:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8UKTxiI098654; Tue, 30 Sep 2014 20:29:59 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8UKTx0e098653; Tue, 30 Sep 2014 20:29:59 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201409302029.s8UKTx0e098653@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Tue, 30 Sep 2014 20:29:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272326 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2014 20:29:59 -0000 Author: tuexen Date: Tue Sep 30 20:29:58 2014 New Revision: 272326 URL: http://svnweb.freebsd.org/changeset/base/272326 Log: UDPLite requires a checksum. Therefore, discard a received packet if the checksum is 0. MFC after: 3 days Modified: head/sys/netinet/udp_usrreq.c Modified: head/sys/netinet/udp_usrreq.c ============================================================================== --- head/sys/netinet/udp_usrreq.c Tue Sep 30 20:18:10 2014 (r272325) +++ head/sys/netinet/udp_usrreq.c Tue Sep 30 20:29:58 2014 (r272326) @@ -498,8 +498,16 @@ udp_input(struct mbuf **mp, int *offp, i m_freem(m); return (IPPROTO_DONE); } - } else - UDPSTAT_INC(udps_nosum); + } else { + if (proto == IPPROTO_UDP) { + UDPSTAT_INC(udps_nosum); + } else { + /* UDPLite requires a checksum */ + /* XXX: What is the right UDPLite MIB counter here? */ + m_freem(m); + return (IPPROTO_DONE); + } + } pcbinfo = get_inpcbinfo(proto); if (IN_MULTICAST(ntohl(ip->ip_dst.s_addr)) || From owner-svn-src-all@FreeBSD.ORG Tue Sep 30 20:32:28 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 79007601; Tue, 30 Sep 2014 20:32:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5978C9B2; Tue, 30 Sep 2014 20:32:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8UKWSS6002617; Tue, 30 Sep 2014 20:32:28 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8UKWRS4002613; Tue, 30 Sep 2014 20:32:27 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201409302032.s8UKWRS4002613@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Tue, 30 Sep 2014 20:32:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272327 - stable/10/share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2014 20:32:28 -0000 Author: brooks Date: Tue Sep 30 20:32:27 2014 New Revision: 272327 URL: http://svnweb.freebsd.org/changeset/base/272327 Log: MFC the altera_atse.4. This was intended to have been merged along with r256752. This commit contains the altera_atse.4 portions of r256752, r257656, and r270268. Approved by: re (gjb) Sponsored by: DARPA/AFRL Added: stable/10/share/man/man4/altera_atse.4 - copied unchanged from r272311, head/share/man/man4/altera_atse.4 Modified: stable/10/share/man/man4/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/Makefile ============================================================================== --- stable/10/share/man/man4/Makefile Tue Sep 30 20:29:58 2014 (r272326) +++ stable/10/share/man/man4/Makefile Tue Sep 30 20:32:27 2014 (r272327) @@ -36,6 +36,7 @@ MAN= aac.4 \ alc.4 \ ale.4 \ alpm.4 \ + altera_atse.4 \ altera_avgen.4 \ altera_jtag_uart.4 \ altera_sdcard.4 \ Copied: stable/10/share/man/man4/altera_atse.4 (from r272311, head/share/man/man4/altera_atse.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/share/man/man4/altera_atse.4 Tue Sep 30 20:32:27 2014 (r272327, copy of r272311, head/share/man/man4/altera_atse.4) @@ -0,0 +1,119 @@ +.\"- +.\" Copyright (c) 2013-2014 SRI International +.\" All rights reserved. +.\" +.\" This software was developed by SRI International and the University of +.\" Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) +.\" ("CTSRD"), as part of the DARPA CRASH research programme. +.\" +.\" 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 May 21, 2014 +.Dt ALTERA_ATSE 4 +.Os +.Sh NAME +.Nm atse +.Nd driver for the Altera Triple-Speed Ethernet MegaCore +.Sh SYNOPSIS +.Cd "device atse" +.Cd "options ATSE_CFI_HACK" +.Pp +In +.Pa /boot/device.hints : +.Cd hint.atse.0.at="nexus0" +.Cd hint.atse.0.maddr=0x7f007000 +.Cd hint.atse.0.msize=0x540 +.Cd hint.atse.0.rc_irq=1 +.Cd hint.atse.0.rx_maddr=0x7f007500 +.Cd hint.atse.0.rx_msize=0x8 +.Cd hint.atse.0.rxc_maddr=0x7f007520 +.Cd hint.atse.0.rxc_msize=0x20 +.Cd hint.atse.0.tx_irq=2 +.Cd hint.atse.0.tx_maddr=0x7f007400 +.Cd hint.atse.0.tx_msize=0x8 +.Cd hint.atse.0.txc_maddr=0x7f007420 +.Cd hint.atse.0.txc_msize=0x20 +.Cd hint.e1000phy.0.at="miibus0" +.Cd hint.e1000phy.0.phyno=0 +.Sh DESCRIPTION +The +.Nm +device driver provides support for the Altera Triple-Speed Ethernet +MegaCore. +.Sh HARDWARE +The current version of the +.Nm +driver supports the Ethernet MegaCore as described in version 11.1 of +Altera's documentation when the device is configured with internal FIFOs. +.Sh MAC SELECTION +The default MAC address for each +.Nm +interface is derived from a value stored in +.Xr cfi 4 +flash. +The value is managed by the +.Xr atsectl 8 +utility. +.Pp +Only a single MAC address may be stored in flash. +If the address begins with the Altera prefix 00:07:ed and ends in 00 then +up to 16 addresses will be derived from it by adding the unit number of +the interface to the stored address. +For other prefixes, the address will be assigned to atse0 and random +addresses will be used for other interfaces. +If the stored address is invalid, for example all zero's, multicast, or the +default address shipped on all DE4 boards (00:07:ed:ff:ed:15) then a random +address is generated when the device is attached. +.Sh SEE ALSO +.Xr miibus 4 , +.Xr netintro 4 , +.Xr ifconfig 8 +.Rs +.%T Triple-Speed Ethernet MegaCore Function User Guide +.%D November 2011 +.%I Altera Corporation +.Re +.Sh HISTORY +The +.Nm +device driver first appeared in +.Fx 10.0 . +.Sh AUTHORS +The +.Nm +device driver and this manual page were +developed by SRI International and the University of Cambridge Computer +Laboratory under DARPA/AFRL contract +.Pq FA8750-10-C-0237 +.Pq Do CTSRD Dc , +as part of the DARPA CRASH research programme. +This device driver was written by +.An Bjoern A. Zeeb . +.Sh BUGS +The +.Nm +driver only supports a single configuration of the MegaCore as installed +on the Terasic Technologies Altera DE4 Development and Education Board. +.Pp +Only gigabit Ethernet speeds are currently supported. From owner-svn-src-all@FreeBSD.ORG Tue Sep 30 20:36:09 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B20947C3; Tue, 30 Sep 2014 20:36:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9D8EF9F1; Tue, 30 Sep 2014 20:36:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8UKa9rG003211; Tue, 30 Sep 2014 20:36:09 GMT (envelope-from gnn@FreeBSD.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8UKa7oi003202; Tue, 30 Sep 2014 20:36:07 GMT (envelope-from gnn@FreeBSD.org) Message-Id: <201409302036.s8UKa7oi003202@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gnn set sender to gnn@FreeBSD.org using -f From: "George V. Neville-Neil" Date: Tue, 30 Sep 2014 20:36:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272328 - head/sys/dev/sfxge X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2014 20:36:09 -0000 Author: gnn Date: Tue Sep 30 20:36:07 2014 New Revision: 272328 URL: http://svnweb.freebsd.org/changeset/base/272328 Log: Make size of Tx and Rx rings configurable Required size of event queue is calculated now. Submitted by: Andrew Rybchenko Sponsored by: Solarflare Communications, Inc. Modified: head/sys/dev/sfxge/sfxge.c head/sys/dev/sfxge/sfxge.h head/sys/dev/sfxge/sfxge_ev.c head/sys/dev/sfxge/sfxge_rx.c head/sys/dev/sfxge/sfxge_rx.h head/sys/dev/sfxge/sfxge_tx.c head/sys/dev/sfxge/sfxge_tx.h Modified: head/sys/dev/sfxge/sfxge.c ============================================================================== --- head/sys/dev/sfxge/sfxge.c Tue Sep 30 20:32:27 2014 (r272327) +++ head/sys/dev/sfxge/sfxge.c Tue Sep 30 20:36:07 2014 (r272328) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -67,6 +68,25 @@ __FBSDID("$FreeBSD$"); MALLOC_DEFINE(M_SFXGE, "sfxge", "Solarflare 10GigE driver"); + +SYSCTL_NODE(_hw, OID_AUTO, sfxge, CTLFLAG_RD, 0, + "SFXGE driver parameters"); + +#define SFXGE_PARAM_RX_RING SFXGE_PARAM(rx_ring) +static int sfxge_rx_ring_entries = SFXGE_NDESCS; +TUNABLE_INT(SFXGE_PARAM_RX_RING, &sfxge_rx_ring_entries); +SYSCTL_INT(_hw_sfxge, OID_AUTO, rx_ring, CTLFLAG_RDTUN, + &sfxge_rx_ring_entries, 0, + "Maximum number of descriptors in a receive ring"); + +#define SFXGE_PARAM_TX_RING SFXGE_PARAM(tx_ring) +static int sfxge_tx_ring_entries = SFXGE_NDESCS; +TUNABLE_INT(SFXGE_PARAM_TX_RING, &sfxge_tx_ring_entries); +SYSCTL_INT(_hw_sfxge, OID_AUTO, tx_ring, CTLFLAG_RDTUN, + &sfxge_tx_ring_entries, 0, + "Maximum number of descriptors in a transmit ring"); + + static void sfxge_reset(void *arg, int npending); @@ -314,8 +334,8 @@ sfxge_ifnet_init(struct ifnet *ifp, stru ifp->if_qflush = sfxge_if_qflush; #else ifp->if_start = sfxge_if_start; - IFQ_SET_MAXLEN(&ifp->if_snd, SFXGE_NDESCS - 1); - ifp->if_snd.ifq_drv_maxlen = SFXGE_NDESCS - 1; + IFQ_SET_MAXLEN(&ifp->if_snd, sc->txq_entries - 1); + ifp->if_snd.ifq_drv_maxlen = sc->txq_entries - 1; IFQ_SET_READY(&ifp->if_snd); mtx_init(&sc->tx_lock, "txq", NULL, MTX_DEF); @@ -414,6 +434,26 @@ sfxge_create(struct sfxge_softc *sc) goto fail3; sc->enp = enp; + if (!ISP2(sfxge_rx_ring_entries) || + !(sfxge_rx_ring_entries & EFX_RXQ_NDESCS_MASK)) { + log(LOG_ERR, "%s=%d must be power of 2 from %u to %u", + SFXGE_PARAM_RX_RING, sfxge_rx_ring_entries, + EFX_RXQ_MINNDESCS, EFX_RXQ_MAXNDESCS); + error = EINVAL; + goto fail_rx_ring_entries; + } + sc->rxq_entries = sfxge_rx_ring_entries; + + if (!ISP2(sfxge_tx_ring_entries) || + !(sfxge_tx_ring_entries & EFX_TXQ_NDESCS_MASK)) { + log(LOG_ERR, "%s=%d must be power of 2 from %u to %u", + SFXGE_PARAM_TX_RING, sfxge_tx_ring_entries, + EFX_TXQ_MINNDESCS, EFX_TXQ_MAXNDESCS); + error = EINVAL; + goto fail_tx_ring_entries; + } + sc->txq_entries = sfxge_tx_ring_entries; + /* Initialize MCDI to talk to the microcontroller. */ if ((error = sfxge_mcdi_init(sc)) != 0) goto fail4; @@ -486,6 +526,8 @@ fail5: sfxge_mcdi_fini(sc); fail4: +fail_tx_ring_entries: +fail_rx_ring_entries: sc->enp = NULL; efx_nic_destroy(enp); mtx_destroy(&sc->enp_lock); Modified: head/sys/dev/sfxge/sfxge.h ============================================================================== --- head/sys/dev/sfxge/sfxge.h Tue Sep 30 20:32:27 2014 (r272327) +++ head/sys/dev/sfxge/sfxge.h Tue Sep 30 20:36:07 2014 (r272328) @@ -87,6 +87,8 @@ #include "sfxge_rx.h" #include "sfxge_tx.h" +#define ROUNDUP_POW_OF_TWO(_n) (1ULL << flsl((_n) - 1)) + #define SFXGE_IP_ALIGN 2 #define SFXGE_ETHERTYPE_LOOPBACK 0x9000 /* Xerox loopback */ @@ -106,6 +108,7 @@ struct sfxge_evq { enum sfxge_evq_state init_state; unsigned int index; + unsigned int entries; efsys_mem_t mem; unsigned int buf_base_id; @@ -121,7 +124,6 @@ struct sfxge_evq { struct sfxge_txq **txqs; }; -#define SFXGE_NEVS 4096 #define SFXGE_NDESCS 1024 #define SFXGE_MODERATION 30 @@ -209,6 +211,9 @@ struct sfxge_softc { efx_nic_t *enp; struct mtx enp_lock; + unsigned int rxq_entries; + unsigned int txq_entries; + bus_dma_tag_t parent_dma_tag; efsys_bar_t bar; @@ -246,6 +251,10 @@ struct sfxge_softc { #define SFXGE_LINK_UP(sc) ((sc)->port.link_mode != EFX_LINK_DOWN) #define SFXGE_RUNNING(sc) ((sc)->ifnet->if_drv_flags & IFF_DRV_RUNNING) +#define SFXGE_PARAM(_name) "hw.sfxge." #_name + +SYSCTL_DECL(_hw_sfxge); + /* * From sfxge.c. */ Modified: head/sys/dev/sfxge/sfxge_ev.c ============================================================================== --- head/sys/dev/sfxge/sfxge_ev.c Tue Sep 30 20:32:27 2014 (r272327) +++ head/sys/dev/sfxge/sfxge_ev.c Tue Sep 30 20:36:07 2014 (r272328) @@ -102,7 +102,7 @@ sfxge_ev_rx(void *arg, uint32_t label, u if (rxq->init_state != SFXGE_RXQ_STARTED) goto done; - expected = rxq->pending++ & (SFXGE_NDESCS - 1); + expected = rxq->pending++ & rxq->ptr_mask; if (id != expected) { evq->exception = B_TRUE; @@ -247,10 +247,10 @@ sfxge_ev_tx(void *arg, uint32_t label, u if (txq->init_state != SFXGE_TXQ_STARTED) goto done; - stop = (id + 1) & (SFXGE_NDESCS - 1); - id = txq->pending & (SFXGE_NDESCS - 1); + stop = (id + 1) & txq->ptr_mask; + id = txq->pending & txq->ptr_mask; - delta = (stop >= id) ? (stop - id) : (SFXGE_NDESCS - id + stop); + delta = (stop >= id) ? (stop - id) : (txq->entries - id + stop); txq->pending += delta; evq->tx_done++; @@ -635,7 +635,7 @@ sfxge_ev_qstop(struct sfxge_softc *sc, u efx_ev_qdestroy(evq->common); efx_sram_buf_tbl_clear(sc->enp, evq->buf_base_id, - EFX_EVQ_NBUFS(SFXGE_NEVS)); + EFX_EVQ_NBUFS(evq->entries)); mtx_unlock(&evq->lock); } @@ -654,15 +654,15 @@ sfxge_ev_qstart(struct sfxge_softc *sc, ("evq->init_state != SFXGE_EVQ_INITIALIZED")); /* Clear all events. */ - (void)memset(esmp->esm_base, 0xff, EFX_EVQ_SIZE(SFXGE_NEVS)); + (void)memset(esmp->esm_base, 0xff, EFX_EVQ_SIZE(evq->entries)); /* Program the buffer table. */ if ((rc = efx_sram_buf_tbl_set(sc->enp, evq->buf_base_id, esmp, - EFX_EVQ_NBUFS(SFXGE_NEVS))) != 0) - return rc; + EFX_EVQ_NBUFS(evq->entries))) != 0) + return (rc); /* Create the common code event queue. */ - if ((rc = efx_ev_qcreate(sc->enp, index, esmp, SFXGE_NEVS, + if ((rc = efx_ev_qcreate(sc->enp, index, esmp, evq->entries, evq->buf_base_id, &evq->common)) != 0) goto fail; @@ -705,7 +705,7 @@ fail2: efx_ev_qdestroy(evq->common); fail: efx_sram_buf_tbl_clear(sc->enp, evq->buf_base_id, - EFX_EVQ_NBUFS(SFXGE_NEVS)); + EFX_EVQ_NBUFS(evq->entries)); return (rc); } @@ -802,15 +802,31 @@ sfxge_ev_qinit(struct sfxge_softc *sc, u sc->evq[index] = evq; esmp = &evq->mem; + /* Build an event queue with room for one event per tx and rx buffer, + * plus some extra for link state events and MCDI completions. + * There are three tx queues in the first event queue and one in + * other. + */ + if (index == 0) + evq->entries = + ROUNDUP_POW_OF_TWO(sc->rxq_entries + + 3 * sc->txq_entries + + 128); + else + evq->entries = + ROUNDUP_POW_OF_TWO(sc->rxq_entries + + sc->txq_entries + + 128); + /* Initialise TX completion list */ evq->txqs = &evq->txq; /* Allocate DMA space. */ - if ((rc = sfxge_dma_alloc(sc, EFX_EVQ_SIZE(SFXGE_NEVS), esmp)) != 0) + if ((rc = sfxge_dma_alloc(sc, EFX_EVQ_SIZE(evq->entries), esmp)) != 0) return (rc); /* Allocate buffer table entries. */ - sfxge_sram_buf_tbl_alloc(sc, EFX_EVQ_NBUFS(SFXGE_NEVS), + sfxge_sram_buf_tbl_alloc(sc, EFX_EVQ_NBUFS(evq->entries), &evq->buf_base_id); mtx_init(&evq->lock, "evq", NULL, MTX_DEF); Modified: head/sys/dev/sfxge/sfxge_rx.c ============================================================================== --- head/sys/dev/sfxge/sfxge_rx.c Tue Sep 30 20:32:27 2014 (r272327) +++ head/sys/dev/sfxge/sfxge_rx.c Tue Sep 30 20:36:07 2014 (r272328) @@ -54,8 +54,7 @@ __FBSDID("$FreeBSD$"); #include "sfxge.h" #include "sfxge_rx.h" -#define RX_REFILL_THRESHOLD (EFX_RXQ_LIMIT(SFXGE_NDESCS) * 9 / 10) -#define RX_REFILL_THRESHOLD_2 (RX_REFILL_THRESHOLD / 2) +#define RX_REFILL_THRESHOLD(_entries) (EFX_RXQ_LIMIT(_entries) * 9 / 10) /* Size of the LRO hash table. Must be a power of 2. A larger table * means we can accelerate a larger number of streams. @@ -214,11 +213,11 @@ sfxge_rx_qfill(struct sfxge_rxq *rxq, un return; rxfill = rxq->added - rxq->completed; - KASSERT(rxfill <= EFX_RXQ_LIMIT(SFXGE_NDESCS), - ("rxfill > EFX_RXQ_LIMIT(SFXGE_NDESCS)")); - ntodo = min(EFX_RXQ_LIMIT(SFXGE_NDESCS) - rxfill, target); - KASSERT(ntodo <= EFX_RXQ_LIMIT(SFXGE_NDESCS), - ("ntodo > EFX_RQX_LIMIT(SFXGE_NDESCS)")); + KASSERT(rxfill <= EFX_RXQ_LIMIT(rxq->entries), + ("rxfill > EFX_RXQ_LIMIT(rxq->entries)")); + ntodo = min(EFX_RXQ_LIMIT(rxq->entries) - rxfill, target); + KASSERT(ntodo <= EFX_RXQ_LIMIT(rxq->entries), + ("ntodo > EFX_RQX_LIMIT(rxq->entries)")); if (ntodo == 0) return; @@ -231,7 +230,7 @@ sfxge_rx_qfill(struct sfxge_rxq *rxq, un bus_dma_segment_t seg; struct mbuf *m; - id = (rxq->added + batch) & (SFXGE_NDESCS - 1); + id = (rxq->added + batch) & rxq->ptr_mask; rx_desc = &rxq->queue[id]; KASSERT(rx_desc->mbuf == NULL, ("rx_desc->mbuf != NULL")); @@ -274,7 +273,7 @@ sfxge_rx_qrefill(struct sfxge_rxq *rxq) return; /* Make sure the queue is full */ - sfxge_rx_qfill(rxq, EFX_RXQ_LIMIT(SFXGE_NDESCS), B_TRUE); + sfxge_rx_qfill(rxq, EFX_RXQ_LIMIT(rxq->entries), B_TRUE); } static void __sfxge_rx_deliver(struct sfxge_softc *sc, struct mbuf *m) @@ -757,7 +756,7 @@ sfxge_rx_qcomplete(struct sfxge_rxq *rxq unsigned int id; struct sfxge_rx_sw_desc *rx_desc; - id = completed++ & (SFXGE_NDESCS - 1); + id = completed++ & rxq->ptr_mask; rx_desc = &rxq->queue[id]; m = rx_desc->mbuf; @@ -821,8 +820,8 @@ discard: sfxge_lro_end_of_burst(rxq); /* Top up the queue if necessary */ - if (level < RX_REFILL_THRESHOLD) - sfxge_rx_qfill(rxq, EFX_RXQ_LIMIT(SFXGE_NDESCS), B_FALSE); + if (level < rxq->refill_threshold) + sfxge_rx_qfill(rxq, EFX_RXQ_LIMIT(rxq->entries), B_FALSE); } static void @@ -884,7 +883,7 @@ again: efx_rx_qdestroy(rxq->common); efx_sram_buf_tbl_clear(sc->enp, rxq->buf_base_id, - EFX_RXQ_NBUFS(SFXGE_NDESCS)); + EFX_RXQ_NBUFS(sc->rxq_entries)); mtx_unlock(&evq->lock); } @@ -908,12 +907,12 @@ sfxge_rx_qstart(struct sfxge_softc *sc, /* Program the buffer table. */ if ((rc = efx_sram_buf_tbl_set(sc->enp, rxq->buf_base_id, esmp, - EFX_RXQ_NBUFS(SFXGE_NDESCS))) != 0) - return rc; + EFX_RXQ_NBUFS(sc->rxq_entries))) != 0) + return (rc); /* Create the common code receive queue. */ if ((rc = efx_rx_qcreate(sc->enp, index, index, EFX_RXQ_TYPE_DEFAULT, - esmp, SFXGE_NDESCS, rxq->buf_base_id, evq->common, + esmp, sc->rxq_entries, rxq->buf_base_id, evq->common, &rxq->common)) != 0) goto fail; @@ -925,7 +924,7 @@ sfxge_rx_qstart(struct sfxge_softc *sc, rxq->init_state = SFXGE_RXQ_STARTED; /* Try to fill the queue from the pool. */ - sfxge_rx_qfill(rxq, EFX_RXQ_LIMIT(SFXGE_NDESCS), B_FALSE); + sfxge_rx_qfill(rxq, EFX_RXQ_LIMIT(sc->rxq_entries), B_FALSE); mtx_unlock(&evq->lock); @@ -933,8 +932,8 @@ sfxge_rx_qstart(struct sfxge_softc *sc, fail: efx_sram_buf_tbl_clear(sc->enp, rxq->buf_base_id, - EFX_RXQ_NBUFS(SFXGE_NDESCS)); - return rc; + EFX_RXQ_NBUFS(sc->rxq_entries)); + return (rc); } void @@ -1105,6 +1104,9 @@ sfxge_rx_qinit(struct sfxge_softc *sc, u rxq = malloc(sizeof(struct sfxge_rxq), M_SFXGE, M_ZERO | M_WAITOK); rxq->sc = sc; rxq->index = index; + rxq->entries = sc->rxq_entries; + rxq->ptr_mask = rxq->entries - 1; + rxq->refill_threshold = RX_REFILL_THRESHOLD(rxq->entries); sc->rxq[index] = rxq; esmp = &rxq->mem; @@ -1112,16 +1114,16 @@ sfxge_rx_qinit(struct sfxge_softc *sc, u evq = sc->evq[index]; /* Allocate and zero DMA space. */ - if ((rc = sfxge_dma_alloc(sc, EFX_RXQ_SIZE(SFXGE_NDESCS), esmp)) != 0) + if ((rc = sfxge_dma_alloc(sc, EFX_RXQ_SIZE(sc->rxq_entries), esmp)) != 0) return (rc); - (void)memset(esmp->esm_base, 0, EFX_RXQ_SIZE(SFXGE_NDESCS)); + (void)memset(esmp->esm_base, 0, EFX_RXQ_SIZE(sc->rxq_entries)); /* Allocate buffer table entries. */ - sfxge_sram_buf_tbl_alloc(sc, EFX_RXQ_NBUFS(SFXGE_NDESCS), + sfxge_sram_buf_tbl_alloc(sc, EFX_RXQ_NBUFS(sc->rxq_entries), &rxq->buf_base_id); /* Allocate the context array and the flow table. */ - rxq->queue = malloc(sizeof(struct sfxge_rx_sw_desc) * SFXGE_NDESCS, + rxq->queue = malloc(sizeof(struct sfxge_rx_sw_desc) * sc->rxq_entries, M_SFXGE, M_WAITOK | M_ZERO); sfxge_lro_init(rxq); Modified: head/sys/dev/sfxge/sfxge_rx.h ============================================================================== --- head/sys/dev/sfxge/sfxge_rx.h Tue Sep 30 20:32:27 2014 (r272327) +++ head/sys/dev/sfxge/sfxge_rx.h Tue Sep 30 20:36:07 2014 (r272328) @@ -159,6 +159,8 @@ struct sfxge_rxq { efsys_mem_t mem; unsigned int buf_base_id; enum sfxge_rxq_state init_state; + unsigned int entries; + unsigned int ptr_mask; struct sfxge_rx_sw_desc *queue __aligned(CACHE_LINE_SIZE); unsigned int added; @@ -166,6 +168,7 @@ struct sfxge_rxq { unsigned int completed; unsigned int loopback; struct sfxge_lro_state lro; + unsigned int refill_threshold; struct callout refill_callout; unsigned int refill_delay; Modified: head/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- head/sys/dev/sfxge/sfxge_tx.c Tue Sep 30 20:32:27 2014 (r272327) +++ head/sys/dev/sfxge/sfxge_tx.c Tue Sep 30 20:36:07 2014 (r272328) @@ -75,7 +75,7 @@ __FBSDID("$FreeBSD$"); * minimum MSS of 512. */ #define SFXGE_TSO_MAX_DESC ((65535 / 512) * 2 + SFXGE_TX_MAPPING_MAX_SEG - 1) -#define SFXGE_TXQ_BLOCK_LEVEL (SFXGE_NDESCS - SFXGE_TSO_MAX_DESC) +#define SFXGE_TXQ_BLOCK_LEVEL(_entries) ((_entries) - SFXGE_TSO_MAX_DESC) /* Forward declarations. */ static inline void sfxge_tx_qdpl_service(struct sfxge_txq *txq); @@ -101,7 +101,7 @@ sfxge_tx_qcomplete(struct sfxge_txq *txq struct sfxge_tx_mapping *stmp; unsigned int id; - id = completed++ & (SFXGE_NDESCS - 1); + id = completed++ & txq->ptr_mask; stmp = &txq->stmp[id]; if (stmp->flags & TX_BUF_UNMAP) { @@ -125,7 +125,7 @@ sfxge_tx_qcomplete(struct sfxge_txq *txq unsigned int level; level = txq->added - txq->completed; - if (level <= SFXGE_TXQ_UNBLOCK_LEVEL) + if (level <= SFXGE_TXQ_UNBLOCK_LEVEL(txq->entries)) sfxge_tx_qunblock(txq); } } @@ -218,19 +218,19 @@ sfxge_tx_qlist_post(struct sfxge_txq *tx ("efx_tx_qpost() refragmented descriptors")); level = txq->added - txq->reaped; - KASSERT(level <= SFXGE_NDESCS, ("overfilled TX queue")); + KASSERT(level <= txq->entries, ("overfilled TX queue")); /* Clear the fragment list. */ txq->n_pend_desc = 0; /* Have we reached the block level? */ - if (level < SFXGE_TXQ_BLOCK_LEVEL) + if (level < SFXGE_TXQ_BLOCK_LEVEL(txq->entries)) return; /* Reap, and check again */ sfxge_tx_qreap(txq); level = txq->added - txq->reaped; - if (level < SFXGE_TXQ_BLOCK_LEVEL) + if (level < SFXGE_TXQ_BLOCK_LEVEL(txq->entries)) return; txq->blocked = 1; @@ -242,7 +242,7 @@ sfxge_tx_qlist_post(struct sfxge_txq *tx mb(); sfxge_tx_qreap(txq); level = txq->added - txq->reaped; - if (level < SFXGE_TXQ_BLOCK_LEVEL) { + if (level < SFXGE_TXQ_BLOCK_LEVEL(txq->entries)) { mb(); txq->blocked = 0; } @@ -271,7 +271,7 @@ static int sfxge_tx_queue_mbuf(struct sf } /* Load the packet for DMA. */ - id = txq->added & (SFXGE_NDESCS - 1); + id = txq->added & txq->ptr_mask; stmp = &txq->stmp[id]; rc = bus_dmamap_load_mbuf_sg(txq->packet_dma_tag, stmp->map, mbuf, dma_seg, &n_dma_seg, 0); @@ -318,7 +318,7 @@ static int sfxge_tx_queue_mbuf(struct sf stmp->flags = 0; if (__predict_false(stmp == - &txq->stmp[SFXGE_NDESCS - 1])) + &txq->stmp[txq->ptr_mask])) stmp = &txq->stmp[0]; else stmp++; @@ -762,20 +762,22 @@ static inline const struct tcphdr *tso_t * a TSO header buffer, since they must always be followed by a * payload descriptor referring to an mbuf. */ -#define TSOH_COUNT (SFXGE_NDESCS / 2u) +#define TSOH_COUNT(_txq_entries) ((_txq_entries) / 2u) #define TSOH_PER_PAGE (PAGE_SIZE / TSOH_STD_SIZE) -#define TSOH_PAGE_COUNT ((TSOH_COUNT + TSOH_PER_PAGE - 1) / TSOH_PER_PAGE) +#define TSOH_PAGE_COUNT(_txq_entries) \ + ((TSOH_COUNT(_txq_entries) + TSOH_PER_PAGE - 1) / TSOH_PER_PAGE) static int tso_init(struct sfxge_txq *txq) { struct sfxge_softc *sc = txq->sc; + unsigned int tsoh_page_count = TSOH_PAGE_COUNT(sc->txq_entries); int i, rc; /* Allocate TSO header buffers */ - txq->tsoh_buffer = malloc(TSOH_PAGE_COUNT * sizeof(txq->tsoh_buffer[0]), + txq->tsoh_buffer = malloc(tsoh_page_count * sizeof(txq->tsoh_buffer[0]), M_SFXGE, M_WAITOK); - for (i = 0; i < TSOH_PAGE_COUNT; i++) { + for (i = 0; i < tsoh_page_count; i++) { rc = sfxge_dma_alloc(sc, PAGE_SIZE, &txq->tsoh_buffer[i]); if (rc != 0) goto fail; @@ -796,7 +798,7 @@ static void tso_fini(struct sfxge_txq *t int i; if (txq->tsoh_buffer != NULL) { - for (i = 0; i < TSOH_PAGE_COUNT; i++) + for (i = 0; i < TSOH_PAGE_COUNT(txq->sc->txq_entries); i++) sfxge_dma_free(&txq->tsoh_buffer[i]); free(txq->tsoh_buffer, M_SFXGE); } @@ -1010,12 +1012,12 @@ sfxge_tx_queue_tso(struct sfxge_txq *txq tso.dma_addr = dma_seg->ds_addr + tso.header_len; } - id = txq->added & (SFXGE_NDESCS - 1); + id = txq->added & txq->ptr_mask; if (__predict_false(tso_start_new_packet(txq, &tso, id))) - return -1; + return (-1); while (1) { - id = (id + 1) & (SFXGE_NDESCS - 1); + id = (id + 1) & txq->ptr_mask; tso_fill_packet_with_fragment(txq, &tso); /* Move onto the next fragment? */ @@ -1038,7 +1040,7 @@ sfxge_tx_queue_tso(struct sfxge_txq *txq if (txq->n_pend_desc > SFXGE_TSO_MAX_DESC - (1 + SFXGE_TX_MAPPING_MAX_SEG)) break; - next_id = (id + 1) & (SFXGE_NDESCS - 1); + next_id = (id + 1) & txq->ptr_mask; if (__predict_false(tso_start_new_packet(txq, &tso, next_id))) break; @@ -1070,7 +1072,7 @@ sfxge_tx_qunblock(struct sfxge_txq *txq) unsigned int level; level = txq->added - txq->completed; - if (level <= SFXGE_TXQ_UNBLOCK_LEVEL) + if (level <= SFXGE_TXQ_UNBLOCK_LEVEL(txq->entries)) txq->blocked = 0; } @@ -1146,7 +1148,7 @@ sfxge_tx_qstop(struct sfxge_softc *sc, u txq->common = NULL; efx_sram_buf_tbl_clear(sc->enp, txq->buf_base_id, - EFX_TXQ_NBUFS(SFXGE_NDESCS)); + EFX_TXQ_NBUFS(sc->txq_entries)); mtx_unlock(&evq->lock); mtx_unlock(SFXGE_TXQ_LOCK(txq)); @@ -1172,8 +1174,8 @@ sfxge_tx_qstart(struct sfxge_softc *sc, /* Program the buffer table. */ if ((rc = efx_sram_buf_tbl_set(sc->enp, txq->buf_base_id, esmp, - EFX_TXQ_NBUFS(SFXGE_NDESCS))) != 0) - return rc; + EFX_TXQ_NBUFS(sc->txq_entries))) != 0) + return (rc); /* Determine the kind of queue we are creating. */ switch (txq->type) { @@ -1194,7 +1196,7 @@ sfxge_tx_qstart(struct sfxge_softc *sc, /* Create the common code transmit queue. */ if ((rc = efx_tx_qcreate(sc->enp, index, txq->type, esmp, - SFXGE_NDESCS, txq->buf_base_id, flags, evq->common, + sc->txq_entries, txq->buf_base_id, flags, evq->common, &txq->common)) != 0) goto fail; @@ -1211,8 +1213,8 @@ sfxge_tx_qstart(struct sfxge_softc *sc, fail: efx_sram_buf_tbl_clear(sc->enp, txq->buf_base_id, - EFX_TXQ_NBUFS(SFXGE_NDESCS)); - return rc; + EFX_TXQ_NBUFS(sc->txq_entries)); + return (rc); } void @@ -1280,7 +1282,7 @@ static void sfxge_tx_qfini(struct sfxge_softc *sc, unsigned int index) { struct sfxge_txq *txq; - unsigned int nmaps = SFXGE_NDESCS; + unsigned int nmaps; txq = sc->txq[index]; @@ -1292,6 +1294,7 @@ sfxge_tx_qfini(struct sfxge_softc *sc, u /* Free the context arrays. */ free(txq->pend_desc, M_SFXGE); + nmaps = sc->txq_entries; while (nmaps-- != 0) bus_dmamap_destroy(txq->packet_dma_tag, txq->stmp[nmaps].map); free(txq->stmp, M_SFXGE); @@ -1323,6 +1326,8 @@ sfxge_tx_qinit(struct sfxge_softc *sc, u txq = malloc(sizeof(struct sfxge_txq), M_SFXGE, M_ZERO | M_WAITOK); txq->sc = sc; + txq->entries = sc->txq_entries; + txq->ptr_mask = txq->entries - 1; sc->txq[txq_index] = txq; esmp = &txq->mem; @@ -1330,12 +1335,12 @@ sfxge_tx_qinit(struct sfxge_softc *sc, u evq = sc->evq[evq_index]; /* Allocate and zero DMA space for the descriptor ring. */ - if ((rc = sfxge_dma_alloc(sc, EFX_TXQ_SIZE(SFXGE_NDESCS), esmp)) != 0) + if ((rc = sfxge_dma_alloc(sc, EFX_TXQ_SIZE(sc->txq_entries), esmp)) != 0) return (rc); - (void)memset(esmp->esm_base, 0, EFX_TXQ_SIZE(SFXGE_NDESCS)); + (void)memset(esmp->esm_base, 0, EFX_TXQ_SIZE(sc->txq_entries)); /* Allocate buffer table entries. */ - sfxge_sram_buf_tbl_alloc(sc, EFX_TXQ_NBUFS(SFXGE_NDESCS), + sfxge_sram_buf_tbl_alloc(sc, EFX_TXQ_NBUFS(sc->txq_entries), &txq->buf_base_id); /* Create a DMA tag for packet mappings. */ @@ -1349,13 +1354,13 @@ sfxge_tx_qinit(struct sfxge_softc *sc, u } /* Allocate pending descriptor array for batching writes. */ - txq->pend_desc = malloc(sizeof(efx_buffer_t) * SFXGE_NDESCS, + txq->pend_desc = malloc(sizeof(efx_buffer_t) * sc->txq_entries, M_SFXGE, M_ZERO | M_WAITOK); /* Allocate and initialise mbuf DMA mapping array. */ - txq->stmp = malloc(sizeof(struct sfxge_tx_mapping) * SFXGE_NDESCS, + txq->stmp = malloc(sizeof(struct sfxge_tx_mapping) * sc->txq_entries, M_SFXGE, M_ZERO | M_WAITOK); - for (nmaps = 0; nmaps < SFXGE_NDESCS; nmaps++) { + for (nmaps = 0; nmaps < sc->txq_entries; nmaps++) { rc = bus_dmamap_create(txq->packet_dma_tag, 0, &txq->stmp[nmaps].map); if (rc != 0) Modified: head/sys/dev/sfxge/sfxge_tx.h ============================================================================== --- head/sys/dev/sfxge/sfxge_tx.h Tue Sep 30 20:32:27 2014 (r272327) +++ head/sys/dev/sfxge/sfxge_tx.h Tue Sep 30 20:36:07 2014 (r272328) @@ -106,7 +106,7 @@ enum sfxge_txq_type { SFXGE_TXQ_NTYPES }; -#define SFXGE_TXQ_UNBLOCK_LEVEL (EFX_TXQ_LIMIT(SFXGE_NDESCS) / 4) +#define SFXGE_TXQ_UNBLOCK_LEVEL(_entries) (EFX_TXQ_LIMIT(_entries) / 4) #define SFXGE_TX_BATCH 64 @@ -128,6 +128,8 @@ struct sfxge_txq { unsigned int evq_index; efsys_mem_t mem; unsigned int buf_base_id; + unsigned int entries; + unsigned int ptr_mask; struct sfxge_tx_mapping *stmp; /* Packets in flight. */ bus_dma_tag_t packet_dma_tag; From owner-svn-src-all@FreeBSD.ORG Tue Sep 30 20:38:37 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4AD81BC1; Tue, 30 Sep 2014 20:38:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 370F8A67; Tue, 30 Sep 2014 20:38:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8UKcbY0003654; Tue, 30 Sep 2014 20:38:37 GMT (envelope-from gnn@FreeBSD.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8UKcbTn003653; Tue, 30 Sep 2014 20:38:37 GMT (envelope-from gnn@FreeBSD.org) Message-Id: <201409302038.s8UKcbTn003653@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gnn set sender to gnn@FreeBSD.org using -f From: "George V. Neville-Neil" Date: Tue, 30 Sep 2014 20:38:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272329 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2014 20:38:37 -0000 Author: gnn Date: Tue Sep 30 20:38:36 2014 New Revision: 272329 URL: http://svnweb.freebsd.org/changeset/base/272329 Log: Update SolarFlare driver manual page with new tunables. Submitted by: Andrew Rybchenko Sponsored by: Solarflare Communications, Inc. Modified: head/share/man/man4/sfxge.4 Modified: head/share/man/man4/sfxge.4 ============================================================================== --- head/share/man/man4/sfxge.4 Tue Sep 30 20:36:07 2014 (r272328) +++ head/share/man/man4/sfxge.4 Tue Sep 30 20:38:36 2014 (r272329) @@ -76,6 +76,32 @@ The .Nm driver supports all 10Gb Ethernet adapters based on Solarflare SFC9000 family controllers. +.Sh LOADER TUNABLES +Tunables can be set at the +.Xr loader 8 +prompt before booting the kernel or stored in +.Xr loader.conf 5 . +Actual values can be obtained using +.Xr sysctl 8 . +.Bl -tag -width indent +.It Va hw.sfxge.rx_ring +Maximum number of descriptors in a receive queue ring. +Supported values are: 512, 1024, 2048 and 4096. +.It Va hw.sfxge.tx_ring +Maximum number of descriptors in a transmit queue ring. +Supported values are: 512, 1024, 2048 and 4096. +.It Va hw.sfxge.tx_dpl_get_max +The maximum length of the deferred packet 'get-list' for queued transmit +packets, used only if the transmit queue lock can be acquired. +If packet is dropped, \fItx_early_drops\fR counter grows and local sender +gets ENOBUFS error. +Value must be greater than 0. +.It Va hw.sfxge.tx_dpl_put_max +The maximum length of the deferred packet 'put-list' for queued transmit +packets, used if the transmit queue lock cannot be acquired. +If packet is dropped, \fItx_early_drops\fR counter grows and local sender +gets ENOBUFS error. +Value must be greater or equal to 0. .Sh SUPPORT For general information and support, go to the Solarflare support website at: From owner-svn-src-all@FreeBSD.ORG Tue Sep 30 20:43:22 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ACDC5DDA; Tue, 30 Sep 2014 20:43:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8FEF2B31; Tue, 30 Sep 2014 20:43:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8UKhMYb007669; Tue, 30 Sep 2014 20:43:22 GMT (envelope-from gnn@FreeBSD.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8UKhLow007666; Tue, 30 Sep 2014 20:43:21 GMT (envelope-from gnn@FreeBSD.org) Message-Id: <201409302043.s8UKhLow007666@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gnn set sender to gnn@FreeBSD.org using -f From: "George V. Neville-Neil" Date: Tue, 30 Sep 2014 20:43:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272330 - head/sys/dev/sfxge X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2014 20:43:22 -0000 Author: gnn Date: Tue Sep 30 20:43:21 2014 New Revision: 272330 URL: http://svnweb.freebsd.org/changeset/base/272330 Log: The patch allows to check state of the software Tx queues at run time. Submitted by: Andrew Rybchenko Sponsored by: Solarflare Communications, Inc. Modified: head/sys/dev/sfxge/sfxge.h head/sys/dev/sfxge/sfxge_tx.c head/sys/dev/sfxge/sfxge_tx.h Modified: head/sys/dev/sfxge/sfxge.h ============================================================================== --- head/sys/dev/sfxge/sfxge.h Tue Sep 30 20:38:36 2014 (r272329) +++ head/sys/dev/sfxge/sfxge.h Tue Sep 30 20:43:21 2014 (r272330) @@ -202,6 +202,7 @@ struct sfxge_softc { struct ifnet *ifnet; unsigned int if_flags; struct sysctl_oid *stats_node; + struct sysctl_oid *txqs_node; struct task task_reset; Modified: head/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- head/sys/dev/sfxge/sfxge_tx.c Tue Sep 30 20:38:36 2014 (r272329) +++ head/sys/dev/sfxge/sfxge_tx.c Tue Sep 30 20:43:21 2014 (r272330) @@ -176,7 +176,7 @@ sfxge_tx_qdpl_swizzle(struct sfxge_txq * KASSERT(*get_tailp == NULL, ("*get_tailp != NULL")); *stdp->std_getp = get_next; stdp->std_getp = get_tailp; - stdp->std_count += count; + stdp->std_get_count += count; } #endif /* SFXGE_HAVE_MQ */ @@ -380,7 +380,7 @@ sfxge_tx_qdpl_drain(struct sfxge_txq *tx prefetch_read_many(txq->common); mbuf = stdp->std_get; - count = stdp->std_count; + count = stdp->std_get_count; while (count != 0) { KASSERT(mbuf != NULL, ("mbuf == NULL")); @@ -412,17 +412,17 @@ sfxge_tx_qdpl_drain(struct sfxge_txq *tx if (count == 0) { KASSERT(mbuf == NULL, ("mbuf != NULL")); stdp->std_get = NULL; - stdp->std_count = 0; + stdp->std_get_count = 0; stdp->std_getp = &stdp->std_get; } else { stdp->std_get = mbuf; - stdp->std_count = count; + stdp->std_get_count = count; } if (txq->added != pushed) efx_tx_qpush(txq->common, txq->added); - KASSERT(txq->blocked || stdp->std_count == 0, + KASSERT(txq->blocked || stdp->std_get_count == 0, ("queue unblocked but count is non-zero")); } @@ -476,12 +476,12 @@ sfxge_tx_qdpl_put(struct sfxge_txq *txq, sfxge_tx_qdpl_swizzle(txq); - if (stdp->std_count >= SFXGE_TX_DPL_GET_PKT_LIMIT_DEFAULT) + if (stdp->std_get_count >= SFXGE_TX_DPL_GET_PKT_LIMIT_DEFAULT) return (ENOBUFS); *(stdp->std_getp) = mbuf; stdp->std_getp = &mbuf->m_nextpkt; - stdp->std_count++; + stdp->std_get_count++; } else { volatile uintptr_t *putp; uintptr_t old; @@ -575,7 +575,7 @@ sfxge_tx_qdpl_flush(struct sfxge_txq *tx m_freem(mbuf); } stdp->std_get = NULL; - stdp->std_count = 0; + stdp->std_get_count = 0; stdp->std_getp = &stdp->std_get; mtx_unlock(&txq->lock); @@ -1315,6 +1315,8 @@ static int sfxge_tx_qinit(struct sfxge_softc *sc, unsigned int txq_index, enum sfxge_txq_type type, unsigned int evq_index) { + char name[16]; + struct sysctl_oid *txq_node; struct sfxge_txq *txq; struct sfxge_evq *evq; #ifdef SFXGE_HAVE_MQ @@ -1367,6 +1369,16 @@ sfxge_tx_qinit(struct sfxge_softc *sc, u goto fail2; } + snprintf(name, sizeof(name), "%u", txq_index); + txq_node = SYSCTL_ADD_NODE( + device_get_sysctl_ctx(sc->dev), + SYSCTL_CHILDREN(sc->txqs_node), + OID_AUTO, name, CTLFLAG_RD, NULL, ""); + if (txq_node == NULL) { + rc = ENOMEM; + goto fail_txq_node; + } + if (type == SFXGE_TXQ_IP_TCP_UDP_CKSUM && (rc = tso_init(txq)) != 0) goto fail3; @@ -1377,6 +1389,11 @@ sfxge_tx_qinit(struct sfxge_softc *sc, u stdp->std_getp = &stdp->std_get; mtx_init(&txq->lock, "txq", NULL, MTX_DEF); + + SYSCTL_ADD_UINT(device_get_sysctl_ctx(sc->dev), + SYSCTL_CHILDREN(txq_node), OID_AUTO, + "dpl_get_count", CTLFLAG_RD | CTLFLAG_STATS, + &stdp->std_get_count, 0, ""); #endif txq->type = type; @@ -1387,6 +1404,7 @@ sfxge_tx_qinit(struct sfxge_softc *sc, u return (0); fail3: +fail_txq_node: free(txq->pend_desc, M_SFXGE); fail2: while (nmaps-- != 0) @@ -1480,6 +1498,15 @@ sfxge_tx_init(struct sfxge_softc *sc) KASSERT(intr->state == SFXGE_INTR_INITIALIZED, ("intr->state != SFXGE_INTR_INITIALIZED")); + sc->txqs_node = SYSCTL_ADD_NODE( + device_get_sysctl_ctx(sc->dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(sc->dev)), + OID_AUTO, "txq", CTLFLAG_RD, NULL, "Tx queues"); + if (sc->txqs_node == NULL) { + rc = ENOMEM; + goto fail_txq_node; + } + /* Initialize the transmit queues */ if ((rc = sfxge_tx_qinit(sc, SFXGE_TXQ_NON_CKSUM, SFXGE_TXQ_NON_CKSUM, 0)) != 0) @@ -1509,5 +1536,6 @@ fail2: sfxge_tx_qfini(sc, SFXGE_TXQ_NON_CKSUM); fail: +fail_txq_node: return (rc); } Modified: head/sys/dev/sfxge/sfxge_tx.h ============================================================================== --- head/sys/dev/sfxge/sfxge_tx.h Tue Sep 30 20:38:36 2014 (r272329) +++ head/sys/dev/sfxge/sfxge_tx.h Tue Sep 30 20:43:21 2014 (r272330) @@ -82,10 +82,10 @@ struct sfxge_tx_mapping { * Deferred packet list. */ struct sfxge_tx_dpl { - uintptr_t std_put; /* Head of put list. */ - struct mbuf *std_get; /* Head of get list. */ - struct mbuf **std_getp; /* Tail of get list. */ - unsigned int std_count; /* Count of packets. */ + uintptr_t std_put; /* Head of put list. */ + struct mbuf *std_get; /* Head of get list. */ + struct mbuf **std_getp; /* Tail of get list. */ + unsigned int std_get_count; /* Packets in get list. */ }; From owner-svn-src-all@FreeBSD.ORG Tue Sep 30 20:47:37 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 73E02148; Tue, 30 Sep 2014 20:47:37 +0000 (UTC) Received: from mail-wg0-x230.google.com (mail-wg0-x230.google.com [IPv6:2a00:1450:400c:c00::230]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 93D6EB85; Tue, 30 Sep 2014 20:47:36 +0000 (UTC) Received: by mail-wg0-f48.google.com with SMTP id l18so3486996wgh.31 for ; Tue, 30 Sep 2014 13:47: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:message-id:subject :from:to:cc:content-type; bh=hMOYhXI3VjgKzPa7pzwjjQv7xlvHyLerV3DO3S6V16I=; b=XrOKpSS3HTE8EvAyX2mwMfIa5sUL3vX2CQCZLocek+GgDemBGJa5Joe504/NK6+fTR RhwBjbKbidrFKW7T1pAivNWbgmOtYJwZgpmHFH+tTpq8pxhzU5ch6LRk0Bhg/8kMhnmJ niU4E+ywB6Q7Tr1+Mk7qqFjBQ6KeWJ8Or2C84/9GvPfICwCM6p+8Tb9TCdoUMimsbA3u dO9ClwBg34L6Pd1VZbnhV5Gy5HNKm5NPhtSbYg6L+q0M4dJbtgIdjPP010kcpsPBxcim jMq+k1M1iAK+UKECIgYPgfYvsxnSm14HXDFYelpfF4Y/fc6PTK7sYsCSrpRQAjXH1U7H fwGA== MIME-Version: 1.0 X-Received: by 10.180.74.203 with SMTP id w11mr8709218wiv.26.1412110054929; Tue, 30 Sep 2014 13:47:34 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.216.106.136 with HTTP; Tue, 30 Sep 2014 13:47:34 -0700 (PDT) In-Reply-To: <201409302029.s8UKTx0e098653@svn.freebsd.org> References: <201409302029.s8UKTx0e098653@svn.freebsd.org> Date: Tue, 30 Sep 2014 13:47:34 -0700 X-Google-Sender-Auth: RdEtaBpv-AzisyBpzQYXvi39vjU Message-ID: Subject: Re: svn commit: r272326 - head/sys/netinet From: Adrian Chadd To: Michael Tuexen Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2014 20:47:37 -0000 Hi, I think you should consider adding a new set of protocol counters for UDPLITE. :) -a On 30 September 2014 13:29, Michael Tuexen wrote: > Author: tuexen > Date: Tue Sep 30 20:29:58 2014 > New Revision: 272326 > URL: http://svnweb.freebsd.org/changeset/base/272326 > > Log: > UDPLite requires a checksum. Therefore, discard a received packet if > the checksum is 0. > > MFC after: 3 days > > Modified: > head/sys/netinet/udp_usrreq.c > > Modified: head/sys/netinet/udp_usrreq.c > ============================================================================== > --- head/sys/netinet/udp_usrreq.c Tue Sep 30 20:18:10 2014 (r272325) > +++ head/sys/netinet/udp_usrreq.c Tue Sep 30 20:29:58 2014 (r272326) > @@ -498,8 +498,16 @@ udp_input(struct mbuf **mp, int *offp, i > m_freem(m); > return (IPPROTO_DONE); > } > - } else > - UDPSTAT_INC(udps_nosum); > + } else { > + if (proto == IPPROTO_UDP) { > + UDPSTAT_INC(udps_nosum); > + } else { > + /* UDPLite requires a checksum */ > + /* XXX: What is the right UDPLite MIB counter here? */ > + m_freem(m); > + return (IPPROTO_DONE); > + } > + } > > pcbinfo = get_inpcbinfo(proto); > if (IN_MULTICAST(ntohl(ip->ip_dst.s_addr)) || > From owner-svn-src-all@FreeBSD.ORG Tue Sep 30 20:57:26 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2824560B; Tue, 30 Sep 2014 20:57:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 143B8CAB; Tue, 30 Sep 2014 20:57:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8UKvPLR013019; Tue, 30 Sep 2014 20:57:25 GMT (envelope-from gnn@FreeBSD.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8UKvP4W013017; Tue, 30 Sep 2014 20:57:25 GMT (envelope-from gnn@FreeBSD.org) Message-Id: <201409302057.s8UKvP4W013017@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gnn set sender to gnn@FreeBSD.org using -f From: "George V. Neville-Neil" Date: Tue, 30 Sep 2014 20:57:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272331 - head/sys/dev/sfxge X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2014 20:57:26 -0000 Author: gnn Date: Tue Sep 30 20:57:25 2014 New Revision: 272331 URL: http://svnweb.freebsd.org/changeset/base/272331 Log: Support tunable to control Tx deferred packet list limits Also increase default for Tx queue get-list limit. Too small limit results in TCP packets drops especiall when many streams are running simultaneously. Put list may be kept small enough since it is just a temporary location if transmit function can't get Tx queue lock. Submitted by: Andrew Rybchenko Sponsored by: Solarflare Communications, Inc. Modified: head/sys/dev/sfxge/sfxge_tx.c head/sys/dev/sfxge/sfxge_tx.h Modified: head/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- head/sys/dev/sfxge/sfxge_tx.c Tue Sep 30 20:43:21 2014 (r272330) +++ head/sys/dev/sfxge/sfxge_tx.c Tue Sep 30 20:57:25 2014 (r272331) @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -77,6 +78,25 @@ __FBSDID("$FreeBSD$"); #define SFXGE_TSO_MAX_DESC ((65535 / 512) * 2 + SFXGE_TX_MAPPING_MAX_SEG - 1) #define SFXGE_TXQ_BLOCK_LEVEL(_entries) ((_entries) - SFXGE_TSO_MAX_DESC) +#ifdef SFXGE_HAVE_MQ + +#define SFXGE_PARAM_TX_DPL_GET_MAX SFXGE_PARAM(tx_dpl_get_max) +static int sfxge_tx_dpl_get_max = SFXGE_TX_DPL_GET_PKT_LIMIT_DEFAULT; +TUNABLE_INT(SFXGE_PARAM_TX_DPL_GET_MAX, &sfxge_tx_dpl_get_max); +SYSCTL_INT(_hw_sfxge, OID_AUTO, tx_dpl_get_max, CTLFLAG_RDTUN, + &sfxge_tx_dpl_get_max, 0, + "Maximum number of packets in deferred packet get-list"); + +#define SFXGE_PARAM_TX_DPL_PUT_MAX SFXGE_PARAM(tx_dpl_put_max) +static int sfxge_tx_dpl_put_max = SFXGE_TX_DPL_PUT_PKT_LIMIT_DEFAULT; +TUNABLE_INT(SFXGE_PARAM_TX_DPL_PUT_MAX, &sfxge_tx_dpl_put_max); +SYSCTL_INT(_hw_sfxge, OID_AUTO, tx_dpl_put_max, CTLFLAG_RDTUN, + &sfxge_tx_dpl_put_max, 0, + "Maximum number of packets in deferred packet put-list"); + +#endif + + /* Forward declarations. */ static inline void sfxge_tx_qdpl_service(struct sfxge_txq *txq); static void sfxge_tx_qlist_post(struct sfxge_txq *txq); @@ -476,7 +496,7 @@ sfxge_tx_qdpl_put(struct sfxge_txq *txq, sfxge_tx_qdpl_swizzle(txq); - if (stdp->std_get_count >= SFXGE_TX_DPL_GET_PKT_LIMIT_DEFAULT) + if (stdp->std_get_count >= stdp->std_get_max) return (ENOBUFS); *(stdp->std_getp) = mbuf; @@ -498,7 +518,7 @@ sfxge_tx_qdpl_put(struct sfxge_txq *txq, old_len = mp->m_pkthdr.csum_data; } else old_len = 0; - if (old_len >= SFXGE_TX_DPL_PUT_PKT_LIMIT_DEFAULT) + if (old_len >= stdp->std_put_max) return (ENOBUFS); mbuf->m_pkthdr.csum_data = old_len + 1; mbuf->m_nextpkt = (void *)old; @@ -1384,8 +1404,23 @@ sfxge_tx_qinit(struct sfxge_softc *sc, u goto fail3; #ifdef SFXGE_HAVE_MQ + if (sfxge_tx_dpl_get_max <= 0) { + log(LOG_ERR, "%s=%d must be greater than 0", + SFXGE_PARAM_TX_DPL_GET_MAX, sfxge_tx_dpl_get_max); + rc = EINVAL; + goto fail_tx_dpl_get_max; + } + if (sfxge_tx_dpl_put_max < 0) { + log(LOG_ERR, "%s=%d must be greater or equal to 0", + SFXGE_PARAM_TX_DPL_PUT_MAX, sfxge_tx_dpl_put_max); + rc = EINVAL; + goto fail_tx_dpl_put_max; + } + /* Initialize the deferred packet list. */ stdp = &txq->dpl; + stdp->std_put_max = sfxge_tx_dpl_put_max; + stdp->std_get_max = sfxge_tx_dpl_get_max; stdp->std_getp = &stdp->std_get; mtx_init(&txq->lock, "txq", NULL, MTX_DEF); @@ -1403,6 +1438,8 @@ sfxge_tx_qinit(struct sfxge_softc *sc, u return (0); +fail_tx_dpl_put_max: +fail_tx_dpl_get_max: fail3: fail_txq_node: free(txq->pend_desc, M_SFXGE); Modified: head/sys/dev/sfxge/sfxge_tx.h ============================================================================== --- head/sys/dev/sfxge/sfxge_tx.h Tue Sep 30 20:43:21 2014 (r272330) +++ head/sys/dev/sfxge/sfxge_tx.h Tue Sep 30 20:57:25 2014 (r272331) @@ -75,13 +75,17 @@ struct sfxge_tx_mapping { enum sfxge_tx_buf_flags flags; }; -#define SFXGE_TX_DPL_GET_PKT_LIMIT_DEFAULT 64 +#define SFXGE_TX_DPL_GET_PKT_LIMIT_DEFAULT 1024 #define SFXGE_TX_DPL_PUT_PKT_LIMIT_DEFAULT 64 /* * Deferred packet list. */ struct sfxge_tx_dpl { + unsigned int std_get_max; /* Maximum number of packets + * in get list */ + unsigned int std_put_max; /* Maximum number of packets + * in put list */ uintptr_t std_put; /* Head of put list. */ struct mbuf *std_get; /* Head of get list. */ struct mbuf **std_getp; /* Tail of get list. */ From owner-svn-src-all@FreeBSD.ORG Tue Sep 30 21:03:18 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 76192863; Tue, 30 Sep 2014 21:03:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 47658D80; Tue, 30 Sep 2014 21:03:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8UL3Ifc017265; Tue, 30 Sep 2014 21:03:18 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8UL3HCW017263; Tue, 30 Sep 2014 21:03:17 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201409302103.s8UL3HCW017263@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 30 Sep 2014 21:03:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272332 - in stable/10/sys/cddl: boot/zfs contrib/opensolaris/uts/common/fs/zfs/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2014 21:03:18 -0000 Author: delphij Date: Tue Sep 30 21:03:17 2014 New Revision: 272332 URL: http://svnweb.freebsd.org/changeset/base/272332 Log: MFC r271526: MFV r271510: Enforce 4K as smallest indirect block size (previously the smallest indirect block size was 1K but that was never used). This makes some space estimates more accurate and uses less memory for some data structures. Illumos issue: 5141 zfs minimum indirect block size is 4K Approved by: re (gjb) Modified: stable/10/sys/cddl/boot/zfs/zfsimpl.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/boot/zfs/zfsimpl.h ============================================================================== --- stable/10/sys/cddl/boot/zfs/zfsimpl.h Tue Sep 30 20:57:25 2014 (r272331) +++ stable/10/sys/cddl/boot/zfs/zfsimpl.h Tue Sep 30 21:03:17 2014 (r272332) @@ -840,7 +840,7 @@ struct uberblock { * Fixed constants. */ #define DNODE_SHIFT 9 /* 512 bytes */ -#define DN_MIN_INDBLKSHIFT 10 /* 1k */ +#define DN_MIN_INDBLKSHIFT 12 /* 4k */ #define DN_MAX_INDBLKSHIFT 14 /* 16k */ #define DNODE_BLOCK_SHIFT 14 /* 16k */ #define DNODE_CORE_SIZE 64 /* 64 bytes for dnode sans blkptrs */ Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h Tue Sep 30 20:57:25 2014 (r272331) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h Tue Sep 30 21:03:17 2014 (r272332) @@ -56,7 +56,7 @@ extern "C" { * Fixed constants. */ #define DNODE_SHIFT 9 /* 512 bytes */ -#define DN_MIN_INDBLKSHIFT 10 /* 1k */ +#define DN_MIN_INDBLKSHIFT 12 /* 4k */ #define DN_MAX_INDBLKSHIFT 14 /* 16k */ #define DNODE_BLOCK_SHIFT 14 /* 16k */ #define DNODE_CORE_SIZE 64 /* 64 bytes for dnode sans blkptrs */ From owner-svn-src-all@FreeBSD.ORG Tue Sep 30 21:04:03 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3AC3CA2C; Tue, 30 Sep 2014 21:04:03 +0000 (UTC) Received: from mail-n.franken.de (drew.ipv6.franken.de [IPv6:2001:638:a02:a001:20e:cff:fe4a:feaa]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mail-n.franken.de", Issuer "Thawte DV SSL CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ED940D90; Tue, 30 Sep 2014 21:04:02 +0000 (UTC) Received: from [192.168.1.102] (p508F16E6.dip0.t-ipconnect.de [80.143.22.230]) (Authenticated sender: macmic) by mail-n.franken.de (Postfix) with ESMTP id C387A1C104FDB; Tue, 30 Sep 2014 23:03:58 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r272326 - head/sys/netinet From: Michael Tuexen In-Reply-To: Date: Tue, 30 Sep 2014 23:03:56 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <4A8FE3A2-B085-4EBC-8E3E-F5A91129EEDE@freebsd.org> References: <201409302029.s8UKTx0e098653@svn.freebsd.org> To: Adrian Chadd X-Mailer: Apple Mail (2.1878.6) Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2014 21:04:03 -0000 On 30 Sep 2014, at 22:47, Adrian Chadd wrote: > Hi, >=20 > I think you should consider adding a new set of protocol counters for > UDPLITE. :) Yepp. There is http://tools.ietf.org/html/rfc5097 which needs to be implemented. Best regards Michael >=20 >=20 >=20 > -a >=20 > On 30 September 2014 13:29, Michael Tuexen wrote: >> Author: tuexen >> Date: Tue Sep 30 20:29:58 2014 >> New Revision: 272326 >> URL: http://svnweb.freebsd.org/changeset/base/272326 >>=20 >> Log: >> UDPLite requires a checksum. Therefore, discard a received packet if >> the checksum is 0. >>=20 >> MFC after: 3 days >>=20 >> Modified: >> head/sys/netinet/udp_usrreq.c >>=20 >> Modified: head/sys/netinet/udp_usrreq.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/netinet/udp_usrreq.c Tue Sep 30 20:18:10 2014 = (r272325) >> +++ head/sys/netinet/udp_usrreq.c Tue Sep 30 20:29:58 2014 = (r272326) >> @@ -498,8 +498,16 @@ udp_input(struct mbuf **mp, int *offp, i >> m_freem(m); >> return (IPPROTO_DONE); >> } >> - } else >> - UDPSTAT_INC(udps_nosum); >> + } else { >> + if (proto =3D=3D IPPROTO_UDP) { >> + UDPSTAT_INC(udps_nosum); >> + } else { >> + /* UDPLite requires a checksum */ >> + /* XXX: What is the right UDPLite MIB counter = here? */ >> + m_freem(m); >> + return (IPPROTO_DONE); >> + } >> + } >>=20 >> pcbinfo =3D get_inpcbinfo(proto); >> if (IN_MULTICAST(ntohl(ip->ip_dst.s_addr)) || >>=20 >=20 >=20 From owner-svn-src-all@FreeBSD.ORG Tue Sep 30 21:28:05 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D42CC495; Tue, 30 Sep 2014 21:28:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BFA9AD3; Tue, 30 Sep 2014 21:28:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8ULS55D027915; Tue, 30 Sep 2014 21:28:05 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8ULS5je027914; Tue, 30 Sep 2014 21:28:05 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201409302128.s8ULS5je027914@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Tue, 30 Sep 2014 21:28:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272333 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2014 21:28:05 -0000 Author: ian Date: Tue Sep 30 21:28:05 2014 New Revision: 272333 URL: http://svnweb.freebsd.org/changeset/base/272333 Log: When building the lists of available memory, actually honor the exclusion flags, like the comment says it does. Pointy hat: ian Submitted by: Svatopluk Kraus Modified: head/sys/arm/arm/physmem.c Modified: head/sys/arm/arm/physmem.c ============================================================================== --- head/sys/arm/arm/physmem.c Tue Sep 30 21:03:17 2014 (r272332) +++ head/sys/arm/arm/physmem.c Tue Sep 30 21:28:05 2014 (r272333) @@ -168,6 +168,12 @@ regions_to_avail(vm_paddr_t *avail, uint end = hwp->size + start; realmem += arm32_btop(end - start); for (exi = 0, exp = exregions; exi < excnt; ++exi, ++exp) { + /* + * If the excluded region does not match given flags, + * continue checking with the next excluded region. + */ + if ((exp->flags & exflags) == 0) + continue; xstart = exp->addr; xend = exp->size + xstart; /* From owner-svn-src-all@FreeBSD.ORG Tue Sep 30 22:19:55 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 820428F2; Tue, 30 Sep 2014 22:19:55 +0000 (UTC) Received: from mx1.sbone.de (bird.sbone.de [46.4.1.90]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id E6DE0C15; Tue, 30 Sep 2014 22:19:54 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id D7A1425D387C; Tue, 30 Sep 2014 22:19:50 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 033E4C7709A; Tue, 30 Sep 2014 22:19:50 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id TpeX8bt8Ohkt; Tue, 30 Sep 2014 22:19:48 +0000 (UTC) Received: from [IPv6:fde9:577b:c1a9:4410:f0c1:ca19:2fb1:f851] (unknown [IPv6:fde9:577b:c1a9:4410:f0c1:ca19:2fb1:f851]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 29546C77087; Tue, 30 Sep 2014 22:19:46 +0000 (UTC) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r272329 - head/share/man/man4 From: "Bjoern A. Zeeb" In-Reply-To: <201409302038.s8UKcbTn003653@svn.freebsd.org> Date: Tue, 30 Sep 2014 22:19:40 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201409302038.s8UKcbTn003653@svn.freebsd.org> To: "George V. Neville-Neil" X-Mailer: Apple Mail (2.1878.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2014 22:19:55 -0000 On 30 Sep 2014, at 20:38 , George V. Neville-Neil = wrote: > Author: gnn > Date: Tue Sep 30 20:38:36 2014 > New Revision: 272329 > URL: http://svnweb.freebsd.org/changeset/base/272329 >=20 > Log: > Update SolarFlare driver manual page with new tunables. >=20 > Submitted by: Andrew Rybchenko > Sponsored by: Solarflare Communications, Inc. >=20 You should bump .Dd > Modified: > head/share/man/man4/sfxge.4 >=20 > Modified: head/share/man/man4/sfxge.4 > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=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/share/man/man4/sfxge.4 Tue Sep 30 20:36:07 2014 = (r272328) > +++ head/share/man/man4/sfxge.4 Tue Sep 30 20:38:36 2014 = (r272329) > @@ -76,6 +76,32 @@ The > .Nm > driver supports all 10Gb Ethernet adapters based on Solarflare SFC9000 > family controllers. > +.Sh LOADER TUNABLES > +Tunables can be set at the > +.Xr loader 8 > +prompt before booting the kernel or stored in > +.Xr loader.conf 5 . > +Actual values can be obtained using > +.Xr sysctl 8 . > +.Bl -tag -width indent > +.It Va hw.sfxge.rx_ring > +Maximum number of descriptors in a receive queue ring. > +Supported values are: 512, 1024, 2048 and 4096. > +.It Va hw.sfxge.tx_ring > +Maximum number of descriptors in a transmit queue ring. > +Supported values are: 512, 1024, 2048 and 4096. > +.It Va hw.sfxge.tx_dpl_get_max > +The maximum length of the deferred packet 'get-list' for queued = transmit > +packets, used only if the transmit queue lock can be acquired. > +If packet is dropped, \fItx_early_drops\fR counter grows and local = sender > +gets ENOBUFS error. > +Value must be greater than 0. > +.It Va hw.sfxge.tx_dpl_put_max > +The maximum length of the deferred packet 'put-list' for queued = transmit > +packets, used if the transmit queue lock cannot be acquired. > +If packet is dropped, \fItx_early_drops\fR counter grows and local = sender > +gets ENOBUFS error. > +Value must be greater or equal to 0. > .Sh SUPPORT > For general information and support, > go to the Solarflare support website at: >=20 =97=20 Bjoern A. Zeeb "Come on. Learn, goddamn it.", WarGames, 1983 From owner-svn-src-all@FreeBSD.ORG Tue Sep 30 23:01:12 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8204F3CD; Tue, 30 Sep 2014 23:01:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 55C6812E; Tue, 30 Sep 2014 23:01:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8UN1CnO075265; Tue, 30 Sep 2014 23:01:12 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8UN1CIu075264; Tue, 30 Sep 2014 23:01:12 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201409302301.s8UN1CIu075264@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Tue, 30 Sep 2014 23:01:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272334 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2014 23:01:12 -0000 Author: ian Date: Tue Sep 30 23:01:11 2014 New Revision: 272334 URL: http://svnweb.freebsd.org/changeset/base/272334 Log: Return the actual baud rate programmed in the hardware rather than 115200. This allows the "3wire" entry in /etc/ttys (with no speed specified) to work. Modified: head/sys/dev/uart/uart_dev_imx.c Modified: head/sys/dev/uart/uart_dev_imx.c ============================================================================== --- head/sys/dev/uart/uart_dev_imx.c Tue Sep 30 21:28:05 2014 (r272333) +++ head/sys/dev/uart/uart_dev_imx.c Tue Sep 30 23:01:11 2014 (r272334) @@ -90,6 +90,45 @@ imx_uart_probe(struct uart_bas *bas) return (0); } +static u_int +imx_uart_getbaud(struct uart_bas *bas) +{ + uint32_t rate, ubir, ubmr; + u_int baud, blo, bhi, i; + static const u_int predivs[] = {6, 5, 4, 3, 2, 1, 7, 1}; + static const u_int std_rates[] = { + 9600, 14400, 19200, 38400, 57600, 115200, 230400, 460800, 921600 + }; + + /* + * Get the baud rate the hardware is programmed for, then search the + * table of standard baud rates for a number that's within 3% of the + * actual rate the hardware is programmed for. It's more comforting to + * see that your console is running at 115200 than 114942. Note that + * here we cannot make a simplifying assumption that the predivider and + * numerator are 1 (like we do when setting the baud rate), because we + * don't know what u-boot might have set up. + */ + i = (GETREG(bas, REG(UFCR)) & IMXUART_UFCR_RFDIV_MASK) >> + IMXUART_UFCR_RFDIV_SHIFT; + rate = imx_ccm_uart_hz() / predivs[i]; + ubir = GETREG(bas, REG(UBIR)) + 1; + ubmr = GETREG(bas, REG(UBMR)) + 1; + baud = ((rate / 16 ) * ubir) / ubmr; + + blo = (baud * 100) / 103; + bhi = (baud * 100) / 97; + for (i = 0; i < nitems(std_rates); i++) { + rate = std_rates[i]; + if (rate >= blo && rate <= bhi) { + baud = rate; + break; + } + } + + return (baud); +} + static void imx_uart_init(struct uart_bas *bas, int baudrate, int databits, int stopbits, int parity) @@ -348,8 +387,7 @@ imx_uart_bus_ioctl(struct uart_softc *sc /* TODO */ break; case UART_IOCTL_BAUD: - /* TODO */ - *(int*)data = 115200; + *(u_int*)data = imx_uart_getbaud(bas); break; default: error = EINVAL; From owner-svn-src-all@FreeBSD.ORG Tue Sep 30 23:16:27 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 945138E7; Tue, 30 Sep 2014 23:16:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8079A260; Tue, 30 Sep 2014 23:16:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8UNGRAh082396; Tue, 30 Sep 2014 23:16:27 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8UNGRLf082395; Tue, 30 Sep 2014 23:16:27 GMT (envelope-from np@FreeBSD.org) Message-Id: <201409302316.s8UNGRLf082395@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Tue, 30 Sep 2014 23:16:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272336 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2014 23:16:27 -0000 Author: np Date: Tue Sep 30 23:16:26 2014 New Revision: 272336 URL: http://svnweb.freebsd.org/changeset/base/272336 Log: Test for absence of M_NOFREE before attempting to purge the mbuf's tags. This will leave more state intact should the assertion go off. MFC after: 1 month Modified: head/sys/kern/kern_mbuf.c Modified: head/sys/kern/kern_mbuf.c ============================================================================== --- head/sys/kern/kern_mbuf.c Tue Sep 30 23:16:03 2014 (r272335) +++ head/sys/kern/kern_mbuf.c Tue Sep 30 23:16:26 2014 (r272336) @@ -447,9 +447,9 @@ mb_dtor_mbuf(void *mem, int size, void * m = (struct mbuf *)mem; flags = (unsigned long)arg; + KASSERT((m->m_flags & M_NOFREE) == 0, ("%s: M_NOFREE set", __func__)); if ((m->m_flags & M_PKTHDR) && !SLIST_EMPTY(&m->m_pkthdr.tags)) m_tag_delete_chain(m, NULL); - KASSERT((m->m_flags & M_NOFREE) == 0, ("%s: M_NOFREE set", __func__)); #ifdef INVARIANTS trash_dtor(mem, size, arg); #endif From owner-svn-src-all@FreeBSD.ORG Wed Oct 1 01:56:52 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 96141641; Wed, 1 Oct 2014 01:56:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 82FE65EF; Wed, 1 Oct 2014 01:56:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s911uq3m058575; Wed, 1 Oct 2014 01:56:52 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s911uqmE058574; Wed, 1 Oct 2014 01:56:52 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201410010156.s911uqmE058574@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 1 Oct 2014 01:56:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272340 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 01:56:52 -0000 Author: ngie Date: Wed Oct 1 01:56:51 2014 New Revision: 272340 URL: http://svnweb.freebsd.org/changeset/base/272340 Log: Add ObsoleteFiles.inc OLD_FILES entries for libnv X-MFC with: r271241 Submitted by: pjd Pointyhat to: ngie Sponsored by: EMC / Isilon Storage Division Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Wed Oct 1 01:50:23 2014 (r272339) +++ head/ObsoleteFiles.inc Wed Oct 1 01:56:51 2014 (r272340) @@ -43,6 +43,9 @@ OLD_FILES+=usr/share/man/man9/sleepq_cal OLD_FILES+=usr/share/man/man9/sleepq_catch_signals.9.gz # 20140917: hv_kvpd rc.d script removed in favor of devd configuration OLD_FILES+=etc/rc.d/hv_kvpd +# 20140917: libnv was accidentally being installed to /usr/lib instead of /lib +OLD_LIBS+=usr/lib/libnv.a +OLD_LIBS+=usr/lib/libnv.so.0 # 20140814: libopie version bump OLD_LIBS+=usr/lib/libopie.so.7 OLD_LIBS+=usr/lib32/libopie.so.7 From owner-svn-src-all@FreeBSD.ORG Wed Oct 1 01:57:27 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7954778C; Wed, 1 Oct 2014 01:57:27 +0000 (UTC) Received: from mail-pa0-x22f.google.com (mail-pa0-x22f.google.com [IPv6:2607:f8b0:400e:c03::22f]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 34CCD5F5; Wed, 1 Oct 2014 01:57:27 +0000 (UTC) Received: by mail-pa0-f47.google.com with SMTP id rd3so205776pab.34 for ; Tue, 30 Sep 2014 18:57:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=T2ZktMgBQI2Vbnb5VwskOS5qA3qyjqhhECcHtpWqhug=; b=VxoD7I1uf0/GeuJvNkbFVbQsatGTu+qOvDbQZeaxGld2r9xYj0YM0ULnvTwD/trF9M vUawCloJCC865qWp7MJGoXZOsILh76UK6TLKXT4PlNrEexvFBef4M3YmY/hsOp6Z92Nu XN4mdAQcdKSbk781YEZp92SMB0gCGw/7zn6SW5S44QESNcdnt3pZ428tycuwB0SnD+QE aJJ1Q2Jid/wUqjnhm2n4pL4Mm1HIUNDho0iJOvzQh9R3owucD4fMp7pM0aV2f0Hp8hTj iFsPvp9gEYDpgFPzZZw5QMaPtEUxxjb29YIz+KQucrAEvpqDj4FjoXMD8hxM60+RSJ3R s0Pg== X-Received: by 10.69.31.1 with SMTP id ki1mr29985277pbd.100.1412128646762; Tue, 30 Sep 2014 18:57: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 uf6sm16440307pac.16.2014.09.30.18.57.25 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 30 Sep 2014 18:57:25 -0700 (PDT) Content-Type: multipart/signed; boundary="Apple-Mail=_2932E80C-83E4-4549-AD45-09AB8733F71F"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r271241 - head/lib/libnv From: Garrett Cooper In-Reply-To: <20140929120336.GB2194@garage.freebsd.pl> Date: Tue, 30 Sep 2014 18:57:22 -0700 Message-Id: <2C13A741-B518-4ABB-A0E5-7895095C79DC@gmail.com> References: <201409072256.s87MuvIl059453@svn.freebsd.org> <20140929120336.GB2194@garage.freebsd.pl> To: Pawel Jakub Dawidek X-Mailer: Apple Mail (2.1878.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Garrett Cooper X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 01:57:27 -0000 --Apple-Mail=_2932E80C-83E4-4549-AD45-09AB8733F71F Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On Sep 29, 2014, at 5:03, Pawel Jakub Dawidek wrote: > On Sun, Sep 07, 2014 at 10:56:57PM +0000, Garrett Cooper wrote: >> Author: ngie >> Date: Sun Sep 7 22:56:57 2014 >> New Revision: 271241 >> URL: http://svnweb.freebsd.org/changeset/base/271241 >>=20 >> Log: >> Include src.opts.mk after SHLIBDIR has been defined so libnv is = installed to >> /lib , not /usr/lib >=20 > Don't forget to add /usr/lib/libnv* to ObsoleteFiles.inc. Fixed in r272340 =97 thank you! --Apple-Mail=_2932E80C-83E4-4549-AD45-09AB8733F71F 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----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJUK1+DAAoJEMZr5QU6S73etP0H/jW0OMM5wODYp4sSnAoFqg+5 SHpVrfGndXOcdv7+fYAnMIQqT3RZ/3iSzhp1Ht/EMyp/Ozr6LqRF+DxSSXarYG/5 FR7PNHG8P1N4RcumKYiC8k6pnPLXyKH2pdzZey7PJeCNM/rzDOhbwP7HfpyAC1h/ Q0lKPm4yFEG5/OGvrFw3dMT5nisC4eIYn9+lJcjXkmVaVaOSaRtTEztAOpOrs+zU X/ZvD0IHjD35jCPNwXmlMhxR2YKMlu7HYzGWhTntwNCTBStxSYwWmrNucYTvINwZ 8l06a5HuA4hIYXKD1SjM2KGpgjDQfWADVI8EqX46pbaITGq60HdJN8CXv+NFs4k= =NEYb -----END PGP SIGNATURE----- --Apple-Mail=_2932E80C-83E4-4549-AD45-09AB8733F71F-- From owner-svn-src-all@FreeBSD.ORG Wed Oct 1 03:59:11 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E9988BF; Wed, 1 Oct 2014 03:59:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D5A75262; Wed, 1 Oct 2014 03:59:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s913xBEl016763; Wed, 1 Oct 2014 03:59:11 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s913xBT8016762; Wed, 1 Oct 2014 03:59:11 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201410010359.s913xBT8016762@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 1 Oct 2014 03:59:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r272341 - svnadmin/conf X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 03:59:12 -0000 Author: bdrewery Date: Wed Oct 1 03:59:11 2014 New Revision: 272341 URL: https://svnweb.freebsd.org/changeset/base/272341 Log: Fix commit mail case to also use https:// for svnweb. Modified: svnadmin/conf/mailer.conf Modified: svnadmin/conf/mailer.conf ============================================================================== --- svnadmin/conf/mailer.conf Wed Oct 1 01:56:51 2014 (r272340) +++ svnadmin/conf/mailer.conf Wed Oct 1 03:59:11 2014 (r272341) @@ -201,7 +201,7 @@ generate_diffs = add copy modify # # The available substitution variable is: rev #commit_url = http://diffs.server.com/trac/software/changeset/%(rev)s -commit_url = http://svnweb.freebsd.org/changeset/base/%(rev)s +commit_url = https://svnweb.freebsd.org/changeset/base/%(rev)s # Diff URL construction. For the configured diff URL types, the diff # section (which follows the message header) will include the URL From owner-svn-src-all@FreeBSD.ORG Wed Oct 1 04:03:16 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B8BFB2CB; Wed, 1 Oct 2014 04:03:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A54C5341; Wed, 1 Oct 2014 04:03:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9143GND020938; Wed, 1 Oct 2014 04:03:16 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9143GF3020937; Wed, 1 Oct 2014 04:03:16 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201410010403.s9143GF3020937@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 1 Oct 2014 04:03:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r272342 - svnadmin/conf X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 04:03:16 -0000 Author: ngie Date: Wed Oct 1 04:03:15 2014 New Revision: 272342 URL: https://svnweb.freebsd.org/changeset/base/272342 Log: Remove size limit temporarily so I can import src/tests from NetBSD into the vendor tree Modified: svnadmin/conf/sizelimit.conf Modified: svnadmin/conf/sizelimit.conf ============================================================================== --- svnadmin/conf/sizelimit.conf Wed Oct 1 03:59:11 2014 (r272341) +++ svnadmin/conf/sizelimit.conf Wed Oct 1 04:03:15 2014 (r272342) @@ -30,6 +30,7 @@ jb jeff kmacy lstewart +ngie obrien peter roberto From owner-svn-src-all@FreeBSD.ORG Wed Oct 1 04:07:23 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CAD3A424; Wed, 1 Oct 2014 04:07:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B17D7363; Wed, 1 Oct 2014 04:07:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9147N2M021529; Wed, 1 Oct 2014 04:07:23 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9147JQg021511; Wed, 1 Oct 2014 04:07:19 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201410010407.s9147JQg021511@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 1 Oct 2014 04:07:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r272343 - in vendor/NetBSD/tests: . dist dist/bin dist/bin/cat dist/bin/cp dist/bin/dd dist/bin/df dist/bin/expr dist/bin/pax dist/bin/ps dist/bin/sh dist/bin/sh/dotcmd dist/bin/sh/dotc... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 04:07:24 -0000 Author: ngie Date: Wed Oct 1 04:07:17 2014 New Revision: 272343 URL: https://svnweb.freebsd.org/changeset/base/272343 Log: Check in first src/tests snapshot from NetBSD anoncvs Sources were obtained like so: % export CVSROOT="anoncvs@anoncvs.NetBSD.org:/cvsroot" % cvs -z9 co -D "09/30/2014 20:45" -P src/tests % mv src/tests/* tests/dist/. '*CVS*' has been added to svn:ignore to ease updating periodically from upstream Some line ending issues had to be resolved with test outputs and scripts via dos2unix and by deleting the eol-style property set in usr.bin/sort Discussed with: rpaulo Sponsored by: EMC / Isilon Storage Division Added: vendor/NetBSD/tests/ vendor/NetBSD/tests/dist/Makefile (contents, props changed) vendor/NetBSD/tests/dist/Makefile.inc (contents, props changed) vendor/NetBSD/tests/dist/README vendor/NetBSD/tests/dist/bin/Makefile (contents, props changed) vendor/NetBSD/tests/dist/bin/cat/Makefile (contents, props changed) vendor/NetBSD/tests/dist/bin/cat/d_align.in (contents, props changed) vendor/NetBSD/tests/dist/bin/cat/d_align.out vendor/NetBSD/tests/dist/bin/cat/t_cat.sh (contents, props changed) vendor/NetBSD/tests/dist/bin/cp/Makefile (contents, props changed) vendor/NetBSD/tests/dist/bin/cp/t_cp.sh (contents, props changed) vendor/NetBSD/tests/dist/bin/dd/Makefile (contents, props changed) vendor/NetBSD/tests/dist/bin/dd/t_dd.sh (contents, props changed) vendor/NetBSD/tests/dist/bin/df/Makefile (contents, props changed) vendor/NetBSD/tests/dist/bin/df/getmntinfo.c (contents, props changed) vendor/NetBSD/tests/dist/bin/df/t_df.sh (contents, props changed) vendor/NetBSD/tests/dist/bin/expr/Makefile (contents, props changed) vendor/NetBSD/tests/dist/bin/expr/t_expr.sh (contents, props changed) vendor/NetBSD/tests/dist/bin/pax/Makefile (contents, props changed) vendor/NetBSD/tests/dist/bin/pax/t_pax.sh (contents, props changed) vendor/NetBSD/tests/dist/bin/ps/Makefile (contents, props changed) vendor/NetBSD/tests/dist/bin/ps/keywords vendor/NetBSD/tests/dist/bin/ps/t_ps.sh (contents, props changed) vendor/NetBSD/tests/dist/bin/sh/Makefile (contents, props changed) vendor/NetBSD/tests/dist/bin/sh/dotcmd/Makefile (contents, props changed) vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/case_break_case.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/case_break_compound.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/case_break_file.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/case_break_for.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/case_break_func.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/case_break_subshell.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/case_break_until.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/case_break_while.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/case_continue_case.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/case_continue_compound.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/case_continue_file.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/case_continue_for.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/case_continue_func.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/case_continue_subshell.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/case_continue_until.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/case_continue_while.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/case_return_case.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/case_return_compound.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/case_return_file.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/case_return_for.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/case_return_func.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/case_return_subshell.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/case_return_until.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/case_return_while.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/compound_break_case.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/compound_break_compound.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/compound_break_file.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/compound_break_for.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/compound_break_func.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/compound_break_subshell.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/compound_break_until.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/compound_break_while.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/compound_continue_case.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/compound_continue_compound.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/compound_continue_file.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/compound_continue_for.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/compound_continue_func.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/compound_continue_subshell.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/compound_continue_until.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/compound_continue_while.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/compound_return_case.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/compound_return_compound.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/compound_return_file.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/compound_return_for.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/compound_return_func.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/compound_return_subshell.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/compound_return_until.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/compound_return_while.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/file_break_case.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/file_break_compound.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/file_break_file.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/file_break_for.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/file_break_func.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/file_break_subshell.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/file_break_until.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/file_break_while.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/file_continue_case.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/file_continue_compound.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/file_continue_file.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/file_continue_for.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/file_continue_func.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/file_continue_subshell.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/file_continue_until.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/file_continue_while.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/file_return_case.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/file_return_compound.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/file_return_file.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/file_return_for.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/file_return_func.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/file_return_subshell.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/file_return_until.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/file_return_while.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/for_break_case.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/for_break_compound.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/for_break_file.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/for_break_for.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/for_break_func.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/for_break_subshell.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/for_break_until.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/for_break_while.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/for_continue_case.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/for_continue_compound.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/for_continue_file.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/for_continue_for.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/for_continue_func.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/for_continue_subshell.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/for_continue_until.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/for_continue_while.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/for_return_case.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/for_return_compound.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/for_return_file.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/for_return_for.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/for_return_func.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/for_return_subshell.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/for_return_until.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/for_return_while.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/func_break_case.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/func_break_compound.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/func_break_file.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/func_break_for.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/func_break_func.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/func_break_subshell.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/func_break_until.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/func_break_while.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/func_continue_case.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/func_continue_compound.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/func_continue_file.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/func_continue_for.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/func_continue_func.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/func_continue_subshell.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/func_continue_until.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/func_continue_while.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/func_return_case.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/func_return_compound.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/func_return_file.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/func_return_for.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/func_return_func.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/func_return_subshell.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/func_return_until.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/func_return_while.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/subshell_break_case.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/subshell_break_compound.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/subshell_break_file.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/subshell_break_for.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/subshell_break_func.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/subshell_break_subshell.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/subshell_break_until.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/subshell_break_while.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/subshell_continue_case.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/subshell_continue_compound.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/subshell_continue_file.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/subshell_continue_for.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/subshell_continue_func.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/subshell_continue_subshell.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/subshell_continue_until.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/subshell_continue_while.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/subshell_return_case.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/subshell_return_compound.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/subshell_return_file.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/subshell_return_for.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/subshell_return_func.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/subshell_return_subshell.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/subshell_return_until.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/subshell_return_while.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/until_break_case.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/until_break_compound.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/until_break_file.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/until_break_for.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/until_break_func.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/until_break_subshell.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/until_break_until.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/until_break_while.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/until_continue_case.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/until_continue_compound.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/until_continue_file.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/until_continue_for.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/until_continue_func.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/until_continue_subshell.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/until_continue_until.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/until_continue_while.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/until_return_case.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/until_return_compound.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/until_return_file.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/until_return_for.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/until_return_func.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/until_return_subshell.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/until_return_until.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/until_return_while.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/while_break_case.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/while_break_compound.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/while_break_file.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/while_break_for.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/while_break_func.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/while_break_subshell.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/while_break_until.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/while_break_while.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/while_continue_case.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/while_continue_compound.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/while_continue_file.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/while_continue_for.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/while_continue_func.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/while_continue_subshell.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/while_continue_until.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/while_continue_while.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/while_return_case.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/while_return_compound.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/while_return_file.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/while_return_for.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/while_return_func.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/while_return_subshell.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/while_return_until.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/while_return_while.out vendor/NetBSD/tests/dist/bin/sh/dotcmd/scoped_command (contents, props changed) vendor/NetBSD/tests/dist/bin/sh/dotcmd/t_dotcmd.sh (contents, props changed) vendor/NetBSD/tests/dist/bin/sh/t_compexit.sh (contents, props changed) vendor/NetBSD/tests/dist/bin/sh/t_evaltested.sh (contents, props changed) vendor/NetBSD/tests/dist/bin/sh/t_exit.sh (contents, props changed) vendor/NetBSD/tests/dist/bin/sh/t_expand.sh (contents, props changed) vendor/NetBSD/tests/dist/bin/sh/t_fsplit.sh (contents, props changed) vendor/NetBSD/tests/dist/bin/sh/t_here.sh (contents, props changed) vendor/NetBSD/tests/dist/bin/sh/t_set_e.sh (contents, props changed) vendor/NetBSD/tests/dist/bin/sh/t_ulimit.sh (contents, props changed) vendor/NetBSD/tests/dist/bin/sh/t_varquote.sh (contents, props changed) vendor/NetBSD/tests/dist/bin/sh/t_wait.sh (contents, props changed) vendor/NetBSD/tests/dist/bin/sleep/Makefile (contents, props changed) vendor/NetBSD/tests/dist/bin/sleep/t_sleep.sh (contents, props changed) vendor/NetBSD/tests/dist/bin/tar/Makefile (contents, props changed) vendor/NetBSD/tests/dist/bin/tar/t_tar.sh (contents, props changed) vendor/NetBSD/tests/dist/crypto/Makefile (contents, props changed) vendor/NetBSD/tests/dist/crypto/Makefile.inc (contents, props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/Makefile (contents, props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/Makefile.inc (contents, props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/bf/Makefile (contents, props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/bn/Makefile (contents, props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/bn/Makefile.inc (contents, props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/bn/bn/Makefile (contents, props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/bn/div/Makefile (contents, props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/bn/exp/Makefile (contents, props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/cast/Makefile (contents, props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/conf/Makefile (contents, props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/conf/d_conf.out vendor/NetBSD/tests/dist/crypto/libcrypto/conf/d_conf_ssleay.cnf vendor/NetBSD/tests/dist/crypto/libcrypto/des/Makefile (contents, props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/dh/Makefile (contents, props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/dsa/Makefile (contents, props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/ec/Makefile (contents, props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/ecdh/Makefile (contents, props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/ecdsa/Makefile (contents, props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/engine/Makefile (contents, props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/evp/Makefile (contents, props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/hmac/Makefile (contents, props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/idea/Makefile (contents, props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/lhash/Makefile (contents, props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/md2/Makefile (contents, props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/md4/Makefile (contents, props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/md5/Makefile (contents, props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/mdc2/Makefile (contents, props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/rand/Makefile (contents, props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/rc2/Makefile (contents, props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/rc4/Makefile (contents, props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/rc5/Makefile (contents, props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/ripemd/Makefile (contents, props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/rsa/Makefile (contents, props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/sha/Makefile (contents, props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/sha1/Makefile (contents, props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/srp/Makefile (contents, props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/t_certs.sh (contents, props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/t_ciphers.sh (contents, props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/t_hashes.sh (contents, props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/t_libcrypto.sh (contents, props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/t_pubkey.sh (contents, props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/threads/Makefile (contents, props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/x509v3/Makefile (contents, props changed) vendor/NetBSD/tests/dist/crypto/opencrypto/Makefile (contents, props changed) vendor/NetBSD/tests/dist/crypto/opencrypto/Makefile.inc (contents, props changed) vendor/NetBSD/tests/dist/crypto/opencrypto/h_aesctr1.c (contents, props changed) vendor/NetBSD/tests/dist/crypto/opencrypto/h_aesctr2.c (contents, props changed) vendor/NetBSD/tests/dist/crypto/opencrypto/h_arc4.c (contents, props changed) vendor/NetBSD/tests/dist/crypto/opencrypto/h_camellia.c (contents, props changed) vendor/NetBSD/tests/dist/crypto/opencrypto/h_cbcdes.c (contents, props changed) vendor/NetBSD/tests/dist/crypto/opencrypto/h_comp.c (contents, props changed) vendor/NetBSD/tests/dist/crypto/opencrypto/h_comp_zlib.c (contents, props changed) vendor/NetBSD/tests/dist/crypto/opencrypto/h_comp_zlib_rnd.c (contents, props changed) vendor/NetBSD/tests/dist/crypto/opencrypto/h_gcm.c (contents, props changed) vendor/NetBSD/tests/dist/crypto/opencrypto/h_md5.c (contents, props changed) vendor/NetBSD/tests/dist/crypto/opencrypto/h_md5hmac.c (contents, props changed) vendor/NetBSD/tests/dist/crypto/opencrypto/h_null.c (contents, props changed) vendor/NetBSD/tests/dist/crypto/opencrypto/h_sha1hmac.c (contents, props changed) vendor/NetBSD/tests/dist/crypto/opencrypto/h_xcbcmac.c (contents, props changed) vendor/NetBSD/tests/dist/crypto/opencrypto/t_opencrypto.sh (contents, props changed) vendor/NetBSD/tests/dist/dev/Makefile (contents, props changed) vendor/NetBSD/tests/dist/dev/Makefile.inc (contents, props changed) vendor/NetBSD/tests/dist/dev/audio/Makefile (contents, props changed) vendor/NetBSD/tests/dist/dev/audio/h_pad.c (contents, props changed) vendor/NetBSD/tests/dist/dev/audio/h_pad_musa.c (contents, props changed) vendor/NetBSD/tests/dist/dev/audio/t_pad.sh (contents, props changed) vendor/NetBSD/tests/dist/dev/audio/t_pad_output.bz2.uue vendor/NetBSD/tests/dist/dev/cgd/Makefile (contents, props changed) vendor/NetBSD/tests/dist/dev/cgd/paramsfile vendor/NetBSD/tests/dist/dev/cgd/t_cgd.sh (contents, props changed) vendor/NetBSD/tests/dist/dev/dm/Makefile (contents, props changed) vendor/NetBSD/tests/dist/dev/dm/dm_targets_cmd.plist (contents, props changed) vendor/NetBSD/tests/dist/dev/dm/dm_version_cmd.plist (contents, props changed) vendor/NetBSD/tests/dist/dev/dm/h_dm.c (contents, props changed) vendor/NetBSD/tests/dist/dev/dm/t_dm.sh (contents, props changed) vendor/NetBSD/tests/dist/dev/md/Makefile (contents, props changed) vendor/NetBSD/tests/dist/dev/md/h_mdserv.c (contents, props changed) vendor/NetBSD/tests/dist/dev/md/t_md.sh (contents, props changed) vendor/NetBSD/tests/dist/dev/raidframe/Makefile (contents, props changed) vendor/NetBSD/tests/dist/dev/raidframe/t_raid.sh (contents, props changed) vendor/NetBSD/tests/dist/dev/scsipi/Makefile (contents, props changed) vendor/NetBSD/tests/dist/dev/scsipi/libscsitest/Makefile (contents, props changed) vendor/NetBSD/tests/dist/dev/scsipi/libscsitest/SCSITEST.ioconf vendor/NetBSD/tests/dist/dev/scsipi/libscsitest/scsitest.c (contents, props changed) vendor/NetBSD/tests/dist/dev/scsipi/libscsitest/scsitest.h (contents, props changed) vendor/NetBSD/tests/dist/dev/scsipi/libscsitest/scsitest_component.c (contents, props changed) vendor/NetBSD/tests/dist/dev/scsipi/t_cd.c (contents, props changed) vendor/NetBSD/tests/dist/dev/sysmon/Makefile (contents, props changed) vendor/NetBSD/tests/dist/dev/sysmon/t_swsensor.sh (contents, props changed) vendor/NetBSD/tests/dist/dev/sysmon/t_swwdog.c (contents, props changed) vendor/NetBSD/tests/dist/fs/Makefile (contents, props changed) vendor/NetBSD/tests/dist/fs/Makefile.inc (contents, props changed) vendor/NetBSD/tests/dist/fs/cd9660/Makefile (contents, props changed) vendor/NetBSD/tests/dist/fs/cd9660/pr_48787.image.bz2.uue vendor/NetBSD/tests/dist/fs/cd9660/t_high_ino_big_file.sh (contents, props changed) vendor/NetBSD/tests/dist/fs/common/Makefile (contents, props changed) vendor/NetBSD/tests/dist/fs/common/fstest_ext2fs.c (contents, props changed) vendor/NetBSD/tests/dist/fs/common/fstest_ffs.c (contents, props changed) vendor/NetBSD/tests/dist/fs/common/fstest_lfs.c (contents, props changed) vendor/NetBSD/tests/dist/fs/common/fstest_msdosfs.c (contents, props changed) vendor/NetBSD/tests/dist/fs/common/fstest_nfs.c (contents, props changed) vendor/NetBSD/tests/dist/fs/common/fstest_puffs.c (contents, props changed) vendor/NetBSD/tests/dist/fs/common/fstest_rumpfs.c (contents, props changed) vendor/NetBSD/tests/dist/fs/common/fstest_sysvbfs.c (contents, props changed) vendor/NetBSD/tests/dist/fs/common/fstest_tmpfs.c (contents, props changed) vendor/NetBSD/tests/dist/fs/common/fstest_udf.c (contents, props changed) vendor/NetBSD/tests/dist/fs/common/fstest_v7fs.c (contents, props changed) vendor/NetBSD/tests/dist/fs/common/fstest_zfs.c (contents, props changed) vendor/NetBSD/tests/dist/fs/common/h_fsmacros.h (contents, props changed) vendor/NetBSD/tests/dist/fs/common/snapshot.c (contents, props changed) vendor/NetBSD/tests/dist/fs/ffs/Makefile (contents, props changed) vendor/NetBSD/tests/dist/fs/ffs/ffs_common.sh (contents, props changed) vendor/NetBSD/tests/dist/fs/ffs/h_ffs_server.c (contents, props changed) vendor/NetBSD/tests/dist/fs/ffs/h_quota2_tests.c (contents, props changed) vendor/NetBSD/tests/dist/fs/ffs/quotas_common.sh (contents, props changed) vendor/NetBSD/tests/dist/fs/ffs/t_clearquota.sh (contents, props changed) vendor/NetBSD/tests/dist/fs/ffs/t_fifos.c (contents, props changed) vendor/NetBSD/tests/dist/fs/ffs/t_getquota.sh (contents, props changed) vendor/NetBSD/tests/dist/fs/ffs/t_miscquota.sh (contents, props changed) vendor/NetBSD/tests/dist/fs/ffs/t_mount.c (contents, props changed) vendor/NetBSD/tests/dist/fs/ffs/t_quota2_1.c (contents, props changed) vendor/NetBSD/tests/dist/fs/ffs/t_quota2_remount.c (contents, props changed) vendor/NetBSD/tests/dist/fs/ffs/t_quotalimit.sh (contents, props changed) vendor/NetBSD/tests/dist/fs/ffs/t_setquota.sh (contents, props changed) vendor/NetBSD/tests/dist/fs/ffs/t_snapshot.c (contents, props changed) vendor/NetBSD/tests/dist/fs/ffs/t_snapshot_log.c (contents, props changed) vendor/NetBSD/tests/dist/fs/ffs/t_snapshot_v2.c (contents, props changed) vendor/NetBSD/tests/dist/fs/fifofs/Makefile (contents, props changed) vendor/NetBSD/tests/dist/fs/fifofs/t_fifo.c (contents, props changed) vendor/NetBSD/tests/dist/fs/h_funcs.subr vendor/NetBSD/tests/dist/fs/hfs/Makefile (contents, props changed) vendor/NetBSD/tests/dist/fs/hfs/colon.hfs.bz2.uue vendor/NetBSD/tests/dist/fs/hfs/t_pathconvert.c (contents, props changed) vendor/NetBSD/tests/dist/fs/kernfs/Makefile (contents, props changed) vendor/NetBSD/tests/dist/fs/kernfs/t_basic.c (contents, props changed) vendor/NetBSD/tests/dist/fs/lfs/Makefile (contents, props changed) vendor/NetBSD/tests/dist/fs/lfs/t_pr.c (contents, props changed) vendor/NetBSD/tests/dist/fs/msdosfs/Makefile (contents, props changed) vendor/NetBSD/tests/dist/fs/msdosfs/t_snapshot.c (contents, props changed) vendor/NetBSD/tests/dist/fs/nfs/Makefile (contents, props changed) vendor/NetBSD/tests/dist/fs/nfs/nfsservice/Makefile (contents, props changed) vendor/NetBSD/tests/dist/fs/nfs/nfsservice/README vendor/NetBSD/tests/dist/fs/nfs/nfsservice/exports vendor/NetBSD/tests/dist/fs/nfs/nfsservice/getmntinfo.c (contents, props changed) vendor/NetBSD/tests/dist/fs/nfs/nfsservice/mountd.c (contents, props changed) vendor/NetBSD/tests/dist/fs/nfs/nfsservice/nfsd.c (contents, props changed) vendor/NetBSD/tests/dist/fs/nfs/nfsservice/pathnames.h (contents, props changed) vendor/NetBSD/tests/dist/fs/nfs/nfsservice/rpcbind/Makefile.inc (contents, props changed) vendor/NetBSD/tests/dist/fs/nfs/nfsservice/rpcbind/check_bound.c (contents, props changed) vendor/NetBSD/tests/dist/fs/nfs/nfsservice/rpcbind/pmap_svc.c (contents, props changed) vendor/NetBSD/tests/dist/fs/nfs/nfsservice/rpcbind/rpcb_stat.c (contents, props changed) vendor/NetBSD/tests/dist/fs/nfs/nfsservice/rpcbind/rpcb_svc.c (contents, props changed) vendor/NetBSD/tests/dist/fs/nfs/nfsservice/rpcbind/rpcb_svc_4.c (contents, props changed) vendor/NetBSD/tests/dist/fs/nfs/nfsservice/rpcbind/rpcb_svc_com.c (contents, props changed) vendor/NetBSD/tests/dist/fs/nfs/nfsservice/rpcbind/rpcbind.8 (contents, props changed) vendor/NetBSD/tests/dist/fs/nfs/nfsservice/rpcbind/rpcbind.c (contents, props changed) vendor/NetBSD/tests/dist/fs/nfs/nfsservice/rpcbind/rpcbind.h (contents, props changed) vendor/NetBSD/tests/dist/fs/nfs/nfsservice/rpcbind/security.c (contents, props changed) vendor/NetBSD/tests/dist/fs/nfs/nfsservice/rpcbind/util.c (contents, props changed) vendor/NetBSD/tests/dist/fs/nfs/nfsservice/rumpnfsd.c (contents, props changed) vendor/NetBSD/tests/dist/fs/nfs/t_mountd.c (contents, props changed) vendor/NetBSD/tests/dist/fs/nfs/t_rquotad.sh (contents, props changed) vendor/NetBSD/tests/dist/fs/nullfs/Makefile (contents, props changed) vendor/NetBSD/tests/dist/fs/nullfs/t_basic.c (contents, props changed) vendor/NetBSD/tests/dist/fs/psshfs/Makefile (contents, props changed) vendor/NetBSD/tests/dist/fs/psshfs/h_have_puffs.c (contents, props changed) vendor/NetBSD/tests/dist/fs/psshfs/ssh_config.in (contents, props changed) vendor/NetBSD/tests/dist/fs/psshfs/ssh_host_key vendor/NetBSD/tests/dist/fs/psshfs/ssh_host_key.pub vendor/NetBSD/tests/dist/fs/psshfs/sshd_config.in (contents, props changed) vendor/NetBSD/tests/dist/fs/psshfs/t_psshfs.sh (contents, props changed) vendor/NetBSD/tests/dist/fs/ptyfs/Makefile (contents, props changed) vendor/NetBSD/tests/dist/fs/ptyfs/t_nullpts.c (contents, props changed) vendor/NetBSD/tests/dist/fs/ptyfs/t_ptyfs.c (contents, props changed) vendor/NetBSD/tests/dist/fs/puffs/Makefile (contents, props changed) vendor/NetBSD/tests/dist/fs/puffs/h_dtfs/Makefile (contents, props changed) vendor/NetBSD/tests/dist/fs/puffs/h_dtfs/dtfs.c (contents, props changed) vendor/NetBSD/tests/dist/fs/puffs/h_dtfs/dtfs.h (contents, props changed) vendor/NetBSD/tests/dist/fs/puffs/h_dtfs/dtfs_subr.c (contents, props changed) vendor/NetBSD/tests/dist/fs/puffs/h_dtfs/dtfs_vfsops.c (contents, props changed) vendor/NetBSD/tests/dist/fs/puffs/h_dtfs/dtfs_vnops.c (contents, props changed) vendor/NetBSD/tests/dist/fs/puffs/t_basic.c (contents, props changed) vendor/NetBSD/tests/dist/fs/puffs/t_fuzz.c (contents, props changed) vendor/NetBSD/tests/dist/fs/puffs/t_io.c (contents, props changed) vendor/NetBSD/tests/dist/fs/tmpfs/Makefile (contents, props changed) vendor/NetBSD/tests/dist/fs/tmpfs/README vendor/NetBSD/tests/dist/fs/tmpfs/h_funcs.subr vendor/NetBSD/tests/dist/fs/tmpfs/h_tools.c (contents, props changed) vendor/NetBSD/tests/dist/fs/tmpfs/t_create.sh (contents, props changed) vendor/NetBSD/tests/dist/fs/tmpfs/t_devices.sh (contents, props changed) vendor/NetBSD/tests/dist/fs/tmpfs/t_dots.sh (contents, props changed) vendor/NetBSD/tests/dist/fs/tmpfs/t_exec.sh (contents, props changed) vendor/NetBSD/tests/dist/fs/tmpfs/t_link.sh (contents, props changed) vendor/NetBSD/tests/dist/fs/tmpfs/t_mkdir.sh (contents, props changed) vendor/NetBSD/tests/dist/fs/tmpfs/t_mknod.sh (contents, props changed) vendor/NetBSD/tests/dist/fs/tmpfs/t_mount.sh (contents, props changed) vendor/NetBSD/tests/dist/fs/tmpfs/t_pipes.sh (contents, props changed) vendor/NetBSD/tests/dist/fs/tmpfs/t_read_write.sh (contents, props changed) vendor/NetBSD/tests/dist/fs/tmpfs/t_readdir.sh (contents, props changed) vendor/NetBSD/tests/dist/fs/tmpfs/t_remove.sh (contents, props changed) vendor/NetBSD/tests/dist/fs/tmpfs/t_rename.sh (contents, props changed) vendor/NetBSD/tests/dist/fs/tmpfs/t_renamerace.c (contents, props changed) vendor/NetBSD/tests/dist/fs/tmpfs/t_rmdir.sh (contents, props changed) vendor/NetBSD/tests/dist/fs/tmpfs/t_setattr.sh (contents, props changed) vendor/NetBSD/tests/dist/fs/tmpfs/t_sizes.sh (contents, props changed) vendor/NetBSD/tests/dist/fs/tmpfs/t_sockets.sh (contents, props changed) vendor/NetBSD/tests/dist/fs/tmpfs/t_statvfs.sh (contents, props changed) vendor/NetBSD/tests/dist/fs/tmpfs/t_symlink.sh (contents, props changed) vendor/NetBSD/tests/dist/fs/tmpfs/t_times.sh (contents, props changed) vendor/NetBSD/tests/dist/fs/tmpfs/t_trail_slash.sh (contents, props changed) vendor/NetBSD/tests/dist/fs/tmpfs/t_truncate.sh (contents, props changed) vendor/NetBSD/tests/dist/fs/tmpfs/t_vnd.sh (contents, props changed) vendor/NetBSD/tests/dist/fs/tmpfs/t_vnode_leak.sh (contents, props changed) vendor/NetBSD/tests/dist/fs/umapfs/Makefile (contents, props changed) vendor/NetBSD/tests/dist/fs/umapfs/t_basic.c (contents, props changed) vendor/NetBSD/tests/dist/fs/union/Makefile (contents, props changed) vendor/NetBSD/tests/dist/fs/union/t_pr.c (contents, props changed) vendor/NetBSD/tests/dist/fs/vfs/Makefile (contents, props changed) vendor/NetBSD/tests/dist/fs/vfs/t_full.c (contents, props changed) vendor/NetBSD/tests/dist/fs/vfs/t_io.c (contents, props changed) vendor/NetBSD/tests/dist/fs/vfs/t_renamerace.c (contents, props changed) vendor/NetBSD/tests/dist/fs/vfs/t_rmdirrace.c (contents, props changed) vendor/NetBSD/tests/dist/fs/vfs/t_ro.c (contents, props changed) vendor/NetBSD/tests/dist/fs/vfs/t_union.c (contents, props changed) vendor/NetBSD/tests/dist/fs/vfs/t_unpriv.c (contents, props changed) vendor/NetBSD/tests/dist/fs/vfs/t_vfsops.c (contents, props changed) vendor/NetBSD/tests/dist/fs/vfs/t_vnops.c (contents, props changed) vendor/NetBSD/tests/dist/fs/zfs/Makefile (contents, props changed) vendor/NetBSD/tests/dist/fs/zfs/t_zpool.sh (contents, props changed) vendor/NetBSD/tests/dist/games/Makefile (contents, props changed) vendor/NetBSD/tests/dist/games/t_factor.sh (contents, props changed) vendor/NetBSD/tests/dist/h_macros.h (contents, props changed) vendor/NetBSD/tests/dist/include/Makefile (contents, props changed) vendor/NetBSD/tests/dist/include/Makefile.inc (contents, props changed) vendor/NetBSD/tests/dist/include/d_bitstring_27.out vendor/NetBSD/tests/dist/include/d_bitstring_32.out vendor/NetBSD/tests/dist/include/d_bitstring_49.out vendor/NetBSD/tests/dist/include/d_bitstring_64.out vendor/NetBSD/tests/dist/include/d_bitstring_67.out vendor/NetBSD/tests/dist/include/d_bitstring_8.out vendor/NetBSD/tests/dist/include/machine/Makefile (contents, props changed) vendor/NetBSD/tests/dist/include/machine/t_bswap.c (contents, props changed) vendor/NetBSD/tests/dist/include/sys/Makefile (contents, props changed) vendor/NetBSD/tests/dist/include/sys/t_bitops.c (contents, props changed) vendor/NetBSD/tests/dist/include/sys/t_bootblock.c (contents, props changed) vendor/NetBSD/tests/dist/include/sys/t_cdefs.c (contents, props changed) vendor/NetBSD/tests/dist/include/sys/t_socket.c (contents, props changed) vendor/NetBSD/tests/dist/include/sys/t_tree.c (contents, props changed) vendor/NetBSD/tests/dist/include/sys/t_types.c (contents, props changed) vendor/NetBSD/tests/dist/include/t_bitstring.c (contents, props changed) vendor/NetBSD/tests/dist/include/t_errno.c (contents, props changed) vendor/NetBSD/tests/dist/include/t_glob.c (contents, props changed) vendor/NetBSD/tests/dist/include/t_inttypes.c (contents, props changed) vendor/NetBSD/tests/dist/include/t_limits.c (contents, props changed) vendor/NetBSD/tests/dist/include/t_netdb.c (contents, props changed) vendor/NetBSD/tests/dist/include/t_paths.c (contents, props changed) vendor/NetBSD/tests/dist/include/t_stdint.c (contents, props changed) vendor/NetBSD/tests/dist/ipf/Makefile (contents, props changed) vendor/NetBSD/tests/dist/ipf/expected/.cvsignore vendor/NetBSD/tests/dist/ipf/expected/Makefile (contents, props changed) vendor/NetBSD/tests/dist/ipf/expected/bpf-f1 vendor/NetBSD/tests/dist/ipf/expected/bpf1 vendor/NetBSD/tests/dist/ipf/expected/f1 vendor/NetBSD/tests/dist/ipf/expected/f10 vendor/NetBSD/tests/dist/ipf/expected/f11 vendor/NetBSD/tests/dist/ipf/expected/f12 vendor/NetBSD/tests/dist/ipf/expected/f13 vendor/NetBSD/tests/dist/ipf/expected/f14 vendor/NetBSD/tests/dist/ipf/expected/f15 vendor/NetBSD/tests/dist/ipf/expected/f16 vendor/NetBSD/tests/dist/ipf/expected/f17 vendor/NetBSD/tests/dist/ipf/expected/f18 vendor/NetBSD/tests/dist/ipf/expected/f19 vendor/NetBSD/tests/dist/ipf/expected/f2 vendor/NetBSD/tests/dist/ipf/expected/f20 vendor/NetBSD/tests/dist/ipf/expected/f21 vendor/NetBSD/tests/dist/ipf/expected/f22 vendor/NetBSD/tests/dist/ipf/expected/f24 vendor/NetBSD/tests/dist/ipf/expected/f25 vendor/NetBSD/tests/dist/ipf/expected/f26 vendor/NetBSD/tests/dist/ipf/expected/f27 vendor/NetBSD/tests/dist/ipf/expected/f28 vendor/NetBSD/tests/dist/ipf/expected/f29 vendor/NetBSD/tests/dist/ipf/expected/f3 vendor/NetBSD/tests/dist/ipf/expected/f30 vendor/NetBSD/tests/dist/ipf/expected/f4 vendor/NetBSD/tests/dist/ipf/expected/f5 vendor/NetBSD/tests/dist/ipf/expected/f6 vendor/NetBSD/tests/dist/ipf/expected/f7 vendor/NetBSD/tests/dist/ipf/expected/f8 vendor/NetBSD/tests/dist/ipf/expected/f9 vendor/NetBSD/tests/dist/ipf/expected/i1 vendor/NetBSD/tests/dist/ipf/expected/i10 vendor/NetBSD/tests/dist/ipf/expected/i11 vendor/NetBSD/tests/dist/ipf/expected/i12 vendor/NetBSD/tests/dist/ipf/expected/i13 vendor/NetBSD/tests/dist/ipf/expected/i14 vendor/NetBSD/tests/dist/ipf/expected/i15 vendor/NetBSD/tests/dist/ipf/expected/i16 vendor/NetBSD/tests/dist/ipf/expected/i17 vendor/NetBSD/tests/dist/ipf/expected/i18 vendor/NetBSD/tests/dist/ipf/expected/i19.dist vendor/NetBSD/tests/dist/ipf/expected/i2 vendor/NetBSD/tests/dist/ipf/expected/i20 vendor/NetBSD/tests/dist/ipf/expected/i21 vendor/NetBSD/tests/dist/ipf/expected/i22 vendor/NetBSD/tests/dist/ipf/expected/i23 vendor/NetBSD/tests/dist/ipf/expected/i3 vendor/NetBSD/tests/dist/ipf/expected/i4 vendor/NetBSD/tests/dist/ipf/expected/i5 vendor/NetBSD/tests/dist/ipf/expected/i6 vendor/NetBSD/tests/dist/ipf/expected/i7 vendor/NetBSD/tests/dist/ipf/expected/i8 vendor/NetBSD/tests/dist/ipf/expected/i9 vendor/NetBSD/tests/dist/ipf/expected/in1 vendor/NetBSD/tests/dist/ipf/expected/in100 vendor/NetBSD/tests/dist/ipf/expected/in100_6 vendor/NetBSD/tests/dist/ipf/expected/in101 vendor/NetBSD/tests/dist/ipf/expected/in101_6 vendor/NetBSD/tests/dist/ipf/expected/in102 vendor/NetBSD/tests/dist/ipf/expected/in102_6 vendor/NetBSD/tests/dist/ipf/expected/in1_6 vendor/NetBSD/tests/dist/ipf/expected/in2 vendor/NetBSD/tests/dist/ipf/expected/in2_6 vendor/NetBSD/tests/dist/ipf/expected/in3 vendor/NetBSD/tests/dist/ipf/expected/in3_6 vendor/NetBSD/tests/dist/ipf/expected/in4 vendor/NetBSD/tests/dist/ipf/expected/in4_6 vendor/NetBSD/tests/dist/ipf/expected/in5 vendor/NetBSD/tests/dist/ipf/expected/in5_6 vendor/NetBSD/tests/dist/ipf/expected/in6 vendor/NetBSD/tests/dist/ipf/expected/in6_6 vendor/NetBSD/tests/dist/ipf/expected/in7 vendor/NetBSD/tests/dist/ipf/expected/in8_6 vendor/NetBSD/tests/dist/ipf/expected/ip1 vendor/NetBSD/tests/dist/ipf/expected/ip2 vendor/NetBSD/tests/dist/ipf/expected/ip3 vendor/NetBSD/tests/dist/ipf/expected/ipv6.1 (contents, props changed) vendor/NetBSD/tests/dist/ipf/expected/ipv6.2 (contents, props changed) vendor/NetBSD/tests/dist/ipf/expected/ipv6.3 (contents, props changed) vendor/NetBSD/tests/dist/ipf/expected/ipv6.4 (contents, props changed) vendor/NetBSD/tests/dist/ipf/expected/ipv6.5 (contents, props changed) vendor/NetBSD/tests/dist/ipf/expected/ipv6.6 (contents, props changed) vendor/NetBSD/tests/dist/ipf/expected/l1 vendor/NetBSD/tests/dist/ipf/expected/l1.b vendor/NetBSD/tests/dist/ipf/expected/n1 vendor/NetBSD/tests/dist/ipf/expected/n10 vendor/NetBSD/tests/dist/ipf/expected/n100 vendor/NetBSD/tests/dist/ipf/expected/n101 vendor/NetBSD/tests/dist/ipf/expected/n102 vendor/NetBSD/tests/dist/ipf/expected/n103 vendor/NetBSD/tests/dist/ipf/expected/n104 vendor/NetBSD/tests/dist/ipf/expected/n105 vendor/NetBSD/tests/dist/ipf/expected/n106 vendor/NetBSD/tests/dist/ipf/expected/n11 vendor/NetBSD/tests/dist/ipf/expected/n11_6 vendor/NetBSD/tests/dist/ipf/expected/n12 vendor/NetBSD/tests/dist/ipf/expected/n12_6 vendor/NetBSD/tests/dist/ipf/expected/n13 vendor/NetBSD/tests/dist/ipf/expected/n13_6 vendor/NetBSD/tests/dist/ipf/expected/n14 vendor/NetBSD/tests/dist/ipf/expected/n14_6 vendor/NetBSD/tests/dist/ipf/expected/n15 vendor/NetBSD/tests/dist/ipf/expected/n15_6 vendor/NetBSD/tests/dist/ipf/expected/n16 vendor/NetBSD/tests/dist/ipf/expected/n17 vendor/NetBSD/tests/dist/ipf/expected/n18 vendor/NetBSD/tests/dist/ipf/expected/n1_6 vendor/NetBSD/tests/dist/ipf/expected/n2 vendor/NetBSD/tests/dist/ipf/expected/n200 vendor/NetBSD/tests/dist/ipf/expected/n2_6 vendor/NetBSD/tests/dist/ipf/expected/n3 vendor/NetBSD/tests/dist/ipf/expected/n4 vendor/NetBSD/tests/dist/ipf/expected/n4_6 vendor/NetBSD/tests/dist/ipf/expected/n5 vendor/NetBSD/tests/dist/ipf/expected/n5_6 vendor/NetBSD/tests/dist/ipf/expected/n6 vendor/NetBSD/tests/dist/ipf/expected/n6_6 vendor/NetBSD/tests/dist/ipf/expected/n7 vendor/NetBSD/tests/dist/ipf/expected/n7_6 vendor/NetBSD/tests/dist/ipf/expected/n8 vendor/NetBSD/tests/dist/ipf/expected/n8_6 vendor/NetBSD/tests/dist/ipf/expected/n9 vendor/NetBSD/tests/dist/ipf/expected/n9_6 vendor/NetBSD/tests/dist/ipf/expected/ni1 vendor/NetBSD/tests/dist/ipf/expected/ni10 vendor/NetBSD/tests/dist/ipf/expected/ni11 vendor/NetBSD/tests/dist/ipf/expected/ni12 vendor/NetBSD/tests/dist/ipf/expected/ni13 vendor/NetBSD/tests/dist/ipf/expected/ni14 vendor/NetBSD/tests/dist/ipf/expected/ni15 vendor/NetBSD/tests/dist/ipf/expected/ni16 vendor/NetBSD/tests/dist/ipf/expected/ni17 vendor/NetBSD/tests/dist/ipf/expected/ni18 vendor/NetBSD/tests/dist/ipf/expected/ni19 vendor/NetBSD/tests/dist/ipf/expected/ni2 vendor/NetBSD/tests/dist/ipf/expected/ni20 vendor/NetBSD/tests/dist/ipf/expected/ni21 vendor/NetBSD/tests/dist/ipf/expected/ni23 vendor/NetBSD/tests/dist/ipf/expected/ni3 vendor/NetBSD/tests/dist/ipf/expected/ni4 vendor/NetBSD/tests/dist/ipf/expected/ni5 vendor/NetBSD/tests/dist/ipf/expected/ni6 vendor/NetBSD/tests/dist/ipf/expected/ni7 vendor/NetBSD/tests/dist/ipf/expected/ni8 vendor/NetBSD/tests/dist/ipf/expected/ni9 vendor/NetBSD/tests/dist/ipf/expected/p1 vendor/NetBSD/tests/dist/ipf/expected/p10 vendor/NetBSD/tests/dist/ipf/expected/p11 vendor/NetBSD/tests/dist/ipf/expected/p12 vendor/NetBSD/tests/dist/ipf/expected/p13 vendor/NetBSD/tests/dist/ipf/expected/p2 vendor/NetBSD/tests/dist/ipf/expected/p3 vendor/NetBSD/tests/dist/ipf/expected/p4 vendor/NetBSD/tests/dist/ipf/expected/p5 vendor/NetBSD/tests/dist/ipf/expected/p6 vendor/NetBSD/tests/dist/ipf/expected/p7 vendor/NetBSD/tests/dist/ipf/expected/p9 vendor/NetBSD/tests/dist/ipf/h_common.sh (contents, props changed) vendor/NetBSD/tests/dist/ipf/input/Makefile (contents, props changed) vendor/NetBSD/tests/dist/ipf/input/f1 vendor/NetBSD/tests/dist/ipf/input/f10 vendor/NetBSD/tests/dist/ipf/input/f11 vendor/NetBSD/tests/dist/ipf/input/f12 vendor/NetBSD/tests/dist/ipf/input/f13 vendor/NetBSD/tests/dist/ipf/input/f14 vendor/NetBSD/tests/dist/ipf/input/f15 vendor/NetBSD/tests/dist/ipf/input/f16 vendor/NetBSD/tests/dist/ipf/input/f17 vendor/NetBSD/tests/dist/ipf/input/f18 vendor/NetBSD/tests/dist/ipf/input/f19 vendor/NetBSD/tests/dist/ipf/input/f2 vendor/NetBSD/tests/dist/ipf/input/f20 vendor/NetBSD/tests/dist/ipf/input/f21 vendor/NetBSD/tests/dist/ipf/input/f22 vendor/NetBSD/tests/dist/ipf/input/f24 vendor/NetBSD/tests/dist/ipf/input/f25 vendor/NetBSD/tests/dist/ipf/input/f26 vendor/NetBSD/tests/dist/ipf/input/f27 vendor/NetBSD/tests/dist/ipf/input/f28 vendor/NetBSD/tests/dist/ipf/input/f29 vendor/NetBSD/tests/dist/ipf/input/f3 vendor/NetBSD/tests/dist/ipf/input/f30 vendor/NetBSD/tests/dist/ipf/input/f4 vendor/NetBSD/tests/dist/ipf/input/f5 vendor/NetBSD/tests/dist/ipf/input/f6 vendor/NetBSD/tests/dist/ipf/input/f7 vendor/NetBSD/tests/dist/ipf/input/f8 vendor/NetBSD/tests/dist/ipf/input/f9 vendor/NetBSD/tests/dist/ipf/input/ip2.data vendor/NetBSD/tests/dist/ipf/input/ipv6.1 (contents, props changed) vendor/NetBSD/tests/dist/ipf/input/ipv6.2 (contents, props changed) vendor/NetBSD/tests/dist/ipf/input/ipv6.3 (contents, props changed) vendor/NetBSD/tests/dist/ipf/input/ipv6.4 (contents, props changed) vendor/NetBSD/tests/dist/ipf/input/ipv6.5 (contents, props changed) vendor/NetBSD/tests/dist/ipf/input/ipv6.6 (contents, props changed) vendor/NetBSD/tests/dist/ipf/input/l1 vendor/NetBSD/tests/dist/ipf/input/n1 vendor/NetBSD/tests/dist/ipf/input/n10 vendor/NetBSD/tests/dist/ipf/input/n100 vendor/NetBSD/tests/dist/ipf/input/n101 vendor/NetBSD/tests/dist/ipf/input/n102 vendor/NetBSD/tests/dist/ipf/input/n103 vendor/NetBSD/tests/dist/ipf/input/n104 vendor/NetBSD/tests/dist/ipf/input/n105 vendor/NetBSD/tests/dist/ipf/input/n106 vendor/NetBSD/tests/dist/ipf/input/n10_6 vendor/NetBSD/tests/dist/ipf/input/n11 vendor/NetBSD/tests/dist/ipf/input/n11_6 vendor/NetBSD/tests/dist/ipf/input/n12 vendor/NetBSD/tests/dist/ipf/input/n12_6 vendor/NetBSD/tests/dist/ipf/input/n13 vendor/NetBSD/tests/dist/ipf/input/n13_6 vendor/NetBSD/tests/dist/ipf/input/n14 vendor/NetBSD/tests/dist/ipf/input/n14_6 vendor/NetBSD/tests/dist/ipf/input/n15 vendor/NetBSD/tests/dist/ipf/input/n15_6 vendor/NetBSD/tests/dist/ipf/input/n16 vendor/NetBSD/tests/dist/ipf/input/n17 vendor/NetBSD/tests/dist/ipf/input/n18 vendor/NetBSD/tests/dist/ipf/input/n1_6 vendor/NetBSD/tests/dist/ipf/input/n2 vendor/NetBSD/tests/dist/ipf/input/n200 vendor/NetBSD/tests/dist/ipf/input/n2_6 vendor/NetBSD/tests/dist/ipf/input/n3 vendor/NetBSD/tests/dist/ipf/input/n4 vendor/NetBSD/tests/dist/ipf/input/n4_6 vendor/NetBSD/tests/dist/ipf/input/n5 vendor/NetBSD/tests/dist/ipf/input/n5_6 vendor/NetBSD/tests/dist/ipf/input/n6 vendor/NetBSD/tests/dist/ipf/input/n6_6 vendor/NetBSD/tests/dist/ipf/input/n7 vendor/NetBSD/tests/dist/ipf/input/n7_6 vendor/NetBSD/tests/dist/ipf/input/n8 vendor/NetBSD/tests/dist/ipf/input/n8_6 vendor/NetBSD/tests/dist/ipf/input/n9 vendor/NetBSD/tests/dist/ipf/input/n9_6 vendor/NetBSD/tests/dist/ipf/input/ni1 vendor/NetBSD/tests/dist/ipf/input/ni10 vendor/NetBSD/tests/dist/ipf/input/ni11 vendor/NetBSD/tests/dist/ipf/input/ni12 vendor/NetBSD/tests/dist/ipf/input/ni13 vendor/NetBSD/tests/dist/ipf/input/ni14 vendor/NetBSD/tests/dist/ipf/input/ni15 vendor/NetBSD/tests/dist/ipf/input/ni16 vendor/NetBSD/tests/dist/ipf/input/ni17 vendor/NetBSD/tests/dist/ipf/input/ni18 vendor/NetBSD/tests/dist/ipf/input/ni19 vendor/NetBSD/tests/dist/ipf/input/ni2 vendor/NetBSD/tests/dist/ipf/input/ni20 vendor/NetBSD/tests/dist/ipf/input/ni21 vendor/NetBSD/tests/dist/ipf/input/ni23 vendor/NetBSD/tests/dist/ipf/input/ni3 vendor/NetBSD/tests/dist/ipf/input/ni4 vendor/NetBSD/tests/dist/ipf/input/ni5 vendor/NetBSD/tests/dist/ipf/input/ni6 vendor/NetBSD/tests/dist/ipf/input/ni7 vendor/NetBSD/tests/dist/ipf/input/ni8 vendor/NetBSD/tests/dist/ipf/input/ni9 vendor/NetBSD/tests/dist/ipf/input/p1 vendor/NetBSD/tests/dist/ipf/input/p10 vendor/NetBSD/tests/dist/ipf/input/p11 vendor/NetBSD/tests/dist/ipf/input/p12 vendor/NetBSD/tests/dist/ipf/input/p13 vendor/NetBSD/tests/dist/ipf/input/p2 vendor/NetBSD/tests/dist/ipf/input/p3 vendor/NetBSD/tests/dist/ipf/input/p4 vendor/NetBSD/tests/dist/ipf/input/p5 vendor/NetBSD/tests/dist/ipf/input/p6 vendor/NetBSD/tests/dist/ipf/input/p7 vendor/NetBSD/tests/dist/ipf/input/p9 vendor/NetBSD/tests/dist/ipf/regress/Makefile (contents, props changed) vendor/NetBSD/tests/dist/ipf/regress/bpf-f1 vendor/NetBSD/tests/dist/ipf/regress/bpf1 vendor/NetBSD/tests/dist/ipf/regress/f1 vendor/NetBSD/tests/dist/ipf/regress/f10 vendor/NetBSD/tests/dist/ipf/regress/f11 vendor/NetBSD/tests/dist/ipf/regress/f12 vendor/NetBSD/tests/dist/ipf/regress/f13 vendor/NetBSD/tests/dist/ipf/regress/f14 vendor/NetBSD/tests/dist/ipf/regress/f15 vendor/NetBSD/tests/dist/ipf/regress/f16 vendor/NetBSD/tests/dist/ipf/regress/f17 vendor/NetBSD/tests/dist/ipf/regress/f18 vendor/NetBSD/tests/dist/ipf/regress/f19 vendor/NetBSD/tests/dist/ipf/regress/f2 vendor/NetBSD/tests/dist/ipf/regress/f20 vendor/NetBSD/tests/dist/ipf/regress/f21 vendor/NetBSD/tests/dist/ipf/regress/f22 vendor/NetBSD/tests/dist/ipf/regress/f24 vendor/NetBSD/tests/dist/ipf/regress/f25 vendor/NetBSD/tests/dist/ipf/regress/f26 vendor/NetBSD/tests/dist/ipf/regress/f27 vendor/NetBSD/tests/dist/ipf/regress/f28.ipf vendor/NetBSD/tests/dist/ipf/regress/f28.pool vendor/NetBSD/tests/dist/ipf/regress/f29.ipf vendor/NetBSD/tests/dist/ipf/regress/f29.pool vendor/NetBSD/tests/dist/ipf/regress/f3 vendor/NetBSD/tests/dist/ipf/regress/f30 vendor/NetBSD/tests/dist/ipf/regress/f4 vendor/NetBSD/tests/dist/ipf/regress/f5 vendor/NetBSD/tests/dist/ipf/regress/f6 vendor/NetBSD/tests/dist/ipf/regress/f7 vendor/NetBSD/tests/dist/ipf/regress/f8 vendor/NetBSD/tests/dist/ipf/regress/f9 vendor/NetBSD/tests/dist/ipf/regress/i1 vendor/NetBSD/tests/dist/ipf/regress/i10 vendor/NetBSD/tests/dist/ipf/regress/i11 vendor/NetBSD/tests/dist/ipf/regress/i12 vendor/NetBSD/tests/dist/ipf/regress/i13 vendor/NetBSD/tests/dist/ipf/regress/i14 vendor/NetBSD/tests/dist/ipf/regress/i15 vendor/NetBSD/tests/dist/ipf/regress/i16 vendor/NetBSD/tests/dist/ipf/regress/i17 vendor/NetBSD/tests/dist/ipf/regress/i18 vendor/NetBSD/tests/dist/ipf/regress/i19 vendor/NetBSD/tests/dist/ipf/regress/i2 vendor/NetBSD/tests/dist/ipf/regress/i20 vendor/NetBSD/tests/dist/ipf/regress/i21 vendor/NetBSD/tests/dist/ipf/regress/i22 vendor/NetBSD/tests/dist/ipf/regress/i23 vendor/NetBSD/tests/dist/ipf/regress/i3 vendor/NetBSD/tests/dist/ipf/regress/i4 vendor/NetBSD/tests/dist/ipf/regress/i5 vendor/NetBSD/tests/dist/ipf/regress/i6 vendor/NetBSD/tests/dist/ipf/regress/i7 vendor/NetBSD/tests/dist/ipf/regress/i8 vendor/NetBSD/tests/dist/ipf/regress/i9 vendor/NetBSD/tests/dist/ipf/regress/in1 vendor/NetBSD/tests/dist/ipf/regress/in100 vendor/NetBSD/tests/dist/ipf/regress/in100_6 vendor/NetBSD/tests/dist/ipf/regress/in101 vendor/NetBSD/tests/dist/ipf/regress/in101_6 vendor/NetBSD/tests/dist/ipf/regress/in102 vendor/NetBSD/tests/dist/ipf/regress/in102_6 vendor/NetBSD/tests/dist/ipf/regress/in1_6 vendor/NetBSD/tests/dist/ipf/regress/in2 vendor/NetBSD/tests/dist/ipf/regress/in2_6 vendor/NetBSD/tests/dist/ipf/regress/in3 vendor/NetBSD/tests/dist/ipf/regress/in3_6 vendor/NetBSD/tests/dist/ipf/regress/in4 vendor/NetBSD/tests/dist/ipf/regress/in4_6 vendor/NetBSD/tests/dist/ipf/regress/in5 vendor/NetBSD/tests/dist/ipf/regress/in5_6 vendor/NetBSD/tests/dist/ipf/regress/in6 vendor/NetBSD/tests/dist/ipf/regress/in6_6 vendor/NetBSD/tests/dist/ipf/regress/in7 vendor/NetBSD/tests/dist/ipf/regress/in8_6 vendor/NetBSD/tests/dist/ipf/regress/ip1 vendor/NetBSD/tests/dist/ipf/regress/ip2 vendor/NetBSD/tests/dist/ipf/regress/ip3 vendor/NetBSD/tests/dist/ipf/regress/ipv6.1 (contents, props changed) vendor/NetBSD/tests/dist/ipf/regress/ipv6.2 (contents, props changed) vendor/NetBSD/tests/dist/ipf/regress/ipv6.3 (contents, props changed) vendor/NetBSD/tests/dist/ipf/regress/ipv6.4 (contents, props changed) vendor/NetBSD/tests/dist/ipf/regress/ipv6.5 (contents, props changed) vendor/NetBSD/tests/dist/ipf/regress/ipv6.6 (contents, props changed) vendor/NetBSD/tests/dist/ipf/regress/l1 vendor/NetBSD/tests/dist/ipf/regress/n1 vendor/NetBSD/tests/dist/ipf/regress/n10 vendor/NetBSD/tests/dist/ipf/regress/n100 vendor/NetBSD/tests/dist/ipf/regress/n101 vendor/NetBSD/tests/dist/ipf/regress/n102 vendor/NetBSD/tests/dist/ipf/regress/n103 vendor/NetBSD/tests/dist/ipf/regress/n104 vendor/NetBSD/tests/dist/ipf/regress/n105 vendor/NetBSD/tests/dist/ipf/regress/n106 vendor/NetBSD/tests/dist/ipf/regress/n10_6 vendor/NetBSD/tests/dist/ipf/regress/n11 vendor/NetBSD/tests/dist/ipf/regress/n11_6 vendor/NetBSD/tests/dist/ipf/regress/n12 vendor/NetBSD/tests/dist/ipf/regress/n12_6 vendor/NetBSD/tests/dist/ipf/regress/n13 vendor/NetBSD/tests/dist/ipf/regress/n13_6 vendor/NetBSD/tests/dist/ipf/regress/n14 vendor/NetBSD/tests/dist/ipf/regress/n14_6 vendor/NetBSD/tests/dist/ipf/regress/n15 vendor/NetBSD/tests/dist/ipf/regress/n15_6 vendor/NetBSD/tests/dist/ipf/regress/n16 vendor/NetBSD/tests/dist/ipf/regress/n16_6 vendor/NetBSD/tests/dist/ipf/regress/n17 vendor/NetBSD/tests/dist/ipf/regress/n18 vendor/NetBSD/tests/dist/ipf/regress/n1_6 vendor/NetBSD/tests/dist/ipf/regress/n2 vendor/NetBSD/tests/dist/ipf/regress/n200 vendor/NetBSD/tests/dist/ipf/regress/n2_6 vendor/NetBSD/tests/dist/ipf/regress/n3 vendor/NetBSD/tests/dist/ipf/regress/n4 vendor/NetBSD/tests/dist/ipf/regress/n4_6 vendor/NetBSD/tests/dist/ipf/regress/n5 vendor/NetBSD/tests/dist/ipf/regress/n5_6 vendor/NetBSD/tests/dist/ipf/regress/n6 vendor/NetBSD/tests/dist/ipf/regress/n6_6 vendor/NetBSD/tests/dist/ipf/regress/n7 vendor/NetBSD/tests/dist/ipf/regress/n7_6 vendor/NetBSD/tests/dist/ipf/regress/n8 vendor/NetBSD/tests/dist/ipf/regress/n8_6 vendor/NetBSD/tests/dist/ipf/regress/n9 vendor/NetBSD/tests/dist/ipf/regress/n9_6 vendor/NetBSD/tests/dist/ipf/regress/ni1.ipf vendor/NetBSD/tests/dist/ipf/regress/ni1.nat vendor/NetBSD/tests/dist/ipf/regress/ni10.ipf vendor/NetBSD/tests/dist/ipf/regress/ni10.nat vendor/NetBSD/tests/dist/ipf/regress/ni11.ipf vendor/NetBSD/tests/dist/ipf/regress/ni11.nat vendor/NetBSD/tests/dist/ipf/regress/ni12.ipf vendor/NetBSD/tests/dist/ipf/regress/ni12.nat vendor/NetBSD/tests/dist/ipf/regress/ni13.ipf vendor/NetBSD/tests/dist/ipf/regress/ni13.nat vendor/NetBSD/tests/dist/ipf/regress/ni14.ipf vendor/NetBSD/tests/dist/ipf/regress/ni14.nat vendor/NetBSD/tests/dist/ipf/regress/ni15.ipf vendor/NetBSD/tests/dist/ipf/regress/ni15.nat vendor/NetBSD/tests/dist/ipf/regress/ni16.ipf vendor/NetBSD/tests/dist/ipf/regress/ni16.nat vendor/NetBSD/tests/dist/ipf/regress/ni17.ipf vendor/NetBSD/tests/dist/ipf/regress/ni17.nat vendor/NetBSD/tests/dist/ipf/regress/ni18.ipf vendor/NetBSD/tests/dist/ipf/regress/ni18.nat vendor/NetBSD/tests/dist/ipf/regress/ni19.ipf vendor/NetBSD/tests/dist/ipf/regress/ni19.nat vendor/NetBSD/tests/dist/ipf/regress/ni2.ipf vendor/NetBSD/tests/dist/ipf/regress/ni2.nat vendor/NetBSD/tests/dist/ipf/regress/ni20.ipf vendor/NetBSD/tests/dist/ipf/regress/ni20.nat vendor/NetBSD/tests/dist/ipf/regress/ni21.ipf vendor/NetBSD/tests/dist/ipf/regress/ni21.nat vendor/NetBSD/tests/dist/ipf/regress/ni23.ipf vendor/NetBSD/tests/dist/ipf/regress/ni23.nat vendor/NetBSD/tests/dist/ipf/regress/ni3.ipf vendor/NetBSD/tests/dist/ipf/regress/ni3.nat vendor/NetBSD/tests/dist/ipf/regress/ni4.ipf vendor/NetBSD/tests/dist/ipf/regress/ni4.nat vendor/NetBSD/tests/dist/ipf/regress/ni5.ipf vendor/NetBSD/tests/dist/ipf/regress/ni5.nat vendor/NetBSD/tests/dist/ipf/regress/ni6.ipf vendor/NetBSD/tests/dist/ipf/regress/ni6.nat vendor/NetBSD/tests/dist/ipf/regress/ni7.ipf vendor/NetBSD/tests/dist/ipf/regress/ni7.nat vendor/NetBSD/tests/dist/ipf/regress/ni8.ipf vendor/NetBSD/tests/dist/ipf/regress/ni8.nat vendor/NetBSD/tests/dist/ipf/regress/ni9.ipf vendor/NetBSD/tests/dist/ipf/regress/ni9.nat vendor/NetBSD/tests/dist/ipf/regress/p1.ipf vendor/NetBSD/tests/dist/ipf/regress/p1.pool vendor/NetBSD/tests/dist/ipf/regress/p10.nat vendor/NetBSD/tests/dist/ipf/regress/p10.pool vendor/NetBSD/tests/dist/ipf/regress/p11.nat vendor/NetBSD/tests/dist/ipf/regress/p11.pool vendor/NetBSD/tests/dist/ipf/regress/p12.nat vendor/NetBSD/tests/dist/ipf/regress/p12.pool vendor/NetBSD/tests/dist/ipf/regress/p13.ipf vendor/NetBSD/tests/dist/ipf/regress/p13.pool vendor/NetBSD/tests/dist/ipf/regress/p2.ipf vendor/NetBSD/tests/dist/ipf/regress/p3.ipf vendor/NetBSD/tests/dist/ipf/regress/p3.pool vendor/NetBSD/tests/dist/ipf/regress/p4.nat vendor/NetBSD/tests/dist/ipf/regress/p4.pool vendor/NetBSD/tests/dist/ipf/regress/p5.ipf vendor/NetBSD/tests/dist/ipf/regress/p5.pool vendor/NetBSD/tests/dist/ipf/regress/p6.ipf vendor/NetBSD/tests/dist/ipf/regress/p6.pool vendor/NetBSD/tests/dist/ipf/regress/p6.whois vendor/NetBSD/tests/dist/ipf/regress/p7.nat vendor/NetBSD/tests/dist/ipf/regress/p7.pool vendor/NetBSD/tests/dist/ipf/regress/p9.nat vendor/NetBSD/tests/dist/ipf/regress/p9.pool vendor/NetBSD/tests/dist/ipf/t_bpf.sh (contents, props changed) vendor/NetBSD/tests/dist/ipf/t_filter_exec.sh (contents, props changed) vendor/NetBSD/tests/dist/ipf/t_filter_parse.sh (contents, props changed) vendor/NetBSD/tests/dist/ipf/t_logging.sh (contents, props changed) vendor/NetBSD/tests/dist/ipf/t_nat_exec.sh (contents, props changed) vendor/NetBSD/tests/dist/ipf/t_nat_ipf_exec.sh (contents, props changed) vendor/NetBSD/tests/dist/ipf/t_nat_parse.sh (contents, props changed) vendor/NetBSD/tests/dist/ipf/t_pools.sh (contents, props changed) vendor/NetBSD/tests/dist/kernel/Makefile (contents, props changed) vendor/NetBSD/tests/dist/kernel/Makefile.inc (contents, props changed) vendor/NetBSD/tests/dist/kernel/gen_t_subr_prf (contents, props changed) vendor/NetBSD/tests/dist/kernel/h_ps_strings1.c (contents, props changed) vendor/NetBSD/tests/dist/kernel/h_ps_strings2.c (contents, props changed) vendor/NetBSD/tests/dist/kernel/kqueue/Makefile (contents, props changed) vendor/NetBSD/tests/dist/kernel/kqueue/Makefile.inc (contents, props changed) vendor/NetBSD/tests/dist/kernel/kqueue/read/Makefile (contents, props changed) vendor/NetBSD/tests/dist/kernel/kqueue/read/t_fifo.c (contents, props changed) vendor/NetBSD/tests/dist/kernel/kqueue/read/t_file.c (contents, props changed) vendor/NetBSD/tests/dist/kernel/kqueue/read/t_file2.c (contents, props changed) vendor/NetBSD/tests/dist/kernel/kqueue/read/t_pipe.c (contents, props changed) vendor/NetBSD/tests/dist/kernel/kqueue/read/t_ttypty.c (contents, props changed) vendor/NetBSD/tests/dist/kernel/kqueue/t_ioctl.c (contents, props changed) vendor/NetBSD/tests/dist/kernel/kqueue/t_proc1.c (contents, props changed) vendor/NetBSD/tests/dist/kernel/kqueue/t_proc2.c (contents, props changed) vendor/NetBSD/tests/dist/kernel/kqueue/t_proc3.c (contents, props changed) vendor/NetBSD/tests/dist/kernel/kqueue/t_sig.c (contents, props changed) vendor/NetBSD/tests/dist/kernel/kqueue/write/Makefile (contents, props changed) vendor/NetBSD/tests/dist/kernel/kqueue/write/t_fifo.c (contents, props changed) vendor/NetBSD/tests/dist/kernel/kqueue/write/t_pipe.c (contents, props changed) vendor/NetBSD/tests/dist/kernel/kqueue/write/t_ttypty.c (contents, props changed) vendor/NetBSD/tests/dist/kernel/t_extattrctl.c (contents, props changed) vendor/NetBSD/tests/dist/kernel/t_extent.c (contents, props changed) vendor/NetBSD/tests/dist/kernel/t_filedesc.c (contents, props changed) vendor/NetBSD/tests/dist/kernel/t_kauth_pr_47598.c (contents, props changed) vendor/NetBSD/tests/dist/kernel/t_lock.c (contents, props changed) vendor/NetBSD/tests/dist/kernel/t_lockf.c (contents, props changed) vendor/NetBSD/tests/dist/kernel/t_mqueue.c (contents, props changed) vendor/NetBSD/tests/dist/kernel/t_ps_strings.sh (contents, props changed) vendor/NetBSD/tests/dist/kernel/t_pty.c (contents, props changed) vendor/NetBSD/tests/dist/kernel/t_rnd.c (contents, props changed) vendor/NetBSD/tests/dist/kernel/t_sysctl.c (contents, props changed) vendor/NetBSD/tests/dist/kernel/t_sysv.c (contents, props changed) vendor/NetBSD/tests/dist/kernel/t_umount.sh (contents, props changed) vendor/NetBSD/tests/dist/kernel/t_umountstress.sh (contents, props changed) vendor/NetBSD/tests/dist/kernel/tty/Makefile (contents, props changed) vendor/NetBSD/tests/dist/kernel/tty/t_pr.c (contents, props changed) vendor/NetBSD/tests/dist/lib/Makefile (contents, props changed) vendor/NetBSD/tests/dist/lib/Makefile.inc (contents, props changed) vendor/NetBSD/tests/dist/lib/csu/Makefile (contents, props changed) vendor/NetBSD/tests/dist/lib/csu/Makefile.check_stack (contents, props changed) vendor/NetBSD/tests/dist/lib/csu/Makefile.inc (contents, props changed) vendor/NetBSD/tests/dist/lib/csu/arch/alpha/h_initfini_align.S (contents, props changed) vendor/NetBSD/tests/dist/lib/csu/arch/arm/h_initfini_align.S (contents, props changed) vendor/NetBSD/tests/dist/lib/csu/arch/hppa/h_initfini_align.S (contents, props changed) vendor/NetBSD/tests/dist/lib/csu/arch/i386/h_initfini_align.S (contents, props changed) vendor/NetBSD/tests/dist/lib/csu/arch/ia64/h_initfini_align.S (contents, props changed) vendor/NetBSD/tests/dist/lib/csu/arch/mips/h_initfini_align.S (contents, props changed) vendor/NetBSD/tests/dist/lib/csu/arch/powerpc/h_initfini_align.S (contents, props changed) vendor/NetBSD/tests/dist/lib/csu/arch/sparc/h_initfini_align.S (contents, props changed) vendor/NetBSD/tests/dist/lib/csu/arch/sparc64/h_initfini_align.S (contents, props changed) vendor/NetBSD/tests/dist/lib/csu/arch/vax/h_initfini_align.S (contents, props changed) vendor/NetBSD/tests/dist/lib/csu/arch/x86_64/h_initfini_align.S (contents, props changed) vendor/NetBSD/tests/dist/lib/csu/dso/Makefile (contents, props changed) vendor/NetBSD/tests/dist/lib/csu/dso/h_initfini3_dso.cxx (contents, props changed) vendor/NetBSD/tests/dist/lib/csu/h_initfini1.cxx (contents, props changed) vendor/NetBSD/tests/dist/lib/csu/h_initfini3.cxx (contents, props changed) vendor/NetBSD/tests/dist/lib/csu/h_initfini_common.cxx (contents, props changed) vendor/NetBSD/tests/dist/lib/csu/t_crt0.sh (contents, props changed) vendor/NetBSD/tests/dist/lib/libbluetooth/Makefile (contents, props changed) vendor/NetBSD/tests/dist/lib/libbluetooth/t_bluetooth.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libbluetooth/t_sdp_data.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libbluetooth/t_sdp_get.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libbluetooth/t_sdp_match.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libbluetooth/t_sdp_put.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libbluetooth/t_sdp_set.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libbpfjit/Makefile (contents, props changed) vendor/NetBSD/tests/dist/lib/libbpfjit/t_bpfjit.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libbpfjit/t_cop.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libbpfjit/t_extmem.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/Makefile (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/Makefile.inc (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/arch/Makefile.exec_prot (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/arch/aarch64/exec_prot_support.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/arch/aarch64/return_one.S (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/arch/alpha/exec_prot_support.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/arch/alpha/return_one.S (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/arch/arm/exec_prot_support.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/arch/arm/return_one.S (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/arch/hppa/exec_prot_support.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/arch/hppa/return_one.S (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/arch/i386/exec_prot_support.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/arch/i386/return_one.S (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/arch/ia64/exec_prot_support.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/arch/ia64/return_one.S (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/arch/m68k/exec_prot_support.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/arch/m68k/return_one.S (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/arch/mips/exec_prot_support.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/arch/mips/return_one.S (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/arch/or1k/exec_prot_support.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/arch/or1k/return_one.S (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/arch/powerpc/exec_prot_support.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/arch/powerpc/return_one.S (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/arch/powerpc64/exec_prot_support.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/arch/powerpc64/return_one.S (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/arch/riscv/exec_prot_support.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/arch/riscv/return_one.S (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/arch/sh3/exec_prot_support.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/arch/sh3/return_one.S (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/arch/sparc/exec_prot_support.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/arch/sparc/return_one.S (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/arch/sparc64/exec_prot_support.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/arch/sparc64/return_one.S (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/arch/vax/exec_prot_support.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/arch/vax/return_one.S (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/arch/x86_64/exec_prot_support.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/arch/x86_64/return_one.S (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/c063/Makefile (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/c063/t_faccessat.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/c063/t_fchmodat.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/c063/t_fchownat.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/c063/t_fexecve.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/c063/t_fstatat.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/c063/t_linkat.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/c063/t_mkdirat.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/c063/t_mkfifoat.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/c063/t_mknodat.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/c063/t_o_search.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/c063/t_openat.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/c063/t_readlinkat.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/c063/t_renameat.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/c063/t_symlinkat.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/c063/t_unlinkat.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/c063/t_utimensat.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/common/exec_prot.h (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/db/Makefile (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/db/README vendor/NetBSD/tests/dist/lib/libc/db/h_db.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/db/t_db.sh (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/gen/Makefile (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/gen/execve/Makefile (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/gen/execve/t_execve.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/gen/isqemu.h (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/gen/posix_spawn/Makefile (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/gen/posix_spawn/Makefile.inc (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/gen/posix_spawn/h_fileactions.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/gen/posix_spawn/h_nonexec.sh (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/gen/posix_spawn/h_spawn.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/gen/posix_spawn/h_spawnattr.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/gen/posix_spawn/t_fileactions.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/gen/posix_spawn/t_spawn.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/gen/posix_spawn/t_spawnattr.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/gen/t_alarm.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/gen/t_assert.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/gen/t_basedirname.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/gen/t_closefrom.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/gen/t_cpuset.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/gen/t_dir.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/gen/t_floatunditf.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/gen/t_fmtcheck.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/gen/t_fnmatch.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/gen/t_fpclassify.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/gen/t_fpsetmask.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/gen/t_fpsetround.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/gen/t_ftok.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/gen/t_getcwd.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/gen/t_getgrent.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/gen/t_glob.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/gen/t_humanize_number.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/gen/t_isnan.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/gen/t_nice.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/gen/t_pause.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/gen/t_raise.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/gen/t_randomid.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/gen/t_realpath.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/gen/t_setdomainname.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/gen/t_sethostname.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/gen/t_siginfo.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/gen/t_sleep.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/gen/t_syslog.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/gen/t_time.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/gen/t_ttyname.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/gen/t_vis.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/hash/Makefile (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/hash/data/md5test-in vendor/NetBSD/tests/dist/lib/libc/hash/data/md5test-out vendor/NetBSD/tests/dist/lib/libc/hash/data/sha1test-in vendor/NetBSD/tests/dist/lib/libc/hash/data/sha1test-out vendor/NetBSD/tests/dist/lib/libc/hash/data/sha1test2-out vendor/NetBSD/tests/dist/lib/libc/hash/h_hash.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/hash/t_hash.sh (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/hash/t_sha2.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/inet/Makefile (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/inet/t_inet_network.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/locale/Makefile (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/locale/t_io.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/locale/t_mbrtowc.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/locale/t_mbsnrtowcs.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/locale/t_mbstowcs.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/locale/t_mbtowc.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/locale/t_wcscspn.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/locale/t_wcspbrk.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/locale/t_wcsspn.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/locale/t_wcstod.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/locale/t_wctomb.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/net/Makefile (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/net/Makefile.inc (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/net/gen_ether_subr (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/net/getaddrinfo/Makefile (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/net/getaddrinfo/README vendor/NetBSD/tests/dist/lib/libc/net/getaddrinfo/basics_v4.exp vendor/NetBSD/tests/dist/lib/libc/net/getaddrinfo/basics_v4v6.exp vendor/NetBSD/tests/dist/lib/libc/net/getaddrinfo/h_gai.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/net/getaddrinfo/no_host_v4.exp vendor/NetBSD/tests/dist/lib/libc/net/getaddrinfo/no_host_v4v6.exp vendor/NetBSD/tests/dist/lib/libc/net/getaddrinfo/no_serv_v4.exp vendor/NetBSD/tests/dist/lib/libc/net/getaddrinfo/no_serv_v4v6.exp vendor/NetBSD/tests/dist/lib/libc/net/getaddrinfo/scoped.exp vendor/NetBSD/tests/dist/lib/libc/net/getaddrinfo/sock_raw_v4.exp vendor/NetBSD/tests/dist/lib/libc/net/getaddrinfo/sock_raw_v4v6.exp vendor/NetBSD/tests/dist/lib/libc/net/getaddrinfo/spec_fam_v4.exp vendor/NetBSD/tests/dist/lib/libc/net/getaddrinfo/spec_fam_v4v6.exp vendor/NetBSD/tests/dist/lib/libc/net/getaddrinfo/t_getaddrinfo.sh (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/net/getaddrinfo/unsup_fam.exp vendor/NetBSD/tests/dist/lib/libc/net/h_dns_server.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/net/h_hostent.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/net/h_nsd_recurse.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/net/h_protoent.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/net/h_servent.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/net/hosts vendor/NetBSD/tests/dist/lib/libc/net/resolv.conf (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/net/t_ether_aton.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/net/t_getprotoent.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/net/t_hostent.sh (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/net/t_nsdispatch.sh (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/net/t_protoent.sh (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/net/t_servent.sh (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/regex/Makefile (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/regex/README vendor/NetBSD/tests/dist/lib/libc/regex/data/anchor.in (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/regex/data/att/README vendor/NetBSD/tests/dist/lib/libc/regex/data/att/basic.dat vendor/NetBSD/tests/dist/lib/libc/regex/data/att/categorization.dat vendor/NetBSD/tests/dist/lib/libc/regex/data/att/forcedassoc.dat vendor/NetBSD/tests/dist/lib/libc/regex/data/att/leftassoc.dat vendor/NetBSD/tests/dist/lib/libc/regex/data/att/nullsubexpr.dat vendor/NetBSD/tests/dist/lib/libc/regex/data/att/repetition.dat vendor/NetBSD/tests/dist/lib/libc/regex/data/att/rightassoc.dat vendor/NetBSD/tests/dist/lib/libc/regex/data/backref.in (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/regex/data/basic.in (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/regex/data/bracket.in (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/regex/data/c_comments.in (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/regex/data/complex.in (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/regex/data/error.in (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/regex/data/meta.in (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/regex/data/nospec.in (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/regex/data/paren.in (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/regex/data/regress.in (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/regex/data/repet_bounded.in (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/regex/data/repet_multi.in (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/regex/data/repet_ordinary.in (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/regex/data/startend.in (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/regex/data/subexp.in (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/regex/data/subtle.in (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/regex/data/word_bound.in (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/regex/data/zero.in (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/regex/debug.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/regex/main.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/regex/split.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/regex/t_exhaust.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/regex/t_regex.sh (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/regex/t_regex_att.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/regex/test_regex.h (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/rpc/Makefile (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/rpc/h_testbits.x vendor/NetBSD/tests/dist/lib/libc/rpc/t_rpc.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/rpc/t_xdr.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/setjmp/Makefile (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/setjmp/t_setjmp.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/setjmp/t_threadjmp.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/ssp/Makefile (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/ssp/h_fgets.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/ssp/h_getcwd.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/ssp/h_gets.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/ssp/h_memcpy.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/ssp/h_memmove.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/ssp/h_memset.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/ssp/h_raw.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/ssp/h_read.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/ssp/h_readlink.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/ssp/h_snprintf.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/ssp/h_sprintf.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/ssp/h_stpcpy.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/ssp/h_stpncpy.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/ssp/h_strcat.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/ssp/h_strcpy.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/ssp/h_strncat.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/ssp/h_strncpy.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/ssp/h_vsnprintf.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/ssp/h_vsprintf.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/ssp/t_ssp.sh (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/stdio/Makefile (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/stdio/t_clearerr.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/stdio/t_fflush.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/stdio/t_fmemopen.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/stdio/t_fopen.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/stdio/t_fputc.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/stdio/t_mktemp.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/stdio/t_popen.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/stdio/t_printf.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/stdio/t_scanf.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/stdlib/Makefile (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/stdlib/h_atexit.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/stdlib/h_getopt.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/stdlib/h_getopt_long.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/stdlib/t_abs.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/stdlib/t_atexit.sh (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/stdlib/t_atoi.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/stdlib/t_div.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/stdlib/t_exit.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/stdlib/t_getenv.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/stdlib/t_getenv_thread.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/stdlib/t_getopt.sh (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/stdlib/t_hsearch.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/stdlib/t_mi_vector_hash.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/stdlib/t_posix_memalign.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/stdlib/t_random.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/stdlib/t_strtod.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/stdlib/t_strtol.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/stdlib/t_system.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/string/Makefile (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/string/t_bm.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/string/t_memchr.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/string/t_memcpy.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/string/t_memmem.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/string/t_memset.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/string/t_popcount.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/string/t_strcat.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/string/t_strchr.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/string/t_strcmp.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/string/t_strcpy.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/string/t_strcspn.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/string/t_strerror.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/string/t_stresep.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/string/t_strlen.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/string/t_strpbrk.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/string/t_strrchr.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/string/t_strspn.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/string/t_swab.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/sync/Makefile (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/sync/all_sync_ops_linkable.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/sys/Makefile (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/sys/t_access.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/sys/t_chroot.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/sys/t_clock_gettime.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/sys/t_clone.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/sys/t_connect.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/sys/t_dup.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/sys/t_fsync.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/sys/t_getcontext.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/sys/t_getgroups.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/sys/t_getitimer.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/sys/t_getlogin.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/sys/t_getpid.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/sys/t_getrusage.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/sys/t_getsid.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/sys/t_gettimeofday.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/sys/t_issetugid.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/sys/t_kevent.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/sys/t_kill.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/sys/t_link.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/sys/t_listen.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/sys/t_lwp_create.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/sys/t_lwp_ctl.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/sys/t_mincore.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/sys/t_minherit.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/sys/t_mkdir.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/sys/t_mkfifo.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/sys/t_mknod.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/sys/t_mlock.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/sys/t_mmap.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/sys/t_mprotect.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/sys/t_msgctl.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/sys/t_msgget.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/sys/t_msgrcv.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/sys/t_msgsnd.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/sys/t_msync.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/sys/t_nanosleep.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/sys/t_pipe.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/sys/t_pipe2.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/sys/t_poll.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/sys/t_posix_fadvise.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/sys/t_recvmmsg.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/sys/t_revoke.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/sys/t_select.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/sys/t_setrlimit.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/sys/t_setuid.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/sys/t_sigaction.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/sys/t_sigqueue.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/sys/t_sigtimedwait.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/sys/t_socketpair.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/sys/t_stat.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/sys/t_swapcontext.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/sys/t_timer_create.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/sys/t_truncate.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/sys/t_ucontext.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/sys/t_umask.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/sys/t_unlink.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/sys/t_write.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/t_cdb.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/t_convfp.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/t_gdtoa.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/termios/Makefile (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/termios/t_tcsetpgrp.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/time/Makefile (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/time/t_mktime.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/time/t_strptime.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/tls/Makefile (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/tls/Makefile.inc (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/tls/dso/Makefile (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/tls/dso/h_tls_dlopen.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/tls/t_tls_dlopen.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/tls/t_tls_dynamic.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/tls/t_tls_static.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/tls/t_tls_static_helper.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/tls_dso/Makefile (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/tls_dso/h_tls_dynamic.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/ttyio/Makefile (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/ttyio/t_ptm.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/ttyio/t_ttyio.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libcrypt/Makefile (contents, props changed) vendor/NetBSD/tests/dist/lib/libcrypt/t_crypt.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libcurses/Makefile (contents, props changed) vendor/NetBSD/tests/dist/lib/libcurses/Makefile.inc (contents, props changed) vendor/NetBSD/tests/dist/lib/libcurses/atf.terminfo (contents, props changed) vendor/NetBSD/tests/dist/lib/libcurses/check_files/Makefile (contents, props changed) vendor/NetBSD/tests/dist/lib/libcurses/check_files/addch.chk vendor/NetBSD/tests/dist/lib/libcurses/check_files/addchstr.chk vendor/NetBSD/tests/dist/lib/libcurses/check_files/addstr.chk vendor/NetBSD/tests/dist/lib/libcurses/check_files/attributes.chk vendor/NetBSD/tests/dist/lib/libcurses/check_files/background1.chk vendor/NetBSD/tests/dist/lib/libcurses/check_files/background2.chk vendor/NetBSD/tests/dist/lib/libcurses/check_files/background3.chk vendor/NetBSD/tests/dist/lib/libcurses/check_files/background4.chk (contents, props changed) vendor/NetBSD/tests/dist/lib/libcurses/check_files/background5.chk (contents, props changed) vendor/NetBSD/tests/dist/lib/libcurses/check_files/bell.chk vendor/NetBSD/tests/dist/lib/libcurses/check_files/box_standout.chk (contents, props changed) vendor/NetBSD/tests/dist/lib/libcurses/check_files/chgat1.chk (contents, props changed) vendor/NetBSD/tests/dist/lib/libcurses/check_files/chgat2.chk vendor/NetBSD/tests/dist/lib/libcurses/check_files/chgat3.chk vendor/NetBSD/tests/dist/lib/libcurses/check_files/clear1.chk vendor/NetBSD/tests/dist/lib/libcurses/check_files/clear10.chk vendor/NetBSD/tests/dist/lib/libcurses/check_files/clear2.chk vendor/NetBSD/tests/dist/lib/libcurses/check_files/clear3.chk vendor/NetBSD/tests/dist/lib/libcurses/check_files/clear4.chk (contents, props changed) vendor/NetBSD/tests/dist/lib/libcurses/check_files/clear5.chk vendor/NetBSD/tests/dist/lib/libcurses/check_files/clear6.chk vendor/NetBSD/tests/dist/lib/libcurses/check_files/clear7.chk vendor/NetBSD/tests/dist/lib/libcurses/check_files/clear8.chk (contents, props changed) vendor/NetBSD/tests/dist/lib/libcurses/check_files/clear9.chk vendor/NetBSD/tests/dist/lib/libcurses/check_files/color_blank_draw.chk vendor/NetBSD/tests/dist/lib/libcurses/check_files/color_blue_back.chk vendor/NetBSD/tests/dist/lib/libcurses/check_files/color_default.chk vendor/NetBSD/tests/dist/lib/libcurses/check_files/color_red_fore.chk vendor/NetBSD/tests/dist/lib/libcurses/check_files/color_set.chk vendor/NetBSD/tests/dist/lib/libcurses/check_files/color_start.chk vendor/NetBSD/tests/dist/lib/libcurses/check_files/copywin1.chk vendor/NetBSD/tests/dist/lib/libcurses/check_files/copywin10.chk vendor/NetBSD/tests/dist/lib/libcurses/check_files/copywin11.chk vendor/NetBSD/tests/dist/lib/libcurses/check_files/copywin12.chk vendor/NetBSD/tests/dist/lib/libcurses/check_files/copywin13.chk vendor/NetBSD/tests/dist/lib/libcurses/check_files/copywin14.chk vendor/NetBSD/tests/dist/lib/libcurses/check_files/copywin2.chk vendor/NetBSD/tests/dist/lib/libcurses/check_files/copywin3.chk vendor/NetBSD/tests/dist/lib/libcurses/check_files/copywin4.chk (contents, props changed) vendor/NetBSD/tests/dist/lib/libcurses/check_files/copywin5.chk vendor/NetBSD/tests/dist/lib/libcurses/check_files/copywin6.chk vendor/NetBSD/tests/dist/lib/libcurses/check_files/copywin7.chk (contents, props changed) vendor/NetBSD/tests/dist/lib/libcurses/check_files/copywin8.chk vendor/NetBSD/tests/dist/lib/libcurses/check_files/copywin9.chk vendor/NetBSD/tests/dist/lib/libcurses/check_files/curs_set1.chk vendor/NetBSD/tests/dist/lib/libcurses/check_files/curs_set2.chk vendor/NetBSD/tests/dist/lib/libcurses/check_files/curs_set3.chk vendor/NetBSD/tests/dist/lib/libcurses/check_files/curses_start.chk vendor/NetBSD/tests/dist/lib/libcurses/check_files/fill.chk vendor/NetBSD/tests/dist/lib/libcurses/check_files/home.chk vendor/NetBSD/tests/dist/lib/libcurses/check_files/timeout.chk vendor/NetBSD/tests/dist/lib/libcurses/check_files/wborder.chk vendor/NetBSD/tests/dist/lib/libcurses/check_files/wborder_refresh.chk vendor/NetBSD/tests/dist/lib/libcurses/check_files/wgetstr.chk vendor/NetBSD/tests/dist/lib/libcurses/check_files/wgetstr_refresh.chk vendor/NetBSD/tests/dist/lib/libcurses/check_files/window.chk vendor/NetBSD/tests/dist/lib/libcurses/check_files/wprintw_refresh.chk vendor/NetBSD/tests/dist/lib/libcurses/check_files/wscrl1.chk vendor/NetBSD/tests/dist/lib/libcurses/check_files/wscrl2.chk (contents, props changed) vendor/NetBSD/tests/dist/lib/libcurses/director/Makefile (contents, props changed) vendor/NetBSD/tests/dist/lib/libcurses/director/director.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libcurses/director/returns.h (contents, props changed) vendor/NetBSD/tests/dist/lib/libcurses/director/testlang_conf.l vendor/NetBSD/tests/dist/lib/libcurses/director/testlang_parse.y vendor/NetBSD/tests/dist/lib/libcurses/slave/Makefile (contents, props changed) vendor/NetBSD/tests/dist/lib/libcurses/slave/command_table.h (contents, props changed) vendor/NetBSD/tests/dist/lib/libcurses/slave/commands.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libcurses/slave/curses_commands.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libcurses/slave/curses_commands.h (contents, props changed) vendor/NetBSD/tests/dist/lib/libcurses/slave/slave.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libcurses/slave/slave.h (contents, props changed) vendor/NetBSD/tests/dist/lib/libcurses/t_curses.sh (contents, props changed) vendor/NetBSD/tests/dist/lib/libcurses/testframe.txt (contents, props changed) vendor/NetBSD/tests/dist/lib/libcurses/tests/Makefile (contents, props changed) vendor/NetBSD/tests/dist/lib/libcurses/tests/addch vendor/NetBSD/tests/dist/lib/libcurses/tests/addchnstr vendor/NetBSD/tests/dist/lib/libcurses/tests/addchstr vendor/NetBSD/tests/dist/lib/libcurses/tests/addnstr vendor/NetBSD/tests/dist/lib/libcurses/tests/addstr vendor/NetBSD/tests/dist/lib/libcurses/tests/assume_default_colors vendor/NetBSD/tests/dist/lib/libcurses/tests/attributes vendor/NetBSD/tests/dist/lib/libcurses/tests/background vendor/NetBSD/tests/dist/lib/libcurses/tests/beep vendor/NetBSD/tests/dist/lib/libcurses/tests/box vendor/NetBSD/tests/dist/lib/libcurses/tests/can_change_color vendor/NetBSD/tests/dist/lib/libcurses/tests/cbreak vendor/NetBSD/tests/dist/lib/libcurses/tests/chgat vendor/NetBSD/tests/dist/lib/libcurses/tests/clear vendor/NetBSD/tests/dist/lib/libcurses/tests/color_content vendor/NetBSD/tests/dist/lib/libcurses/tests/color_set vendor/NetBSD/tests/dist/lib/libcurses/tests/copywin vendor/NetBSD/tests/dist/lib/libcurses/tests/curs_set vendor/NetBSD/tests/dist/lib/libcurses/tests/fill_screen vendor/NetBSD/tests/dist/lib/libcurses/tests/getch vendor/NetBSD/tests/dist/lib/libcurses/tests/getstr vendor/NetBSD/tests/dist/lib/libcurses/tests/mvwin vendor/NetBSD/tests/dist/lib/libcurses/tests/start vendor/NetBSD/tests/dist/lib/libcurses/tests/start_color vendor/NetBSD/tests/dist/lib/libcurses/tests/std_defines vendor/NetBSD/tests/dist/lib/libcurses/tests/termattrs vendor/NetBSD/tests/dist/lib/libcurses/tests/timeout vendor/NetBSD/tests/dist/lib/libcurses/tests/wborder vendor/NetBSD/tests/dist/lib/libcurses/tests/window vendor/NetBSD/tests/dist/lib/libcurses/tests/window_create vendor/NetBSD/tests/dist/lib/libcurses/tests/wprintw vendor/NetBSD/tests/dist/lib/libcurses/tests/wscrl vendor/NetBSD/tests/dist/lib/libdes/Makefile (contents, props changed) vendor/NetBSD/tests/dist/lib/libdes/t_des.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libevent/Makefile (contents, props changed) vendor/NetBSD/tests/dist/lib/libevent/t_event.sh (contents, props changed) vendor/NetBSD/tests/dist/lib/libexecinfo/Makefile (contents, props changed) vendor/NetBSD/tests/dist/lib/libexecinfo/t_backtrace.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libm/Makefile (contents, props changed) vendor/NetBSD/tests/dist/lib/libm/t_acos.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libm/t_asin.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libm/t_atan.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libm/t_cbrt.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libm/t_ceil.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libm/t_cos.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libm/t_cosh.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libm/t_erf.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libm/t_exp.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libm/t_fmod.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libm/t_infinity.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libm/t_ldexp.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libm/t_libm.h (contents, props changed) vendor/NetBSD/tests/dist/lib/libm/t_log.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libm/t_modf.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libm/t_pow.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libm/t_precision.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libm/t_round.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libm/t_scalbn.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libm/t_sin.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libm/t_sinh.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libm/t_sqrt.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libm/t_tan.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libm/t_tanh.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libobjc/Makefile (contents, props changed) vendor/NetBSD/tests/dist/lib/libobjc/t_threads.m vendor/NetBSD/tests/dist/lib/libposix/Makefile (contents, props changed) vendor/NetBSD/tests/dist/lib/libposix/Makefile.inc (contents, props changed) vendor/NetBSD/tests/dist/lib/libposix/bsd/Makefile (contents, props changed) vendor/NetBSD/tests/dist/lib/libposix/posix1/Makefile (contents, props changed) vendor/NetBSD/tests/dist/lib/libposix/posix2/Makefile (contents, props changed) vendor/NetBSD/tests/dist/lib/libposix/t_rename.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libppath/Makefile (contents, props changed) vendor/NetBSD/tests/dist/lib/libppath/personnel.plist (contents, props changed) vendor/NetBSD/tests/dist/lib/libppath/plist_to_c (contents, props changed) vendor/NetBSD/tests/dist/lib/libppath/t_ppath.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libprop/Makefile (contents, props changed) vendor/NetBSD/tests/dist/lib/libprop/t_basic.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libpthread/Makefile (contents, props changed) vendor/NetBSD/tests/dist/lib/libpthread/d_mach vendor/NetBSD/tests/dist/lib/libpthread/dlopen/Makefile (contents, props changed) vendor/NetBSD/tests/dist/lib/libpthread/dlopen/dso/Makefile (contents, props changed) vendor/NetBSD/tests/dist/lib/libpthread/dlopen/dso/h_pthread_dlopen.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libpthread/dlopen/t_dlopen.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libpthread/dlopen/t_dso_pthread_create.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libpthread/dlopen/t_main_pthread_create.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libpthread/h_atexit.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libpthread/h_cancel.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libpthread/h_common.h (contents, props changed) vendor/NetBSD/tests/dist/lib/libpthread/h_exit.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libpthread/h_resolv.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libpthread/t_atexit.sh (contents, props changed) vendor/NetBSD/tests/dist/lib/libpthread/t_barrier.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libpthread/t_cancel.sh (contents, props changed) vendor/NetBSD/tests/dist/lib/libpthread/t_cond.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libpthread/t_condwait.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libpthread/t_detach.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libpthread/t_equal.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libpthread/t_exit.sh (contents, props changed) vendor/NetBSD/tests/dist/lib/libpthread/t_fork.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libpthread/t_fpu.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libpthread/t_join.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libpthread/t_kill.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libpthread/t_mutex.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libpthread/t_name.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libpthread/t_once.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libpthread/t_preempt.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libpthread/t_resolv.sh (contents, props changed) vendor/NetBSD/tests/dist/lib/libpthread/t_rwlock.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libpthread/t_sem.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libpthread/t_sigalarm.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libpthread/t_siglongjmp.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libpthread/t_sigmask.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libpthread/t_sigsuspend.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libpthread/t_sleep.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libpthread/t_swapcontext.c (contents, props changed) vendor/NetBSD/tests/dist/lib/librt/Makefile (contents, props changed) vendor/NetBSD/tests/dist/lib/librt/t_sched.c (contents, props changed) vendor/NetBSD/tests/dist/lib/librt/t_sem.c (contents, props changed) vendor/NetBSD/tests/dist/lib/librumpclient/Makefile (contents, props changed) vendor/NetBSD/tests/dist/lib/librumpclient/h_exec.c (contents, props changed) vendor/NetBSD/tests/dist/lib/librumpclient/h_execthr.c (contents, props changed) vendor/NetBSD/tests/dist/lib/librumpclient/t_exec.sh (contents, props changed) vendor/NetBSD/tests/dist/lib/librumpclient/t_fd.c (contents, props changed) vendor/NetBSD/tests/dist/lib/librumphijack/Makefile (contents, props changed) vendor/NetBSD/tests/dist/lib/librumphijack/h_client.c (contents, props changed) vendor/NetBSD/tests/dist/lib/librumphijack/h_cwd.c (contents, props changed) vendor/NetBSD/tests/dist/lib/librumphijack/h_netget.c (contents, props changed) vendor/NetBSD/tests/dist/lib/librumphijack/index.html (contents, props changed) vendor/NetBSD/tests/dist/lib/librumphijack/netstat.expout vendor/NetBSD/tests/dist/lib/librumphijack/ssh_config.in (contents, props changed) vendor/NetBSD/tests/dist/lib/librumphijack/ssh_host_key vendor/NetBSD/tests/dist/lib/librumphijack/ssh_host_key.pub vendor/NetBSD/tests/dist/lib/librumphijack/sshd_config.in (contents, props changed) vendor/NetBSD/tests/dist/lib/librumphijack/t_asyncio.sh (contents, props changed) vendor/NetBSD/tests/dist/lib/librumphijack/t_config.sh (contents, props changed) vendor/NetBSD/tests/dist/lib/librumphijack/t_cwd.sh (contents, props changed) vendor/NetBSD/tests/dist/lib/librumphijack/t_sh.sh (contents, props changed) vendor/NetBSD/tests/dist/lib/librumphijack/t_tcpip.sh (contents, props changed) vendor/NetBSD/tests/dist/lib/librumphijack/t_vfs.sh (contents, props changed) vendor/NetBSD/tests/dist/lib/libskey/Makefile (contents, props changed) vendor/NetBSD/tests/dist/lib/libskey/t_algorithms.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libsljit/Makefile (contents, props changed) vendor/NetBSD/tests/dist/lib/libsljit/t_sljit.sh (contents, props changed) vendor/NetBSD/tests/dist/lib/libtre/Makefile (contents, props changed) vendor/NetBSD/tests/dist/lib/libutil/Makefile (contents, props changed) vendor/NetBSD/tests/dist/lib/libutil/t_efun.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libutil/t_parsedate.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libutil/t_pidfile.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libutil/t_snprintb.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libutil/t_sockaddr_snprintf.c (contents, props changed) vendor/NetBSD/tests/dist/lib/semaphore/Makefile (contents, props changed) vendor/NetBSD/tests/dist/lib/semaphore/Makefile.inc (contents, props changed) vendor/NetBSD/tests/dist/lib/semaphore/pthread/Makefile (contents, props changed) vendor/NetBSD/tests/dist/lib/semaphore/pthread/t_sem_pth.c (contents, props changed) vendor/NetBSD/tests/dist/lib/semaphore/sem.c (contents, props changed) vendor/NetBSD/tests/dist/libexec/Makefile (contents, props changed) vendor/NetBSD/tests/dist/libexec/Makefile.inc (contents, props changed) vendor/NetBSD/tests/dist/libexec/ld.elf_so/Makefile (contents, props changed) vendor/NetBSD/tests/dist/libexec/ld.elf_so/Makefile.inc (contents, props changed) vendor/NetBSD/tests/dist/libexec/ld.elf_so/data/Makefile (contents, props changed) vendor/NetBSD/tests/dist/libexec/ld.elf_so/data/symver-output-ref-stderr.v0-v0 vendor/NetBSD/tests/dist/libexec/ld.elf_so/data/symver-output-ref-stderr.v0-v1 vendor/NetBSD/tests/dist/libexec/ld.elf_so/data/symver-output-ref-stderr.v0-v2 vendor/NetBSD/tests/dist/libexec/ld.elf_so/data/symver-output-ref-stderr.v1-v0 vendor/NetBSD/tests/dist/libexec/ld.elf_so/data/symver-output-ref-stderr.v1-v1 vendor/NetBSD/tests/dist/libexec/ld.elf_so/data/symver-output-ref-stderr.v1-v2 vendor/NetBSD/tests/dist/libexec/ld.elf_so/data/symver-output-ref-stderr.v2-v0 vendor/NetBSD/tests/dist/libexec/ld.elf_so/data/symver-output-ref-stderr.v2-v1 vendor/NetBSD/tests/dist/libexec/ld.elf_so/data/symver-output-ref-stderr.v2-v2 vendor/NetBSD/tests/dist/libexec/ld.elf_so/data/symver-output-ref-stdout.v0-v0 vendor/NetBSD/tests/dist/libexec/ld.elf_so/data/symver-output-ref-stdout.v0-v1 vendor/NetBSD/tests/dist/libexec/ld.elf_so/data/symver-output-ref-stdout.v0-v2 vendor/NetBSD/tests/dist/libexec/ld.elf_so/data/symver-output-ref-stdout.v1-v0 vendor/NetBSD/tests/dist/libexec/ld.elf_so/data/symver-output-ref-stdout.v1-v1 vendor/NetBSD/tests/dist/libexec/ld.elf_so/data/symver-output-ref-stdout.v1-v2 vendor/NetBSD/tests/dist/libexec/ld.elf_so/data/symver-output-ref-stdout.v2-v0 vendor/NetBSD/tests/dist/libexec/ld.elf_so/data/symver-output-ref-stdout.v2-v1 vendor/NetBSD/tests/dist/libexec/ld.elf_so/data/symver-output-ref-stdout.v2-v2 vendor/NetBSD/tests/dist/libexec/ld.elf_so/h_df_1_noopen.c (contents, props changed) vendor/NetBSD/tests/dist/libexec/ld.elf_so/h_dl_symver.c (contents, props changed) vendor/NetBSD/tests/dist/libexec/ld.elf_so/h_ifunc.c (contents, props changed) vendor/NetBSD/tests/dist/libexec/ld.elf_so/h_locking.c (contents, props changed) vendor/NetBSD/tests/dist/libexec/ld.elf_so/helper_dso1/Makefile (contents, props changed) vendor/NetBSD/tests/dist/libexec/ld.elf_so/helper_dso1/h_helper_dso1.c (contents, props changed) vendor/NetBSD/tests/dist/libexec/ld.elf_so/helper_dso2/Makefile (contents, props changed) vendor/NetBSD/tests/dist/libexec/ld.elf_so/helper_dso2/h_helper_dso2.c (contents, props changed) vendor/NetBSD/tests/dist/libexec/ld.elf_so/helper_ifunc_dso/Makefile (contents, props changed) vendor/NetBSD/tests/dist/libexec/ld.elf_so/helper_ifunc_dso/h_helper_ifunc.c (contents, props changed) vendor/NetBSD/tests/dist/libexec/ld.elf_so/helper_symver_dso0/Makefile (contents, props changed) vendor/NetBSD/tests/dist/libexec/ld.elf_so/helper_symver_dso0/h_helper_symver_dso0.c (contents, props changed) vendor/NetBSD/tests/dist/libexec/ld.elf_so/helper_symver_dso1/Makefile (contents, props changed) vendor/NetBSD/tests/dist/libexec/ld.elf_so/helper_symver_dso1/h_helper_symver_dso1.c (contents, props changed) vendor/NetBSD/tests/dist/libexec/ld.elf_so/helper_symver_dso1/h_helper_symver_dso1.map vendor/NetBSD/tests/dist/libexec/ld.elf_so/helper_symver_dso2/Makefile (contents, props changed) vendor/NetBSD/tests/dist/libexec/ld.elf_so/helper_symver_dso2/h_helper_symver_dso2.c (contents, props changed) vendor/NetBSD/tests/dist/libexec/ld.elf_so/helper_symver_dso2/h_helper_symver_dso2.map vendor/NetBSD/tests/dist/libexec/ld.elf_so/t_df_1_noopen.sh (contents, props changed) vendor/NetBSD/tests/dist/libexec/ld.elf_so/t_dl_symver.sh (contents, props changed) vendor/NetBSD/tests/dist/libexec/ld.elf_so/t_dlerror-cleared.c (contents, props changed) vendor/NetBSD/tests/dist/libexec/ld.elf_so/t_dlerror-false.c (contents, props changed) vendor/NetBSD/tests/dist/libexec/ld.elf_so/t_dlinfo.c (contents, props changed) vendor/NetBSD/tests/dist/libexec/ld.elf_so/t_dlvsym.c (contents, props changed) vendor/NetBSD/tests/dist/libexec/ld.elf_so/t_ifunc.c (contents, props changed) vendor/NetBSD/tests/dist/modules/Makefile (contents, props changed) vendor/NetBSD/tests/dist/modules/Makefile.inc (contents, props changed) vendor/NetBSD/tests/dist/modules/k_helper/Makefile (contents, props changed) vendor/NetBSD/tests/dist/modules/k_helper/k_helper.c (contents, props changed) vendor/NetBSD/tests/dist/modules/k_helper2/Makefile (contents, props changed) vendor/NetBSD/tests/dist/modules/k_helper2/k_helper2.c (contents, props changed) vendor/NetBSD/tests/dist/modules/k_helper3/Makefile (contents, props changed) vendor/NetBSD/tests/dist/modules/k_helper3/k_helper3.c (contents, props changed) vendor/NetBSD/tests/dist/modules/k_uvm/Makefile (contents, props changed) vendor/NetBSD/tests/dist/modules/k_uvm/k_uvm.c (contents, props changed) vendor/NetBSD/tests/dist/modules/t_abi_uvm.sh (contents, props changed) vendor/NetBSD/tests/dist/modules/t_builtin.c (contents, props changed) vendor/NetBSD/tests/dist/modules/t_modctl.c (contents, props changed) vendor/NetBSD/tests/dist/modules/t_modload.sh (contents, props changed) vendor/NetBSD/tests/dist/net/Makefile (contents, props changed) vendor/NetBSD/tests/dist/net/Makefile.inc (contents, props changed) vendor/NetBSD/tests/dist/net/bpf/Makefile (contents, props changed) vendor/NetBSD/tests/dist/net/bpf/h_bpf.h (contents, props changed) vendor/NetBSD/tests/dist/net/bpf/t_bpf.c (contents, props changed) vendor/NetBSD/tests/dist/net/bpf/t_div-by-zero.c (contents, props changed) vendor/NetBSD/tests/dist/net/bpf/t_mbuf.c (contents, props changed) vendor/NetBSD/tests/dist/net/bpfilter/Makefile (contents, props changed) vendor/NetBSD/tests/dist/net/bpfilter/t_bpfilter.c (contents, props changed) vendor/NetBSD/tests/dist/net/bpfjit/Makefile (contents, props changed) vendor/NetBSD/tests/dist/net/bpfjit/t_bpfjit.c (contents, props changed) vendor/NetBSD/tests/dist/net/bpfjit/t_cop.c (contents, props changed) vendor/NetBSD/tests/dist/net/bpfjit/t_extmem.c (contents, props changed) vendor/NetBSD/tests/dist/net/bpfjit/t_mbuf.c (contents, props changed) vendor/NetBSD/tests/dist/net/carp/Makefile (contents, props changed) vendor/NetBSD/tests/dist/net/carp/t_basic.c (contents, props changed) vendor/NetBSD/tests/dist/net/config/netconfig.c (contents, props changed) vendor/NetBSD/tests/dist/net/fdpass/Makefile (contents, props changed) vendor/NetBSD/tests/dist/net/fdpass/fdpass.c (contents, props changed) vendor/NetBSD/tests/dist/net/fdpass/t_fdpass.sh (contents, props changed) vendor/NetBSD/tests/dist/net/icmp/Makefile (contents, props changed) vendor/NetBSD/tests/dist/net/icmp/t_forward.c (contents, props changed) vendor/NetBSD/tests/dist/net/icmp/t_ping.c (contents, props changed) vendor/NetBSD/tests/dist/net/icmp/t_ping2.sh (contents, props changed) vendor/NetBSD/tests/dist/net/if/Makefile (contents, props changed) vendor/NetBSD/tests/dist/net/if/t_compat.c (contents, props changed) vendor/NetBSD/tests/dist/net/if_bridge/Makefile (contents, props changed) vendor/NetBSD/tests/dist/net/if_bridge/t_bridge.sh (contents, props changed) vendor/NetBSD/tests/dist/net/if_loop/Makefile (contents, props changed) vendor/NetBSD/tests/dist/net/if_loop/t_pr.c (contents, props changed) vendor/NetBSD/tests/dist/net/mpls/Makefile (contents, props changed) vendor/NetBSD/tests/dist/net/mpls/t_ldp_regen.sh (contents, props changed) vendor/NetBSD/tests/dist/net/mpls/t_mpls_fw.sh (contents, props changed) vendor/NetBSD/tests/dist/net/mpls/t_rfc4182.sh (contents, props changed) vendor/NetBSD/tests/dist/net/net/Makefile (contents, props changed) vendor/NetBSD/tests/dist/net/net/t_pktinfo.c (contents, props changed) vendor/NetBSD/tests/dist/net/net/t_raw.c (contents, props changed) vendor/NetBSD/tests/dist/net/net/t_tcp.c (contents, props changed) vendor/NetBSD/tests/dist/net/net/t_udp.c (contents, props changed) vendor/NetBSD/tests/dist/net/net/t_unix.c (contents, props changed) vendor/NetBSD/tests/dist/net/npf/Makefile (contents, props changed) vendor/NetBSD/tests/dist/net/npf/t_npf.sh (contents, props changed) vendor/NetBSD/tests/dist/net/route/Makefile (contents, props changed) vendor/NetBSD/tests/dist/net/route/t_change.sh (contents, props changed) vendor/NetBSD/tests/dist/net/sys/Makefile (contents, props changed) vendor/NetBSD/tests/dist/net/sys/t_rfc6056.c (contents, props changed) vendor/NetBSD/tests/dist/rump/Makefile (contents, props changed) vendor/NetBSD/tests/dist/rump/Makefile.inc (contents, props changed) vendor/NetBSD/tests/dist/rump/kernspace/Makefile (contents, props changed) vendor/NetBSD/tests/dist/rump/kernspace/alloc.c (contents, props changed) vendor/NetBSD/tests/dist/rump/kernspace/busypage.c (contents, props changed) vendor/NetBSD/tests/dist/rump/kernspace/kernspace.h (contents, props changed) vendor/NetBSD/tests/dist/rump/kernspace/lockme.c (contents, props changed) vendor/NetBSD/tests/dist/rump/kernspace/sendsig.c (contents, props changed) vendor/NetBSD/tests/dist/rump/kernspace/thread.c (contents, props changed) vendor/NetBSD/tests/dist/rump/kernspace/tsleep.c (contents, props changed) vendor/NetBSD/tests/dist/rump/modautoload/Makefile (contents, props changed) vendor/NetBSD/tests/dist/rump/modautoload/t_modautoload.c (contents, props changed) vendor/NetBSD/tests/dist/rump/rumpkern/Makefile (contents, props changed) vendor/NetBSD/tests/dist/rump/rumpkern/h_client/Makefile (contents, props changed) vendor/NetBSD/tests/dist/rump/rumpkern/h_client/h_forkcli.c (contents, props changed) vendor/NetBSD/tests/dist/rump/rumpkern/h_client/h_reconcli.c (contents, props changed) vendor/NetBSD/tests/dist/rump/rumpkern/h_client/h_sigcli.c (contents, props changed) vendor/NetBSD/tests/dist/rump/rumpkern/h_client/h_simplecli.c (contents, props changed) vendor/NetBSD/tests/dist/rump/rumpkern/h_client/h_stresscli.c (contents, props changed) vendor/NetBSD/tests/dist/rump/rumpkern/h_server/Makefile (contents, props changed) vendor/NetBSD/tests/dist/rump/rumpkern/h_server/h_simpleserver.c (contents, props changed) vendor/NetBSD/tests/dist/rump/rumpkern/t_copy.c (contents, props changed) vendor/NetBSD/tests/dist/rump/rumpkern/t_kern.c (contents, props changed) vendor/NetBSD/tests/dist/rump/rumpkern/t_lwproc.c (contents, props changed) vendor/NetBSD/tests/dist/rump/rumpkern/t_modcmd.c (contents, props changed) vendor/NetBSD/tests/dist/rump/rumpkern/t_modlinkset.c (contents, props changed) vendor/NetBSD/tests/dist/rump/rumpkern/t_signals.c (contents, props changed) vendor/NetBSD/tests/dist/rump/rumpkern/t_sp.sh (contents, props changed) vendor/NetBSD/tests/dist/rump/rumpkern/t_threads.c (contents, props changed) vendor/NetBSD/tests/dist/rump/rumpkern/t_tsleep.c (contents, props changed) vendor/NetBSD/tests/dist/rump/rumpkern/t_vm.c (contents, props changed) vendor/NetBSD/tests/dist/rump/rumpnet/Makefile (contents, props changed) vendor/NetBSD/tests/dist/rump/rumpnet/t_shmif.sh (contents, props changed) vendor/NetBSD/tests/dist/rump/rumpvfs/Makefile (contents, props changed) vendor/NetBSD/tests/dist/rump/rumpvfs/t_basic.c (contents, props changed) vendor/NetBSD/tests/dist/rump/rumpvfs/t_etfs.c (contents, props changed) vendor/NetBSD/tests/dist/rump/rumpvfs/t_p2kifs.c (contents, props changed) vendor/NetBSD/tests/dist/sbin/Makefile (contents, props changed) vendor/NetBSD/tests/dist/sbin/Makefile.inc (contents, props changed) vendor/NetBSD/tests/dist/sbin/fsck_ffs/Makefile (contents, props changed) vendor/NetBSD/tests/dist/sbin/fsck_ffs/quotas_common.sh (contents, props changed) vendor/NetBSD/tests/dist/sbin/fsck_ffs/t_check_quotas.sh (contents, props changed) vendor/NetBSD/tests/dist/sbin/fsck_ffs/t_enable_quotas.sh (contents, props changed) vendor/NetBSD/tests/dist/sbin/ifconfig/Makefile (contents, props changed) vendor/NetBSD/tests/dist/sbin/ifconfig/t_nonexistent.sh (contents, props changed) vendor/NetBSD/tests/dist/sbin/newfs/Makefile (contents, props changed) vendor/NetBSD/tests/dist/sbin/newfs/quotas_common.sh (contents, props changed) vendor/NetBSD/tests/dist/sbin/newfs/t_enable_quotas.sh (contents, props changed) vendor/NetBSD/tests/dist/sbin/newfs_msdos/Makefile (contents, props changed) vendor/NetBSD/tests/dist/sbin/newfs_msdos/t_create.sh (contents, props changed) vendor/NetBSD/tests/dist/sbin/resize_ffs/Makefile (contents, props changed) vendor/NetBSD/tests/dist/sbin/resize_ffs/common.sh (contents, props changed) vendor/NetBSD/tests/dist/sbin/resize_ffs/t_grow.sh (contents, props changed) vendor/NetBSD/tests/dist/sbin/resize_ffs/t_grow_swapped.sh (contents, props changed) vendor/NetBSD/tests/dist/sbin/resize_ffs/t_shrink.sh (contents, props changed) vendor/NetBSD/tests/dist/sbin/resize_ffs/t_shrink_swapped.sh (contents, props changed) vendor/NetBSD/tests/dist/sbin/resize_ffs/testdata.md5 vendor/NetBSD/tests/dist/sbin/resize_ffs/testdata.tar.gz.base64 vendor/NetBSD/tests/dist/sbin/route/Makefile (contents, props changed) vendor/NetBSD/tests/dist/sbin/route/t_missing.sh (contents, props changed) vendor/NetBSD/tests/dist/sbin/sysctl/Makefile (contents, props changed) vendor/NetBSD/tests/dist/sbin/sysctl/t_perm.sh (contents, props changed) vendor/NetBSD/tests/dist/sbin/sysctl/t_sysctl.sh (contents, props changed) vendor/NetBSD/tests/dist/share/Makefile (contents, props changed) vendor/NetBSD/tests/dist/share/examples/Makefile (contents, props changed) vendor/NetBSD/tests/dist/share/examples/t_asm.sh (contents, props changed) vendor/NetBSD/tests/dist/share/mk/Makefile (contents, props changed) vendor/NetBSD/tests/dist/share/mk/common.subr vendor/NetBSD/tests/dist/share/mk/t_lib.sh (contents, props changed) vendor/NetBSD/tests/dist/share/mk/t_own.sh (contents, props changed) vendor/NetBSD/tests/dist/share/mk/t_prog.sh (contents, props changed) vendor/NetBSD/tests/dist/share/mk/t_test.sh (contents, props changed) vendor/NetBSD/tests/dist/sys/Makefile (contents, props changed) vendor/NetBSD/tests/dist/sys/rc/Makefile (contents, props changed) vendor/NetBSD/tests/dist/sys/rc/h_args.sh (contents, props changed) vendor/NetBSD/tests/dist/sys/rc/h_simple.sh (contents, props changed) vendor/NetBSD/tests/dist/sys/rc/t_rc_d_cli.sh (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/Makefile (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/awk/Makefile (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/awk/d_assign_NF.awk (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/awk/d_assign_NF.in (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/awk/d_assign_NF.out vendor/NetBSD/tests/dist/usr.bin/awk/d_big_regexp.awk (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/awk/d_big_regexp.in (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/awk/d_big_regexp.out vendor/NetBSD/tests/dist/usr.bin/awk/d_end1.awk (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/awk/d_end1.in (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/awk/d_end1.out vendor/NetBSD/tests/dist/usr.bin/awk/d_end2.awk (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/awk/d_end2.in (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/awk/d_end2.out vendor/NetBSD/tests/dist/usr.bin/awk/d_period.awk (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/awk/d_period.in (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/awk/d_period.out vendor/NetBSD/tests/dist/usr.bin/awk/d_string1.awk (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/awk/d_string1.out vendor/NetBSD/tests/dist/usr.bin/awk/d_tolower.awk (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/awk/d_tolower.in (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/awk/d_tolower.out (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/awk/d_toupper.awk (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/awk/d_toupper.in (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/awk/d_toupper.out (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/awk/t_awk.sh (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/basename/Makefile (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/basename/t_basename.sh (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/bzip2/Makefile (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/bzip2/t_bzip2.sh (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/cc/Makefile (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/cc/t_hello.sh (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/cmp/Makefile (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/cmp/t_cmp.sh (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/config/Makefile (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/config/d_deffs_redef vendor/NetBSD/tests/dist/usr.bin/config/d_loop vendor/NetBSD/tests/dist/usr.bin/config/d_loop2 vendor/NetBSD/tests/dist/usr.bin/config/d_no_pseudo vendor/NetBSD/tests/dist/usr.bin/config/d_postponed_orphan vendor/NetBSD/tests/dist/usr.bin/config/d_pseudo_parent vendor/NetBSD/tests/dist/usr.bin/config/d_shadow_instance vendor/NetBSD/tests/dist/usr.bin/config/support/Makefile (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/config/support/arch/Makefile (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/config/support/arch/regress/Makefile (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/config/support/arch/regress/conf/Makefile (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/config/support/arch/regress/conf/Makefile.regress (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/config/support/arch/regress/conf/files.regress vendor/NetBSD/tests/dist/usr.bin/config/support/arch/regress/conf/std.regress vendor/NetBSD/tests/dist/usr.bin/config/support/conf/Makefile (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/config/support/conf/files vendor/NetBSD/tests/dist/usr.bin/config/t_config.sh (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/cut/Makefile (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/cut/d_basic.out vendor/NetBSD/tests/dist/usr.bin/cut/d_cut.in (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/cut/d_dflag.out vendor/NetBSD/tests/dist/usr.bin/cut/d_dsflag.out vendor/NetBSD/tests/dist/usr.bin/cut/d_latin1.in (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/cut/d_sflag.out vendor/NetBSD/tests/dist/usr.bin/cut/d_utf8.in (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/cut/t_cut.sh (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/diff/Makefile (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/diff/d_mallocv1.in (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/diff/d_mallocv2.in (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/diff/t_diff.sh (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/dirname/Makefile (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/dirname/t_dirname.sh (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/find/Makefile (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/find/t_find.sh (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/grep/Makefile (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/grep/d_basic.out vendor/NetBSD/tests/dist/usr.bin/grep/d_begin_end_a.out vendor/NetBSD/tests/dist/usr.bin/grep/d_begin_end_b.out vendor/NetBSD/tests/dist/usr.bin/grep/d_binary.out vendor/NetBSD/tests/dist/usr.bin/grep/d_context2_a.out (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/grep/d_context2_b.out (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/grep/d_context2_c.out (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/grep/d_context_a.in (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/grep/d_context_a.out vendor/NetBSD/tests/dist/usr.bin/grep/d_context_b.in (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/grep/d_context_b.out vendor/NetBSD/tests/dist/usr.bin/grep/d_context_c.out vendor/NetBSD/tests/dist/usr.bin/grep/d_context_d.out vendor/NetBSD/tests/dist/usr.bin/grep/d_egrep.out vendor/NetBSD/tests/dist/usr.bin/grep/d_file_exp.in (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/grep/d_file_exp.out vendor/NetBSD/tests/dist/usr.bin/grep/d_ignore_case.out vendor/NetBSD/tests/dist/usr.bin/grep/d_input vendor/NetBSD/tests/dist/usr.bin/grep/d_invert.in (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/grep/d_invert.out vendor/NetBSD/tests/dist/usr.bin/grep/d_recurse.out vendor/NetBSD/tests/dist/usr.bin/grep/d_recurse_symlink.err vendor/NetBSD/tests/dist/usr.bin/grep/d_recurse_symlink.out vendor/NetBSD/tests/dist/usr.bin/grep/d_whole_line.out vendor/NetBSD/tests/dist/usr.bin/grep/d_word_regexps.out vendor/NetBSD/tests/dist/usr.bin/grep/d_zgrep.out vendor/NetBSD/tests/dist/usr.bin/grep/t_grep.sh (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/gzip/Makefile (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/gzip/t_gzip.sh (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/id/Makefile (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/id/pwgr.c (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/id/t_groups.sh (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/id/t_id.sh (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/id/t_whoami.sh (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/infocmp/Makefile (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/infocmp/t_terminfo.sh (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/jot/Makefile (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/jot/d_basic.out vendor/NetBSD/tests/dist/usr.bin/jot/t_jot.sh (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/m4/Makefile (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/m4/d_ff_after_dnl.m4.uue vendor/NetBSD/tests/dist/usr.bin/m4/d_ff_after_dnl.out vendor/NetBSD/tests/dist/usr.bin/m4/d_m4wrap-P.m4 vendor/NetBSD/tests/dist/usr.bin/m4/d_m4wrap-P.out vendor/NetBSD/tests/dist/usr.bin/m4/d_m4wrap.m4 vendor/NetBSD/tests/dist/usr.bin/m4/d_m4wrap.out vendor/NetBSD/tests/dist/usr.bin/m4/t_m4.sh (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/make/Makefile (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/make/t_make.sh (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/mkdep/Makefile (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/mkdep/t_mkdep.sh (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/nbperf/Makefile (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/nbperf/h_nbperf.sh (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/nbperf/hash_driver.c (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/nbperf/t_nbperf.sh (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/netpgpverify/Makefile (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/netpgpverify/t_netpgpverify.sh (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/pr/Makefile (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/pr/d_basic.in (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/pr/d_basic.out vendor/NetBSD/tests/dist/usr.bin/pr/t_basic.sh (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/rump_server/Makefile (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/rump_server/t_disk.sh (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/sdiff/Makefile (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/sdiff/d_dot.in (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/sdiff/d_flags_l.out vendor/NetBSD/tests/dist/usr.bin/sdiff/d_flags_s.out vendor/NetBSD/tests/dist/usr.bin/sdiff/d_flags_w.out vendor/NetBSD/tests/dist/usr.bin/sdiff/d_iflags_a1.out vendor/NetBSD/tests/dist/usr.bin/sdiff/d_iflags_a2.out vendor/NetBSD/tests/dist/usr.bin/sdiff/d_iflags_b1.out vendor/NetBSD/tests/dist/usr.bin/sdiff/d_iflags_b2.out vendor/NetBSD/tests/dist/usr.bin/sdiff/d_iflags_c1.out vendor/NetBSD/tests/dist/usr.bin/sdiff/d_iflags_c2.out vendor/NetBSD/tests/dist/usr.bin/sdiff/d_iflags_d1.out vendor/NetBSD/tests/dist/usr.bin/sdiff/d_iflags_d2.out vendor/NetBSD/tests/dist/usr.bin/sdiff/d_input1 vendor/NetBSD/tests/dist/usr.bin/sdiff/d_input2 vendor/NetBSD/tests/dist/usr.bin/sdiff/d_oneline.in (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/sdiff/d_oneline_a.out vendor/NetBSD/tests/dist/usr.bin/sdiff/d_oneline_b.out vendor/NetBSD/tests/dist/usr.bin/sdiff/d_same.out vendor/NetBSD/tests/dist/usr.bin/sdiff/d_short.out vendor/NetBSD/tests/dist/usr.bin/sdiff/d_tabends.in (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/sdiff/d_tabends_a.out vendor/NetBSD/tests/dist/usr.bin/sdiff/d_tabends_b.out vendor/NetBSD/tests/dist/usr.bin/sdiff/d_tabends_c.out vendor/NetBSD/tests/dist/usr.bin/sdiff/d_tabs.out vendor/NetBSD/tests/dist/usr.bin/sdiff/d_tabs1.in (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/sdiff/d_tabs2.in (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/sdiff/t_sdiff.sh (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/sed/Makefile (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/sed/d_c2048.in (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/sed/t_sed.sh (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/shmif_dumpbus/Makefile (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/shmif_dumpbus/d_pcap.out.bz2.uue vendor/NetBSD/tests/dist/usr.bin/shmif_dumpbus/d_pkthdrs.out.bz2.uue vendor/NetBSD/tests/dist/usr.bin/shmif_dumpbus/shmbus.bz2.uue vendor/NetBSD/tests/dist/usr.bin/shmif_dumpbus/t_basic.sh (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/sort/Makefile (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/sort/d_any_char_dflag_out.txt (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/sort/d_any_char_fflag_out.txt (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/sort/d_any_char_iflag_out.txt (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/sort/d_any_char_in.txt (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/sort/t_sort.sh (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/tmux/Makefile (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/tmux/t_tmux.sh (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/tr/Makefile (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/tr/t_basic.sh (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/unifdef/Makefile (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/unifdef/d_basic.in (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/unifdef/d_basic.out vendor/NetBSD/tests/dist/usr.bin/unifdef/t_basic.sh (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/vmstat/Makefile (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/vmstat/t_vmstat.sh (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/xlint/Makefile (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/xlint/lint1/Makefile (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/xlint/lint1/d_alignof.c (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/xlint/lint1/d_c99_complex_num.c (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/xlint/lint1/d_c99_complex_split.c (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/xlint/lint1/d_c99_decls_after_stmt.c (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/xlint/lint1/d_c99_decls_after_stmt2.c (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/xlint/lint1/d_c99_decls_after_stmt3.c (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/xlint/lint1/d_c99_for_loops.c (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/xlint/lint1/d_c99_func.c (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/xlint/lint1/d_c99_recursive_init.c (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/xlint/lint1/d_c99_struct_init.c (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/xlint/lint1/d_c99_union_init1.c (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/xlint/lint1/d_c99_union_init2.c (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/xlint/lint1/d_c99_union_init3.c (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/xlint/lint1/d_c9x_array_init.c (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/xlint/lint1/d_c9x_recursive_init.c (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/xlint/lint1/d_cast_init.c (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/xlint/lint1/d_cast_init2.c (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/xlint/lint1/d_cast_lhs.c (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/xlint/lint1/d_compound_literals1.c (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/xlint/lint1/d_compound_literals2.c (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/xlint/lint1/d_constant_conv1.c (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/xlint/lint1/d_constant_conv2.c (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/xlint/lint1/d_cvt_constant.c (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/xlint/lint1/d_cvt_in_ternary.c (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/xlint/lint1/d_ellipsis_in_switch.c (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/xlint/lint1/d_gcc_compound_statements1.c (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/xlint/lint1/d_gcc_compound_statements2.c (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/xlint/lint1/d_gcc_compound_statements3.c (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/xlint/lint1/d_gcc_extension.c (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/xlint/lint1/d_gcc_func.c (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/xlint/lint1/d_gcc_variable_array_init.c (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/xlint/lint1/d_incorrect_array_size.c (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/xlint/lint1/d_long_double_int.c (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/xlint/lint1/d_nested_structs.c (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/xlint/lint1/d_nolimit_init.c (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/xlint/lint1/d_packed_structs.c (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/xlint/lint1/d_shift_to_narrower_type.c (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/xlint/lint1/d_type_conv1.c (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/xlint/lint1/d_type_conv2.c (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/xlint/lint1/d_type_conv3.c (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/xlint/lint1/d_typename_as_var.c (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/xlint/lint1/d_zero_sized_arrays.c (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/xlint/lint1/t_integration.sh (contents, props changed) vendor/NetBSD/tests/dist/usr.sbin/Makefile (contents, props changed) vendor/NetBSD/tests/dist/usr.sbin/mtree/Makefile (contents, props changed) vendor/NetBSD/tests/dist/usr.sbin/mtree/d_convert.in (contents, props changed) vendor/NetBSD/tests/dist/usr.sbin/mtree/d_convert_C.out vendor/NetBSD/tests/dist/usr.sbin/mtree/d_convert_C_S.out vendor/NetBSD/tests/dist/usr.sbin/mtree/d_convert_D.out vendor/NetBSD/tests/dist/usr.sbin/mtree/d_convert_D_S.out vendor/NetBSD/tests/dist/usr.sbin/mtree/d_merge.in (contents, props changed) vendor/NetBSD/tests/dist/usr.sbin/mtree/d_merge_C_M.out vendor/NetBSD/tests/dist/usr.sbin/mtree/d_merge_C_M_S.out vendor/NetBSD/tests/dist/usr.sbin/mtree/mtree_d_create.out vendor/NetBSD/tests/dist/usr.sbin/mtree/netbsd6_d_create.out vendor/NetBSD/tests/dist/usr.sbin/mtree/t_mtree.sh (contents, props changed) vendor/NetBSD/tests/dist/usr.sbin/tcpdump/Makefile (contents, props changed) vendor/NetBSD/tests/dist/usr.sbin/tcpdump/t_tcpdump.sh (contents, props changed) vendor/NetBSD/tests/dist/usr.sbin/traceroute/Makefile (contents, props changed) vendor/NetBSD/tests/dist/usr.sbin/traceroute/t_traceroute.sh (contents, props changed) vendor/NetBSD/tests/dist/usr.sbin/useradd/Makefile (contents, props changed) vendor/NetBSD/tests/dist/usr.sbin/useradd/t_useradd.sh (contents, props changed) Directory Properties: vendor/NetBSD/tests/dist/ (props changed) vendor/NetBSD/tests/dist/bin/ (props changed) vendor/NetBSD/tests/dist/bin/cat/ (props changed) vendor/NetBSD/tests/dist/bin/cp/ (props changed) vendor/NetBSD/tests/dist/bin/dd/ (props changed) vendor/NetBSD/tests/dist/bin/df/ (props changed) vendor/NetBSD/tests/dist/bin/expr/ (props changed) vendor/NetBSD/tests/dist/bin/pax/ (props changed) vendor/NetBSD/tests/dist/bin/ps/ (props changed) vendor/NetBSD/tests/dist/bin/sh/ (props changed) vendor/NetBSD/tests/dist/bin/sh/dotcmd/ (props changed) vendor/NetBSD/tests/dist/bin/sh/dotcmd/out/ (props changed) vendor/NetBSD/tests/dist/bin/sleep/ (props changed) vendor/NetBSD/tests/dist/bin/tar/ (props changed) vendor/NetBSD/tests/dist/crypto/ (props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/ (props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/bf/ (props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/bn/ (props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/bn/bn/ (props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/bn/div/ (props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/bn/exp/ (props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/cast/ (props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/conf/ (props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/des/ (props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/dh/ (props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/dsa/ (props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/ec/ (props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/ecdh/ (props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/ecdsa/ (props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/engine/ (props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/evp/ (props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/hmac/ (props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/idea/ (props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/lhash/ (props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/md2/ (props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/md4/ (props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/md5/ (props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/mdc2/ (props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/rand/ (props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/rc2/ (props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/rc4/ (props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/rc5/ (props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/ripemd/ (props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/rsa/ (props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/sha/ (props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/sha1/ (props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/srp/ (props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/threads/ (props changed) vendor/NetBSD/tests/dist/crypto/libcrypto/x509v3/ (props changed) vendor/NetBSD/tests/dist/crypto/opencrypto/ (props changed) vendor/NetBSD/tests/dist/dev/ (props changed) vendor/NetBSD/tests/dist/dev/audio/ (props changed) vendor/NetBSD/tests/dist/dev/cgd/ (props changed) vendor/NetBSD/tests/dist/dev/dm/ (props changed) vendor/NetBSD/tests/dist/dev/md/ (props changed) vendor/NetBSD/tests/dist/dev/raidframe/ (props changed) vendor/NetBSD/tests/dist/dev/scsipi/ (props changed) vendor/NetBSD/tests/dist/dev/scsipi/libscsitest/ (props changed) vendor/NetBSD/tests/dist/dev/sysmon/ (props changed) vendor/NetBSD/tests/dist/fs/ (props changed) vendor/NetBSD/tests/dist/fs/cd9660/ (props changed) vendor/NetBSD/tests/dist/fs/common/ (props changed) vendor/NetBSD/tests/dist/fs/ffs/ (props changed) vendor/NetBSD/tests/dist/fs/fifofs/ (props changed) vendor/NetBSD/tests/dist/fs/hfs/ (props changed) vendor/NetBSD/tests/dist/fs/kernfs/ (props changed) vendor/NetBSD/tests/dist/fs/lfs/ (props changed) vendor/NetBSD/tests/dist/fs/msdosfs/ (props changed) vendor/NetBSD/tests/dist/fs/nfs/ (props changed) vendor/NetBSD/tests/dist/fs/nfs/nfsservice/ (props changed) vendor/NetBSD/tests/dist/fs/nfs/nfsservice/rpcbind/ (props changed) vendor/NetBSD/tests/dist/fs/nullfs/ (props changed) vendor/NetBSD/tests/dist/fs/psshfs/ (props changed) vendor/NetBSD/tests/dist/fs/ptyfs/ (props changed) vendor/NetBSD/tests/dist/fs/puffs/ (props changed) vendor/NetBSD/tests/dist/fs/puffs/h_dtfs/ (props changed) vendor/NetBSD/tests/dist/fs/tmpfs/ (props changed) vendor/NetBSD/tests/dist/fs/umapfs/ (props changed) vendor/NetBSD/tests/dist/fs/union/ (props changed) vendor/NetBSD/tests/dist/fs/vfs/ (props changed) vendor/NetBSD/tests/dist/fs/zfs/ (props changed) vendor/NetBSD/tests/dist/games/ (props changed) vendor/NetBSD/tests/dist/include/ (props changed) vendor/NetBSD/tests/dist/include/machine/ (props changed) vendor/NetBSD/tests/dist/include/sys/ (props changed) vendor/NetBSD/tests/dist/ipf/ (props changed) vendor/NetBSD/tests/dist/ipf/expected/ (props changed) vendor/NetBSD/tests/dist/ipf/input/ (props changed) vendor/NetBSD/tests/dist/ipf/regress/ (props changed) vendor/NetBSD/tests/dist/kernel/ (props changed) vendor/NetBSD/tests/dist/kernel/kqueue/ (props changed) vendor/NetBSD/tests/dist/kernel/kqueue/read/ (props changed) vendor/NetBSD/tests/dist/kernel/kqueue/write/ (props changed) vendor/NetBSD/tests/dist/kernel/tty/ (props changed) vendor/NetBSD/tests/dist/lib/ (props changed) vendor/NetBSD/tests/dist/lib/csu/ (props changed) vendor/NetBSD/tests/dist/lib/csu/arch/ (props changed) vendor/NetBSD/tests/dist/lib/csu/arch/alpha/ (props changed) vendor/NetBSD/tests/dist/lib/csu/arch/arm/ (props changed) vendor/NetBSD/tests/dist/lib/csu/arch/hppa/ (props changed) vendor/NetBSD/tests/dist/lib/csu/arch/i386/ (props changed) vendor/NetBSD/tests/dist/lib/csu/arch/ia64/ (props changed) vendor/NetBSD/tests/dist/lib/csu/arch/mips/ (props changed) vendor/NetBSD/tests/dist/lib/csu/arch/powerpc/ (props changed) vendor/NetBSD/tests/dist/lib/csu/arch/sparc/ (props changed) vendor/NetBSD/tests/dist/lib/csu/arch/sparc64/ (props changed) vendor/NetBSD/tests/dist/lib/csu/arch/vax/ (props changed) vendor/NetBSD/tests/dist/lib/csu/arch/x86_64/ (props changed) vendor/NetBSD/tests/dist/lib/csu/dso/ (props changed) vendor/NetBSD/tests/dist/lib/libbluetooth/ (props changed) vendor/NetBSD/tests/dist/lib/libbpfjit/ (props changed) vendor/NetBSD/tests/dist/lib/libc/ (props changed) vendor/NetBSD/tests/dist/lib/libc/arch/ (props changed) vendor/NetBSD/tests/dist/lib/libc/arch/aarch64/ (props changed) vendor/NetBSD/tests/dist/lib/libc/arch/alpha/ (props changed) vendor/NetBSD/tests/dist/lib/libc/arch/arm/ (props changed) vendor/NetBSD/tests/dist/lib/libc/arch/hppa/ (props changed) vendor/NetBSD/tests/dist/lib/libc/arch/i386/ (props changed) vendor/NetBSD/tests/dist/lib/libc/arch/ia64/ (props changed) vendor/NetBSD/tests/dist/lib/libc/arch/m68k/ (props changed) vendor/NetBSD/tests/dist/lib/libc/arch/mips/ (props changed) vendor/NetBSD/tests/dist/lib/libc/arch/or1k/ (props changed) vendor/NetBSD/tests/dist/lib/libc/arch/powerpc/ (props changed) vendor/NetBSD/tests/dist/lib/libc/arch/powerpc64/ (props changed) vendor/NetBSD/tests/dist/lib/libc/arch/riscv/ (props changed) vendor/NetBSD/tests/dist/lib/libc/arch/sh3/ (props changed) vendor/NetBSD/tests/dist/lib/libc/arch/sparc/ (props changed) vendor/NetBSD/tests/dist/lib/libc/arch/sparc64/ (props changed) vendor/NetBSD/tests/dist/lib/libc/arch/vax/ (props changed) vendor/NetBSD/tests/dist/lib/libc/arch/x86_64/ (props changed) vendor/NetBSD/tests/dist/lib/libc/c063/ (props changed) vendor/NetBSD/tests/dist/lib/libc/common/ (props changed) vendor/NetBSD/tests/dist/lib/libc/db/ (props changed) vendor/NetBSD/tests/dist/lib/libc/gen/ (props changed) vendor/NetBSD/tests/dist/lib/libc/gen/execve/ (props changed) vendor/NetBSD/tests/dist/lib/libc/gen/posix_spawn/ (props changed) vendor/NetBSD/tests/dist/lib/libc/hash/ (props changed) vendor/NetBSD/tests/dist/lib/libc/hash/data/ (props changed) vendor/NetBSD/tests/dist/lib/libc/inet/ (props changed) vendor/NetBSD/tests/dist/lib/libc/locale/ (props changed) vendor/NetBSD/tests/dist/lib/libc/net/ (props changed) vendor/NetBSD/tests/dist/lib/libc/net/getaddrinfo/ (props changed) vendor/NetBSD/tests/dist/lib/libc/regex/ (props changed) vendor/NetBSD/tests/dist/lib/libc/regex/data/ (props changed) vendor/NetBSD/tests/dist/lib/libc/regex/data/att/ (props changed) vendor/NetBSD/tests/dist/lib/libc/rpc/ (props changed) vendor/NetBSD/tests/dist/lib/libc/setjmp/ (props changed) vendor/NetBSD/tests/dist/lib/libc/ssp/ (props changed) vendor/NetBSD/tests/dist/lib/libc/stdio/ (props changed) vendor/NetBSD/tests/dist/lib/libc/stdlib/ (props changed) vendor/NetBSD/tests/dist/lib/libc/string/ (props changed) vendor/NetBSD/tests/dist/lib/libc/sync/ (props changed) vendor/NetBSD/tests/dist/lib/libc/sys/ (props changed) vendor/NetBSD/tests/dist/lib/libc/termios/ (props changed) vendor/NetBSD/tests/dist/lib/libc/time/ (props changed) vendor/NetBSD/tests/dist/lib/libc/tls/ (props changed) vendor/NetBSD/tests/dist/lib/libc/tls/dso/ (props changed) vendor/NetBSD/tests/dist/lib/libc/tls_dso/ (props changed) vendor/NetBSD/tests/dist/lib/libc/ttyio/ (props changed) vendor/NetBSD/tests/dist/lib/libcrypt/ (props changed) vendor/NetBSD/tests/dist/lib/libcurses/ (props changed) vendor/NetBSD/tests/dist/lib/libcurses/check_files/ (props changed) vendor/NetBSD/tests/dist/lib/libcurses/director/ (props changed) vendor/NetBSD/tests/dist/lib/libcurses/slave/ (props changed) vendor/NetBSD/tests/dist/lib/libcurses/tests/ (props changed) vendor/NetBSD/tests/dist/lib/libdes/ (props changed) vendor/NetBSD/tests/dist/lib/libevent/ (props changed) vendor/NetBSD/tests/dist/lib/libexecinfo/ (props changed) vendor/NetBSD/tests/dist/lib/libm/ (props changed) vendor/NetBSD/tests/dist/lib/libobjc/ (props changed) vendor/NetBSD/tests/dist/lib/libposix/ (props changed) vendor/NetBSD/tests/dist/lib/libposix/bsd/ (props changed) vendor/NetBSD/tests/dist/lib/libposix/posix1/ (props changed) vendor/NetBSD/tests/dist/lib/libposix/posix2/ (props changed) vendor/NetBSD/tests/dist/lib/libppath/ (props changed) vendor/NetBSD/tests/dist/lib/libprop/ (props changed) vendor/NetBSD/tests/dist/lib/libpthread/ (props changed) vendor/NetBSD/tests/dist/lib/libpthread/dlopen/ (props changed) vendor/NetBSD/tests/dist/lib/libpthread/dlopen/dso/ (props changed) vendor/NetBSD/tests/dist/lib/librt/ (props changed) vendor/NetBSD/tests/dist/lib/librumpclient/ (props changed) vendor/NetBSD/tests/dist/lib/librumphijack/ (props changed) vendor/NetBSD/tests/dist/lib/libskey/ (props changed) vendor/NetBSD/tests/dist/lib/libsljit/ (props changed) vendor/NetBSD/tests/dist/lib/libtre/ (props changed) vendor/NetBSD/tests/dist/lib/libutil/ (props changed) vendor/NetBSD/tests/dist/lib/semaphore/ (props changed) vendor/NetBSD/tests/dist/lib/semaphore/pthread/ (props changed) vendor/NetBSD/tests/dist/libexec/ (props changed) vendor/NetBSD/tests/dist/libexec/ld.elf_so/ (props changed) vendor/NetBSD/tests/dist/libexec/ld.elf_so/data/ (props changed) vendor/NetBSD/tests/dist/libexec/ld.elf_so/helper_dso1/ (props changed) vendor/NetBSD/tests/dist/libexec/ld.elf_so/helper_dso2/ (props changed) vendor/NetBSD/tests/dist/libexec/ld.elf_so/helper_ifunc_dso/ (props changed) vendor/NetBSD/tests/dist/libexec/ld.elf_so/helper_symver_dso0/ (props changed) vendor/NetBSD/tests/dist/libexec/ld.elf_so/helper_symver_dso1/ (props changed) vendor/NetBSD/tests/dist/libexec/ld.elf_so/helper_symver_dso2/ (props changed) vendor/NetBSD/tests/dist/modules/ (props changed) vendor/NetBSD/tests/dist/modules/k_helper/ (props changed) vendor/NetBSD/tests/dist/modules/k_helper2/ (props changed) vendor/NetBSD/tests/dist/modules/k_helper3/ (props changed) vendor/NetBSD/tests/dist/modules/k_uvm/ (props changed) vendor/NetBSD/tests/dist/net/ (props changed) vendor/NetBSD/tests/dist/net/bpf/ (props changed) vendor/NetBSD/tests/dist/net/bpfilter/ (props changed) vendor/NetBSD/tests/dist/net/bpfjit/ (props changed) vendor/NetBSD/tests/dist/net/carp/ (props changed) vendor/NetBSD/tests/dist/net/config/ (props changed) vendor/NetBSD/tests/dist/net/fdpass/ (props changed) vendor/NetBSD/tests/dist/net/icmp/ (props changed) vendor/NetBSD/tests/dist/net/if/ (props changed) vendor/NetBSD/tests/dist/net/if_bridge/ (props changed) vendor/NetBSD/tests/dist/net/if_loop/ (props changed) vendor/NetBSD/tests/dist/net/mpls/ (props changed) vendor/NetBSD/tests/dist/net/net/ (props changed) vendor/NetBSD/tests/dist/net/npf/ (props changed) vendor/NetBSD/tests/dist/net/route/ (props changed) vendor/NetBSD/tests/dist/net/sys/ (props changed) vendor/NetBSD/tests/dist/rump/ (props changed) vendor/NetBSD/tests/dist/rump/kernspace/ (props changed) vendor/NetBSD/tests/dist/rump/modautoload/ (props changed) vendor/NetBSD/tests/dist/rump/rumpkern/ (props changed) vendor/NetBSD/tests/dist/rump/rumpkern/h_client/ (props changed) vendor/NetBSD/tests/dist/rump/rumpkern/h_server/ (props changed) vendor/NetBSD/tests/dist/rump/rumpnet/ (props changed) vendor/NetBSD/tests/dist/rump/rumpvfs/ (props changed) vendor/NetBSD/tests/dist/sbin/ (props changed) vendor/NetBSD/tests/dist/sbin/fsck_ffs/ (props changed) vendor/NetBSD/tests/dist/sbin/ifconfig/ (props changed) vendor/NetBSD/tests/dist/sbin/newfs/ (props changed) vendor/NetBSD/tests/dist/sbin/newfs_msdos/ (props changed) vendor/NetBSD/tests/dist/sbin/resize_ffs/ (props changed) vendor/NetBSD/tests/dist/sbin/route/ (props changed) vendor/NetBSD/tests/dist/sbin/sysctl/ (props changed) vendor/NetBSD/tests/dist/share/ (props changed) vendor/NetBSD/tests/dist/share/examples/ (props changed) vendor/NetBSD/tests/dist/share/mk/ (props changed) vendor/NetBSD/tests/dist/sys/ (props changed) vendor/NetBSD/tests/dist/sys/rc/ (props changed) vendor/NetBSD/tests/dist/usr.bin/ (props changed) vendor/NetBSD/tests/dist/usr.bin/awk/ (props changed) vendor/NetBSD/tests/dist/usr.bin/basename/ (props changed) vendor/NetBSD/tests/dist/usr.bin/bzip2/ (props changed) vendor/NetBSD/tests/dist/usr.bin/cc/ (props changed) vendor/NetBSD/tests/dist/usr.bin/cmp/ (props changed) vendor/NetBSD/tests/dist/usr.bin/config/ (props changed) vendor/NetBSD/tests/dist/usr.bin/config/support/ (props changed) vendor/NetBSD/tests/dist/usr.bin/config/support/arch/ (props changed) vendor/NetBSD/tests/dist/usr.bin/config/support/arch/regress/ (props changed) vendor/NetBSD/tests/dist/usr.bin/config/support/arch/regress/conf/ (props changed) vendor/NetBSD/tests/dist/usr.bin/config/support/conf/ (props changed) vendor/NetBSD/tests/dist/usr.bin/cut/ (props changed) vendor/NetBSD/tests/dist/usr.bin/diff/ (props changed) vendor/NetBSD/tests/dist/usr.bin/dirname/ (props changed) vendor/NetBSD/tests/dist/usr.bin/find/ (props changed) vendor/NetBSD/tests/dist/usr.bin/grep/ (props changed) vendor/NetBSD/tests/dist/usr.bin/gzip/ (props changed) vendor/NetBSD/tests/dist/usr.bin/id/ (props changed) vendor/NetBSD/tests/dist/usr.bin/infocmp/ (props changed) vendor/NetBSD/tests/dist/usr.bin/jot/ (props changed) vendor/NetBSD/tests/dist/usr.bin/m4/ (props changed) vendor/NetBSD/tests/dist/usr.bin/make/ (props changed) vendor/NetBSD/tests/dist/usr.bin/mkdep/ (props changed) vendor/NetBSD/tests/dist/usr.bin/nbperf/ (props changed) vendor/NetBSD/tests/dist/usr.bin/netpgpverify/ (props changed) vendor/NetBSD/tests/dist/usr.bin/pr/ (props changed) vendor/NetBSD/tests/dist/usr.bin/rump_server/ (props changed) vendor/NetBSD/tests/dist/usr.bin/sdiff/ (props changed) vendor/NetBSD/tests/dist/usr.bin/sed/ (props changed) vendor/NetBSD/tests/dist/usr.bin/shmif_dumpbus/ (props changed) vendor/NetBSD/tests/dist/usr.bin/sort/ (props changed) vendor/NetBSD/tests/dist/usr.bin/tmux/ (props changed) vendor/NetBSD/tests/dist/usr.bin/tr/ (props changed) vendor/NetBSD/tests/dist/usr.bin/unifdef/ (props changed) vendor/NetBSD/tests/dist/usr.bin/vmstat/ (props changed) vendor/NetBSD/tests/dist/usr.bin/xlint/ (props changed) vendor/NetBSD/tests/dist/usr.bin/xlint/lint1/ (props changed) vendor/NetBSD/tests/dist/usr.sbin/ (props changed) vendor/NetBSD/tests/dist/usr.sbin/mtree/ (props changed) vendor/NetBSD/tests/dist/usr.sbin/tcpdump/ (props changed) vendor/NetBSD/tests/dist/usr.sbin/traceroute/ (props changed) vendor/NetBSD/tests/dist/usr.sbin/useradd/ (props changed) Added: vendor/NetBSD/tests/dist/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/NetBSD/tests/dist/Makefile Wed Oct 1 04:07:17 2014 (r272343) @@ -0,0 +1,45 @@ +# $NetBSD: Makefile,v 1.44 2013/02/25 00:33:19 jmmv Exp $ + +.include + +.if ${MKATF} != "no" + +TESTSDIR= ${TESTSBASE} + +TESTS_SUBDIRS= bin dev games include kernel lib libexec net +TESTS_SUBDIRS+= sbin sys usr.bin usr.sbin + +. if (${MKRUMP} != "no") +TESTS_SUBDIRS+= fs rump + +. if ${MKKMOD} != "no" +TESTS_SUBDIRS+= modules +. endif +. endif + +. if ${MKCRYPTO} != "no" +TESTS_SUBDIRS+= crypto +. endif + +. if ${MKIPFILTER} != "no" +TESTS_SUBDIRS+= ipf +. endif + +. if ${MKSHARE} != "no" +TESTS_SUBDIRS+= share +. endif + +. if ${MKATF} != "no" +ATFFILE_EXTRA_SUBDIRS+= atf +. endif + +. if ${MKKYUA} != "no" +ATFFILE_EXTRA_SUBDIRS+= kyua-atf-compat kyua-cli kyua-testers +. endif + +.include + +.else + +.include +.endif Added: vendor/NetBSD/tests/dist/Makefile.inc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/NetBSD/tests/dist/Makefile.inc Wed Oct 1 04:07:17 2014 (r272343) @@ -0,0 +1,3 @@ +# $NetBSD: Makefile.inc,v 1.2 2011/09/16 16:30:18 joerg Exp $ +WARNS ?= 4 +CWARNFLAGS+= -Wno-missing-noreturn Added: vendor/NetBSD/tests/dist/README ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/NetBSD/tests/dist/README Wed Oct 1 04:07:17 2014 (r272343) @@ -0,0 +1,20 @@ +$NetBSD: README,v 1.4 2012/05/18 15:36:21 jruoho Exp $ + +When adding new tests, please try to follow the following conventions. + +1. For library routines, including system calls, the directory structure of + the tests should follow the directory structure of the real source tree. + For instance, interfaces available via the C library should follow: + + src/lib/libc/gen -> src/tests/lib/libc/gen + src/lib/libc/sys -> src/tests/lib/libc/sys + ... + +2. Equivalently, all tests for userland utilities should try to follow their + location in the source tree. If this can not be satisfied, the tests for + a utility should be located under the directory to which the utility is + installed. Thus, a test for env(1) should go to src/tests/usr.bin/env. + Likewise, a test for tcpdump(8) should be in src/tests/usr.sbin/tcpdump, + even though the source code for the program is located under src/external. + +3. Otherwise use your own discretion. Added: vendor/NetBSD/tests/dist/bin/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/NetBSD/tests/dist/bin/Makefile Wed Oct 1 04:07:17 2014 (r272343) @@ -0,0 +1,9 @@ +# $NetBSD: Makefile,v 1.3 2012/03/30 15:49:24 njoly Exp $ + +.include + +TESTSDIR= ${TESTSBASE}/bin + +TESTS_SUBDIRS= cat cp dd df expr pax ps sh sleep tar + +.include Added: vendor/NetBSD/tests/dist/bin/cat/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/NetBSD/tests/dist/bin/cat/Makefile Wed Oct 1 04:07:17 2014 (r272343) @@ -0,0 +1,12 @@ +# $NetBSD: Makefile,v 1.1 2012/03/27 08:16:33 jruoho Exp $ + +.include + +TESTSDIR= ${TESTSBASE}/bin/cat +TESTS_SH= t_cat + +FILESDIR= ${TESTSDIR} +FILES+= d_align.in +FILES+= d_align.out + +.include Added: vendor/NetBSD/tests/dist/bin/cat/d_align.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/NetBSD/tests/dist/bin/cat/d_align.in Wed Oct 1 04:07:17 2014 (r272343) @@ -0,0 +1,3 @@ +a b c +1 2 3 +x y z Added: vendor/NetBSD/tests/dist/bin/cat/d_align.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/NetBSD/tests/dist/bin/cat/d_align.out Wed Oct 1 04:07:17 2014 (r272343) @@ -0,0 +1,3 @@ + 1 a b c$ + 2 1 2 3$ + 3 x y z$ Added: vendor/NetBSD/tests/dist/bin/cat/t_cat.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/NetBSD/tests/dist/bin/cat/t_cat.sh Wed Oct 1 04:07:17 2014 (r272343) @@ -0,0 +1,59 @@ +# $NetBSD: t_cat.sh,v 1.2 2012/03/27 17:57:02 jruoho Exp $ +# +# Copyright (c) 2012 The NetBSD Foundation, Inc. +# All rights reserved. +# +# This code is derived from software contributed to The NetBSD Foundation +# by Jukka Ruohonen. +# +# 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. +# + +atf_test_case align +align_head() { + atf_set "descr" "Test that cat(1) aligns the output " \ + "right with options '-be' (PR bin/4841)" +} + +align_body() { + + atf_check -s ignore -o file:$(atf_get_srcdir)/d_align.out \ + -x "cat -be $(atf_get_srcdir)/d_align.in" +} + +atf_test_case nonexistent +nonexistent_head() { + atf_set "descr" "Test that cat(1) doesn't return zero exit " \ + "status for a nonexistent file (PR bin/3538)" +} + +nonexistent_body() { + + atf_check -s not-exit:0 -o empty -e not-empty \ + -x "cat /some/name/that/does/not/exist" +} + +atf_init_test_cases() +{ + atf_add_test_case align + atf_add_test_case nonexistent +} Added: vendor/NetBSD/tests/dist/bin/cp/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/NetBSD/tests/dist/bin/cp/Makefile Wed Oct 1 04:07:17 2014 (r272343) @@ -0,0 +1,8 @@ +# $NetBSD: Makefile,v 1.1 2012/03/17 16:33:10 jruoho Exp $ + +.include + +TESTSDIR= ${TESTSBASE}/bin/cp +TESTS_SH= t_cp + +.include Added: vendor/NetBSD/tests/dist/bin/cp/t_cp.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/NetBSD/tests/dist/bin/cp/t_cp.sh Wed Oct 1 04:07:17 2014 (r272343) @@ -0,0 +1,294 @@ +# $NetBSD: t_cp.sh,v 1.1 2012/03/17 16:33:10 jruoho Exp $ +# +# Copyright (c) 2007, 2008 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. +# + +FILES="file file2 file3 link dir dir2 dirlink target" + +cleanup() { + rm -fr ${FILES} +} + +cp_compare() { + echo "Ensuring that $2 and $3 are identical" + cmp -s $2 $3 || atf_fail "$2 and $3 are different" +} + +reset() { + cleanup + echo "I'm a file" > file + echo "I'm a file, 2" > file2 + echo "I'm a file, 3" > file3 + ln -s file link + mkdir dir + ln -s dir dirlink +} + +atf_test_case file_to_file +file_to_file_head() { + atf_set "descr" "Checks the copy of a file to a file" +} +file_to_file_body() { + reset + + file_to_file_simple + file_to_file_preserve + file_to_file_noflags +} + +file_to_file_simple() { + rm -f file2 + umask 022 + chmod 777 file + atf_check -s eq:0 -o empty -e empty cp file file2 + cp_compare file_to_file_simple file file2 + if [ `stat -f "%Lp" file2` != "755" ]; then + atf_fail "new file not created with umask" + fi + + chmod 644 file + chmod 777 file2 + cp_compare file_to_file_simple file file2 + if [ `stat -f "%Lp" file2` != "777" ]; then + atf_fail "existing files permissions not retained" + fi +} + +file_to_file_preserve() { + rm file3 + chmod 644 file + chflags nodump file + atf_check -s eq:0 -o empty -e empty cp -p file file3 + finfo=`stat -f "%p%u%g%m%z%f" file` + f3info=`stat -f "%p%u%g%m%z%f" file3` + if [ $finfo != $f3info ]; then + atf_fail "attributes not preserved" + fi +} + +file_to_file_noflags() { + rm file3 + chmod 644 file + chflags nodump file + atf_check -s eq:0 -o empty -e empty cp -p -N file file3 + finfo=`stat -f "%f" file` + f3info=`stat -f "%f" file3` + if [ $finfo = $f3info ]; then + atf_fail "-p -N preserved file flags" + fi +} + +atf_test_case file_to_link +file_to_link_head() { + atf_set "descr" "Checks the copy of a file to a symbolic link" +} +file_to_link_body() { + reset + atf_check -s eq:0 -o empty -e empty cp file2 link + cp_compare file_to_link file file2 +} + +atf_test_case link_to_file +link_to_file_head() { + atf_set "descr" "Checks the copy of a symbolic link to a file" +} +link_to_file_body() { + reset + # file and link are identical (not copied). + atf_check -s eq:1 -o empty -e ignore cp link file + atf_check -s eq:0 -o empty -e empty cp link file2 + cp_compare link_to_file file file2 +} + +atf_test_case file_over_link +file_over_link_head() { + atf_set "descr" "Checks the copy of a file to a symbolic link" \ + "without following it" +} +file_over_link_body() { + reset + atf_check -s eq:0 -o empty -e empty cp -P file link + cp_compare file_over_link file link +} + +atf_test_case link_over_file +link_over_file_head() { + atf_set "descr" "Checks the copy of a symbolic link to a file" \ + "without following the former" +} +link_over_file_body() { + reset + atf_check -s eq:0 -o empty -e empty cp -P link file + if [ `readlink link` != `readlink file` ]; then + atf_fail "readlink link != readlink file" + fi +} + +atf_test_case files_to_dir +files_to_dir_head() { + atf_set "descr" "Checks the copy of multiple files into a directory" +} +files_to_dir_body() { + reset + # can't copy multiple files to a file + atf_check -s eq:1 -o empty -e ignore cp file file2 file3 + atf_check -s eq:0 -o empty -e empty cp file file2 link dir + cp_compare files_to_dir file "dir/file" +} + +atf_test_case dir_to_file +dir_to_file_head() { + atf_set "descr" "Checks the copy of a directory onto a file, which" \ + "should not work" +} +dir_to_file_body() { + reset + # can't copy a dir onto a file + atf_check -s eq:1 -o empty -e ignore cp dir file + atf_check -s eq:1 -o empty -e ignore cp -R dir file +} + +atf_test_case file_to_linkdir +file_to_linkdir_head() { + atf_set "descr" "Checks the copy of a file to a symbolic link that" \ + "points to a directory" +} +file_to_linkdir_body() { + reset + atf_check -s eq:0 -o empty -e empty cp file dirlink + cp_compare file_to_linkdir file "dir/file" + + # overwrite the link + atf_check -s eq:0 -o empty -e empty cp -P file dirlink + atf_check -s eq:1 -o empty -e empty readlink dirlink + cp_compare file_to_linkdir file dirlink +} + +atf_test_case linkdir_to_file +linkdir_to_file_head() { + atf_set "descr" "Checks the copy of a symbolic link that points to" \ + "a directory onto a file" +} +linkdir_to_file_body() { + reset + # cannot copy a dir onto a file + atf_check -s eq:1 -o empty -e ignore cp dirlink file + + # overwrite the link + atf_check -s eq:0 -o empty -e empty cp -P dirlink file + if [ `readlink file` != `readlink dirlink` ]; then + atf_fail "readlink link != readlink file" + fi +} + +dir_to_dne_no_R() { + atf_check -s eq:1 -o empty -e ignore cp dir dir2 +} + +dir_to_dne() { + atf_check -s eq:0 -o empty -e empty cp -R dir dir2 + cp_compare dir_to_dne "dir/file" "dir2/file" + readlink dir2/link >/dev/null + if [ $? -gt 0 ]; then + atf_fail "-R didn't copy a link as a link" + fi +} + +dir_to_dir_H() { + dir_to_dir_setup + atf_check -s eq:0 -o empty -e empty cp -R dir dir2 + + chmod 777 dir + + # copy a dir into a dir, only command-line links are followed + atf_check -s eq:0 -o empty -e empty cp -R -H dirlink dir2 + cp_compare dir_to_dir_H "dir/file" "dir2/dirlink/file" + readlink dir2/dirlink/link >/dev/null + if [ $? -gt 0 ]; then + atf_fail "didn't copy a link as a link" + fi + + # Created directories have the same mode as the corresponding + # source directory, unmodified by the process's umask. + if [ `stat -f "%Lp" dir2/dirlink` != "777" ]; then + atf_fail "-R modified dir perms with umask" + fi +} + +dir_to_dir_L() { + dir_to_dir_setup + atf_check -s eq:0 -o empty -e empty cp -R dir dir2 + atf_check -s eq:0 -o empty -e empty cp -R -H dirlink dir2 + + # copy a dir into a dir, following all links + atf_check -s eq:0 -o empty -e empty cp -R -H -L dirlink dir2/dirlink + cp_compare dir_to_dir_L "dir/file" "dir2/dirlink/dirlink/file" + # fail if -R -L copied a link as a link + atf_check -s eq:1 -o ignore -e empty readlink dir2/dirlink/dirlink/link +} + +dir_to_dir_subdir_exists() { + # recursively copy a dir into another dir, with some subdirs already + # existing + cleanup + + mkdir -p dir/1 dir/2 dir/3 target/2 + echo "file" > dir/2/file + atf_check -s eq:0 -o empty -e empty cp -R dir/* target + cp_compare dir_to_dir_subdir_exists "dir/2/file" "target/2/file" +} + +dir_to_dir_setup() { + reset + umask 077 + cp -P file file2 file3 link dir +} + +atf_test_case dir_to_dir +dir_to_dir_head() { + atf_set "descr" "Checks the copy of a directory onto another directory" +} +dir_to_dir_body() { + dir_to_dir_setup + dir_to_dne_no_R + dir_to_dne + dir_to_dir_H + dir_to_dir_L + dir_to_dir_subdir_exists +} + +atf_init_test_cases() +{ + atf_add_test_case file_to_file + atf_add_test_case file_to_link + atf_add_test_case link_to_file + atf_add_test_case file_over_link + atf_add_test_case link_over_file + atf_add_test_case files_to_dir + atf_add_test_case file_to_linkdir + atf_add_test_case linkdir_to_file + atf_add_test_case dir_to_file + atf_add_test_case dir_to_dir +} Added: vendor/NetBSD/tests/dist/bin/dd/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/NetBSD/tests/dist/bin/dd/Makefile Wed Oct 1 04:07:17 2014 (r272343) @@ -0,0 +1,8 @@ +# $NetBSD: Makefile,v 1.1 2012/03/17 16:33:11 jruoho Exp $ + +.include + +TESTSDIR= ${TESTSBASE}/bin/dd +TESTS_SH= t_dd + +.include Added: vendor/NetBSD/tests/dist/bin/dd/t_dd.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/NetBSD/tests/dist/bin/dd/t_dd.sh Wed Oct 1 04:07:17 2014 (r272343) @@ -0,0 +1,130 @@ +# $NetBSD: t_dd.sh,v 1.1 2012/03/17 16:33:11 jruoho Exp $ +# +# Copyright (c) 2007 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. +# + +test_dd_length() { + result=$1 + cmd=$2 + set -- x `eval $cmd | wc -c` + res=$2 + if [ x"$res" != x"$result" ]; then + atf_fail "Expected $result bytes of output, got $res: $cmd" + fi +} + +atf_test_case length +length_head() { + # XXX The PR should be stored in a tag. + atf_set "descr" "Test for result messages accidentally pumped into" \ + "the output file if the standard IO descriptors are" \ + "closed. The last of the three following tests is" \ + "the one expected to fail. (NetBSD PR bin/8521)" +} +length_body() { + test_dd_length 512 \ + "dd if=/dev/zero of=/dev/fd/5 count=1 5>&1 >/dev/null 2>/dev/null" + test_dd_length 512 \ + "dd if=/dev/zero of=/dev/fd/5 count=1 5>&1 >&- 2>/dev/null" + test_dd_length 512 \ + "dd if=/dev/zero of=/dev/fd/5 count=1 5>&1 >&- 2>&-" +} + +test_dd_io() { + res="`echo -n "$2" | eval $1`" + if [ x"$res" != x"$3" ]; then + atf_fail "Expected \"$3\", got \"$res\": $1" + fi +} + +allbits1="\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043\044\045\046\047\050\051\052\053\054\055\056\057\060\061\062\063\064\065\066\067\070\071\072\073\074\075\076\077\100\101\102\103\104\105\106\107\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131\132\133\134\135\136\137\140\141\142\143\144\145\146\147\150\151\152\153\154\155\156\157\160\161\162\163\164\165\166\167\170\171\172\173\174\175\176\177\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\36 6\367\370\371\372\373\374\375\376\377" + +ebcdicbits1="\000\001\002\003\067\055\056\057\026\005\045\013\014\015\016\017\020\021\022\023\074\075\062\046\030\031\077\047\034\035\036\037\100\132\177\173\133\154\120\175\115\135\134\116\153\140\113\141\360\361\362\363\364\365\366\367\370\371\172\136\114\176\156\157\174\301\302\303\304\305\306\307\310\311\321\322\323\324\325\326\327\330\331\342\343\344\345\346\347\350\351\255\340\275\232\155\171\201\202\203\204\205\206\207\210\211\221\222\223\224\225\226\227\230\231\242\243\244\245\246\247\250\251\300\117\320\137\007\040\041\042\043\044\025\006\027\050\051\052\053\054\011\012\033\060\061\032\063\064\065\066\010\070\071\072\073\004\024\076\341\101\102\103\104\105\106\107\110\111\121\122\123\124\125\126\127\130\131\142\143\144\145\146\147\150\151\160\161\162\163\164\165\166\167\170\200\212\213\214\215\216\217\220\152\233\234\235\236\237\240\252\253\254\112\256\257\260\261\262\263\264\265\266\267\270\271\272\273\274\241\276\277\312\313\314\315\316\317\332\333\334\335\336\337\352\353 \354\355\356\357\372\373\374\375\376\377" + +allvisbits=`echo -n "$allbits1" | unvis | vis` +ebcdicvisbits=`echo -n "$ebcdicbits1" | unvis | vis` + +atf_test_case io +io_head() { + atf_set "descr" "This checks the combination of bs= with" \ + "conv=ebcdic. Prior to revision 1.24 of dd's" \ + "args.c, the conv option would be ignored." +} +io_body() { + test_dd_io "unvis | dd 2>/dev/null | vis" \ + "$allvisbits" "$allvisbits" + test_dd_io "unvis | dd ibs=1 2>/dev/null | vis" \ + "$allvisbits" "$allvisbits" + test_dd_io "unvis | dd obs=1 2>/dev/null | vis" \ + "$allvisbits" "$allvisbits" + test_dd_io "unvis | dd bs=1 2>/dev/null | vis" \ + "$allvisbits" "$allvisbits" + + test_dd_io "unvis | dd conv=ebcdic 2>/dev/null | vis" \ + "$allvisbits" "$ebcdicvisbits" + test_dd_io "unvis | dd conv=ebcdic ibs=512 2>/dev/null | vis" \ + "$allvisbits" "$ebcdicvisbits" + test_dd_io "unvis | dd conv=ebcdic obs=512 2>/dev/null | vis" \ + "$allvisbits" "$ebcdicvisbits" + test_dd_io "unvis | dd conv=ebcdic bs=512 2>/dev/null | vis" \ + "$allvisbits" "$ebcdicvisbits" + + test_dd_io "unvis | dd conv=ebcdic 2>/dev/null | vis" \ + "$allvisbits" "$ebcdicvisbits" + test_dd_io "unvis | dd conv=ebcdic ibs=1 2>/dev/null | vis" \ + "$allvisbits" "$ebcdicvisbits" + test_dd_io "unvis | dd conv=ebcdic obs=1 2>/dev/null | vis" \ + "$allvisbits" "$ebcdicvisbits" + test_dd_io "unvis | dd conv=ebcdic bs=1 2>/dev/null | vis" \ + "$allvisbits" "$ebcdicvisbits" +} + +atf_test_case seek +seek_head() { + atf_set "descr" "Tests output file seeking" +} + +seek_body() { + echo TEST1234 > testfile + atf_check -s exit:0 -e ignore \ + dd if=/dev/zero of=testfile seek=1 bs=8k count=1 + atf_check -s exit:0 -e ignore -o match:'^TEST1234$' dd if=testfile + eval $(stat -s testfile) + atf_check_equal $st_size $((2*8192)) + + echo -n TEST1234 > tf2 + atf_check -s exit:0 -e ignore -x \ + 'dd bs=4 if=/dev/zero count=1 | tr \\0 \\n | dd of=tf2 bs=4 seek=1' + atf_check -s exit:0 -e ignore -o match:'^TEST$' dd if=tf2 + eval $(stat -s tf2) + atf_check_equal $st_size 8 +} + +atf_init_test_cases() +{ + atf_add_test_case length + atf_add_test_case io + atf_add_test_case seek +} Added: vendor/NetBSD/tests/dist/bin/df/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/NetBSD/tests/dist/bin/df/Makefile Wed Oct 1 04:07:17 2014 (r272343) @@ -0,0 +1,27 @@ +# $NetBSD: Makefile,v 1.1 2012/03/17 16:33:11 jruoho Exp $ + +NOMAN= # defined + +.include + +TESTSDIR= ${TESTSBASE}/bin/df + +TESTS_SH= t_df + +BINDIR= ${TESTSDIR} +PROG= h_df +.PATH: ${NETBSDSRCDIR}/bin/df +SRCS= df.c getmntinfo.c + +LDADD+= -lutil +DPADD+= ${LIBUTIL} + +# Pass -DINTREE to make to test using humanize_number.c in source tree +# directly instead of the one in libc. +.if defined(INTREE) +.PATH: ${NETBSDSRCDIR}/lib/libc/gen +CPPFLAGS+= -I${NETBSDSRCDIR}/lib/libc/include +SRCS+= humanize_number.c +.endif + +.include Added: vendor/NetBSD/tests/dist/bin/df/getmntinfo.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/NetBSD/tests/dist/bin/df/getmntinfo.c Wed Oct 1 04:07:17 2014 (r272343) @@ -0,0 +1,218 @@ +/* $NetBSD: getmntinfo.c,v 1.1 2012/03/17 16:33:11 jruoho Exp $ */ +/* + * Copyright (c) 2007 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. + */ + +#include +#include +#include + +#include +#include +#include + +#define KB * 1024 +#define MB * 1024 KB +#define GB * 1024 MB + +static struct statvfs *getnewstatvfs(void); +static void other_variants(const struct statvfs *, const int *, int, + const int *, int); +static void setup_filer(void); +static void setup_ld0g(void); +static void setup_strpct(void); + +static struct statvfs *allstatvfs; +static int sftotal, sfused; + +struct statvfs * +getnewstatvfs(void) +{ + + if (sftotal == sfused) { + sftotal = sftotal ? sftotal * 2 : 1; + allstatvfs = realloc(allstatvfs, + sftotal * sizeof(struct statvfs)); + if (allstatvfs == NULL) + err(EXIT_FAILURE, "realloc"); + } + + return (&allstatvfs[sfused++]); +} + +void +other_variants(const struct statvfs *tmpl, const int *minfree, int minfreecnt, + const int *consumed, int consumedcnt) +{ + int64_t total, used; + struct statvfs *sf; + int i, j; + + for (i = 0; i < minfreecnt; i++) + for (j = 0; j < consumedcnt; j++) { + sf = getnewstatvfs(); + *sf = *tmpl; + total = (int64_t)(u_long)sf->f_blocks * sf->f_bsize; + used = total * consumed[j] / 100; + sf->f_bfree = (total - used) / sf->f_bsize; + sf->f_bavail = (total * (100 - minfree[i]) / 100 - + used) / (int)sf->f_bsize; + sf->f_bresvd = sf->f_bfree - sf->f_bavail; + } +} + +/* + * Parameter taken from: + * http://mail-index.NetBSD.org/tech-userlevel/2004/03/24/0001.html + */ +void +setup_filer(void) +{ + static const struct statvfs tmpl = { +#define BSIZE 512 +#define TOTAL 1147ULL GB +#define USED 132ULL MB + .f_bsize = BSIZE, + .f_frsize = BSIZE, + .f_blocks = TOTAL / BSIZE, + .f_bfree = (TOTAL - USED) / BSIZE, + .f_bavail = (TOTAL - USED) / BSIZE, + .f_bresvd = 0, + .f_mntfromname = "filer:/", + .f_mntonname = "/filer", +#undef USED +#undef TOTAL +#undef BSIZE + }; + static const int minfree[] = { 0, 5, 10, 15, }; + static const int consumed[] = { 0, 20, 60, 95, 100 }; + + *getnewstatvfs() = tmpl; + other_variants(&tmpl, minfree, sizeof(minfree) / sizeof(minfree[0]), + consumed, sizeof(consumed) / sizeof(consumed[0])); +} + +/* + * Parameter taken from: + * http://mail-index.NetBSD.org/current-users/2004/03/01/0038.html + */ +void +setup_ld0g(void) +{ + static const struct statvfs tmpl = { +#define BSIZE 4096 /* Guess */ +#define TOTAL 1308726116ULL KB +#define USED 17901268ULL KB +#define AVAIL 1225388540ULL KB + .f_bsize = BSIZE, + .f_frsize = BSIZE, + .f_blocks = TOTAL / BSIZE, + .f_bfree = (TOTAL - USED) / BSIZE, + .f_bavail = AVAIL / BSIZE, + .f_bresvd = (TOTAL - USED) / BSIZE - AVAIL / BSIZE, + .f_mntfromname = "/dev/ld0g", + .f_mntonname = "/anon-root", +#undef AVAIL +#undef USED +#undef TOTAL +#undef BSIZE + }; + static const int minfree[] = { 0, 5, 10, 15, }; + static const int consumed[] = { 0, 20, 60, 95, 100 }; + + *getnewstatvfs() = tmpl; + other_variants(&tmpl, minfree, sizeof(minfree) / sizeof(minfree[0]), + consumed, sizeof(consumed) / sizeof(consumed[0])); +} + +/* + * Test of strpct() with huge number. + */ +void +setup_strpct(void) +{ + static const struct statvfs tmpl = { +#define BSIZE 4096 /* Guess */ +#define TOTAL 0x4ffffffffULL KB +#define USED (TOTAL / 2) +#define AVAIL (TOTAL / 2) + .f_bsize = BSIZE, + .f_frsize = BSIZE, + .f_blocks = TOTAL / BSIZE, + .f_bfree = (TOTAL - USED) / BSIZE, + .f_bavail = AVAIL / BSIZE, + .f_bresvd = (TOTAL - USED) / BSIZE - AVAIL / BSIZE, + .f_mntfromname = "/dev/strpct", + .f_mntonname = "/strpct", +#undef AVAIL +#undef USED +#undef TOTAL +#undef BSIZE + }; + + *getnewstatvfs() = tmpl; +} + +/* + * Parameter taken from: + * http://www.netbsd.org/cgi-bin/query-pr-single.pl?number=23600 + */ +static void +setup_pr23600(void) +{ + static const struct statvfs tmpl = { +#define BSIZE 512 +#define TOTAL 20971376ULL +#define USED 5719864ULL +#define AVAIL 15251512ULL + .f_bsize = BSIZE, + .f_frsize = BSIZE, + .f_blocks = TOTAL, + .f_bfree = TOTAL - USED, + .f_bavail = AVAIL, + .f_bresvd = TOTAL - USED - AVAIL, + .f_mntfromname = "/dev/wd0e", + .f_mntonname = "/mount/windows/C", +#undef AVAIL +#undef USED +#undef TOTAL +#undef BSIZE + }; + + *getnewstatvfs() = tmpl; +} + +int +getmntinfo(struct statvfs **mntbuf, int flags) +{ + + setup_filer(); + setup_ld0g(); + setup_strpct(); + setup_pr23600(); + + *mntbuf = allstatvfs; + return (sfused); +} Added: vendor/NetBSD/tests/dist/bin/df/t_df.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/NetBSD/tests/dist/bin/df/t_df.sh Wed Oct 1 04:07:17 2014 (r272343) @@ -0,0 +1,148 @@ +# $NetBSD: t_df.sh,v 1.1 2012/03/17 16:33:11 jruoho Exp $ +# +# Copyright (c) 2007, 2008 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. +# + +atf_test_case normal +normal_head() { + atf_set "descr" "Checks that the output of df without flags is" \ + "correct according to some already-known, sane" \ + "output" +} +normal_body() { + cat >expout <expout < Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9B5385E7; Wed, 1 Oct 2014 04:08:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 87F7E378; Wed, 1 Oct 2014 04:08:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9148U1I021996; Wed, 1 Oct 2014 04:08:30 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9148Uf4021995; Wed, 1 Oct 2014 04:08:30 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201410010408.s9148Uf4021995@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 1 Oct 2014 04:08:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r272344 - svnadmin/conf X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 04:08:30 -0000 Author: ngie Date: Wed Oct 1 04:08:29 2014 New Revision: 272344 URL: https://svnweb.freebsd.org/changeset/base/272344 Log: Remove temporary sizelimit restriction Modified: svnadmin/conf/sizelimit.conf Modified: svnadmin/conf/sizelimit.conf ============================================================================== --- svnadmin/conf/sizelimit.conf Wed Oct 1 04:07:17 2014 (r272343) +++ svnadmin/conf/sizelimit.conf Wed Oct 1 04:08:29 2014 (r272344) @@ -30,7 +30,7 @@ jb jeff kmacy lstewart -ngie +#ngie obrien peter roberto From owner-svn-src-all@FreeBSD.ORG Wed Oct 1 04:12:38 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D8777744; Wed, 1 Oct 2014 04:12:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AB229603; Wed, 1 Oct 2014 04:12:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s914Cc6a026124; Wed, 1 Oct 2014 04:12:38 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s914CcWt026123; Wed, 1 Oct 2014 04:12:38 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201410010412.s914CcWt026123@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 1 Oct 2014 04:12:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r272345 - vendor/NetBSD/tests/09.30.2014_20.45 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 04:12:39 -0000 Author: ngie Date: Wed Oct 1 04:12:38 2014 New Revision: 272345 URL: https://svnweb.freebsd.org/changeset/base/272345 Log: Tag ^/base/vendor/NetBSD/tests/09.30.2014_20.45 from ^/base/vendor/NetBSD/tests/dist Sponsored by: EMC / Isilon Storage Division Added: vendor/NetBSD/tests/09.30.2014_20.45/ - copied from r272344, vendor/NetBSD/tests/dist/ From owner-svn-src-all@FreeBSD.ORG Wed Oct 1 04:28:40 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4EEFB9F2; Wed, 1 Oct 2014 04:28:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3B69775A; Wed, 1 Oct 2014 04:28:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s914Sekx031693; Wed, 1 Oct 2014 04:28:40 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s914SetH031692; Wed, 1 Oct 2014 04:28:40 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201410010428.s914SetH031692@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 1 Oct 2014 04:28:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272346 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 04:28:40 -0000 Author: markj Date: Wed Oct 1 04:28:39 2014 New Revision: 272346 URL: https://svnweb.freebsd.org/changeset/base/272346 Log: Correct the way that libelf is linked when USDT is used. Modified: head/share/mk/bsd.dep.mk Modified: head/share/mk/bsd.dep.mk ============================================================================== --- head/share/mk/bsd.dep.mk Wed Oct 1 04:12:38 2014 (r272345) +++ head/share/mk/bsd.dep.mk Wed Oct 1 04:28:39 2014 (r272346) @@ -123,8 +123,8 @@ ${_YC:R}.o: ${_YC} # DTrace probe definitions # libelf is currently needed for drti.o .if ${SRCS:M*.d} -LDFLAGS+= -lelf -LDADD+= ${LIBELF} +LDADD+= -lelf +DPADD+= ${LIBELF} CFLAGS+= -I${.OBJDIR} .endif .for _DSRC in ${SRCS:M*.d:N*/*} From owner-svn-src-all@FreeBSD.ORG Wed Oct 1 05:43:30 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9EB881E5C; Wed, 1 Oct 2014 05:43:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 80F208BC; Wed, 1 Oct 2014 05:43:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s915hUYg068774; Wed, 1 Oct 2014 05:43:30 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s915hTKc068771; Wed, 1 Oct 2014 05:43:29 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201410010543.s915hTKc068771@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 1 Oct 2014 05:43:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272347 - in head: share/man/man4 sys/netinet 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 05:43:30 -0000 Author: tuexen Date: Wed Oct 1 05:43:29 2014 New Revision: 272347 URL: https://svnweb.freebsd.org/changeset/base/272347 Log: The default for UDPLITE_RECV_CSCOV is zero. RFC 3828 recommend that this means full checksum coverage for received packets. If an application is willing to accept packets with partial coverage, it is expected to use the socekt option and provice the minimum coverage it accepts. Reviewed by: kevlo MFC after: 3 days Modified: head/share/man/man4/udplite.4 head/sys/netinet/udp_usrreq.c head/sys/netinet6/udp6_usrreq.c Modified: head/share/man/man4/udplite.4 ============================================================================== --- head/share/man/man4/udplite.4 Wed Oct 1 04:28:39 2014 (r272346) +++ head/share/man/man4/udplite.4 Wed Oct 1 05:43:29 2014 (r272347) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 7, 2014 +.Dd October 1, 2014 .Dt UDPLITE 4 .Os .Sh NAME @@ -55,16 +55,16 @@ and tested with .Bl -tag -width ".Dv UDPLITE_SEND_CSCOV" .It Dv UDPLITE_SEND_CSCOV This option sets the sender checksum coverage. -A value of zero indicates that the entire packet -is covered by the checksum. -A value of 1 to 7 must be discarded by the receiver. +A value of zero indicates that all sent packets will have +full checksum coverage. +A value of 8 to 65535 limits the checksum coverage of all sent packets +to the value given. .It Dv UDPLITE_RECV_CSCOV This option is the receiver-side analogue. -It is truly optional, i.e. not required to enable traffic -with partial checksum coverage. -Its function is that of a traffic filter: -when enabled, it instructs the kernel to drop -all packets which have a coverage less than this value. +A value of zero instructs the kernel to drop all received packets +not having full checksum coverage. +A value of 8 to 65535 instructs the kernel to drop all received +packets with a partial checksum coverage smaller than the value specified. .El .Sh ERRORS A socket operation may fail with one of the following errors returned: Modified: head/sys/netinet/udp_usrreq.c ============================================================================== --- head/sys/netinet/udp_usrreq.c Wed Oct 1 04:28:39 2014 (r272346) +++ head/sys/netinet/udp_usrreq.c Wed Oct 1 05:43:29 2014 (r272347) @@ -689,7 +689,7 @@ udp_input(struct mbuf **mp, int *offp, i struct udpcb *up; up = intoudpcb(inp); - if (up->u_rxcslen > len) { + if (up->u_rxcslen == 0 || up->u_rxcslen > len) { INP_RUNLOCK(inp); m_freem(m); return (IPPROTO_DONE); Modified: head/sys/netinet6/udp6_usrreq.c ============================================================================== --- head/sys/netinet6/udp6_usrreq.c Wed Oct 1 04:28:39 2014 (r272346) +++ head/sys/netinet6/udp6_usrreq.c Wed Oct 1 05:43:29 2014 (r272347) @@ -261,7 +261,7 @@ udp6_input(struct mbuf **mp, int *offp, if (uh_sum != 0) { UDPSTAT_INC(udps_badsum); - goto badunlocked; + /*goto badunlocked;*/ } /* @@ -481,7 +481,7 @@ udp6_input(struct mbuf **mp, int *offp, INP_RLOCK_ASSERT(inp); up = intoudpcb(inp); if (cscov_partial) { - if (up->u_rxcslen > ulen) { + if (up->u_rxcslen == 0 || up->u_rxcslen > ulen) { INP_RUNLOCK(inp); m_freem(m); return (IPPROTO_DONE); From owner-svn-src-all@FreeBSD.ORG Wed Oct 1 07:15:03 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 38015558; Wed, 1 Oct 2014 07:15:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2453A1DF; Wed, 1 Oct 2014 07:15:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s917F3Mt012077; Wed, 1 Oct 2014 07:15:03 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s917F3gG012076; Wed, 1 Oct 2014 07:15:03 GMT (envelope-from des@FreeBSD.org) Message-Id: <201410010715.s917F3gG012076@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: des set sender to des@FreeBSD.org using -f From: Dag-Erling Smørgrav Date: Wed, 1 Oct 2014 07:15:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272348 - head/lib/libpam/modules/pam_login_access X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 07:15:03 -0000 Author: des Date: Wed Oct 1 07:15:02 2014 New Revision: 272348 URL: https://svnweb.freebsd.org/changeset/base/272348 Log: Consistently cast tty and user to const char * in printf()-like contexts. Modified: head/lib/libpam/modules/pam_login_access/pam_login_access.c Modified: head/lib/libpam/modules/pam_login_access/pam_login_access.c ============================================================================== --- head/lib/libpam/modules/pam_login_access/pam_login_access.c Wed Oct 1 05:43:29 2014 (r272347) +++ head/lib/libpam/modules/pam_login_access/pam_login_access.c Wed Oct 1 07:15:02 2014 (r272348) @@ -85,20 +85,21 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int if (login_access(user, rhost) != 0) return (PAM_SUCCESS); PAM_VERBOSE_ERROR("%s is not allowed to log in from %s", - user, rhost); + (const char *)user, (const char *)rhost); } else if (tty != NULL && *(const char *)tty != '\0') { PAM_LOG("Checking login.access for user %s on tty %s", (const char *)user, (const char *)tty); if (login_access(user, tty) != 0) return (PAM_SUCCESS); PAM_VERBOSE_ERROR("%s is not allowed to log in on %s", - user, tty); + (const char *)user, (const char *)tty); } else { PAM_LOG("Checking login.access for user %s", (const char *)user); if (login_access(user, "***unknown***") != 0) return (PAM_SUCCESS); - PAM_VERBOSE_ERROR("%s is not allowed to log in", user); + PAM_VERBOSE_ERROR("%s is not allowed to log in", + (const char *)user); } return (PAM_AUTH_ERR); From owner-svn-src-all@FreeBSD.ORG Wed Oct 1 07:34:50 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 382CC9ED; Wed, 1 Oct 2014 07:34:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 244AE616; Wed, 1 Oct 2014 07:34:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s917YoBJ021296; Wed, 1 Oct 2014 07:34:50 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s917Yofc021295; Wed, 1 Oct 2014 07:34:50 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201410010734.s917Yofc021295@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 1 Oct 2014 07:34:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272349 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 07:34:50 -0000 Author: hselasky Date: Wed Oct 1 07:34:49 2014 New Revision: 272349 URL: https://svnweb.freebsd.org/changeset/base/272349 Log: Set default cycle state in case of early interrupts. MFC after: 3 days Modified: head/sys/dev/usb/controller/xhci.c Modified: head/sys/dev/usb/controller/xhci.c ============================================================================== --- head/sys/dev/usb/controller/xhci.c Wed Oct 1 07:15:02 2014 (r272348) +++ head/sys/dev/usb/controller/xhci.c Wed Oct 1 07:34:49 2014 (r272349) @@ -614,6 +614,10 @@ xhci_init(struct xhci_softc *sc, device_ sc->sc_bus.devices = sc->sc_devices; sc->sc_bus.devices_max = XHCI_MAX_DEVICES; + /* set default cycle state in case of early interrupts */ + sc->sc_event_ccs = 1; + sc->sc_command_ccs = 1; + /* setup command queue mutex and condition varible */ cv_init(&sc->sc_cmd_cv, "CMDQ"); sx_init(&sc->sc_cmd_sx, "CMDQ lock"); From owner-svn-src-all@FreeBSD.ORG Wed Oct 1 08:26:58 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 12A19B66; Wed, 1 Oct 2014 08:26:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D5786C67; Wed, 1 Oct 2014 08:26:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s918QvTr045522; Wed, 1 Oct 2014 08:26:57 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s918Qqn5045488; Wed, 1 Oct 2014 08:26:52 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201410010826.s918Qqn5045488@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 1 Oct 2014 08:26:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272350 - in head: . gnu/lib/csu gnu/lib/libgcc gnu/lib/libgcov gnu/lib/libstdc++ gnu/lib/libsupc++ gnu/usr.bin/cc gnu/usr.bin/cc/cc_tools lib/clang lib/libc/arm lib/libc/arm/gen lib/li... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 08:26:58 -0000 Author: andrew Date: Wed Oct 1 08:26:51 2014 New Revision: 272350 URL: https://svnweb.freebsd.org/changeset/base/272350 Log: Remove MK_ARM_EABI, the armeb issues have been fixed. The code to support the oabi is still in the tree, but it is expected this will be removed as developers work on surrounding code. With this commit the ARM EABI is the only supported supported ABI by FreeBSD on ARMa 32-bit processors. X-MFC after: never Relnotes: yes Differential Revision: https://reviews.freebsd.org/D876 Deleted: head/lib/libc/arm/Symbol_oabi.map Modified: head/Makefile.inc1 head/gnu/lib/csu/Makefile head/gnu/lib/libgcc/Makefile head/gnu/lib/libgcov/Makefile head/gnu/lib/libstdc++/Makefile head/gnu/lib/libsupc++/Makefile head/gnu/usr.bin/cc/Makefile.inc head/gnu/usr.bin/cc/cc_tools/Makefile head/lib/clang/clang.build.mk head/lib/libc/arm/Makefile.inc head/lib/libc/arm/gen/Makefile.inc head/lib/libc/quad/Makefile.inc head/lib/libcompiler_rt/Makefile head/lib/libstand/Makefile head/libexec/rtld-elf/Makefile head/share/mk/src.opts.mk head/sys/boot/arm/ixp425/boot2/Makefile head/sys/boot/libstand32/Makefile head/sys/conf/Makefile.arm head/sys/conf/kern.opts.mk Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Wed Oct 1 07:34:49 2014 (r272349) +++ head/Makefile.inc1 Wed Oct 1 08:26:51 2014 (r272350) @@ -336,7 +336,7 @@ XFLAGS+= -B${CROSS_BINUTILS_PREFIX} .else XFLAGS+= -B${WORLDTMP}/usr/bin .endif -.if ${TARGET} == "arm" && ${MK_ARM_EABI} != "no" +.if ${TARGET} == "arm" .if ${TARGET_ARCH:M*eb*} == "" TARGET_ABI= gnueabi .elif ${TARGET_ARCH} == "armv6hf" Modified: head/gnu/lib/csu/Makefile ============================================================================== --- head/gnu/lib/csu/Makefile Wed Oct 1 07:34:49 2014 (r272349) +++ head/gnu/lib/csu/Makefile Wed Oct 1 08:26:51 2014 (r272350) @@ -24,7 +24,7 @@ CFLAGS+= -I${GCCLIB}/include -I${GCCDIR} CRTS_CFLAGS= -DCRTSTUFFS_O -DSHARED ${PICFLAG} MKDEP= -DCRT_BEGIN -.if ${TARGET_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no" +.if ${TARGET_CPUARCH} == "arm" CFLAGS+= -DTARGET_ARM_EABI .endif Modified: head/gnu/lib/libgcc/Makefile ============================================================================== --- head/gnu/lib/libgcc/Makefile Wed Oct 1 07:34:49 2014 (r272349) +++ head/gnu/lib/libgcc/Makefile Wed Oct 1 08:26:51 2014 (r272350) @@ -15,7 +15,7 @@ MK_SSP= no .include "${.CURDIR}/../../usr.bin/cc/Makefile.tgt" -.if ${TARGET_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no" +.if ${TARGET_CPUARCH} == "arm" CFLAGS+= -DTARGET_ARM_EABI .endif @@ -56,7 +56,7 @@ LIB2FUNCS+= _fixuns${mode}si .endfor # Likewise double-word routines. -.if ${TARGET_CPUARCH} != "arm" || ${MK_ARM_EABI} == "no" +.if ${TARGET_CPUARCH} != "arm" # These are implemented in an ARM specific file but will not be filtered out .for mode in sf df xf tf LIB2FUNCS+= _fix${mode}di _fixuns${mode}di @@ -117,14 +117,10 @@ CFLAGS.clang+= -fheinous-gnu-extensions LIB1ASMSRC = lib1funcs.asm LIB1ASMFUNCS = _dvmd_tls _bb_init_func -.if ${MK_ARM_EABI} != "no" LIB2ADDEH = unwind-arm.c libunwind.S pr-support.c unwind-c.c # Some compilers generate __aeabi_ functions libgcc_s is missing DPADD+= ${LIBCOMPILER_RT} LDADD+= -lcompiler_rt -.else -LIB2FUNCS_EXTRA = floatunsidf.c floatunsisf.c -.endif .endif .if ${TARGET_CPUARCH} == mips @@ -319,7 +315,7 @@ CLEANFILES += cs-*.h option* SHLIB_MKMAP = ${GCCDIR}/mkmap-symver.awk SHLIB_MKMAP_OPTS = SHLIB_MAPFILES = ${GCCDIR}/libgcc-std.ver -.if ${TARGET_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no" +.if ${TARGET_CPUARCH} == "arm" SHLIB_MAPFILES += ${GCCDIR}/config/arm/libgcc-bpabi.ver .endif VERSION_MAP = libgcc.map Modified: head/gnu/lib/libgcov/Makefile ============================================================================== --- head/gnu/lib/libgcov/Makefile Wed Oct 1 07:34:49 2014 (r272349) +++ head/gnu/lib/libgcov/Makefile Wed Oct 1 08:26:51 2014 (r272350) @@ -17,7 +17,7 @@ CFLAGS+= -D_PTHREADS -DGTHREAD_USE_WEAK CFLAGS+= -I${.CURDIR}/../../usr.bin/cc/cc_tools \ -I${GCCLIB}/include -I${GCCDIR}/config -I${GCCDIR} -I. -.if ${TARGET_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no" +.if ${TARGET_CPUARCH} == "arm" CFLAGS+= -DTARGET_ARM_EABI .endif Modified: head/gnu/lib/libstdc++/Makefile ============================================================================== --- head/gnu/lib/libstdc++/Makefile Wed Oct 1 07:34:49 2014 (r272349) +++ head/gnu/lib/libstdc++/Makefile Wed Oct 1 08:26:51 2014 (r272350) @@ -16,9 +16,6 @@ LIB= stdc++ SHLIB_MAJOR= 6 CFLAGS+= -DIN_GLIBCPP_V3 -DHAVE_CONFIG_H -.if ${MACHINE_CPUARCH} == "arm" && ${MK_ARM_EABI} == "no" -CFLAGS+= -D_GLIBCXX_SJLJ_EXCEPTIONS=1 -.endif CFLAGS+= -I${.CURDIR} -I${SUPDIR} -I${GCCDIR} -I${SRCDIR}/include CFLAGS+= -I${GCCLIB}/include -I${SRCDIR}/include -I. CFLAGS+= -frandom-seed=RepeatabilityConsideredGood @@ -596,7 +593,7 @@ gthr-default.h: ${GCCDIR}/gthr-posix.h CLEANFILES+= ${THRHDRS} -.if ${MACHINE_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no" +.if ${MACHINE_CPUARCH} == "arm" unwind.h: ${GCCDIR}/config/arm/unwind-arm.h .else unwind.h: ${GCCDIR}/unwind-generic.h Modified: head/gnu/lib/libsupc++/Makefile ============================================================================== --- head/gnu/lib/libsupc++/Makefile Wed Oct 1 07:34:49 2014 (r272349) +++ head/gnu/lib/libsupc++/Makefile Wed Oct 1 08:26:51 2014 (r272350) @@ -22,9 +22,6 @@ SRCS+= del_op.cc del_opnt.cc del_opv.cc SRCS+= cp-demangle.c CFLAGS+= -DIN_GLIBCPP_V3 -DHAVE_CONFIG_H -.if ${MACHINE_CPUARCH} == "arm" && ${MK_ARM_EABI} == "no" -CFLAGS+= -D_GLIBCXX_SJLJ_EXCEPTIONS=1 -.endif CFLAGS+= -I${GCCLIB}/include -I${SRCDIR} -I${GCCDIR} CFLAGS+= -I${.CURDIR}/../libstdc++ -I. CFLAGS+= -frandom-seed=RepeatabilityConsideredGood @@ -35,7 +32,7 @@ HDRS= exception new typeinfo cxxabi.h ex INCS= ${HDRS:S;^;${SRCDIR}/;} INCSDIR=${INCLUDEDIR}/c++/${GCCVER} -.if ${MACHINE_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no" +.if ${MACHINE_CPUARCH} == "arm" unwind.h: ${GCCDIR}/config/arm/unwind-arm.h .else unwind.h: ${GCCDIR}/unwind-generic.h Modified: head/gnu/usr.bin/cc/Makefile.inc ============================================================================== --- head/gnu/usr.bin/cc/Makefile.inc Wed Oct 1 07:34:49 2014 (r272349) +++ head/gnu/usr.bin/cc/Makefile.inc Wed Oct 1 08:26:51 2014 (r272350) @@ -27,7 +27,7 @@ CSTD?= gnu89 CFLAGS+= -DCROSS_DIRECTORY_STRUCTURE .endif -.if ${TARGET_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no" +.if ${TARGET_CPUARCH} == "arm" CFLAGS+= -DTARGET_ARM_EABI .endif Modified: head/gnu/usr.bin/cc/cc_tools/Makefile ============================================================================== --- head/gnu/usr.bin/cc/cc_tools/Makefile Wed Oct 1 07:34:49 2014 (r272349) +++ head/gnu/usr.bin/cc/cc_tools/Makefile Wed Oct 1 08:26:51 2014 (r272350) @@ -51,10 +51,8 @@ TARGET_INC+= ${GCC_CPU}/elf.h .endif .if ${TARGET_CPUARCH} == "arm" TARGET_INC+= ${GCC_CPU}/aout.h -.if ${MK_ARM_EABI} != "no" TARGET_INC+= ${GCC_CPU}/bpabi.h .endif -.endif .if ${TARGET_ARCH} == "powerpc64" TARGET_INC+= ${GCC_CPU}/biarch64.h TARGET_INC+= ${GCC_CPU}/default64.h @@ -352,7 +350,7 @@ gthr-default.h: ${GCCDIR}/gthr-posix.h GENSRCS+= gthr-default.h -.if ${TARGET_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no" +.if ${TARGET_CPUARCH} == "arm" unwind.h: ${GCCDIR}/config/arm/unwind-arm.h .else unwind.h: ${GCCDIR}/unwind-generic.h Modified: head/lib/clang/clang.build.mk ============================================================================== --- head/lib/clang/clang.build.mk Wed Oct 1 07:34:49 2014 (r272349) +++ head/lib/clang/clang.build.mk Wed Oct 1 08:26:51 2014 (r272350) @@ -22,8 +22,7 @@ CFLAGS+= -fno-strict-aliasing TARGET_ARCH?= ${MACHINE_ARCH} BUILD_ARCH?= ${MACHINE_ARCH} -.if (${TARGET_ARCH} == "arm" || ${TARGET_ARCH} == "armv6") && \ - ${MK_ARM_EABI} != "no" +.if (${TARGET_ARCH} == "arm" || ${TARGET_ARCH} == "armv6") TARGET_ABI= gnueabi .elif ${TARGET_ARCH} == "armv6hf" TARGET_ABI= gnueabihf Modified: head/lib/libc/arm/Makefile.inc ============================================================================== --- head/lib/libc/arm/Makefile.inc Wed Oct 1 07:34:49 2014 (r272349) +++ head/lib/libc/arm/Makefile.inc Wed Oct 1 08:26:51 2014 (r272350) @@ -9,12 +9,7 @@ SOFTFLOAT_BITS=32 MDSRCS+=machdep_ldisd.c SYM_MAPS+=${LIBC_SRCTOP}/arm/Symbol.map -.if ${MK_ARM_EABI} == "no" -# This contains the symbols that were removed when moving to the ARM EABI -SYM_MAPS+=${LIBC_SRCTOP}/arm/Symbol_oabi.map -.else .include "${LIBC_SRCTOP}/arm/aeabi/Makefile.inc" -.endif .if ${MACHINE_ARCH} == "armv6hf" SYM_MAPS+=${LIBC_SRCTOP}/arm/Symbol_vfp.map Modified: head/lib/libc/arm/gen/Makefile.inc ============================================================================== --- head/lib/libc/arm/gen/Makefile.inc Wed Oct 1 07:34:49 2014 (r272349) +++ head/lib/libc/arm/gen/Makefile.inc Wed Oct 1 08:26:51 2014 (r272350) @@ -6,10 +6,6 @@ SRCS+= _ctx_start.S _setjmp.S _set_tp.c __aeabi_read_tp.S setjmp.S signalcontext.c sigsetjmp.S flt_rounds.c \ arm_initfini.c -.if ${MK_ARM_EABI} == "no" -SRCS+= divsi3.S -.endif - .if ${MACHINE_ARCH} == "armv6hf" SRCS+= fpgetmask_vfp.c fpgetround_vfp.c fpgetsticky_vfp.c fpsetmask_vfp.c \ fpsetround_vfp.c fpsetsticky_vfp.c Modified: head/lib/libc/quad/Makefile.inc ============================================================================== --- head/lib/libc/quad/Makefile.inc Wed Oct 1 07:34:49 2014 (r272349) +++ head/lib/libc/quad/Makefile.inc Wed Oct 1 08:26:51 2014 (r272350) @@ -8,7 +8,7 @@ SRCS+= cmpdi2.c divdi3.c moddi3.c qdivrem.c ucmpdi2.c udivdi3.c umoddi3.c -.elif ${LIBC_ARCH} == "arm" && ${MK_ARM_EABI} != "no" +.elif ${LIBC_ARCH} == "arm" SRCS+= adddi3.c anddi3.c floatunsdidf.c iordi3.c lshldi3.c notdi2.c \ qdivrem.c subdi3.c xordi3.c Modified: head/lib/libcompiler_rt/Makefile ============================================================================== --- head/lib/libcompiler_rt/Makefile Wed Oct 1 07:34:49 2014 (r272349) +++ head/lib/libcompiler_rt/Makefile Wed Oct 1 08:26:51 2014 (r272350) @@ -144,8 +144,7 @@ SRCF+= adddf3 \ truncdfsf2 .endif -.if ${MACHINE_CPUARCH} != "mips" && \ - (${MACHINE_CPUARCH} != "arm" || ${MK_ARM_EABI} != "no") +.if ${MACHINE_CPUARCH} != "mips" SRCF+= divsi3 \ modsi3 \ udivsi3 \ @@ -174,7 +173,7 @@ SRCS+= ${file}.c . endif .endfor -.if ${MACHINE_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no" +.if ${MACHINE_CPUARCH} == "arm" SRCS+= aeabi_idivmod.S \ aeabi_ldivmod.S \ aeabi_memcmp.S \ Modified: head/lib/libstand/Makefile ============================================================================== --- head/lib/libstand/Makefile Wed Oct 1 07:34:49 2014 (r272349) +++ head/lib/libstand/Makefile Wed Oct 1 08:26:51 2014 (r272350) @@ -64,9 +64,6 @@ SRCS+= bcmp.c bcopy.c bzero.c ffs.c memc .if ${MACHINE_CPUARCH} == "arm" .PATH: ${.CURDIR}/../libc/arm/gen -.if ${MK_ARM_EABI} == "no" -SRCS+= divsi3.S -.else # Compiler support functions .PATH: ${.CURDIR}/../../contrib/compiler-rt/lib/ # __clzsi2 and ctzsi2 for various builtin functions @@ -78,7 +75,6 @@ SRCS+= udivmoddi4.c udivmodsi4.c udivdi3 .PATH: ${.CURDIR}/../../contrib/compiler-rt/lib/arm/ SRCS+= aeabi_idivmod.S aeabi_ldivmod.S aeabi_uidivmod.S aeabi_uldivmod.S SRCS+= aeabi_memcmp.S aeabi_memcpy.S aeabi_memmove.S aeabi_memset.S -.endif .endif .if ${MACHINE_CPUARCH} == "powerpc" Modified: head/libexec/rtld-elf/Makefile ============================================================================== --- head/libexec/rtld-elf/Makefile Wed Oct 1 07:34:49 2014 (r272349) +++ head/libexec/rtld-elf/Makefile Wed Oct 1 08:26:51 2014 (r272350) @@ -46,7 +46,7 @@ LDFLAGS+= -shared -Wl,-Bsymbolic DPADD= ${LIBC_PIC} LDADD= -lc_pic -.if ${MACHINE_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no" +.if ${MACHINE_CPUARCH} == "arm" # Some of the required math functions (div & mod) are implemented in # libcompiler_rt on ARM. The library also needs to be placed first to be # correctly linked. As some of the functions are used before we have Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Wed Oct 1 07:34:49 2014 (r272349) +++ head/share/mk/src.opts.mk Wed Oct 1 08:26:51 2014 (r272350) @@ -48,7 +48,6 @@ __DEFAULT_YES_OPTIONS = \ ACPI \ AMD \ APM \ - ARM_EABI \ AT \ ATM \ AUDIT \ Modified: head/sys/boot/arm/ixp425/boot2/Makefile ============================================================================== --- head/sys/boot/arm/ixp425/boot2/Makefile Wed Oct 1 07:34:49 2014 (r272349) +++ head/sys/boot/arm/ixp425/boot2/Makefile Wed Oct 1 08:26:51 2014 (r272350) @@ -17,9 +17,7 @@ FILES=${P} SRCS=arm_init.S boot2.c ${BOOT_FLAVOR:tl}_board.c SRCS+=memchr.c memcmp.c memcpy.c memmem.c memset.c printf.c strcmp.c strcpy.c SRCS+=strlen.c ashldi3.c divsi3.S muldi3.c -.if ${MK_ARM_EABI} != "no" SRCS+=aeabi_unwind.c -.endif MAN= KERNPHYSADDR=0x180000 Modified: head/sys/boot/libstand32/Makefile ============================================================================== --- head/sys/boot/libstand32/Makefile Wed Oct 1 07:34:49 2014 (r272349) +++ head/sys/boot/libstand32/Makefile Wed Oct 1 08:26:51 2014 (r272350) @@ -67,9 +67,6 @@ SRCS+= bcmp.c bcopy.c bzero.c ffs.c memc .if ${MACHINE_CPUARCH} == "arm" .PATH: ${LIBC}/arm/gen -.if ${MK_ARM_EABI} == "no" -SRCS+= divsi3.S -.else # Compiler support functions .PATH: ${.CURDIR}/../../../contrib/compiler-rt/lib/ # __clzsi2 and ctzsi2 for various builtin functions @@ -81,7 +78,6 @@ SRCS+= udivmoddi4.c udivmodsi4.c udivdi3 .PATH: ${.CURDIR}/../../../contrib/compiler-rt/lib/arm/ SRCS+= aeabi_idivmod.S aeabi_ldivmod.S aeabi_uidivmod.S aeabi_uldivmod.S SRCS+= aeabi_memcmp.S aeabi_memcpy.S aeabi_memmove.S aeabi_memset.S -.endif .endif .if ${MACHINE_CPUARCH} == "powerpc" Modified: head/sys/conf/Makefile.arm ============================================================================== --- head/sys/conf/Makefile.arm Wed Oct 1 07:34:49 2014 (r272349) +++ head/sys/conf/Makefile.arm Wed Oct 1 08:26:51 2014 (r272350) @@ -42,11 +42,7 @@ STRIP_FLAGS = -S # We don't support gcc's thump interwork stuff, so disable it CFLAGS.gcc += -mno-thumb-interwork -.if empty(DDB_ENABLED) -.if ${MK_ARM_EABI} == "no" -CFLAGS.gcc += -mno-apcs-frame -.endif -.elif ${MK_ARM_EABI} != "no" +.if !empty(DDB_ENABLED) CFLAGS += -funwind-tables # clang requires us to tell it to emit assembly with unwind information CFLAGS.clang += -mllvm -arm-enable-ehabi Modified: head/sys/conf/kern.opts.mk ============================================================================== --- head/sys/conf/kern.opts.mk Wed Oct 1 07:34:49 2014 (r272349) +++ head/sys/conf/kern.opts.mk Wed Oct 1 08:26:51 2014 (r272350) @@ -23,7 +23,6 @@ # src tree. __DEFAULT_YES_OPTIONS = \ - ARM_EABI \ BLUETOOTH \ CDDL \ CRYPT \ From owner-svn-src-all@FreeBSD.ORG Wed Oct 1 10:26:44 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1CF354B1; Wed, 1 Oct 2014 10:26:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 089FCC93; Wed, 1 Oct 2014 10:26:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s91AQhZY002577; Wed, 1 Oct 2014 10:26:43 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s91AQh7l002576; Wed, 1 Oct 2014 10:26:43 GMT (envelope-from des@FreeBSD.org) Message-Id: <201410011026.s91AQh7l002576@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: des set sender to des@FreeBSD.org using -f From: Dag-Erling Smørgrav Date: Wed, 1 Oct 2014 10:26:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272351 - stable/10/lib/libpam/modules/pam_login_access X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 10:26:44 -0000 Author: des Date: Wed Oct 1 10:26:43 2014 New Revision: 272351 URL: https://svnweb.freebsd.org/changeset/base/272351 Log: MFH (r272280, r272281, r272348): allow use with null user and rhost PR: 83099 193927 Approved by: re (kib) Modified: stable/10/lib/libpam/modules/pam_login_access/pam_login_access.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libpam/modules/pam_login_access/pam_login_access.c ============================================================================== --- stable/10/lib/libpam/modules/pam_login_access/pam_login_access.c Wed Oct 1 08:26:51 2014 (r272350) +++ stable/10/lib/libpam/modules/pam_login_access/pam_login_access.c Wed Oct 1 10:26:43 2014 (r272351) @@ -85,17 +85,21 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int if (login_access(user, rhost) != 0) return (PAM_SUCCESS); PAM_VERBOSE_ERROR("%s is not allowed to log in from %s", - user, rhost); + (const char *)user, (const char *)rhost); } else if (tty != NULL && *(const char *)tty != '\0') { PAM_LOG("Checking login.access for user %s on tty %s", (const char *)user, (const char *)tty); if (login_access(user, tty) != 0) return (PAM_SUCCESS); PAM_VERBOSE_ERROR("%s is not allowed to log in on %s", - user, tty); + (const char *)user, (const char *)tty); } else { - PAM_VERBOSE_ERROR("PAM_RHOST or PAM_TTY required"); - return (PAM_AUTHINFO_UNAVAIL); + PAM_LOG("Checking login.access for user %s", + (const char *)user); + if (login_access(user, "***unknown***") != 0) + return (PAM_SUCCESS); + PAM_VERBOSE_ERROR("%s is not allowed to log in", + (const char *)user); } return (PAM_AUTH_ERR); From owner-svn-src-all@FreeBSD.ORG Wed Oct 1 10:29:14 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EDBCB65F; Wed, 1 Oct 2014 10:29:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D954CCB9; Wed, 1 Oct 2014 10:29:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s91ATEN3003029; Wed, 1 Oct 2014 10:29:14 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s91ATENJ003028; Wed, 1 Oct 2014 10:29:14 GMT (envelope-from des@FreeBSD.org) Message-Id: <201410011029.s91ATENJ003028@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: des set sender to des@FreeBSD.org using -f From: Dag-Erling Smørgrav Date: Wed, 1 Oct 2014 10:29:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r272352 - stable/9/lib/libpam/modules/pam_login_access X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 10:29:15 -0000 Author: des Date: Wed Oct 1 10:29:14 2014 New Revision: 272352 URL: https://svnweb.freebsd.org/changeset/base/272352 Log: MFH (r272280, r272281, r272348): allow use with null user and rhost PR: 83099 193927 Modified: stable/9/lib/libpam/modules/pam_login_access/pam_login_access.c Directory Properties: stable/9/lib/libpam/ (props changed) Modified: stable/9/lib/libpam/modules/pam_login_access/pam_login_access.c ============================================================================== --- stable/9/lib/libpam/modules/pam_login_access/pam_login_access.c Wed Oct 1 10:26:43 2014 (r272351) +++ stable/9/lib/libpam/modules/pam_login_access/pam_login_access.c Wed Oct 1 10:29:14 2014 (r272352) @@ -85,17 +85,21 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int if (login_access(user, rhost) != 0) return (PAM_SUCCESS); PAM_VERBOSE_ERROR("%s is not allowed to log in from %s", - user, rhost); + (const char *)user, (const char *)rhost); } else if (tty != NULL && *(const char *)tty != '\0') { PAM_LOG("Checking login.access for user %s on tty %s", (const char *)user, (const char *)tty); if (login_access(user, tty) != 0) return (PAM_SUCCESS); PAM_VERBOSE_ERROR("%s is not allowed to log in on %s", - user, tty); + (const char *)user, (const char *)tty); } else { - PAM_VERBOSE_ERROR("PAM_RHOST or PAM_TTY required"); - return (PAM_AUTHINFO_UNAVAIL); + PAM_LOG("Checking login.access for user %s", + (const char *)user); + if (login_access(user, "***unknown***") != 0) + return (PAM_SUCCESS); + PAM_VERBOSE_ERROR("%s is not allowed to log in", + (const char *)user); } return (PAM_AUTH_ERR); From owner-svn-src-all@FreeBSD.ORG Wed Oct 1 10:35:52 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DBF098A9; Wed, 1 Oct 2014 10:35:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C79E2D86; Wed, 1 Oct 2014 10:35:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s91AZqQK007566; Wed, 1 Oct 2014 10:35:52 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s91AZqEJ007565; Wed, 1 Oct 2014 10:35:52 GMT (envelope-from des@FreeBSD.org) Message-Id: <201410011035.s91AZqEJ007565@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: des set sender to des@FreeBSD.org using -f From: Dag-Erling Smørgrav Date: Wed, 1 Oct 2014 10:35:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r272353 - stable/8/lib/libpam/modules/pam_login_access X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 10:35:53 -0000 Author: des Date: Wed Oct 1 10:35:52 2014 New Revision: 272353 URL: https://svnweb.freebsd.org/changeset/base/272353 Log: MFH (r272280, r272281, r272348): allow use with null user and rhost PR: 83099 193927 Modified: stable/8/lib/libpam/modules/pam_login_access/pam_login_access.c Directory Properties: stable/8/lib/libpam/ (props changed) Modified: stable/8/lib/libpam/modules/pam_login_access/pam_login_access.c ============================================================================== --- stable/8/lib/libpam/modules/pam_login_access/pam_login_access.c Wed Oct 1 10:29:14 2014 (r272352) +++ stable/8/lib/libpam/modules/pam_login_access/pam_login_access.c Wed Oct 1 10:35:52 2014 (r272353) @@ -85,17 +85,21 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int if (login_access(user, rhost) != 0) return (PAM_SUCCESS); PAM_VERBOSE_ERROR("%s is not allowed to log in from %s", - user, rhost); + (const char *)user, (const char *)rhost); } else if (tty != NULL && *(const char *)tty != '\0') { PAM_LOG("Checking login.access for user %s on tty %s", (const char *)user, (const char *)tty); if (login_access(user, tty) != 0) return (PAM_SUCCESS); PAM_VERBOSE_ERROR("%s is not allowed to log in on %s", - user, tty); + (const char *)user, (const char *)tty); } else { - PAM_VERBOSE_ERROR("PAM_RHOST or PAM_TTY required"); - return (PAM_AUTHINFO_UNAVAIL); + PAM_LOG("Checking login.access for user %s", + (const char *)user); + if (login_access(user, "***unknown***") != 0) + return (PAM_SUCCESS); + PAM_VERBOSE_ERROR("%s is not allowed to log in", + (const char *)user); } return (PAM_AUTH_ERR); From owner-svn-src-all@FreeBSD.ORG Wed Oct 1 11:23:56 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F2012B15; Wed, 1 Oct 2014 11:23:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DBC1C391; Wed, 1 Oct 2014 11:23:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s91BNtcT030975; Wed, 1 Oct 2014 11:23:55 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s91BNtbB030974; Wed, 1 Oct 2014 11:23:55 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201410011123.s91BNtbB030974@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 1 Oct 2014 11:23:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272354 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 11:23:56 -0000 Author: glebius Date: Wed Oct 1 11:23:54 2014 New Revision: 272354 URL: https://svnweb.freebsd.org/changeset/base/272354 Log: Fix off by one in lagg_port_destroy(). Reported by: "Max N. Boyarov" Modified: head/sys/net/if_lagg.c Modified: head/sys/net/if_lagg.c ============================================================================== --- head/sys/net/if_lagg.c Wed Oct 1 10:35:52 2014 (r272353) +++ head/sys/net/if_lagg.c Wed Oct 1 11:23:54 2014 (r272354) @@ -884,7 +884,7 @@ lagg_port_destroy(struct lagg_port *lp, /* Update detached port counters */ pval = lp->port_counters.val; - for (i = 0; i <= IFCOUNTERS; i++, pval++) { + for (i = 0; i < IFCOUNTERS; i++, pval++) { vdiff = ifp->if_get_counter(ifp, i) - *pval; sc->detached_counters.val[i] += vdiff; } From owner-svn-src-all@FreeBSD.ORG Wed Oct 1 11:30:21 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 88B67EB6; Wed, 1 Oct 2014 11:30:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5BCD6676; Wed, 1 Oct 2014 11:30:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s91BULkK032290; Wed, 1 Oct 2014 11:30:21 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s91BULTJ032288; Wed, 1 Oct 2014 11:30:21 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201410011130.s91BULTJ032288@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 1 Oct 2014 11:30:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272355 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 11:30:21 -0000 Author: mav Date: Wed Oct 1 11:30:20 2014 New Revision: 272355 URL: https://svnweb.freebsd.org/changeset/base/272355 Log: Fix couple issues with ROD tokens content. MFC after: 3 days Modified: head/sys/cam/ctl/ctl_tpc.c Modified: head/sys/cam/ctl/ctl_tpc.c ============================================================================== --- head/sys/cam/ctl/ctl_tpc.c Wed Oct 1 11:23:54 2014 (r272354) +++ head/sys/cam/ctl/ctl_tpc.c Wed Oct 1 11:30:20 2014 (r272355) @@ -1812,6 +1812,7 @@ tpc_create_token(struct ctl_lun *lun, st static int id = 0; struct scsi_vpd_id_descriptor *idd = NULL; struct scsi_ec_cscd_id *cscd; + struct scsi_read_capacity_data_long *dtsd; int targid_len; scsi_ulto4b(ROD_TYPE_AUR, token->type); @@ -1830,9 +1831,19 @@ tpc_create_token(struct ctl_lun *lun, st cscd->type_code = EC_CSCD_ID; cscd->luidt_pdt = T_DIRECT; memcpy(&cscd->codeset, idd, 4 + idd->length); + scsi_ulto3b(lun->be_lun->blocksize, cscd->dtsp.block_length); } - scsi_u64to8b(0, &token->body[40]); + scsi_u64to8b(0, &token->body[40]); /* XXX: Should be 128bit value. */ scsi_u64to8b(len, &token->body[48]); + + /* ROD token device type specific data (RC16 without first field) */ + dtsd = (struct scsi_read_capacity_data_long *)&token->body[88 - 8]; + scsi_ulto4b(lun->be_lun->blocksize, dtsd->length); + dtsd->prot_lbppbe = lun->be_lun->pblockexp & SRC16_LBPPBE; + scsi_ulto2b(lun->be_lun->pblockoff & SRC16_LALBA_A, dtsd->lalba_lbp); + if (lun->be_lun->flags & CTL_LUN_FLAG_UNMAP) + dtsd->lalba_lbp[0] |= SRC16_LBPME | SRC16_LBPRZ; + if (port->target_devid) { targid_len = port->target_devid->len; memcpy(&token->body[120], port->target_devid->data, targid_len); @@ -1938,6 +1949,8 @@ ctl_populate_token(struct ctl_scsiio *ct token->range = &data->desc[0]; token->nrange = scsi_2btoul(data->range_descriptor_length) / sizeof(struct scsi_range_desc); + list->cursectors = tpc_ranges_length(token->range, token->nrange); + list->curbytes = (off_t)list->cursectors * lun->be_lun->blocksize; tpc_create_token(lun, port, list->curbytes, (struct scsi_token *)token->token); token->active = 0; @@ -1954,8 +1967,6 @@ ctl_populate_token(struct ctl_scsiio *ct } memcpy(list->res_token, token->token, sizeof(list->res_token)); list->res_token_valid = 1; - list->cursectors = tpc_ranges_length(token->range, token->nrange); - list->curbytes = (off_t)list->cursectors * lun->be_lun->blocksize; list->curseg = 0; list->completed = 1; list->last_active = time_uptime; From owner-svn-src-all@FreeBSD.ORG Wed Oct 1 12:44:17 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 48E04585; Wed, 1 Oct 2014 12:44:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 29BC7EF7; Wed, 1 Oct 2014 12:44:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s91CiHEq069124; Wed, 1 Oct 2014 12:44:17 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s91CiG7O069121; Wed, 1 Oct 2014 12:44:16 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201410011244.s91CiG7O069121@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 1 Oct 2014 12:44:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272356 - in head/sys: arm/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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 12:44:17 -0000 Author: andrew Date: Wed Oct 1 12:44:16 2014 New Revision: 272356 URL: https://svnweb.freebsd.org/changeset/base/272356 Log: Split you the syscall handling to a separate file. Added: head/sys/arm/arm/syscall.c - copied, changed from r272349, head/sys/arm/arm/trap.c Modified: head/sys/arm/arm/trap.c head/sys/conf/files.arm Copied and modified: head/sys/arm/arm/syscall.c (from r272349, head/sys/arm/arm/trap.c) ============================================================================== --- head/sys/arm/arm/trap.c Wed Oct 1 07:34:49 2014 (r272349, copy source) +++ head/sys/arm/arm/syscall.c Wed Oct 1 12:44:16 2014 (r272356) @@ -79,111 +79,24 @@ */ -#include "opt_ktrace.h" - #include __FBSDID("$FreeBSD$"); #include -#include #include #include -#include #include #include #include #include #include -#include -#ifdef KTRACE -#include -#include -#endif #include #include -#include -#include -#include -#include -#include - -#include -#include -#include #include -#include -#include -#include -#include -#include - -#include - -#ifdef KDB -#include -#endif - void swi_handler(struct trapframe *); -#include -#include - -extern char fusubailout[]; - -#ifdef DEBUG -int last_fault_code; /* For the benefit of pmap_fault_fixup() */ -#endif - -struct ksig { - int signb; - u_long code; -}; -struct data_abort { - int (*func)(struct trapframe *, u_int, u_int, struct thread *, - struct ksig *); - const char *desc; -}; - -static int dab_fatal(struct trapframe *, u_int, u_int, struct thread *, - struct ksig *); -static int dab_align(struct trapframe *, u_int, u_int, struct thread *, - struct ksig *); -static int dab_buserr(struct trapframe *, u_int, u_int, struct thread *, - struct ksig *); - -static const struct data_abort data_aborts[] = { - {dab_fatal, "Vector Exception"}, - {dab_align, "Alignment Fault 1"}, - {dab_fatal, "Terminal Exception"}, - {dab_align, "Alignment Fault 3"}, - {dab_buserr, "External Linefetch Abort (S)"}, - {NULL, "Translation Fault (S)"}, -#if (ARM_MMU_V6 + ARM_MMU_V7) != 0 - {NULL, "Translation Flag Fault"}, -#else - {dab_buserr, "External Linefetch Abort (P)"}, -#endif - {NULL, "Translation Fault (P)"}, - {dab_buserr, "External Non-Linefetch Abort (S)"}, - {NULL, "Domain Fault (S)"}, - {dab_buserr, "External Non-Linefetch Abort (P)"}, - {NULL, "Domain Fault (P)"}, - {dab_buserr, "External Translation Abort (L1)"}, - {NULL, "Permission Fault (S)"}, - {dab_buserr, "External Translation Abort (L2)"}, - {NULL, "Permission Fault (P)"} -}; - -/* Determine if a fault came from user mode */ -#define TRAP_USERMODE(tf) ((tf->tf_spsr & PSR_MODE) == PSR_USR32_MODE) - -/* Determine if 'x' is a permission fault */ -#define IS_PERMISSION_FAULT(x) \ - (((1 << ((x) & FAULT_TYPE_MASK)) & \ - ((1 << FAULT_PERM_P) | (1 << FAULT_PERM_S))) != 0) - static __inline void call_trapsignal(struct thread *td, int sig, u_long code) { @@ -195,588 +108,6 @@ call_trapsignal(struct thread *td, int s trapsignal(td, &ksi); } -void -data_abort_handler(struct trapframe *tf) -{ - struct vm_map *map; - struct pcb *pcb; - struct thread *td; - u_int user, far, fsr; - vm_prot_t ftype; - void *onfault; - vm_offset_t va; - int error = 0; - struct ksig ksig; - struct proc *p; - - - /* Grab FAR/FSR before enabling interrupts */ - far = cpu_faultaddress(); - fsr = cpu_faultstatus(); -#if 0 - printf("data abort: fault address=%p (from pc=%p lr=%p)\n", - (void*)far, (void*)tf->tf_pc, (void*)tf->tf_svc_lr); -#endif - - /* Update vmmeter statistics */ -#if 0 - vmexp.traps++; -#endif - - td = curthread; - p = td->td_proc; - - PCPU_INC(cnt.v_trap); - /* Data abort came from user mode? */ - user = TRAP_USERMODE(tf); - - if (user) { - td->td_pticks = 0; - 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; - /* Re-enable interrupts if they were enabled previously */ - if (td->td_md.md_spinlock_count == 0) { - if (__predict_true(tf->tf_spsr & PSR_I) == 0) - enable_interrupts(PSR_I); - if (__predict_true(tf->tf_spsr & PSR_F) == 0) - enable_interrupts(PSR_F); - } - - - /* Invoke the appropriate handler, if necessary */ - if (__predict_false(data_aborts[fsr & FAULT_TYPE_MASK].func != NULL)) { - if ((data_aborts[fsr & FAULT_TYPE_MASK].func)(tf, fsr, far, - td, &ksig)) { - goto do_trapsignal; - } - goto out; - } - - /* - * At this point, we're dealing with one of the following data aborts: - * - * FAULT_TRANS_S - Translation -- Section - * FAULT_TRANS_P - Translation -- Page - * FAULT_DOMAIN_S - Domain -- Section - * FAULT_DOMAIN_P - Domain -- Page - * FAULT_PERM_S - Permission -- Section - * FAULT_PERM_P - Permission -- Page - * - * These are the main virtual memory-related faults signalled by - * the MMU. - */ - - /* fusubailout is used by [fs]uswintr to avoid page faulting */ - if (__predict_false(pcb->pcb_onfault == fusubailout)) { - tf->tf_r0 = EFAULT; - tf->tf_pc = (register_t)(intptr_t) pcb->pcb_onfault; - return; - } - - /* - * Make sure the Program Counter is sane. We could fall foul of - * someone executing Thumb code, in which case the PC might not - * be word-aligned. This would cause a kernel alignment fault - * further down if we have to decode the current instruction. - * XXX: It would be nice to be able to support Thumb at some point. - */ - if (__predict_false((tf->tf_pc & 3) != 0)) { - if (user) { - /* - * Give the user an illegal instruction signal. - */ - /* Deliver a SIGILL to the process */ - ksig.signb = SIGILL; - ksig.code = 0; - goto do_trapsignal; - } - - /* - * The kernel never executes Thumb code. - */ - printf("\ndata_abort_fault: Misaligned Kernel-mode " - "Program Counter\n"); - dab_fatal(tf, fsr, far, td, &ksig); - } - - va = trunc_page((vm_offset_t)far); - - /* - * It is only a kernel address space fault iff: - * 1. user == 0 and - * 2. pcb_onfault not set or - * 3. pcb_onfault set and not LDRT/LDRBT/STRT/STRBT instruction. - */ - if (user == 0 && (va >= VM_MIN_KERNEL_ADDRESS || - (va < VM_MIN_ADDRESS && vector_page == ARM_VECTORS_LOW)) && - __predict_true((pcb->pcb_onfault == NULL || - (ReadWord(tf->tf_pc) & 0x05200000) != 0x04200000))) { - map = kernel_map; - - /* Was the fault due to the FPE/IPKDB ? */ - if (__predict_false((tf->tf_spsr & PSR_MODE)==PSR_UND32_MODE)) { - - /* - * Force exit via userret() - * This is necessary as the FPE is an extension to - * userland that actually runs in a priveledged mode - * but uses USR mode permissions for its accesses. - */ - user = 1; - ksig.signb = SIGSEGV; - ksig.code = 0; - goto do_trapsignal; - } - } else { - map = &td->td_proc->p_vmspace->vm_map; - } - - /* - * We need to know whether the page should be mapped as R or R/W. On - * armv6 and later the fault status register indicates whether the - * access was a read or write. Prior to armv6, we know that a - * permission fault can only be the result of a write to a read-only - * location, so we can deal with those quickly. Otherwise we need to - * disassemble the faulting instruction to determine if it was a write. - */ -#if ARM_ARCH_6 || ARM_ARCH_7A - ftype = (fsr & FAULT_WNR) ? VM_PROT_READ | VM_PROT_WRITE : VM_PROT_READ; -#else - if (IS_PERMISSION_FAULT(fsr)) - ftype = VM_PROT_WRITE; - else { - u_int insn = ReadWord(tf->tf_pc); - - if (((insn & 0x0c100000) == 0x04000000) || /* STR/STRB */ - ((insn & 0x0e1000b0) == 0x000000b0) || /* STRH/STRD */ - ((insn & 0x0a100000) == 0x08000000)) { /* STM/CDT */ - ftype = VM_PROT_WRITE; - } else { - if ((insn & 0x0fb00ff0) == 0x01000090) /* SWP */ - ftype = VM_PROT_READ | VM_PROT_WRITE; - else - ftype = VM_PROT_READ; - } - } -#endif - - /* - * See if the fault is as a result of ref/mod emulation, - * or domain mismatch. - */ -#ifdef DEBUG - last_fault_code = fsr; -#endif - if (td->td_critnest != 0 || WITNESS_CHECK(WARN_SLEEPOK | WARN_GIANTOK, - NULL, "Kernel page fault") != 0) - goto fatal_pagefault; - - if (pmap_fault_fixup(vmspace_pmap(td->td_proc->p_vmspace), va, ftype, - user)) { - goto out; - } - - onfault = pcb->pcb_onfault; - pcb->pcb_onfault = NULL; - if (map != kernel_map) { - PROC_LOCK(p); - p->p_lock++; - PROC_UNLOCK(p); - } - error = vm_fault(map, va, ftype, VM_FAULT_NORMAL); - pcb->pcb_onfault = onfault; - - if (map != kernel_map) { - PROC_LOCK(p); - p->p_lock--; - PROC_UNLOCK(p); - } - if (__predict_true(error == 0)) - goto out; -fatal_pagefault: - if (user == 0) { - if (pcb->pcb_onfault) { - tf->tf_r0 = error; - tf->tf_pc = (register_t)(intptr_t) pcb->pcb_onfault; - return; - } - - printf("\nvm_fault(%p, %x, %x, 0) -> %x\n", map, va, ftype, - error); - dab_fatal(tf, fsr, far, td, &ksig); - } - - - if (error == ENOMEM) { - printf("VM: pid %d (%s), uid %d killed: " - "out of swap\n", td->td_proc->p_pid, td->td_name, - (td->td_proc->p_ucred) ? - td->td_proc->p_ucred->cr_uid : -1); - ksig.signb = SIGKILL; - } else { - ksig.signb = SIGSEGV; - } - ksig.code = 0; -do_trapsignal: - call_trapsignal(td, ksig.signb, ksig.code); -out: - /* If returning to user mode, make sure to invoke userret() */ - if (user) - userret(td, tf); -} - -/* - * dab_fatal() handles the following data aborts: - * - * FAULT_WRTBUF_0 - Vector Exception - * FAULT_WRTBUF_1 - Terminal Exception - * - * We should never see these on a properly functioning system. - * - * This function is also called by the other handlers if they - * detect a fatal problem. - * - * Note: If 'l' is NULL, we assume we're dealing with a prefetch abort. - */ -static int -dab_fatal(struct trapframe *tf, u_int fsr, u_int far, struct thread *td, - struct ksig *ksig) -{ - const char *mode; - - mode = TRAP_USERMODE(tf) ? "user" : "kernel"; - - disable_interrupts(PSR_I|PSR_F); - if (td != NULL) { - printf("Fatal %s mode data abort: '%s'\n", mode, - data_aborts[fsr & FAULT_TYPE_MASK].desc); - printf("trapframe: %p\nFSR=%08x, FAR=", tf, fsr); - if ((fsr & FAULT_IMPRECISE) == 0) - printf("%08x, ", far); - else - printf("Invalid, "); - printf("spsr=%08x\n", tf->tf_spsr); - } else { - printf("Fatal %s mode prefetch abort at 0x%08x\n", - mode, tf->tf_pc); - printf("trapframe: %p, spsr=%08x\n", tf, tf->tf_spsr); - } - - printf("r0 =%08x, r1 =%08x, r2 =%08x, r3 =%08x\n", - tf->tf_r0, tf->tf_r1, tf->tf_r2, tf->tf_r3); - printf("r4 =%08x, r5 =%08x, r6 =%08x, r7 =%08x\n", - tf->tf_r4, tf->tf_r5, tf->tf_r6, tf->tf_r7); - printf("r8 =%08x, r9 =%08x, r10=%08x, r11=%08x\n", - tf->tf_r8, tf->tf_r9, tf->tf_r10, tf->tf_r11); - printf("r12=%08x, ", tf->tf_r12); - - if (TRAP_USERMODE(tf)) - printf("usp=%08x, ulr=%08x", - tf->tf_usr_sp, tf->tf_usr_lr); - else - printf("ssp=%08x, slr=%08x", - tf->tf_svc_sp, tf->tf_svc_lr); - printf(", pc =%08x\n\n", tf->tf_pc); - -#ifdef KDB - if (debugger_on_panic || kdb_active) - if (kdb_trap(fsr, 0, tf)) - return (0); -#endif - panic("Fatal abort"); - /*NOTREACHED*/ -} - -/* - * dab_align() handles the following data aborts: - * - * FAULT_ALIGN_0 - Alignment fault - * FAULT_ALIGN_1 - Alignment fault - * - * These faults are fatal if they happen in kernel mode. Otherwise, we - * deliver a bus error to the process. - */ -static int -dab_align(struct trapframe *tf, u_int fsr, u_int far, struct thread *td, - struct ksig *ksig) -{ - - /* Alignment faults are always fatal if they occur in kernel mode */ - if (!TRAP_USERMODE(tf)) { - if (!td || !td->td_pcb->pcb_onfault) - dab_fatal(tf, fsr, far, td, ksig); - tf->tf_r0 = EFAULT; - tf->tf_pc = (int)td->td_pcb->pcb_onfault; - return (0); - } - - /* pcb_onfault *must* be NULL at this point */ - - /* Deliver a bus error signal to the process */ - ksig->code = 0; - ksig->signb = SIGBUS; - td->td_frame = tf; - - return (1); -} - -/* - * dab_buserr() handles the following data aborts: - * - * FAULT_BUSERR_0 - External Abort on Linefetch -- Section - * FAULT_BUSERR_1 - External Abort on Linefetch -- Page - * FAULT_BUSERR_2 - External Abort on Non-linefetch -- Section - * FAULT_BUSERR_3 - External Abort on Non-linefetch -- Page - * FAULT_BUSTRNL1 - External abort on Translation -- Level 1 - * FAULT_BUSTRNL2 - External abort on Translation -- Level 2 - * - * If pcb_onfault is set, flag the fault and return to the handler. - * If the fault occurred in user mode, give the process a SIGBUS. - * - * Note: On XScale, FAULT_BUSERR_0, FAULT_BUSERR_1, and FAULT_BUSERR_2 - * can be flagged as imprecise in the FSR. This causes a real headache - * since some of the machine state is lost. In this case, tf->tf_pc - * may not actually point to the offending instruction. In fact, if - * we've taken a double abort fault, it generally points somewhere near - * the top of "data_abort_entry" in exception.S. - * - * In all other cases, these data aborts are considered fatal. - */ -static int -dab_buserr(struct trapframe *tf, u_int fsr, u_int far, struct thread *td, - struct ksig *ksig) -{ - struct pcb *pcb = td->td_pcb; - -#ifdef __XSCALE__ - if ((fsr & FAULT_IMPRECISE) != 0 && - (tf->tf_spsr & PSR_MODE) == PSR_ABT32_MODE) { - /* - * Oops, an imprecise, double abort fault. We've lost the - * r14_abt/spsr_abt values corresponding to the original - * abort, and the spsr saved in the trapframe indicates - * ABT mode. - */ - tf->tf_spsr &= ~PSR_MODE; - - /* - * We use a simple heuristic to determine if the double abort - * happened as a result of a kernel or user mode access. - * If the current trapframe is at the top of the kernel stack, - * the fault _must_ have come from user mode. - */ - if (tf != ((struct trapframe *)pcb->un_32.pcb32_sp) - 1) { - /* - * Kernel mode. We're either about to die a - * spectacular death, or pcb_onfault will come - * to our rescue. Either way, the current value - * of tf->tf_pc is irrelevant. - */ - tf->tf_spsr |= PSR_SVC32_MODE; - if (pcb->pcb_onfault == NULL) - printf("\nKernel mode double abort!\n"); - } else { - /* - * User mode. We've lost the program counter at the - * time of the fault (not that it was accurate anyway; - * it's not called an imprecise fault for nothing). - * About all we can do is copy r14_usr to tf_pc and - * hope for the best. The process is about to get a - * SIGBUS, so it's probably history anyway. - */ - tf->tf_spsr |= PSR_USR32_MODE; - tf->tf_pc = tf->tf_usr_lr; - } - } - - /* FAR is invalid for imprecise exceptions */ - if ((fsr & FAULT_IMPRECISE) != 0) - far = 0; -#endif /* __XSCALE__ */ - - if (pcb->pcb_onfault) { - tf->tf_r0 = EFAULT; - tf->tf_pc = (register_t)(intptr_t) pcb->pcb_onfault; - return (0); - } - - /* - * At this point, if the fault happened in kernel mode, we're toast - */ - if (!TRAP_USERMODE(tf)) - dab_fatal(tf, fsr, far, td, ksig); - - /* Deliver a bus error signal to the process */ - ksig->signb = SIGBUS; - ksig->code = 0; - td->td_frame = tf; - - return (1); -} - -/* - * void prefetch_abort_handler(struct trapframe *tf) - * - * Abort handler called when instruction execution occurs at - * a non existent or restricted (access permissions) memory page. - * If the address is invalid and we were in SVC mode then panic as - * the kernel should never prefetch abort. - * If the address is invalid and the page is mapped then the user process - * does no have read permission so send it a signal. - * Otherwise fault the page in and try again. - */ -void -prefetch_abort_handler(struct trapframe *tf) -{ - struct thread *td; - struct proc * p; - struct vm_map *map; - vm_offset_t fault_pc, va; - int error = 0; - struct ksig ksig; - - -#if 0 - /* Update vmmeter statistics */ - uvmexp.traps++; -#endif -#if 0 - 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); - - if (TRAP_USERMODE(tf)) { - td->td_frame = tf; - if (td->td_ucred != td->td_proc->p_ucred) - cred_update_thread(td); - } - fault_pc = tf->tf_pc; - if (td->td_md.md_spinlock_count == 0) { - if (__predict_true(tf->tf_spsr & PSR_I) == 0) - enable_interrupts(PSR_I); - if (__predict_true(tf->tf_spsr & PSR_F) == 0) - enable_interrupts(PSR_F); - } - - /* Prefetch aborts cannot happen in kernel mode */ - if (__predict_false(!TRAP_USERMODE(tf))) - dab_fatal(tf, 0, tf->tf_pc, NULL, &ksig); - td->td_pticks = 0; - - - /* Ok validate the address, can only execute in USER space */ - if (__predict_false(fault_pc >= VM_MAXUSER_ADDRESS || - (fault_pc < VM_MIN_ADDRESS && vector_page == ARM_VECTORS_LOW))) { - ksig.signb = SIGSEGV; - ksig.code = 0; - goto do_trapsignal; - } - - map = &td->td_proc->p_vmspace->vm_map; - va = trunc_page(fault_pc); - - /* - * See if the pmap can handle this fault on its own... - */ -#ifdef DEBUG - last_fault_code = -1; -#endif - if (pmap_fault_fixup(map->pmap, va, VM_PROT_READ, 1)) - goto out; - - if (map != kernel_map) { - PROC_LOCK(p); - p->p_lock++; - PROC_UNLOCK(p); - } - - error = vm_fault(map, va, VM_PROT_READ | VM_PROT_EXECUTE, - VM_FAULT_NORMAL); - if (map != kernel_map) { - PROC_LOCK(p); - p->p_lock--; - PROC_UNLOCK(p); - } - - if (__predict_true(error == 0)) - goto out; - - if (error == ENOMEM) { - printf("VM: pid %d (%s), uid %d killed: " - "out of swap\n", td->td_proc->p_pid, td->td_name, - (td->td_proc->p_ucred) ? - td->td_proc->p_ucred->cr_uid : -1); - ksig.signb = SIGKILL; - } else { - ksig.signb = SIGSEGV; - } - ksig.code = 0; - -do_trapsignal: - call_trapsignal(td, ksig.signb, ksig.code); - -out: - userret(td, tf); - -} - -extern int badaddr_read_1(const uint8_t *, uint8_t *); -extern int badaddr_read_2(const uint16_t *, uint16_t *); -extern int badaddr_read_4(const uint32_t *, uint32_t *); -/* - * Tentatively read an 8, 16, or 32-bit value from 'addr'. - * If the read succeeds, the value is written to 'rptr' and zero is returned. - * Else, return EFAULT. - */ -int -badaddr_read(void *addr, size_t size, void *rptr) -{ - union { - uint8_t v1; - uint16_t v2; - uint32_t v4; - } u; - int rv; - - cpu_drain_writebuf(); - - /* Read from the test address. */ - switch (size) { - case sizeof(uint8_t): - rv = badaddr_read_1(addr, &u.v1); - if (rv == 0 && rptr) - *(uint8_t *) rptr = u.v1; - break; - - case sizeof(uint16_t): - rv = badaddr_read_2(addr, &u.v2); - if (rv == 0 && rptr) - *(uint16_t *) rptr = u.v2; - break; - - case sizeof(uint32_t): - rv = badaddr_read_4(addr, &u.v4); - if (rv == 0 && rptr) - *(uint32_t *) rptr = u.v4; - break; - - default: - panic("badaddr: invalid size (%lu)", (u_long) size); - } - - /* Return EFAULT if the address was invalid, else zero */ - return (rv); -} - int cpu_fetch_syscall_args(struct thread *td, struct syscall_args *sa) { @@ -784,11 +115,7 @@ cpu_fetch_syscall_args(struct thread *td register_t *ap; int error; -#ifdef __ARM_EABI__ sa->code = td->td_frame->tf_r7; -#else - sa->code = sa->insn & 0x000fffff; -#endif ap = &td->td_frame->tf_r0; if (sa->code == SYS_syscall) { sa->code = *ap++; @@ -827,17 +154,6 @@ syscall(struct thread *td, struct trapfr struct syscall_args sa; int error; -#ifndef __ARM_EABI__ - sa.insn = *(uint32_t *)(frame->tf_pc - INSN_SIZE); - switch (sa.insn & SWI_OS_MASK) { - case 0: /* XXX: we need our own one. */ - break; - default: - call_trapsignal(td, SIGILL, 0); - userret(td, frame); - return; - } -#endif sa.nap = 4; error = syscallenter(td, &sa); @@ -855,8 +171,9 @@ swi_handler(struct trapframe *frame) td->td_pticks = 0; /* - * Make sure the program counter is correctly aligned so we + * Make sure the program counter is correctly aligned so we * don't take an alignment fault trying to read the opcode. + * XXX: Fix for Thumb mode */ if (__predict_false(((frame->tf_pc - INSN_SIZE) & 3) != 0)) { call_trapsignal(td, SIGILL, 0); @@ -877,4 +194,3 @@ swi_handler(struct trapframe *frame) syscall(td, frame); } - Modified: head/sys/arm/arm/trap.c ============================================================================== --- head/sys/arm/arm/trap.c Wed Oct 1 11:30:20 2014 (r272355) +++ head/sys/arm/arm/trap.c Wed Oct 1 12:44:16 2014 (r272356) @@ -79,28 +79,15 @@ */ -#include "opt_ktrace.h" - #include __FBSDID("$FreeBSD$"); #include -#include #include #include -#include #include #include -#include -#include #include -#include -#ifdef KTRACE -#include -#include -#endif -#include -#include #include #include @@ -108,28 +95,16 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include -#include -#include #include -#include +#include +#include #include -#include -#include - -#include +#include #ifdef KDB #include #endif - -void swi_handler(struct trapframe *); - -#include -#include - extern char fusubailout[]; #ifdef DEBUG @@ -775,106 +750,4 @@ badaddr_read(void *addr, size_t size, vo /* Return EFAULT if the address was invalid, else zero */ return (rv); -} - -int -cpu_fetch_syscall_args(struct thread *td, struct syscall_args *sa) -{ - struct proc *p; - register_t *ap; - int error; - -#ifdef __ARM_EABI__ - sa->code = td->td_frame->tf_r7; -#else - sa->code = sa->insn & 0x000fffff; -#endif - ap = &td->td_frame->tf_r0; - if (sa->code == SYS_syscall) { - sa->code = *ap++; - sa->nap--; - } else if (sa->code == SYS___syscall) { - sa->code = ap[_QUAD_LOWWORD]; - sa->nap -= 2; - ap += 2; - } - p = td->td_proc; - if (p->p_sysent->sv_mask) - sa->code &= p->p_sysent->sv_mask; - if (sa->code >= p->p_sysent->sv_size) - sa->callp = &p->p_sysent->sv_table[0]; - else - sa->callp = &p->p_sysent->sv_table[sa->code]; - sa->narg = sa->callp->sy_narg; - error = 0; - memcpy(sa->args, ap, sa->nap * sizeof(register_t)); - if (sa->narg > sa->nap) { - error = copyin((void *)td->td_frame->tf_usr_sp, sa->args + - sa->nap, (sa->narg - sa->nap) * sizeof(register_t)); - } - if (error == 0) { - td->td_retval[0] = 0; - td->td_retval[1] = 0; - } - return (error); -} - -#include "../../kern/subr_syscall.c" - -static void -syscall(struct thread *td, struct trapframe *frame) -{ - struct syscall_args sa; - int error; - -#ifndef __ARM_EABI__ - sa.insn = *(uint32_t *)(frame->tf_pc - INSN_SIZE); - switch (sa.insn & SWI_OS_MASK) { - case 0: /* XXX: we need our own one. */ - break; - default: - call_trapsignal(td, SIGILL, 0); - userret(td, frame); - return; - } -#endif - sa.nap = 4; - - error = syscallenter(td, &sa); - KASSERT(error != 0 || td->td_ar == NULL, - ("returning from syscall with td_ar set!")); - syscallret(td, error, &sa); -} - -void -swi_handler(struct trapframe *frame) -{ - struct thread *td = curthread; - - td->td_frame = frame; - - td->td_pticks = 0; - /* - * Make sure the program counter is correctly aligned so we - * don't take an alignment fault trying to read the opcode. - */ - if (__predict_false(((frame->tf_pc - INSN_SIZE) & 3) != 0)) { - call_trapsignal(td, SIGILL, 0); - userret(td, frame); - return; - } - /* - * Enable interrupts if they were enabled before the exception. - * Since all syscalls *should* come from user mode it will always - * be safe to enable them, but check anyway. - */ - if (td->td_md.md_spinlock_count == 0) { - if (__predict_true(frame->tf_spsr & PSR_I) == 0) - enable_interrupts(PSR_I); - if (__predict_true(frame->tf_spsr & PSR_F) == 0) - enable_interrupts(PSR_F); - } - - syscall(td, frame); -} - +} \ No newline at end of file Modified: head/sys/conf/files.arm ============================================================================== --- head/sys/conf/files.arm Wed Oct 1 11:30:20 2014 (r272355) +++ head/sys/conf/files.arm Wed Oct 1 12:44:16 2014 (r272356) @@ -49,6 +49,7 @@ arm/arm/stdatomic.c standard \ arm/arm/support.S standard arm/arm/swtch.S standard arm/arm/sys_machdep.c standard +arm/arm/syscall.c standard arm/arm/trap.c standard arm/arm/uio_machdep.c standard arm/arm/undefined.c standard From owner-svn-src-all@FreeBSD.ORG Wed Oct 1 12:47:27 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F164F89B; Wed, 1 Oct 2014 12:47:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DE4F2F51; Wed, 1 Oct 2014 12:47:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s91ClQMm069645; Wed, 1 Oct 2014 12:47:26 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s91ClQqd069643; Wed, 1 Oct 2014 12:47:26 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201410011247.s91ClQqd069643@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 1 Oct 2014 12:47:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272357 - in head: . lib/clang X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 12:47:27 -0000 Author: andrew Date: Wed Oct 1 12:47:25 2014 New Revision: 272357 URL: https://svnweb.freebsd.org/changeset/base/272357 Log: Fix the TARGET_ABI value clang uses. It shpuld be gnueabi on all ARM soft-float architectures, and gnueabihf for hard-float. Modified: head/Makefile.inc1 head/lib/clang/clang.build.mk Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Wed Oct 1 12:44:16 2014 (r272356) +++ head/Makefile.inc1 Wed Oct 1 12:47:25 2014 (r272357) @@ -337,10 +337,10 @@ XFLAGS+= -B${CROSS_BINUTILS_PREFIX} XFLAGS+= -B${WORLDTMP}/usr/bin .endif .if ${TARGET} == "arm" -.if ${TARGET_ARCH:M*eb*} == "" -TARGET_ABI= gnueabi -.elif ${TARGET_ARCH} == "armv6hf" +.if ${TARGET_ARCH:M*hf*} != "" TARGET_ABI= gnueabihf +.else +TARGET_ABI= gnueabi .endif .endif TARGET_ABI?= unknown Modified: head/lib/clang/clang.build.mk ============================================================================== --- head/lib/clang/clang.build.mk Wed Oct 1 12:44:16 2014 (r272356) +++ head/lib/clang/clang.build.mk Wed Oct 1 12:47:25 2014 (r272357) @@ -22,10 +22,10 @@ CFLAGS+= -fno-strict-aliasing TARGET_ARCH?= ${MACHINE_ARCH} BUILD_ARCH?= ${MACHINE_ARCH} -.if (${TARGET_ARCH} == "arm" || ${TARGET_ARCH} == "armv6") -TARGET_ABI= gnueabi -.elif ${TARGET_ARCH} == "armv6hf" +.if ${TARGET_ARCH:Marm*hf*} != "" TARGET_ABI= gnueabihf +.elif ${TARGET_ARCH:Marm*} != "" +TARGET_ABI= gnueabi .else TARGET_ABI= unknown .endif From owner-svn-src-all@FreeBSD.ORG Wed Oct 1 13:35:42 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3741B65E; Wed, 1 Oct 2014 13:35:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 241937CB; Wed, 1 Oct 2014 13:35:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s91DZgVf093691; Wed, 1 Oct 2014 13:35:42 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s91DZgtV093690; Wed, 1 Oct 2014 13:35:42 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201410011335.s91DZgtV093690@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 1 Oct 2014 13:35:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272358 - head/sys/netpfil/pf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 13:35:42 -0000 Author: glebius Date: Wed Oct 1 13:35:41 2014 New Revision: 272358 URL: https://svnweb.freebsd.org/changeset/base/272358 Log: Use rn_detachhead() instead of direct free(9) for radix tables. Sponsored by: Nginx, Inc. Modified: head/sys/netpfil/pf/pf_table.c Modified: head/sys/netpfil/pf/pf_table.c ============================================================================== --- head/sys/netpfil/pf/pf_table.c Wed Oct 1 12:47:25 2014 (r272357) +++ head/sys/netpfil/pf/pf_table.c Wed Oct 1 13:35:41 2014 (r272358) @@ -1855,11 +1855,11 @@ pfr_destroy_ktable(struct pfr_ktable *kt } if (kt->pfrkt_ip4 != NULL) { RADIX_NODE_HEAD_DESTROY(kt->pfrkt_ip4); - free((caddr_t)kt->pfrkt_ip4, M_RTABLE); + rn_detachhead((void **)&kt->pfrkt_ip4); } if (kt->pfrkt_ip6 != NULL) { RADIX_NODE_HEAD_DESTROY(kt->pfrkt_ip6); - free((caddr_t)kt->pfrkt_ip6, M_RTABLE); + rn_detachhead((void **)&kt->pfrkt_ip6); } if (kt->pfrkt_shadow != NULL) pfr_destroy_ktable(kt->pfrkt_shadow, flushaddr); From owner-svn-src-all@FreeBSD.ORG Wed Oct 1 14:12:03 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 188045FA; Wed, 1 Oct 2014 14:12:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E02E6C86; Wed, 1 Oct 2014 14:12:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s91EC2ja012228; Wed, 1 Oct 2014 14:12:02 GMT (envelope-from will@FreeBSD.org) Received: (from will@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s91EC2Xu012227; Wed, 1 Oct 2014 14:12:02 GMT (envelope-from will@FreeBSD.org) Message-Id: <201410011412.s91EC2Xu012227@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: will set sender to will@FreeBSD.org using -f From: Will Andrews Date: Wed, 1 Oct 2014 14:12:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272359 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 14:12:03 -0000 Author: will Date: Wed Oct 1 14:12:02 2014 New Revision: 272359 URL: https://svnweb.freebsd.org/changeset/base/272359 Log: zfsvfs_create(): Refuse to mount datasets whose names are too long. This is checked for in the zfs_snapshot_004_neg STF/ATF test (currently still in projects/zfsd rather than head). sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c: - zfsvfs_create(): Check whether the objset name fits into statfs.f_mntfromname, and return ENAMETOOLONG if not. Although the filesystem can be unmounted via the umount(8) command, any interface that relies on iterating on statfs (e.g. libzfs) will fail to find the filesystem by its objset name, and thus assume it's not mounted. This causes "zfs unmount", "zfs destroy", etc. to fail on these filesystems, whether or not -f is passed. MFC after: 1 month Sponsored by: Spectra Logic MFSpectraBSD: 974872 on 2013/08/09 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Wed Oct 1 13:35:41 2014 (r272358) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Wed Oct 1 14:12:02 2014 (r272359) @@ -870,6 +870,17 @@ zfsvfs_create(const char *osname, zfsvfs int i, error; uint64_t sa_obj; + /* + * XXX: Fix struct statfs so this isn't necessary! + * + * The 'osname' is used as the filesystem's special node, which means + * it must fit in statfs.f_mntfromname, or else it can't be + * enumerated, so libzfs_mnttab_find() returns NULL, which causes + * 'zfs unmount' to think it's not mounted when it is. + */ + if (strlen(osname) >= MNAMELEN) + return (SET_ERROR(ENAMETOOLONG)); + zfsvfs = kmem_zalloc(sizeof (zfsvfs_t), KM_SLEEP); /* From owner-svn-src-all@FreeBSD.ORG Wed Oct 1 14:20:18 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F2B91959; Wed, 1 Oct 2014 14:20:17 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 73D8CD0F; Wed, 1 Oct 2014 14:20:17 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id s91EKFm3081988 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 1 Oct 2014 18:20:15 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id s91EKFeV081987; Wed, 1 Oct 2014 18:20:15 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 1 Oct 2014 18:20:15 +0400 From: Gleb Smirnoff To: Michael Tuexen Subject: Re: svn commit: r272326 - head/sys/netinet Message-ID: <20141001142015.GO73266@FreeBSD.org> References: <201409302029.s8UKTx0e098653@svn.freebsd.org> <4A8FE3A2-B085-4EBC-8E3E-F5A91129EEDE@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4A8FE3A2-B085-4EBC-8E3E-F5A91129EEDE@freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: "svn-src-head@freebsd.org" , Adrian Chadd , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 14:20:18 -0000 On Tue, Sep 30, 2014 at 11:03:56PM +0200, Michael Tuexen wrote: M> On 30 Sep 2014, at 22:47, Adrian Chadd wrote: M> M> > Hi, M> > M> > I think you should consider adding a new set of protocol counters for M> > UDPLITE. :) M> Yepp. There is M> http://tools.ietf.org/html/rfc5097 M> which needs to be implemented. For now, imho accounting it as UDPSTAT_INC(udps_nosum) would be better than dropping it into the void. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Wed Oct 1 14:35:52 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E2E6DE0D; Wed, 1 Oct 2014 14:35:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CF984F1E; Wed, 1 Oct 2014 14:35:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s91EZqGV022180; Wed, 1 Oct 2014 14:35:52 GMT (envelope-from will@FreeBSD.org) Received: (from will@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s91EZq11022179; Wed, 1 Oct 2014 14:35:52 GMT (envelope-from will@FreeBSD.org) Message-Id: <201410011435.s91EZq11022179@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: will set sender to will@FreeBSD.org using -f From: Will Andrews Date: Wed, 1 Oct 2014 14:35:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272360 - head/sys/dev/acpica/Osd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 14:35:53 -0000 Author: will Date: Wed Oct 1 14:35:52 2014 New Revision: 272360 URL: https://svnweb.freebsd.org/changeset/base/272360 Log: Add sysctl to track the resource consumption of ACPI interrupts. Submitted by: gibbs MFC after: 1 month Sponsored by: Spectra Logic MFSpectraBSD: 636827 on 2012/09/28 Modified: head/sys/dev/acpica/Osd/OsdSchedule.c Modified: head/sys/dev/acpica/Osd/OsdSchedule.c ============================================================================== --- head/sys/dev/acpica/Osd/OsdSchedule.c Wed Oct 1 14:12:02 2014 (r272359) +++ head/sys/dev/acpica/Osd/OsdSchedule.c Wed Oct 1 14:35:52 2014 (r272360) @@ -60,6 +60,13 @@ SYSCTL_INT(_debug_acpi, OID_AUTO, max_ta 0, "Maximum acpi tasks"); /* + * Track and report the system's demand for task slots. + */ +static int acpi_tasks_hiwater; +SYSCTL_INT(_debug_acpi, OID_AUTO, tasks_hiwater, CTLFLAG_RD, + &acpi_tasks_hiwater, 1, "Peak demand for ACPI event task slots."); + +/* * Allow the user to tune the number of task threads we start. It seems * some systems have problems with increased parallelism. */ @@ -151,6 +158,10 @@ acpi_task_enqueue(int priority, ACPI_OSD acpi_task_count++; break; } + + if (i > acpi_tasks_hiwater) + atomic_cmpset_int(&acpi_tasks_hiwater, acpi_tasks_hiwater, i); + if (at == NULL) { printf("AcpiOsExecute: failed to enqueue task, consider increasing " "the debug.acpi.max_tasks tunable\n"); From owner-svn-src-all@FreeBSD.ORG Wed Oct 1 14:39:08 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2FDA812E; Wed, 1 Oct 2014 14:39:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 113F6F61; Wed, 1 Oct 2014 14:39:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s91Ed7UM022639; Wed, 1 Oct 2014 14:39:07 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s91Ed7K3022634; Wed, 1 Oct 2014 14:39:07 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201410011439.s91Ed7K3022634@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Wed, 1 Oct 2014 14:39:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272361 - in head/sys: net netinet netinet6 netpfil/pf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 14:39:08 -0000 Author: melifaro Date: Wed Oct 1 14:39:06 2014 New Revision: 272361 URL: https://svnweb.freebsd.org/changeset/base/272361 Log: Remove lock init from radix.c. Radix has never managed its locking itself. The only consumer using radix with embeded rwlock is system routing table. Move per-AF lock inits there. Modified: head/sys/net/radix.c head/sys/netinet/in_rmx.c head/sys/netinet6/in6_rmx.c head/sys/netpfil/pf/pf_table.c Modified: head/sys/net/radix.c ============================================================================== --- head/sys/net/radix.c Wed Oct 1 14:35:52 2014 (r272360) +++ head/sys/net/radix.c Wed Oct 1 14:39:06 2014 (r272361) @@ -1122,9 +1122,6 @@ rn_inithead_internal(void **head, int of R_Zalloc(rnh, struct radix_node_head *, sizeof (*rnh)); if (rnh == 0) return (0); -#ifdef _KERNEL - RADIX_NODE_HEAD_LOCK_INIT(rnh); -#endif *head = rnh; t = rn_newpair(rn_zeros, off, rnh->rnh_nodes); ttt = rnh->rnh_nodes + 2; Modified: head/sys/netinet/in_rmx.c ============================================================================== --- head/sys/netinet/in_rmx.c Wed Oct 1 14:35:52 2014 (r272360) +++ head/sys/netinet/in_rmx.c Wed Oct 1 14:39:06 2014 (r272361) @@ -352,10 +352,12 @@ in_inithead(void **head, int off) if (!rn_inithead(head, 32)) return 0; + rnh = *head; + RADIX_NODE_HEAD_LOCK_INIT(rnh); + if (off == 0) /* XXX MRT see above */ return 1; /* only do the rest for a real routing table */ - rnh = *head; rnh->rnh_addaddr = in_addroute; in_setmatchfunc(rnh, V_drop_redirect); rnh->rnh_close = in_clsroute; Modified: head/sys/netinet6/in6_rmx.c ============================================================================== --- head/sys/netinet6/in6_rmx.c Wed Oct 1 14:35:52 2014 (r272360) +++ head/sys/netinet6/in6_rmx.c Wed Oct 1 14:39:06 2014 (r272361) @@ -270,10 +270,12 @@ in6_inithead(void **head, int off) if (!rn_inithead(head, offsetof(struct sockaddr_in6, sin6_addr) << 3)) return 0; /* See above */ + rnh = *head; + RADIX_NODE_HEAD_LOCK_INIT(rnh); + if (off == 0) /* See above */ return 1; /* only do the rest for the real thing */ - rnh = *head; rnh->rnh_addaddr = in6_addroute; if (V__in6_rt_was_here == 0) { Modified: head/sys/netpfil/pf/pf_table.c ============================================================================== --- head/sys/netpfil/pf/pf_table.c Wed Oct 1 14:35:52 2014 (r272360) +++ head/sys/netpfil/pf/pf_table.c Wed Oct 1 14:39:06 2014 (r272361) @@ -1853,14 +1853,10 @@ pfr_destroy_ktable(struct pfr_ktable *kt pfr_clean_node_mask(kt, &addrq); pfr_destroy_kentries(&addrq); } - if (kt->pfrkt_ip4 != NULL) { - RADIX_NODE_HEAD_DESTROY(kt->pfrkt_ip4); + if (kt->pfrkt_ip4 != NULL) rn_detachhead((void **)&kt->pfrkt_ip4); - } - if (kt->pfrkt_ip6 != NULL) { - RADIX_NODE_HEAD_DESTROY(kt->pfrkt_ip6); + if (kt->pfrkt_ip6 != NULL) rn_detachhead((void **)&kt->pfrkt_ip6); - } if (kt->pfrkt_shadow != NULL) pfr_destroy_ktable(kt->pfrkt_shadow, flushaddr); if (kt->pfrkt_rs != NULL) { From owner-svn-src-all@FreeBSD.ORG Wed Oct 1 14:52:30 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EC80E782; Wed, 1 Oct 2014 14:52:29 +0000 (UTC) Received: from winston.madpilot.net (winston.madpilot.net [78.47.75.155]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 357BD1CA; Wed, 1 Oct 2014 14:52:29 +0000 (UTC) Received: from winston.madpilot.net (localhost [127.0.0.1]) by winston.madpilot.net (Postfix) with ESMTP id 3j7L6253m3zFfD6; Wed, 1 Oct 2014 16:52:10 +0200 (CEST) Received: from winston.madpilot.net ([127.0.0.1]) by winston.madpilot.net (winston.madpilot.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BNxBuui9knYF; Wed, 1 Oct 2014 16:51:40 +0200 (CEST) Received: from marvin.madpilot.net (micro.madpilot.net [88.149.173.206]) by winston.madpilot.net (Postfix) with ESMTPSA; Wed, 1 Oct 2014 16:51:35 +0200 (CEST) Message-ID: <542C14F6.7020506@FreeBSD.org> Date: Wed, 01 Oct 2014 16:51:34 +0200 From: Guido Falsi User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 MIME-Version: 1.0 To: Will Andrews , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r272282 - head/share/mk References: <201409291505.s8TF5Nhh066884@svn.freebsd.org> In-Reply-To: <201409291505.s8TF5Nhh066884@svn.freebsd.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: Baptiste Daroussin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 14:52:30 -0000 On 09/29/14 17:05, Will Andrews wrote: > Author: will > Date: Mon Sep 29 15:05:23 2014 > New Revision: 272282 > URL: http://svnweb.freebsd.org/changeset/base/272282 > > Log: > Search for the nearest PORTSDIR where Mk/bsd.ports.mk exists, from .CURDIR. > This will only take effect if PORTSDIR is not set, as previously supported. > > Use .if exists(), for four specific possibilities relative to .CURDIR: > ., .., ../.., and ../../.. The fourth possibility is primarily in case > ports ever grows a third level. If none of these paths exist, fall back to > the old default of /usr/ports. > > This removes the need to set PORTSDIR explicitly (or via wrapper script) if > one is running out of a ports tree that is not in /usr/ports, but in a > home directory. > > Reviewed by: bapt, bdrewery (older version) > CR: D799 > MFC after: 1 week > Sponsored by: Spectra Logic > Hi, I just refreshed my machines head r272349 and this change is creating problems to me. Maybe I've always been doing something wrong but this is what is happening: root@marvin:~ [0]# cd /usr/ports/x11/nvidia-driver root@marvin:/usr/ports/x11/nvidia-driver [0]# make -V PORTSDIR /usr/ports/x11/nvidia-driver/../.. this is problematic since now all dependencies are relative paths, this is said to be unsupported in bsd.sanity.mk, line 35 and following ones. It also makes poudriere builds fail: root@marvin:~ [0]# poudriere bulk -C -p mptest -t -j 11amd64 x11/xlogo ====>> Creating the reference jail... done ====>> Mounting system devices for 11amd64-mptest ====>> Mounting ports/packages/distfiles ====>> Mounting packages from: /poudriere/data/packages/11amd64-mptest ====>> Logs: /poudriere/data/logs/bulk/11amd64-mptest/2014-10-01_16h44m56s ====>> WWW: http://pkg.madpilot.net:8888/logs/bulk/11amd64-mptest/2014-10-01_16h44m56s ====>> Appending to make.conf: /usr/local/etc/poudriere.d/make.conf ====>> DEVELOPER=yes ignored from make.conf. Use 'bulk -t' or 'testport' for testing instead. /etc/resolv.conf -> /poudriere/data/build/11amd64-mptest/ref/etc/resolv.conf ====>> Starting jail 11amd64-mptest ====>> Loading MOVED ====>> Calculating ports order and dependencies ====>> Error: Duplicated origin for pkgconf-0.9.7: devel/xorg-macros/../../devel/pkgconf AND x11/xlogo/../../devel/pkgconf. Rerun with -vv to see which ports are depending on these. ====>> Cleaning up ====>> Umounting file systems (the ports nvidia-driver and xlogo in these small logs are taken at random) It also completely breaks portmaster. Maybe this patch is excessive and should first try to discover if we already are in the standard /usr/ports subtree? I have not tried but I'm quite confident I can :fix: this by adding PORTSTREE=/usr/ports in /etc/make.conf, but this does not look like a good solution. -- Guido Falsi From owner-svn-src-all@FreeBSD.ORG Wed Oct 1 15:00:27 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6EFA39A9; Wed, 1 Oct 2014 15:00:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4EF702EB; Wed, 1 Oct 2014 15:00:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s91F0RVH032605; Wed, 1 Oct 2014 15:00:27 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s91F0LgJ032570; Wed, 1 Oct 2014 15:00:21 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201410011500.s91F0LgJ032570@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 1 Oct 2014 15:00:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272362 - in head/lib/libc: powerpc/gen powerpc/sys powerpc64/gen powerpc64/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 15:00:27 -0000 Author: bapt Date: Wed Oct 1 15:00:21 2014 New Revision: 272362 URL: https://svnweb.freebsd.org/changeset/base/272362 Log: Ensure that every ENTRY(foo) has a matching END(foo). It allows to build with newer binutils Differential Revision: https://reviews.freebsd.org/D877 Reviewed by: jhibbits Modified: head/lib/libc/powerpc/gen/_ctx_start.S head/lib/libc/powerpc/gen/_setjmp.S head/lib/libc/powerpc/gen/eabi.S head/lib/libc/powerpc/gen/fabs.S head/lib/libc/powerpc/gen/setjmp.S head/lib/libc/powerpc/gen/sigsetjmp.S head/lib/libc/powerpc/sys/brk.S head/lib/libc/powerpc/sys/exect.S head/lib/libc/powerpc/sys/pipe.S head/lib/libc/powerpc/sys/ptrace.S head/lib/libc/powerpc/sys/sbrk.S head/lib/libc/powerpc64/gen/_ctx_start.S head/lib/libc/powerpc64/gen/_setjmp.S head/lib/libc/powerpc64/gen/fabs.S head/lib/libc/powerpc64/gen/setjmp.S head/lib/libc/powerpc64/gen/sigsetjmp.S head/lib/libc/powerpc64/sys/brk.S head/lib/libc/powerpc64/sys/exect.S head/lib/libc/powerpc64/sys/pipe.S head/lib/libc/powerpc64/sys/ptrace.S head/lib/libc/powerpc64/sys/sbrk.S Modified: head/lib/libc/powerpc/gen/_ctx_start.S ============================================================================== --- head/lib/libc/powerpc/gen/_ctx_start.S Wed Oct 1 14:39:06 2014 (r272361) +++ head/lib/libc/powerpc/gen/_ctx_start.S Wed Oct 1 15:00:21 2014 (r272362) @@ -41,5 +41,6 @@ * above branch. */ bl PIC_PLT(CNAME(abort)) /* abort */ + END(_cts_start) .section .note.GNU-stack,"",%progbits Modified: head/lib/libc/powerpc/gen/_setjmp.S ============================================================================== --- head/lib/libc/powerpc/gen/_setjmp.S Wed Oct 1 14:39:06 2014 (r272361) +++ head/lib/libc/powerpc/gen/_setjmp.S Wed Oct 1 15:00:21 2014 (r272362) @@ -58,6 +58,7 @@ ENTRY(_setjmp) stmw %r9,20(%r3) li %r3,0 blr +END(_setjmp) ENTRY(_longjmp) lmw %r9,20(%r3) @@ -68,5 +69,6 @@ ENTRY(_longjmp) bnelr li %r3,1 blr +END(_longjmp) .section .note.GNU-stack,"",%progbits Modified: head/lib/libc/powerpc/gen/eabi.S ============================================================================== --- head/lib/libc/powerpc/gen/eabi.S Wed Oct 1 14:39:06 2014 (r272361) +++ head/lib/libc/powerpc/gen/eabi.S Wed Oct 1 15:00:21 2014 (r272362) @@ -29,5 +29,6 @@ __FBSDID("$FreeBSD$"); ENTRY(__eabi) blr +END(__eabi) .section .note.GNU-stack,"",%progbits Modified: head/lib/libc/powerpc/gen/fabs.S ============================================================================== --- head/lib/libc/powerpc/gen/fabs.S Wed Oct 1 14:39:06 2014 (r272361) +++ head/lib/libc/powerpc/gen/fabs.S Wed Oct 1 15:00:21 2014 (r272362) @@ -33,5 +33,6 @@ __FBSDID("$FreeBSD$"); ENTRY(fabs) fabs %f1,%f1 blr +END(fabs) .section .note.GNU-stack,"",%progbits Modified: head/lib/libc/powerpc/gen/setjmp.S ============================================================================== --- head/lib/libc/powerpc/gen/setjmp.S Wed Oct 1 14:39:06 2014 (r272361) +++ head/lib/libc/powerpc/gen/setjmp.S Wed Oct 1 15:00:21 2014 (r272362) @@ -68,6 +68,7 @@ ENTRY(setjmp) stmw %r9,20(%r6) li %r3,0 /* return (0) */ blr +END(setjmp) WEAK_REFERENCE(CNAME(__longjmp), longjmp) ENTRY(__longjmp) @@ -86,5 +87,6 @@ ENTRY(__longjmp) bnelr li %r3,1 blr +END(__longjmp) .section .note.GNU-stack,"",%progbits Modified: head/lib/libc/powerpc/gen/sigsetjmp.S ============================================================================== --- head/lib/libc/powerpc/gen/sigsetjmp.S Wed Oct 1 14:39:06 2014 (r272361) +++ head/lib/libc/powerpc/gen/sigsetjmp.S Wed Oct 1 15:00:21 2014 (r272362) @@ -73,6 +73,7 @@ ENTRY(sigsetjmp) stmw %r9,20(%r6) li %r3,0 blr +END(sigsetjmp) ENTRY(siglongjmp) lmw %r9,20(%r3) @@ -94,5 +95,6 @@ ENTRY(siglongjmp) bnelr li %r3,1 blr +END(siglongjmp) .section .note.GNU-stack,"",%progbits Modified: head/lib/libc/powerpc/sys/brk.S ============================================================================== --- head/lib/libc/powerpc/sys/brk.S Wed Oct 1 14:39:06 2014 (r272361) +++ head/lib/libc/powerpc/sys/brk.S Wed Oct 1 15:00:21 2014 (r272362) @@ -71,5 +71,6 @@ ENTRY(brk) 1: b PIC_PLT(HIDENAME(cerror)) +END(brk) .section .note.GNU-stack,"",%progbits Modified: head/lib/libc/powerpc/sys/exect.S ============================================================================== --- head/lib/libc/powerpc/sys/exect.S Wed Oct 1 14:39:06 2014 (r272361) +++ head/lib/libc/powerpc/sys/exect.S Wed Oct 1 15:00:21 2014 (r272362) @@ -37,5 +37,6 @@ ENTRY(exect) blr 1: b PIC_PLT(HIDENAME(cerror)) +END(exect) .section .note.GNU-stack,"",%progbits Modified: head/lib/libc/powerpc/sys/pipe.S ============================================================================== --- head/lib/libc/powerpc/sys/pipe.S Wed Oct 1 14:39:06 2014 (r272361) +++ head/lib/libc/powerpc/sys/pipe.S Wed Oct 1 15:00:21 2014 (r272362) @@ -41,5 +41,6 @@ ENTRY(pipe) blr /* and return 0 */ 1: b PIC_PLT(HIDENAME(cerror)) +END(pipe) .section .note.GNU-stack,"",%progbits Modified: head/lib/libc/powerpc/sys/ptrace.S ============================================================================== --- head/lib/libc/powerpc/sys/ptrace.S Wed Oct 1 14:39:06 2014 (r272361) +++ head/lib/libc/powerpc/sys/ptrace.S Wed Oct 1 15:00:21 2014 (r272362) @@ -56,5 +56,6 @@ ENTRY(ptrace) blr 1: b PIC_PLT(HIDENAME(cerror)) +END(ptrace) .section .note.GNU-stack,"",%progbits Modified: head/lib/libc/powerpc/sys/sbrk.S ============================================================================== --- head/lib/libc/powerpc/sys/sbrk.S Wed Oct 1 14:39:06 2014 (r272361) +++ head/lib/libc/powerpc/sys/sbrk.S Wed Oct 1 15:00:21 2014 (r272362) @@ -68,5 +68,6 @@ ENTRY(sbrk) blr 2: b PIC_PLT(HIDENAME(cerror)) +END(sbrk) .section .note.GNU-stack,"",%progbits Modified: head/lib/libc/powerpc64/gen/_ctx_start.S ============================================================================== --- head/lib/libc/powerpc64/gen/_ctx_start.S Wed Oct 1 14:39:06 2014 (r272361) +++ head/lib/libc/powerpc64/gen/_ctx_start.S Wed Oct 1 15:00:21 2014 (r272362) @@ -46,5 +46,6 @@ nop bl CNAME(abort) /* abort */ nop + END(_ctx_start) .section .note.GNU-stack,"",%progbits Modified: head/lib/libc/powerpc64/gen/_setjmp.S ============================================================================== --- head/lib/libc/powerpc64/gen/_setjmp.S Wed Oct 1 14:39:06 2014 (r272361) +++ head/lib/libc/powerpc64/gen/_setjmp.S Wed Oct 1 15:00:21 2014 (r272362) @@ -80,6 +80,7 @@ ENTRY(_setjmp) std %r31,40 + 22*8(%r3) li %r3,0 blr +END(_setjmp) ENTRY(_longjmp) ld %r9,40 + 0*8(%r3) @@ -113,5 +114,6 @@ ENTRY(_longjmp) bnelr li %r3,1 blr +END(_longjmp) .section .note.GNU-stack,"",%progbits Modified: head/lib/libc/powerpc64/gen/fabs.S ============================================================================== --- head/lib/libc/powerpc64/gen/fabs.S Wed Oct 1 14:39:06 2014 (r272361) +++ head/lib/libc/powerpc64/gen/fabs.S Wed Oct 1 15:00:21 2014 (r272362) @@ -33,5 +33,6 @@ __FBSDID("$FreeBSD$"); ENTRY(fabs) fabs %f1,%f1 blr +END(fabs) .section .note.GNU-stack,"",%progbits Modified: head/lib/libc/powerpc64/gen/setjmp.S ============================================================================== --- head/lib/libc/powerpc64/gen/setjmp.S Wed Oct 1 14:39:06 2014 (r272361) +++ head/lib/libc/powerpc64/gen/setjmp.S Wed Oct 1 15:00:21 2014 (r272362) @@ -92,6 +92,7 @@ ENTRY(setjmp) li %r3,0 /* return (0) */ blr +END(setjmp) WEAK_REFERENCE(__longjmp, longjmp) ENTRY(__longjmp) @@ -132,5 +133,6 @@ ENTRY(__longjmp) bnelr li %r3,1 blr +END(__longjmp) .section .note.GNU-stack,"",%progbits Modified: head/lib/libc/powerpc64/gen/sigsetjmp.S ============================================================================== --- head/lib/libc/powerpc64/gen/sigsetjmp.S Wed Oct 1 14:39:06 2014 (r272361) +++ head/lib/libc/powerpc64/gen/sigsetjmp.S Wed Oct 1 15:00:21 2014 (r272362) @@ -97,6 +97,7 @@ ENTRY(sigsetjmp) li %r3,0 blr +END(sigsetjmp) ENTRY(siglongjmp) ld %r9,40 + 0*8(%r3) @@ -141,5 +142,6 @@ ENTRY(siglongjmp) bnelr li %r3,1 blr +END(siglongjmp) .section .note.GNU-stack,"",%progbits Modified: head/lib/libc/powerpc64/sys/brk.S ============================================================================== --- head/lib/libc/powerpc64/sys/brk.S Wed Oct 1 14:39:06 2014 (r272361) +++ head/lib/libc/powerpc64/sys/brk.S Wed Oct 1 15:00:21 2014 (r272362) @@ -69,5 +69,6 @@ ENTRY(brk) ld %r0,16(%r1) mtlr %r0 blr +END(brk) .section .note.GNU-stack,"",%progbits Modified: head/lib/libc/powerpc64/sys/exect.S ============================================================================== --- head/lib/libc/powerpc64/sys/exect.S Wed Oct 1 14:39:06 2014 (r272361) +++ head/lib/libc/powerpc64/sys/exect.S Wed Oct 1 15:00:21 2014 (r272362) @@ -45,5 +45,6 @@ ENTRY(exect) ld %r0,16(%r1) mtlr %r0 blr +END(exect) .section .note.GNU-stack,"",%progbits Modified: head/lib/libc/powerpc64/sys/pipe.S ============================================================================== --- head/lib/libc/powerpc64/sys/pipe.S Wed Oct 1 14:39:06 2014 (r272361) +++ head/lib/libc/powerpc64/sys/pipe.S Wed Oct 1 15:00:21 2014 (r272362) @@ -49,5 +49,6 @@ ENTRY(pipe) ld %r0,16(%r1) mtlr %r0 blr +END(pipe) .section .note.GNU-stack,"",%progbits Modified: head/lib/libc/powerpc64/sys/ptrace.S ============================================================================== --- head/lib/libc/powerpc64/sys/ptrace.S Wed Oct 1 14:39:06 2014 (r272361) +++ head/lib/libc/powerpc64/sys/ptrace.S Wed Oct 1 15:00:21 2014 (r272362) @@ -63,5 +63,6 @@ ENTRY(ptrace) ld %r0,16(%r1) mtlr %r0 blr +END(ptrace) .section .note.GNU-stack,"",%progbits Modified: head/lib/libc/powerpc64/sys/sbrk.S ============================================================================== --- head/lib/libc/powerpc64/sys/sbrk.S Wed Oct 1 14:39:06 2014 (r272361) +++ head/lib/libc/powerpc64/sys/sbrk.S Wed Oct 1 15:00:21 2014 (r272362) @@ -64,5 +64,6 @@ ENTRY(sbrk) ld %r0,16(%r1) mtlr %r0 blr +END(sbrk) .section .note.GNU-stack,"",%progbits From owner-svn-src-all@FreeBSD.ORG Wed Oct 1 15:02:38 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 526A3BA0; Wed, 1 Oct 2014 15:02:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2540E309; Wed, 1 Oct 2014 15:02:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s91F2cXM036285; Wed, 1 Oct 2014 15:02:38 GMT (envelope-from will@FreeBSD.org) Received: (from will@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s91F2bOk036281; Wed, 1 Oct 2014 15:02:37 GMT (envelope-from will@FreeBSD.org) Message-Id: <201410011502.s91F2bOk036281@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: will set sender to will@FreeBSD.org using -f From: Will Andrews Date: Wed, 1 Oct 2014 15:02:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272363 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 15:02:38 -0000 Author: will Date: Wed Oct 1 15:02:37 2014 New Revision: 272363 URL: https://svnweb.freebsd.org/changeset/base/272363 Log: Always resolve PORTSDIR to absolute paths using realpath(1). Reported by: madpilot Reviewed by: bapt X-MFC-With: 272282 Modified: head/share/mk/bsd.port.mk head/share/mk/bsd.port.subdir.mk Modified: head/share/mk/bsd.port.mk ============================================================================== --- head/share/mk/bsd.port.mk Wed Oct 1 15:00:21 2014 (r272362) +++ head/share/mk/bsd.port.mk Wed Oct 1 15:02:37 2014 (r272363) @@ -5,13 +5,13 @@ # in the default /usr/ports. The ../../.. case is in case ports ever grows # a third level. .if exists(${.CURDIR}/Mk/bsd.port.mk) -PORTSDIR= ${.CURDIR} +PORTSDIR!= realpath ${.CURDIR} .elif exists(${.CURDIR}/../Mk/bsd.port.mk) -PORTSDIR= ${.CURDIR}/.. +PORTSDIR!= realpath ${.CURDIR}/.. .elif exists(${.CURDIR}/../../Mk/bsd.port.mk) -PORTSDIR= ${.CURDIR}/../.. +PORTSDIR!= realpath ${.CURDIR}/../.. .elif exists(${.CURDIR}/../../../Mk/bsd.port.mk) -PORTSDIR= ${.CURDIR}/../../.. +PORTSDIR!= realpath ${.CURDIR}/../../.. .else PORTSDIR= /usr/ports .endif Modified: head/share/mk/bsd.port.subdir.mk ============================================================================== --- head/share/mk/bsd.port.subdir.mk Wed Oct 1 15:00:21 2014 (r272362) +++ head/share/mk/bsd.port.subdir.mk Wed Oct 1 15:02:37 2014 (r272363) @@ -5,13 +5,13 @@ # in the default /usr/ports. The ../../.. case is in case ports ever grows # a third level. .if exists(${.CURDIR}/Mk/bsd.port.mk) -PORTSDIR= ${.CURDIR} +PORTSDIR!= realpath ${.CURDIR} .elif exists(${.CURDIR}/../Mk/bsd.port.mk) -PORTSDIR= ${.CURDIR}/.. +PORTSDIR!= realpath ${.CURDIR}/.. .elif exists(${.CURDIR}/../../Mk/bsd.port.mk) -PORTSDIR= ${.CURDIR}/../.. +PORTSDIR!= realpath ${.CURDIR}/../.. .elif exists(${.CURDIR}/../../../Mk/bsd.port.mk) -PORTSDIR= ${.CURDIR}/../../.. +PORTSDIR!= realpath ${.CURDIR}/../../.. .else PORTSDIR= /usr/ports .endif From owner-svn-src-all@FreeBSD.ORG Wed Oct 1 15:06:11 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9F24BE22 for ; Wed, 1 Oct 2014 15:06:11 +0000 (UTC) Received: from mail-qg0-f47.google.com (mail-qg0-f47.google.com [209.85.192.47]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 60BB033B for ; Wed, 1 Oct 2014 15:06:11 +0000 (UTC) Received: by mail-qg0-f47.google.com with SMTP id i50so384220qgf.20 for ; Wed, 01 Oct 2014 08:06:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=hTHPjtoyQ2xgSQgXtvKW170kINj/aBb46w8Wtv5In1Q=; b=j31P++ayYMoGp/C5O23cyg3KfgsQNihrIm4mEqT/AqQUDT5tcZoG6OH4wGHccREOSs OydDD7gLSjCktiy0rhInH4wjptr2LfSnDgJm928xFcL5zhNTddyd8+WrX2Zbpje7b8p+ +0JDdEhDS+05NOeaaE772D0t4Tb0lfCgIjzkaoZX2tTu+7TPVyTsw1Gyc7krDfl+TI5K 9di52FxPRlEHH8qwJNdSLOiesZyckiH9rH+oLT7ftPamoNyONBWAB5xbo+fCvptisVhO HvyMkekaaT95JYu5qG/eUJLs50GBTkYTrSadOknddsehHd2duZb9xBKKaSr57Jdm3KwP Uebg== X-Gm-Message-State: ALoCoQnfKBo/4Hg2z6kN/qgMYugVCzkoylNrWZCIBi2a40nwEtUG2ufmSBde5ExDWEPnVRMjf1Gi MIME-Version: 1.0 X-Received: by 10.224.127.131 with SMTP id g3mr32389843qas.81.1412175964498; Wed, 01 Oct 2014 08:06:04 -0700 (PDT) Received: by 10.140.31.36 with HTTP; Wed, 1 Oct 2014 08:06:04 -0700 (PDT) In-Reply-To: <542C14F6.7020506@FreeBSD.org> References: <201409291505.s8TF5Nhh066884@svn.freebsd.org> <542C14F6.7020506@FreeBSD.org> Date: Wed, 1 Oct 2014 09:06:04 -0600 Message-ID: Subject: Re: svn commit: r272282 - head/share/mk From: Will Andrews To: Guido Falsi Content-Type: text/plain; charset=UTF-8 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, "src-committers@FreeBSD.org" , Baptiste Daroussin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 15:06:11 -0000 If r272363 doesn't resolve the issue for you, let me know. Thanks! --Will. On Wed, Oct 1, 2014 at 8:51 AM, Guido Falsi wrote: > On 09/29/14 17:05, Will Andrews wrote: >> Author: will >> Date: Mon Sep 29 15:05:23 2014 >> New Revision: 272282 >> URL: http://svnweb.freebsd.org/changeset/base/272282 >> >> Log: >> Search for the nearest PORTSDIR where Mk/bsd.ports.mk exists, from .CURDIR. >> This will only take effect if PORTSDIR is not set, as previously supported. >> >> Use .if exists(), for four specific possibilities relative to .CURDIR: >> ., .., ../.., and ../../.. The fourth possibility is primarily in case >> ports ever grows a third level. If none of these paths exist, fall back to >> the old default of /usr/ports. >> >> This removes the need to set PORTSDIR explicitly (or via wrapper script) if >> one is running out of a ports tree that is not in /usr/ports, but in a >> home directory. >> >> Reviewed by: bapt, bdrewery (older version) >> CR: D799 >> MFC after: 1 week >> Sponsored by: Spectra Logic >> > > Hi, > > I just refreshed my machines head r272349 and this change is creating > problems to me. > > Maybe I've always been doing something wrong but this is what is happening: > > root@marvin:~ [0]# cd /usr/ports/x11/nvidia-driver > root@marvin:/usr/ports/x11/nvidia-driver [0]# make -V PORTSDIR > /usr/ports/x11/nvidia-driver/../.. > > this is problematic since now all dependencies are relative paths, this > is said to be unsupported in bsd.sanity.mk, line 35 and following ones. > > It also makes poudriere builds fail: > > root@marvin:~ [0]# poudriere bulk -C -p mptest -t -j 11amd64 x11/xlogo > ====>> Creating the reference jail... done > ====>> Mounting system devices for 11amd64-mptest > ====>> Mounting ports/packages/distfiles > ====>> Mounting packages from: /poudriere/data/packages/11amd64-mptest > ====>> Logs: /poudriere/data/logs/bulk/11amd64-mptest/2014-10-01_16h44m56s > ====>> WWW: > http://pkg.madpilot.net:8888/logs/bulk/11amd64-mptest/2014-10-01_16h44m56s > ====>> Appending to make.conf: /usr/local/etc/poudriere.d/make.conf > ====>> DEVELOPER=yes ignored from make.conf. Use 'bulk -t' or 'testport' > for testing instead. > /etc/resolv.conf -> /poudriere/data/build/11amd64-mptest/ref/etc/resolv.conf > ====>> Starting jail 11amd64-mptest > ====>> Loading MOVED > ====>> Calculating ports order and dependencies > ====>> Error: Duplicated origin for pkgconf-0.9.7: > devel/xorg-macros/../../devel/pkgconf AND x11/xlogo/../../devel/pkgconf. > Rerun with -vv to see which ports are depending on these. > ====>> Cleaning up > ====>> Umounting file systems > > (the ports nvidia-driver and xlogo in these small logs are taken at random) > > It also completely breaks portmaster. > > Maybe this patch is excessive and should first try to discover if we > already are in the standard /usr/ports subtree? > > I have not tried but I'm quite confident I can :fix: this by adding > PORTSTREE=/usr/ports in /etc/make.conf, but this does not look like a > good solution. > > -- > Guido Falsi From owner-svn-src-all@FreeBSD.ORG Wed Oct 1 15:32:29 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BCD9FC62; Wed, 1 Oct 2014 15:32:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A98C38ED; Wed, 1 Oct 2014 15:32:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s91FWT3U050854; Wed, 1 Oct 2014 15:32:29 GMT (envelope-from will@FreeBSD.org) Received: (from will@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s91FWTZL050853; Wed, 1 Oct 2014 15:32:29 GMT (envelope-from will@FreeBSD.org) Message-Id: <201410011532.s91FWTZL050853@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: will set sender to will@FreeBSD.org using -f From: Will Andrews Date: Wed, 1 Oct 2014 15:32:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272366 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 15:32:29 -0000 Author: will Date: Wed Oct 1 15:32:28 2014 New Revision: 272366 URL: https://svnweb.freebsd.org/changeset/base/272366 Log: In the syncer, drop the sync mutex while patting the watchdog. Some watchdog drivers (like ipmi) need to sleep while patting the watchdog. See sys/dev/ipmi/ipmi.c:ipmi_wd_event(), which calls malloc(M_WAITOK). Submitted by: asomers MFC after: 1 month Sponsored by: Spectra Logic MFSpectraBSD: 637548 on 2012/10/04 Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Wed Oct 1 15:23:23 2014 (r272365) +++ head/sys/kern/vfs_subr.c Wed Oct 1 15:32:28 2014 (r272366) @@ -1863,8 +1863,15 @@ sched_sync(void) continue; } - if (first_printf == 0) + if (first_printf == 0) { + /* + * Drop the sync mutex, because some watchdog + * drivers need to sleep while patting + */ + mtx_unlock(&sync_mtx); wdog_kern_pat(WD_LASTVAL); + mtx_lock(&sync_mtx); + } } if (syncer_state == SYNCER_FINAL_DELAY && syncer_final_iter > 0) From owner-svn-src-all@FreeBSD.ORG Wed Oct 1 15:34:49 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F1052EE0; Wed, 1 Oct 2014 15:34:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DAF51910; Wed, 1 Oct 2014 15:34:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s91FYmi3051212; Wed, 1 Oct 2014 15:34:48 GMT (envelope-from will@FreeBSD.org) Received: (from will@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s91FYmnO051211; Wed, 1 Oct 2014 15:34:48 GMT (envelope-from will@FreeBSD.org) Message-Id: <201410011534.s91FYmnO051211@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: will set sender to will@FreeBSD.org using -f From: Will Andrews Date: Wed, 1 Oct 2014 15:34:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272367 - head/sys/modules/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 15:34:49 -0000 Author: will Date: Wed Oct 1 15:34:48 2014 New Revision: 272367 URL: https://svnweb.freebsd.org/changeset/base/272367 Log: Instead of requiring an edit to turn on ZFS debugging, define ZFS_DEBUG. MFC after: 1 month Modified: head/sys/modules/zfs/Makefile Modified: head/sys/modules/zfs/Makefile ============================================================================== --- head/sys/modules/zfs/Makefile Wed Oct 1 15:32:28 2014 (r272366) +++ head/sys/modules/zfs/Makefile Wed Oct 1 15:34:48 2014 (r272367) @@ -94,8 +94,10 @@ CFLAGS+=-DBUILDING_ZFS CFLAGS+=-mminimal-toc .endif -#CFLAGS+=-DDEBUG=1 -#DEBUG_FLAGS=-g +.ifdef ZFS_DEBUG +CFLAGS+=-DDEBUG=1 +DEBUG_FLAGS=-g +.endif .include From owner-svn-src-all@FreeBSD.ORG Wed Oct 1 15:40:12 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E422F19C; Wed, 1 Oct 2014 15:40:11 +0000 (UTC) Received: from mail-lb0-x232.google.com (mail-lb0-x232.google.com [IPv6:2a00:1450:4010:c04::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DA59D95D; Wed, 1 Oct 2014 15:40:10 +0000 (UTC) Received: by mail-lb0-f178.google.com with SMTP id w7so583324lbi.23 for ; Wed, 01 Oct 2014 08: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:message-id:subject :from:to:cc:content-type; bh=tpSHQ58/PnsARP0x6KHi4vxxbWpS3urSic2Ig2Djnuw=; b=hTownlW+EFANCmJM+vhTUQAAoN8AMzO2WA47v2BMhk5dHvHT0tgsNb8mNqeb7qu+kT /FzG65bl6GNPk8FQrpY5j/uA+P6fywAdB/hKX8cnXDgD/QFzYlkpCV0O3MrQn4H/nMZG r8kfWbKuSn21AUXekPM4FZQnIdLaEjuYd3Kuh9vz/qiUnFhXK619RCAtERyvPDE5RZop 80VjHmPZBMtGfsMfbUwysRarhpVHrRTHnSeveT25ZRQGquDBzOdQ/WjqmGw2dAkuHFRh 8F6gipG4fIIlfcmtOssPxfUG65YhJegEdOEsQqM5dNP0c1iHko2ct9pKz6G86owj341Q unMQ== MIME-Version: 1.0 X-Received: by 10.152.19.167 with SMTP id g7mr6787950lae.31.1412178008770; Wed, 01 Oct 2014 08:40:08 -0700 (PDT) Sender: davide.italiano@gmail.com Received: by 10.25.207.74 with HTTP; Wed, 1 Oct 2014 08:40:08 -0700 (PDT) In-Reply-To: <201410011532.s91FWTZL050853@svn.freebsd.org> References: <201410011532.s91FWTZL050853@svn.freebsd.org> Date: Wed, 1 Oct 2014 08:40:08 -0700 X-Google-Sender-Auth: MinPZJwDnONacQ5PsdGqrdTlF24 Message-ID: Subject: Re: svn commit: r272366 - head/sys/kern From: Davide Italiano To: Will Andrews Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 15:40:12 -0000 On Wed, Oct 1, 2014 at 8:32 AM, Will Andrews wrote: > Author: will > Date: Wed Oct 1 15:32:28 2014 > New Revision: 272366 > URL: https://svnweb.freebsd.org/changeset/base/272366 > > Log: > In the syncer, drop the sync mutex while patting the watchdog. > > Some watchdog drivers (like ipmi) need to sleep while patting the watchdog. > See sys/dev/ipmi/ipmi.c:ipmi_wd_event(), which calls malloc(M_WAITOK). > > Submitted by: asomers > MFC after: 1 month > Sponsored by: Spectra Logic > MFSpectraBSD: 637548 on 2012/10/04 > > Modified: > head/sys/kern/vfs_subr.c > > Modified: head/sys/kern/vfs_subr.c > ============================================================================== > --- head/sys/kern/vfs_subr.c Wed Oct 1 15:23:23 2014 (r272365) > +++ head/sys/kern/vfs_subr.c Wed Oct 1 15:32:28 2014 (r272366) > @@ -1863,8 +1863,15 @@ sched_sync(void) > continue; > } > > - if (first_printf == 0) > + if (first_printf == 0) { > + /* > + * Drop the sync mutex, because some watchdog > + * drivers need to sleep while patting > + */ > + mtx_unlock(&sync_mtx); > wdog_kern_pat(WD_LASTVAL); > + mtx_lock(&sync_mtx); > + } > > } > if (syncer_state == SYNCER_FINAL_DELAY && syncer_final_iter > 0) > I introduced something like this back in the days when I was at iX but never convinced myself this is completely safe -- I assume you investigated about possible races opened by releasing the syncer mutex, and I would be happy if you can elaborate a bit more. -- Davide "There are no solved problems; there are only problems that are more or less solved" -- Henri Poincare From owner-svn-src-all@FreeBSD.ORG Wed Oct 1 16:00:22 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A26FDC9A; Wed, 1 Oct 2014 16:00:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 755FBCDB; Wed, 1 Oct 2014 16:00:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s91G0MTW063694; Wed, 1 Oct 2014 16:00:22 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s91G0M4Y063692; Wed, 1 Oct 2014 16:00:22 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201410011600.s91G0M4Y063692@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 1 Oct 2014 16:00:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272368 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 16:00:22 -0000 Author: andrew Date: Wed Oct 1 16:00:21 2014 New Revision: 272368 URL: https://svnweb.freebsd.org/changeset/base/272368 Log: Clean up detection of big-endian ARM. In all cases we follow the pattern arm*eb*. Check we are building for arm and if MACHINE_ARCH follows this pattern. Modified: head/share/mk/bsd.endian.mk head/share/mk/src.opts.mk Modified: head/share/mk/bsd.endian.mk ============================================================================== --- head/share/mk/bsd.endian.mk Wed Oct 1 15:34:48 2014 (r272367) +++ head/share/mk/bsd.endian.mk Wed Oct 1 16:00:21 2014 (r272368) @@ -2,16 +2,13 @@ .if ${MACHINE_ARCH} == "amd64" || \ ${MACHINE_ARCH} == "i386" || \ - ${MACHINE_ARCH} == "arm" || \ - ${MACHINE_ARCH} == "armv6" || \ - ${MACHINE_ARCH} == "armv6hf" || \ + (${MACHINE} == "arm" && ${MACHINE_ARCH:Marm*eb*} == "") || \ ${MACHINE_ARCH:Mmips*el} != "" TARGET_ENDIANNESS= 1234 .elif ${MACHINE_ARCH} == "powerpc" || \ ${MACHINE_ARCH} == "powerpc64" || \ ${MACHINE_ARCH} == "sparc64" || \ - ${MACHINE_ARCH} == "armeb" || \ - ${MACHINE_ARCH} == "armv6eb" || \ + (${MACHINE} == "arm" && ${MACHINE_ARCH:Marm*eb*} != "") || \ ${MACHINE_ARCH:Mmips*} != "" TARGET_ENDIANNESS= 4321 .endif Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Wed Oct 1 15:34:48 2014 (r272367) +++ head/share/mk/src.opts.mk Wed Oct 1 16:00:21 2014 (r272368) @@ -193,7 +193,7 @@ __TT=${MACHINE} # Clang is only for x86, powerpc and little-endian arm right now, by default. .if ${__T} == "amd64" || ${__T} == "i386" || ${__T:Mpowerpc*} __DEFAULT_YES_OPTIONS+=CLANG CLANG_FULL CLANG_BOOTSTRAP -.elif ${__T} == "arm" || ${__T} == "armv6" || ${__T} == "armv6hf" +.elif ${__TT} == "arm" && ${__T:Marm*eb*} == "" __DEFAULT_YES_OPTIONS+=CLANG CLANG_BOOTSTRAP # GCC is unable to build the full clang on arm, disable it by default. __DEFAULT_NO_OPTIONS+=CLANG_FULL @@ -201,8 +201,8 @@ __DEFAULT_NO_OPTIONS+=CLANG_FULL __DEFAULT_NO_OPTIONS+=CLANG CLANG_FULL CLANG_BOOTSTRAP .endif # Clang the default system compiler only on little-endian arm and x86. -.if ${__T} == "amd64" || ${__T} == "arm" || ${__T} == "armv6" || \ - ${__T} == "armv6hf" || ${__T} == "i386" +.if ${__T} == "amd64" || (${__TT} == "arm" && ${__T:Marm*eb*} == "") || \ + ${__T} == "i386" __DEFAULT_YES_OPTIONS+=CLANG_IS_CC __DEFAULT_NO_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX .else From owner-svn-src-all@FreeBSD.ORG Wed Oct 1 16:08:20 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B53F3EE0; Wed, 1 Oct 2014 16:08:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 87420DE4; Wed, 1 Oct 2014 16:08:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s91G8KTn066248; Wed, 1 Oct 2014 16:08:20 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s91G8J02066245; Wed, 1 Oct 2014 16:08:19 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201410011608.s91G8J02066245@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 1 Oct 2014 16:08:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272369 - in head/lib: libc/arm libc/arm/aeabi libcompiler_rt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 16:08:20 -0000 Author: andrew Date: Wed Oct 1 16:08:19 2014 New Revision: 272369 URL: https://svnweb.freebsd.org/changeset/base/272369 Log: Clean up detection of hard-float ABIs. As with big-endian in r272368 we can check against arm*hf*. Modified: head/lib/libc/arm/Makefile.inc head/lib/libc/arm/aeabi/Makefile.inc head/lib/libcompiler_rt/Makefile Modified: head/lib/libc/arm/Makefile.inc ============================================================================== --- head/lib/libc/arm/Makefile.inc Wed Oct 1 16:00:21 2014 (r272368) +++ head/lib/libc/arm/Makefile.inc Wed Oct 1 16:08:19 2014 (r272369) @@ -11,7 +11,7 @@ SYM_MAPS+=${LIBC_SRCTOP}/arm/Symbol.map .include "${LIBC_SRCTOP}/arm/aeabi/Makefile.inc" -.if ${MACHINE_ARCH} == "armv6hf" +.if ${MACHINE_ARCH:Marm*hf*} != "" SYM_MAPS+=${LIBC_SRCTOP}/arm/Symbol_vfp.map .endif Modified: head/lib/libc/arm/aeabi/Makefile.inc ============================================================================== --- head/lib/libc/arm/aeabi/Makefile.inc Wed Oct 1 16:00:21 2014 (r272368) +++ head/lib/libc/arm/aeabi/Makefile.inc Wed Oct 1 16:08:19 2014 (r272369) @@ -5,7 +5,7 @@ SRCS+= aeabi_atexit.c \ aeabi_unwind_cpp.c \ aeabi_unwind_exidx.c -.if ${MACHINE_ARCH} != "armv6hf" +.if ${MACHINE_ARCH:Marm*hf*} == "" SRCS+= aeabi_double.c \ aeabi_float.c .endif Modified: head/lib/libcompiler_rt/Makefile ============================================================================== --- head/lib/libcompiler_rt/Makefile Wed Oct 1 16:00:21 2014 (r272368) +++ head/lib/libcompiler_rt/Makefile Wed Oct 1 16:08:19 2014 (r272369) @@ -164,9 +164,9 @@ SRCF+= stdatomic .endif .for file in ${SRCF} -. if ${MACHINE_ARCH} == "armv6hf" && exists(${CRTSRC}/${CRTARCH}/${file}vfp.S) +. if ${MACHINE_ARCH:Marm*hf*} != "" && exists(${CRTSRC}/${CRTARCH}/${file}vfp.S) SRCS+= ${file}vfp.S -. elif (${MACHINE_CPUARCH} != "arm" || ${MACHINE_ARCH} == "armv6hf") && exists(${CRTSRC}/${CRTARCH}/${file}.S) +. elif !(${MACHINE_CPUARCH} == "arm" && ${MACHINE_ARCH:Marm*hf*} == "") && exists(${CRTSRC}/${CRTARCH}/${file}.S) SRCS+= ${file}.S . else SRCS+= ${file}.c From owner-svn-src-all@FreeBSD.ORG Wed Oct 1 16:16:02 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2CB90273; Wed, 1 Oct 2014 16:16:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 19A0CEE2; Wed, 1 Oct 2014 16:16:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s91GG170070889; Wed, 1 Oct 2014 16:16:01 GMT (envelope-from will@FreeBSD.org) Received: (from will@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s91GG1Oh070888; Wed, 1 Oct 2014 16:16:01 GMT (envelope-from will@FreeBSD.org) Message-Id: <201410011616.s91GG1Oh070888@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: will set sender to will@FreeBSD.org using -f From: Will Andrews Date: Wed, 1 Oct 2014 16:16:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272371 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 16:16:02 -0000 Author: will Date: Wed Oct 1 16:16:01 2014 New Revision: 272371 URL: https://svnweb.freebsd.org/changeset/base/272371 Log: Embellish a comment regarding the reliability of DEBUG_VFS_LOCKS. Submitted by: kib Modified: head/sys/sys/vnode.h Modified: head/sys/sys/vnode.h ============================================================================== --- head/sys/sys/vnode.h Wed Oct 1 16:09:11 2014 (r272370) +++ head/sys/sys/vnode.h Wed Oct 1 16:16:01 2014 (r272371) @@ -503,7 +503,9 @@ extern struct vnodeop_desc *vnodeop_desc * reliable since if the thread sleeps between changing the lock * state and checking it with the assert, some other thread could * change the state. They are good enough for debugging a single - * filesystem using a single-threaded test. + * filesystem using a single-threaded test. Note that the unreliability is + * limited to false negatives; efforts were made to ensure that false + * positives cannot occur. */ void assert_vi_locked(struct vnode *vp, const char *str); void assert_vi_unlocked(struct vnode *vp, const char *str); From owner-svn-src-all@FreeBSD.ORG Wed Oct 1 16:18:41 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7A75E3F7; Wed, 1 Oct 2014 16:18:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 66C8FF08; Wed, 1 Oct 2014 16:18:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s91GIfx3071252; Wed, 1 Oct 2014 16:18:41 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s91GIfR5071251; Wed, 1 Oct 2014 16:18:41 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201410011618.s91GIfR5071251@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 1 Oct 2014 16:18:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272372 - stable/10/bin/rm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 16:18:41 -0000 Author: gjb Date: Wed Oct 1 16:18:40 2014 New Revision: 272372 URL: https://svnweb.freebsd.org/changeset/base/272372 Log: MFC r268376 (imp): rm -rf can fail sometimes with an error from fts_read. Make it honor fflag to ignore fts_read errors, but stop deleting from that directory because no further progress can be made. When building a kernel with a high -j value on a high core count machine, during the cleanobj phase we can wind up doing multiple rm -rf at the same time for modules that have subdirectories. This exposed this race (sometimes) as fts_read can return an error if the directory is removed by another rm -rf. Since the intent of the -f flag was to ignore errors, even if this was a bug in fts_read, we should ignore the error like we've been instructed to do. Approved by: re (kib) Sponsored by: The FreeBSD Foundation Modified: stable/10/bin/rm/rm.c Directory Properties: stable/10/ (props changed) Modified: stable/10/bin/rm/rm.c ============================================================================== --- stable/10/bin/rm/rm.c Wed Oct 1 16:16:01 2014 (r272371) +++ stable/10/bin/rm/rm.c Wed Oct 1 16:18:40 2014 (r272372) @@ -335,7 +335,7 @@ err: warn("%s", p->fts_path); eval = 1; } - if (errno) + if (!fflag && errno) err(1, "fts_read"); fts_close(fts); } From owner-svn-src-all@FreeBSD.ORG Wed Oct 1 16:19:00 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8D8D9530; Wed, 1 Oct 2014 16:19:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7A3B6F13; Wed, 1 Oct 2014 16:19:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s91GJ0T9071338; Wed, 1 Oct 2014 16:19:00 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s91GJ0W4071337; Wed, 1 Oct 2014 16:19:00 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201410011619.s91GJ0W4071337@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 1 Oct 2014 16:19:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r272373 - stable/9/bin/rm X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 16:19:00 -0000 Author: gjb Date: Wed Oct 1 16:18:59 2014 New Revision: 272373 URL: https://svnweb.freebsd.org/changeset/base/272373 Log: MFC r268376 (imp): rm -rf can fail sometimes with an error from fts_read. Make it honor fflag to ignore fts_read errors, but stop deleting from that directory because no further progress can be made. When building a kernel with a high -j value on a high core count machine, during the cleanobj phase we can wind up doing multiple rm -rf at the same time for modules that have subdirectories. This exposed this race (sometimes) as fts_read can return an error if the directory is removed by another rm -rf. Since the intent of the -f flag was to ignore errors, even if this was a bug in fts_read, we should ignore the error like we've been instructed to do. Sponsored by: The FreeBSD Foundation Modified: stable/9/bin/rm/rm.c Directory Properties: stable/9/bin/rm/ (props changed) Modified: stable/9/bin/rm/rm.c ============================================================================== --- stable/9/bin/rm/rm.c Wed Oct 1 16:18:40 2014 (r272372) +++ stable/9/bin/rm/rm.c Wed Oct 1 16:18:59 2014 (r272373) @@ -329,7 +329,7 @@ err: warn("%s", p->fts_path); eval = 1; } - if (errno) + if (!fflag && errno) err(1, "fts_read"); fts_close(fts); } From owner-svn-src-all@FreeBSD.ORG Wed Oct 1 16:37:35 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E3252A95 for ; Wed, 1 Oct 2014 16:37:34 +0000 (UTC) Received: from mail-qc0-f176.google.com (mail-qc0-f176.google.com [209.85.216.176]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A0308192 for ; Wed, 1 Oct 2014 16:37:34 +0000 (UTC) Received: by mail-qc0-f176.google.com with SMTP id r5so625000qcx.35 for ; Wed, 01 Oct 2014 09:37:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=3hKavqNqkQxN14T8665jX4DBKFHL2mrMdWN+jF4eKk8=; b=MNeHzcJ+9nzfqvYr75Hj058WLa2GlHe9rlduV4Ud19YGnMjcw6aiTAhNhWSXvxc2qa ccz0wrLaiE3Of1MV5WdaIeZH22RvEmstspWadPlQdgUlbMCvEtsKnFwDhz0A/NIZGslb 9x+PEh8p8NLUI7wP5JxGf/ZCTe7AxobTttZZzVYxonaKlce9L3HRayFTkKsx08CBmB+0 2YFOC108lyLQZCrSOm4RNAzculQPQNoAmVqfJ0czX5OPA9YOwlbP2nr72tKvjuq91zkb miu2rD+/LIDQYBlJPRGpQwuhVg6KdscbxYkX6w6tIE7yjxEQ9FyS3p6PzvwwG2MFdOU8 eRpg== X-Gm-Message-State: ALoCoQkdq/oBETW0sIcoW+bf8/L3XYbYBpNsQ5ZE/1UNOlG5ZGmbvgdSYWbE1gLsPLApuFAlYHKj MIME-Version: 1.0 X-Received: by 10.224.32.138 with SMTP id c10mr64383266qad.1.1412181453110; Wed, 01 Oct 2014 09:37:33 -0700 (PDT) Received: by 10.140.31.36 with HTTP; Wed, 1 Oct 2014 09:37:33 -0700 (PDT) In-Reply-To: References: <201410011532.s91FWTZL050853@svn.freebsd.org> Date: Wed, 1 Oct 2014 10:37:33 -0600 Message-ID: Subject: Re: svn commit: r272366 - head/sys/kern From: Will Andrews To: Davide Italiano Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 16:37:35 -0000 I think it depends on what kind of safety you're concerned about. There's only one syncer; none of its state can be reclaimed behind its back. If additional work is added to its queue in the interim, it will be processed as if it was already there at the start of the loop. We've been running with this change for 2 years; I don't think any issues have been reported with it. I realize that's not a guarantee that there isn't a problem. However, this change does fix an issue where the system could deadlock on shutdown because it's calling a watchdog callback that mallocs, while holding sync_mtx. --Will. On Wed, Oct 1, 2014 at 9:40 AM, Davide Italiano wrote: > On Wed, Oct 1, 2014 at 8:32 AM, Will Andrews wrote: >> Author: will >> Date: Wed Oct 1 15:32:28 2014 >> New Revision: 272366 >> URL: https://svnweb.freebsd.org/changeset/base/272366 >> >> Log: >> In the syncer, drop the sync mutex while patting the watchdog. >> >> Some watchdog drivers (like ipmi) need to sleep while patting the watchdog. >> See sys/dev/ipmi/ipmi.c:ipmi_wd_event(), which calls malloc(M_WAITOK). >> >> Submitted by: asomers >> MFC after: 1 month >> Sponsored by: Spectra Logic >> MFSpectraBSD: 637548 on 2012/10/04 >> >> Modified: >> head/sys/kern/vfs_subr.c >> >> Modified: head/sys/kern/vfs_subr.c >> ============================================================================== >> --- head/sys/kern/vfs_subr.c Wed Oct 1 15:23:23 2014 (r272365) >> +++ head/sys/kern/vfs_subr.c Wed Oct 1 15:32:28 2014 (r272366) >> @@ -1863,8 +1863,15 @@ sched_sync(void) >> continue; >> } >> >> - if (first_printf == 0) >> + if (first_printf == 0) { >> + /* >> + * Drop the sync mutex, because some watchdog >> + * drivers need to sleep while patting >> + */ >> + mtx_unlock(&sync_mtx); >> wdog_kern_pat(WD_LASTVAL); >> + mtx_lock(&sync_mtx); >> + } >> >> } >> if (syncer_state == SYNCER_FINAL_DELAY && syncer_final_iter > 0) >> > > I introduced something like this back in the days when I was at iX but > never convinced myself this is completely safe -- I assume you > investigated about possible races opened by releasing the syncer > mutex, and I would be happy if you can elaborate a bit more. > > -- > Davide > > "There are no solved problems; there are only problems that are more > or less solved" -- Henri Poincare From owner-svn-src-all@FreeBSD.ORG Wed Oct 1 16:46:29 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F20A8E2E; Wed, 1 Oct 2014 16:46:28 +0000 (UTC) Received: from mail-yh0-x236.google.com (mail-yh0-x236.google.com [IPv6:2607:f8b0:4002:c01::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8B1062BD; Wed, 1 Oct 2014 16:46:28 +0000 (UTC) Received: by mail-yh0-f54.google.com with SMTP id f10so268994yha.27 for ; Wed, 01 Oct 2014 09:46:27 -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:message-id:subject :from:to:cc:content-type; bh=PGy6AHzXiHl3VDkYyGAev9k9Vti1yIZX7nuZB71mDnk=; b=anA17OYTUNrSXHs8GjKURefPPki694IDfgWf0q1lgXcd3AgEg3P+B+sVeIhAXEAu/9 gFkFUTr9YpqxFspcujtsu4vlQRfzH1kMCfGjHwGRQxkOPQmdBv+Mx4sHVd35jzQiEH8M HILfcLdcc5VhZvVN+8dZpNPXpSNs1rGY/JXYGUUCJSjQcMWDmWZcn8hgpm3RdJTmE9w8 jVQ/yeTbmxiSPYzcbSxC/uDuCss8DPU4DEwlNGV3HORM7qa7RrLS7n8LSFuf5poR/tk1 1ThXcSTdg3joOpCNP9x6AapLohFHJBoGbf0UkYam4Yp5uJm5sLvszeJf4U24LK5A2cur gFrw== MIME-Version: 1.0 X-Received: by 10.236.94.130 with SMTP id n2mr7896869yhf.163.1412181987711; Wed, 01 Oct 2014 09:46:27 -0700 (PDT) Sender: antoine.brodin.freebsd@gmail.com Received: by 10.170.164.197 with HTTP; Wed, 1 Oct 2014 09:46:27 -0700 (PDT) In-Reply-To: <201409282120.s8SLKLJs070469@svn.freebsd.org> References: <201409282120.s8SLKLJs070469@svn.freebsd.org> Date: Wed, 1 Oct 2014 18:46:27 +0200 X-Google-Sender-Auth: a1OTe30PMLxkP7jl8ZcFtzsuQNc Message-ID: Subject: Re: svn commit: r272273 - head/lib/libc/stdtime From: Antoine Brodin To: "Pedro F. Giffuni" Content-Type: text/plain; charset=UTF-8 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 16:46:29 -0000 On Sun, Sep 28, 2014 at 11:20 PM, Pedro F. Giffuni wrote: > Author: pfg > Date: Sun Sep 28 21:20:20 2014 > New Revision: 272273 > URL: http://svnweb.freebsd.org/changeset/base/272273 > > Log: > Add strptime(3) support for %U and %W (take 2) > > Add support for the missing POSIX-2001 %U and %W features: the > existing FreeBSD strptime code recognizes both directives and > validates that the week number lies in the permitted range, > but then simply discards the value. > > Initial support for the feature was written by Paul Green. > David Carlier added the initial handling of tm_wday/tm_yday. > Major credit goes to Andrey Chernov for detecting much of the > brokenness, and rewriting/cleaning most of the code, making it > much more robust. > > Tested independently with the strptime test from the GNU C > library. > > PR: 137307 > MFC after: 1 month > Relnotes: yes Hi, It seems this change breaks some ports, so please no MFC until this is fixed: http://gohan2.ysv.freebsd.org/data/head-amd64-default-baseline/p369565_s272290/logs/errors/latrine-1.0.0_1.log http://gohan2.ysv.freebsd.org/data/head-amd64-default-baseline/p369565_s272290/logs/errors/mongrel2-1.7.5_2.log http://gohan2.ysv.freebsd.org/data/head-amd64-default-baseline/p369565_s272290/logs/errors/deforaos-mailer-0.1.6_1.log Cheers, Antoine (portmgr hat on) > > Modified: > head/lib/libc/stdtime/strptime.c > > Modified: head/lib/libc/stdtime/strptime.c > ============================================================================== > --- head/lib/libc/stdtime/strptime.c Sun Sep 28 21:15:30 2014 (r272272) > +++ head/lib/libc/stdtime/strptime.c Sun Sep 28 21:20:20 2014 (r272273) > @@ -55,10 +55,32 @@ __FBSDID("$FreeBSD$"); > #include "un-namespace.h" > #include "libc_private.h" > #include "timelocal.h" > - > +#include "tzfile.h" > +#include > static char * _strptime(const char *, const char *, struct tm *, int *, locale_t); > > -#define asizeof(a) (sizeof (a) / sizeof ((a)[0])) > +#define asizeof(a) (sizeof(a) / sizeof((a)[0])) > + > +#define FLAG_NONE (1 << 0) > +#define FLAG_YEAR (1 << 1) > +#define FLAG_MONTH (1 << 2) > +#define FLAG_YDAY (1 << 3) > +#define FLAG_MDAY (1 << 4) > +#define FLAG_WDAY (1 << 5) > + > +/* > + * Calculate the week day of the first day of a year. Valid for > + * the Gregorian calendar, which began Sept 14, 1752 in the UK > + * and its colonies. Ref: > + * http://en.wikipedia.org/wiki/Determination_of_the_day_of_the_week > + */ > + > +static int > +first_wday_of(int year) > +{ > + return (((2 * (3 - (year / 100) % 4)) + (year % 100) + > + ((year % 100) / 4) + (isleap(year) ? 6 : 0) + 1) % 7); > +} > > static char * > _strptime(const char *buf, const char *fmt, struct tm *tm, int *GMTp, > @@ -66,9 +88,18 @@ _strptime(const char *buf, const char *f > { > char c; > const char *ptr; > + int day_offset = -1, wday_offset; > + int week_offset; > int i, len; > + int flags; > int Ealternative, Oalternative; > - struct lc_time_T *tptr = __get_current_time_locale(locale); > + const struct lc_time_T *tptr = __get_current_time_locale(locale); > + static int start_of_month[2][13] = { > + {0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365}, > + {0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366} > + }; > + > + flags = FLAG_NONE; > > ptr = fmt; > while (*ptr != 0) { > @@ -102,6 +133,7 @@ label: > buf = _strptime(buf, tptr->date_fmt, tm, GMTp, locale); > if (buf == NULL) > return (NULL); > + flags |= FLAG_WDAY | FLAG_MONTH | FLAG_MDAY | FLAG_YEAR; > break; > > case 'C': > @@ -119,19 +151,23 @@ label: > if (i < 19) > return (NULL); > > - tm->tm_year = i * 100 - 1900; > + tm->tm_year = i * 100 - TM_YEAR_BASE; > + flags |= FLAG_YEAR; > + > break; > > case 'c': > buf = _strptime(buf, tptr->c_fmt, tm, GMTp, locale); > if (buf == NULL) > return (NULL); > + flags |= FLAG_WDAY | FLAG_MONTH | FLAG_MDAY | FLAG_YEAR; > break; > > case 'D': > buf = _strptime(buf, "%m/%d/%y", tm, GMTp, locale); > if (buf == NULL) > return (NULL); > + flags |= FLAG_MONTH | FLAG_MDAY | FLAG_YEAR; > break; > > case 'E': > @@ -150,6 +186,7 @@ label: > buf = _strptime(buf, "%Y-%m-%d", tm, GMTp, locale); > if (buf == NULL) > return (NULL); > + flags |= FLAG_MONTH | FLAG_MDAY | FLAG_YEAR; > break; > > case 'R': > @@ -180,6 +217,7 @@ label: > buf = _strptime(buf, tptr->x_fmt, tm, GMTp, locale); > if (buf == NULL) > return (NULL); > + flags |= FLAG_MONTH | FLAG_MDAY | FLAG_YEAR; > break; > > case 'j': > @@ -197,6 +235,8 @@ label: > return (NULL); > > tm->tm_yday = i - 1; > + flags |= FLAG_YDAY; > + > break; > > case 'M': > @@ -303,7 +343,7 @@ label: > return (NULL); > > tm->tm_wday = i; > - buf += len; > + flags |= FLAG_WDAY; > break; > > case 'U': > @@ -327,6 +367,14 @@ label: > if (i > 53) > return (NULL); > > + if (c == 'U') > + day_offset = TM_SUNDAY; > + else > + day_offset = TM_MONDAY; > + > + > + week_offset = i; > + > break; > > case 'w': > @@ -338,6 +386,7 @@ label: > return (NULL); > > tm->tm_wday = i; > + flags |= FLAG_WDAY; > > break; > > @@ -374,6 +423,7 @@ label: > return (NULL); > > tm->tm_mday = i; > + flags |= FLAG_MDAY; > > break; > > @@ -413,6 +463,8 @@ label: > > tm->tm_mon = i; > buf += len; > + flags |= FLAG_MONTH; > + > break; > > case 'm': > @@ -430,6 +482,7 @@ label: > return (NULL); > > tm->tm_mon = i - 1; > + flags |= FLAG_MONTH; > > break; > > @@ -471,13 +524,14 @@ label: > len--; > } > if (c == 'Y') > - i -= 1900; > + i -= TM_YEAR_BASE; > if (c == 'y' && i < 69) > i += 100; > if (i < 0) > return (NULL); > > tm->tm_year = i; > + flags |= FLAG_YEAR; > > break; > > @@ -543,10 +597,67 @@ label: > break; > } > } > + > + if (!(flags & FLAG_YDAY) && (flags & FLAG_YEAR)) { > + if ((flags & (FLAG_MONTH | FLAG_MDAY)) == > + (FLAG_MONTH | FLAG_MDAY)) { > + tm->tm_yday = start_of_month[isleap(tm->tm_year + > + TM_YEAR_BASE)][tm->tm_mon] + (tm->tm_mday - 1); > + flags |= FLAG_YDAY; > + } else if (day_offset != -1) { > + /* Set the date to the first Sunday (or Monday) > + * of the specified week of the year. > + */ > + if (!(flags & FLAG_WDAY)) { > + tm->tm_wday = day_offset; > + flags |= FLAG_WDAY; > + } > + tm->tm_yday = (7 - > + first_wday_of(tm->tm_year + TM_YEAR_BASE) + > + day_offset) % 7 + (week_offset - 1) * 7 + > + tm->tm_wday - day_offset; > + flags |= FLAG_YDAY; > + } > + } > + > + if ((flags & (FLAG_YEAR | FLAG_YDAY)) == (FLAG_YEAR | FLAG_YDAY)) { > + if (!(flags & FLAG_MONTH)) { > + i = 0; > + while (tm->tm_yday >= > + start_of_month[isleap(tm->tm_year + > + TM_YEAR_BASE)][i]) > + i++; > + if (i > 12) { > + i = 1; > + tm->tm_yday -= > + start_of_month[isleap(tm->tm_year + > + TM_YEAR_BASE)][12]; > + tm->tm_year++; > + } > + tm->tm_mon = i - 1; > + flags |= FLAG_MONTH; > + } > + if (!(flags & FLAG_MDAY)) { > + tm->tm_mday = tm->tm_yday - > + start_of_month[isleap(tm->tm_year + TM_YEAR_BASE)] > + [tm->tm_mon] + 1; > + flags |= FLAG_MDAY; > + } > + if (!(flags & FLAG_WDAY)) { > + i = 0; > + wday_offset = first_wday_of(tm->tm_year); > + while (i++ <= tm->tm_yday) { > + if (wday_offset++ >= 6) > + wday_offset = 0; > + } > + tm->tm_wday = wday_offset; > + flags |= FLAG_WDAY; > + } > + } > + > return ((char *)buf); > } > > - > char * > strptime_l(const char * __restrict buf, const char * __restrict fmt, > struct tm * __restrict tm, locale_t loc) > @@ -564,6 +675,7 @@ strptime_l(const char * __restrict buf, > > return (ret); > } > + > char * > strptime(const char * __restrict buf, const char * __restrict fmt, > struct tm * __restrict tm) > From owner-svn-src-all@FreeBSD.ORG Wed Oct 1 17:16:19 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 42A96BF0; Wed, 1 Oct 2014 17:16:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1506085E; Wed, 1 Oct 2014 17:16:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s91HGIhG099883; Wed, 1 Oct 2014 17:16:18 GMT (envelope-from bjk@FreeBSD.org) Received: (from bjk@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s91HGIVl099882; Wed, 1 Oct 2014 17:16:18 GMT (envelope-from bjk@FreeBSD.org) Message-Id: <201410011716.s91HGIVl099882@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bjk set sender to bjk@FreeBSD.org using -f From: Benjamin Kaduk Date: Wed, 1 Oct 2014 17:16:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272377 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 17:16:19 -0000 Author: bjk (doc committer) Date: Wed Oct 1 17:16:18 2014 New Revision: 272377 URL: https://svnweb.freebsd.org/changeset/base/272377 Log: Some cleanup for sfxge.4 Use standard mdoc macros instead of pure roff, fix some other mdoc usage, make the style consistent, and fix some grammar issues. Approved by: hrs (mentor) Modified: head/share/man/man4/sfxge.4 Modified: head/share/man/man4/sfxge.4 ============================================================================== --- head/share/man/man4/sfxge.4 Wed Oct 1 17:05:40 2014 (r272376) +++ head/share/man/man4/sfxge.4 Wed Oct 1 17:16:18 2014 (r272377) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 8, 2012 +.Dd September 30, 2014 .Dt SFXGE 4 .Os .Sh NAME @@ -85,23 +85,30 @@ Actual values can be obtained using .Xr sysctl 8 . .Bl -tag -width indent .It Va hw.sfxge.rx_ring -Maximum number of descriptors in a receive queue ring. +The maximum number of descriptors in a receive queue ring. Supported values are: 512, 1024, 2048 and 4096. .It Va hw.sfxge.tx_ring -Maximum number of descriptors in a transmit queue ring. +The maximum number of descriptors in a transmit queue ring. Supported values are: 512, 1024, 2048 and 4096. .It Va hw.sfxge.tx_dpl_get_max -The maximum length of the deferred packet 'get-list' for queued transmit +The maximum length of the deferred packet +.Dq get-list +for queued transmit packets, used only if the transmit queue lock can be acquired. -If packet is dropped, \fItx_early_drops\fR counter grows and local sender -gets ENOBUFS error. -Value must be greater than 0. +If a packet is dropped, the +.Va tx_early_drops +counter is incremented and the local sender receives ENOBUFS. +The value must be greater than 0. .It Va hw.sfxge.tx_dpl_put_max -The maximum length of the deferred packet 'put-list' for queued transmit +The maximum length of the deferred packet +.Dq put-list +for queued transmit packets, used if the transmit queue lock cannot be acquired. -If packet is dropped, \fItx_early_drops\fR counter grows and local sender -gets ENOBUFS error. -Value must be greater or equal to 0. +If a packet is dropped, the +.Va tx_early_drops +counter is incremented and the local sender receives ENOBUFS. +The value must be greater than or equal to 0. +.El .Sh SUPPORT For general information and support, go to the Solarflare support website at: From owner-svn-src-all@FreeBSD.ORG Wed Oct 1 18:07:36 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3E658B0B; Wed, 1 Oct 2014 18:07:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 10697DFD; Wed, 1 Oct 2014 18:07:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s91I7ZMA023625; Wed, 1 Oct 2014 18:07:35 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s91I7ZdN023619; Wed, 1 Oct 2014 18:07:35 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201410011807.s91I7ZdN023619@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 1 Oct 2014 18:07:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272378 - in head: share/man/man4 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 18:07:36 -0000 Author: markj Date: Wed Oct 1 18:07:34 2014 New Revision: 272378 URL: https://svnweb.freebsd.org/changeset/base/272378 Log: Add a sysctl, net.inet.icmp.tstamprepl, which can be used to disable replies to ICMP Timestamp packets. PR: 193689 Submitted by: Anthony Cornehl MFC after: 3 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/share/man/man4/icmp.4 head/sys/netinet/ip_icmp.c Modified: head/share/man/man4/icmp.4 ============================================================================== --- head/share/man/man4/icmp.4 Wed Oct 1 17:16:18 2014 (r272377) +++ head/share/man/man4/icmp.4 Wed Oct 1 18:07:34 2014 (r272378) @@ -28,7 +28,7 @@ .\" @(#)icmp.4 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd February 9, 2007 +.Dd September 30, 2014 .Dt ICMP 4 .Os .Sh NAME @@ -216,6 +216,10 @@ instead of the possibly different return Number of bytes from original packet to quote in ICMP reply. This number is internally enforced to be at least 8 bytes (per RFC792) and at most the maximal space left in the ICMP reply mbuf. +.It Va tstamprepl +.Pq Vt boolean +Enable/disable replies to ICMP Timestamp packets. +Defaults to true. .El .Sh ERRORS A socket operation may fail with one of the following errors returned: Modified: head/sys/netinet/ip_icmp.c ============================================================================== --- head/sys/netinet/ip_icmp.c Wed Oct 1 17:16:18 2014 (r272377) +++ head/sys/netinet/ip_icmp.c Wed Oct 1 18:07:34 2014 (r272378) @@ -149,6 +149,10 @@ SYSCTL_VNET_INT(_net_inet_icmp, OID_AUTO &VNET_NAME(icmpbmcastecho), 0, ""); +static VNET_DEFINE(int, icmptstamprepl) = 1; +#define V_icmptstamprepl VNET(icmptstamprepl) +SYSCTL_INT(_net_inet_icmp, OID_AUTO, tstamprepl, CTLFLAG_RW, + &VNET_NAME(icmptstamprepl), 0, "Respond to ICMP Timestamp packets"); #ifdef ICMPPRINTFS int icmpprintfs = 0; @@ -545,6 +549,8 @@ icmp_input(struct mbuf **mp, int *offp, goto reflect; case ICMP_TSTAMP: + if (V_icmptstamprepl == 0) + break; if (!V_icmpbmcastecho && (m->m_flags & (M_MCAST | M_BCAST)) != 0) { ICMPSTAT_INC(icps_bmcasttstamp); From owner-svn-src-all@FreeBSD.ORG Wed Oct 1 18:18:32 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4A973339; Wed, 1 Oct 2014 18:18:32 +0000 (UTC) Received: from mail-wg0-x22c.google.com (mail-wg0-x22c.google.com [IPv6:2a00:1450:400c:c00::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 675A2FFE; Wed, 1 Oct 2014 18:18:31 +0000 (UTC) Received: by mail-wg0-f44.google.com with SMTP id y10so1230797wgg.3 for ; Wed, 01 Oct 2014 11:18:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=9WWRYynxxFcFE4u8IYCLLFA7VMjbHQKPYGWYZ6fFDfk=; b=JC8SBfnyY5IcwOdcbd82rAnWf67KkeiGG1KKGtePvJamVpw2hO99/3ScZfSF5bSNQ1 IN3KciW1LHk/RghZPlzrKM92H1+cTtQCUhgvM7FrhjqHryW8vE6SI1DqLk85+JaqIGK6 p+GgCYbBgh8J4ntwoDDTMEXYeuDWntF0RvKweCNygiemJDTyu52N+QPQidRx3P1ejKdf b0tpjEm2Yb/UzVw8oWO59l+slBI1JZgOxX73J7eaHDb6hpbQXcpytVm3DrMVxaEjLRsL pyglAt4wApVx7cLocu8VDMfVZp8R+mee1s2/ijg1fktOTFdzOvsKL0+aFUzlBctiF+pX E04A== X-Received: by 10.180.211.36 with SMTP id mz4mr16580331wic.39.1412187509243; Wed, 01 Oct 2014 11:18:29 -0700 (PDT) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by mx.google.com with ESMTPSA id ji10sm19390178wid.7.2014.10.01.11.18.28 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 01 Oct 2014 11:18:28 -0700 (PDT) Date: Wed, 1 Oct 2014 20:18:25 +0200 From: Mateusz Guzik To: Will Andrews Subject: Re: svn commit: r272366 - head/sys/kern Message-ID: <20141001181825.GA16048@dft-labs.eu> References: <201410011532.s91FWTZL050853@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <201410011532.s91FWTZL050853@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 18:18:32 -0000 On Wed, Oct 01, 2014 at 03:32:29PM +0000, Will Andrews wrote: > Author: will > Date: Wed Oct 1 15:32:28 2014 > New Revision: 272366 > URL: https://svnweb.freebsd.org/changeset/base/272366 > > Log: > In the syncer, drop the sync mutex while patting the watchdog. > > Some watchdog drivers (like ipmi) need to sleep while patting the watchdog. > See sys/dev/ipmi/ipmi.c:ipmi_wd_event(), which calls malloc(M_WAITOK). > Is not such malloc inherently bad in case of watchdog? It looks like the code waits for request completion and then frees it unconditionally. As such, a local var on stack would do the trick. The code msleeps later, so this hack of dropping sync_mtx is still needed. > Submitted by: asomers > MFC after: 1 month > Sponsored by: Spectra Logic > MFSpectraBSD: 637548 on 2012/10/04 > > Modified: > head/sys/kern/vfs_subr.c > > Modified: head/sys/kern/vfs_subr.c > ============================================================================== > --- head/sys/kern/vfs_subr.c Wed Oct 1 15:23:23 2014 (r272365) > +++ head/sys/kern/vfs_subr.c Wed Oct 1 15:32:28 2014 (r272366) > @@ -1863,8 +1863,15 @@ sched_sync(void) > continue; > } > > - if (first_printf == 0) > + if (first_printf == 0) { > + /* > + * Drop the sync mutex, because some watchdog > + * drivers need to sleep while patting > + */ > + mtx_unlock(&sync_mtx); > wdog_kern_pat(WD_LASTVAL); > + mtx_lock(&sync_mtx); > + } > > } > if (syncer_state == SYNCER_FINAL_DELAY && syncer_final_iter > 0) > -- Mateusz Guzik From owner-svn-src-all@FreeBSD.ORG Wed Oct 1 18:59:58 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 733FFDFF; Wed, 1 Oct 2014 18:59:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5DD0C779; Wed, 1 Oct 2014 18:59:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s91IxwtW047153; Wed, 1 Oct 2014 18:59:58 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s91Ixvqa047151; Wed, 1 Oct 2014 18:59:57 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201410011859.s91Ixvqa047151@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Wed, 1 Oct 2014 18:59:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272379 - in head/usr.sbin/bsdinstall: distextract distfetch X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 18:59:58 -0000 Author: dteske Date: Wed Oct 1 18:59:57 2014 New Revision: 272379 URL: https://svnweb.freebsd.org/changeset/base/272379 Log: Optimize program flow for execution speed. Also fix some more style(9) nits while here: + Fix an issue when extracting small archives where dialog_mixedgauge was not rendering; leaving the user wondering if anything happened. + Add #ifdef's to assuage compilation against older libarchive NB: Minimize diff between branches; make merging easier. + Add missing calls to end_dialog(3) + Change string processing from strtok(3) to strcspn(3) (O(1) optimization) + Use EXIT_SUCCESS and EXIT_FAILURE instead of 0/1 + Optimize getenv(3) use, using stored results instead of calling repeatedly NB: Fixes copy/paste error wherein we display getenv(BSDINSTALL_DISTDIR) in an error msgbox when chdir(2) to getenv(BSDINSTALL_CHROOT) fails (wrong variable displayed in msgbox). + Use strtol(3) instead of [deprecated] atoi(3) + Add additional error checking (e.g., check return of archive_read_new(3)) + Assign DECONST strings to static variables + Fix typo in distextract.c error message (s/Could could/Could not/) + Add comments and make a minor whitespace adjustment Reviewed by: nwhitehorn, julian Modified: head/usr.sbin/bsdinstall/distextract/distextract.c head/usr.sbin/bsdinstall/distfetch/distfetch.c Modified: head/usr.sbin/bsdinstall/distextract/distextract.c ============================================================================== --- head/usr.sbin/bsdinstall/distextract/distextract.c Wed Oct 1 18:07:34 2014 (r272378) +++ head/usr.sbin/bsdinstall/distextract/distextract.c Wed Oct 1 18:59:57 2014 (r272379) @@ -40,45 +40,102 @@ __FBSDID("$FreeBSD$"); #include #include +/* Data to process */ +static char *distdir = NULL; +struct file_node { + char *path; + char *name; + int length; + struct file_node *next; +}; +static struct file_node *dists = NULL; + +/* Function prototypes */ static int count_files(const char *file); -static int extract_files(int nfiles, const char **files); +static int extract_files(int nfiles, struct file_node *files); + +#if __FreeBSD_version <= 1000008 /* r232154: bump for libarchive update */ +#define archive_read_support_filter_all(x) \ + archive_read_support_compression_all(x) +#endif + +#define _errx(...) (end_dialog(), errx(__VA_ARGS__)) int main(void) { - const char **dists; - char *diststring; - int i; + char *chrootdir; + char *distributions; int ndists = 0; int retval; + size_t file_node_size = sizeof(struct file_node); + size_t span; + struct file_node *dist = dists; char error[PATH_MAX + 512]; - if (getenv("DISTRIBUTIONS") == NULL) + if ((distributions = getenv("DISTRIBUTIONS")) == NULL) errx(EXIT_FAILURE, "DISTRIBUTIONS variable is not set"); + if ((distdir = getenv("BSDINSTALL_DISTDIR")) == NULL) + distdir = __DECONST(char *, ""); - diststring = strdup(getenv("DISTRIBUTIONS")); - for (i = 0; diststring[i] != 0; i++) - if (isspace(diststring[i]) && !isspace(diststring[i+1])) - ndists++; - ndists++; /* Last one */ - - dists = calloc(ndists, sizeof(const char *)); - if (dists == NULL) { - free(diststring); - errx(EXIT_FAILURE, "Out of memory!"); - } - - for (i = 0; i < ndists; i++) - dists[i] = strsep(&diststring, " \t"); - + /* Initialize dialog(3) */ init_dialog(stdin, stdout); dialog_vars.backtitle = __DECONST(char *, "FreeBSD Installer"); dlg_put_backtitle(); - if (chdir(getenv("BSDINSTALL_CHROOT")) != 0) { + dialog_msgbox("", + "Checking distribution archives.\nPlease wait...", 4, 35, FALSE); + + /* + * Parse $DISTRIBUTIONS into linked-list + */ + while (*distributions != '\0') { + span = strcspn(distributions, "\t\n\v\f\r "); + if (span < 1) { /* currently on whitespace */ + distributions++; + continue; + } + ndists++; + + /* Allocate a new struct for the distribution */ + if (dist == NULL) { + if ((dist = calloc(1, file_node_size)) == NULL) + _errx(EXIT_FAILURE, "Out of memory!"); + dists = dist; + } else { + dist->next = calloc(1, file_node_size); + if (dist->next == NULL) + _errx(EXIT_FAILURE, "Out of memory!"); + dist = dist->next; + } + + /* Set path */ + if ((dist->path = malloc(span + 1)) == NULL) + _errx(EXIT_FAILURE, "Out of memory!"); + snprintf(dist->path, span + 1, "%s", distributions); + dist->path[span] = '\0'; + + /* Set display name */ + dist->name = strrchr(dist->path, '/'); + if (dist->name == NULL) + dist->name = dist->path; + + /* Set initial length in files (-1 == error) */ + dist->length = count_files(dist->path); + if (dist->length < 0) { + end_dialog(); + return (EXIT_FAILURE); + } + + distributions += span; + } + + /* Optionally chdir(2) into $BSDINSTALL_CHROOT */ + chrootdir = getenv("BSDINSTALL_CHROOT"); + if (chrootdir != NULL && chdir(chrootdir) != 0) { snprintf(error, sizeof(error), - "Could could change to directory %s: %s\n", - getenv("BSDINSTALL_DISTDIR"), strerror(errno)); + "Could not change to directory %s: %s\n", + chrootdir, strerror(errno)); dialog_msgbox("Error", error, 0, 0, TRUE); end_dialog(); return (EXIT_FAILURE); @@ -88,20 +145,28 @@ main(void) end_dialog(); - free(diststring); - free(dists); + while ((dist = dists) != NULL) { + dists = dist->next; + if (dist->path != NULL) + free(dist->path); + free(dist); + } return (retval); } +/* + * Returns number of files in archive file. Parses $BSDINSTALL_DISTDIR/MANIFEST + * if it exists, otherwise uses archive(3) to read the archive file. + */ static int count_files(const char *file) { static FILE *manifest = NULL; - char *tok1; - char *tok2; + char *p; int file_count; int retval; + size_t span; struct archive *archive; struct archive_entry *entry; char line[512]; @@ -109,36 +174,46 @@ count_files(const char *file) char errormsg[PATH_MAX + 512]; if (manifest == NULL) { - snprintf(path, sizeof(path), "%s/MANIFEST", - getenv("BSDINSTALL_DISTDIR")); + snprintf(path, sizeof(path), "%s/MANIFEST", distdir); manifest = fopen(path, "r"); } if (manifest != NULL) { rewind(manifest); while (fgets(line, sizeof(line), manifest) != NULL) { - tok2 = line; - tok1 = strsep(&tok2, "\t"); - if (tok1 == NULL || strcmp(tok1, file) != 0) + p = &line[0]; + span = strcspn(p, "\t") ; + if (span < 1 || strncmp(p, file, span) != 0) continue; /* * We're at the right manifest line. The file count is * in the third element */ - tok1 = strsep(&tok2, "\t"); - tok1 = strsep(&tok2, "\t"); - if (tok1 != NULL) - return atoi(tok1); + span = strcspn(p += span + (*p != '\0' ? 1 : 0), "\t"); + span = strcspn(p += span + (*p != '\0' ? 1 : 0), "\t"); + if (span > 0) { + file_count = (int)strtol(p, (char **)NULL, 10); + if (file_count == 0 && errno == EINVAL) + continue; + return (file_count); + } } } - /* Either we didn't have a manifest, or this archive wasn't there */ - archive = archive_read_new(); + /* + * Either no manifest, or manifest didn't mention this archive. + * Use archive(3) to read the archive, counting files within. + */ + if ((archive = archive_read_new()) == NULL) { + snprintf(errormsg, sizeof(errormsg), + "Error: %s\n", archive_error_string(NULL)); + dialog_msgbox("Extract Error", errormsg, 0, 0, TRUE); + return (-1); + } archive_read_support_format_all(archive); archive_read_support_filter_all(archive); - snprintf(path, sizeof(path), "%s/%s", getenv("BSDINSTALL_DISTDIR"), - file); + snprintf(path, sizeof(path), "%s/%s", distdir, file); retval = archive_read_open_filename(archive, path, 4096); if (retval != ARCHIVE_OK) { snprintf(errormsg, sizeof(errormsg), @@ -157,7 +232,7 @@ count_files(const char *file) } static int -extract_files(int nfiles, const char **files) +extract_files(int nfiles, struct file_node *files) { int archive_file; int archive_files[nfiles]; @@ -169,43 +244,51 @@ extract_files(int nfiles, const char **f int total_files = 0; struct archive *archive; struct archive_entry *entry; + struct file_node *file; char status[8]; + static char title[] = "Archive Extraction"; + static char pprompt[] = "Extracting distribution files...\n"; char path[PATH_MAX]; char errormsg[PATH_MAX + 512]; const char *items[nfiles*2]; /* Make the transfer list for dialog */ - for (i = 0; i < nfiles; i++) { - items[i*2] = strrchr(files[i], '/'); - if (items[i*2] != NULL) - items[i*2]++; - else - items[i*2] = files[i]; + i = 0; + for (file = files; file != NULL; file = file->next) { + items[i*2] = file->name; items[i*2 + 1] = "Pending"; - } - - dialog_msgbox("", - "Checking distribution archives.\nPlease wait...", 0, 0, FALSE); + archive_files[i] = file->length; - /* Count all the files */ - for (i = 0; i < nfiles; i++) { - archive_files[i] = count_files(files[i]); - if (archive_files[i] < 0) - return (-1); - total_files += archive_files[i]; + total_files += file->length; + i++; } - for (i = 0; i < nfiles; i++) { - archive = archive_read_new(); + i = 0; + for (file = files; file != NULL; file = file->next) { + if ((archive = archive_read_new()) == NULL) { + snprintf(errormsg, sizeof(errormsg), + "Error: %s\n", archive_error_string(NULL)); + dialog_msgbox("Extract Error", errormsg, 0, 0, TRUE); + return (EXIT_FAILURE); + } archive_read_support_format_all(archive); archive_read_support_filter_all(archive); - snprintf(path, sizeof(path), "%s/%s", - getenv("BSDINSTALL_DISTDIR"), files[i]); + snprintf(path, sizeof(path), "%s/%s", distdir, file->path); retval = archive_read_open_filename(archive, path, 4096); + if (retval != 0) { + snprintf(errormsg, sizeof(errormsg), + "Error opening %s: %s\n", file->name, + archive_error_string(archive)); + dialog_msgbox("Extract Error", errormsg, 0, 0, TRUE); + return (EXIT_FAILURE); + } items[i*2 + 1] = "In Progress"; archive_file = 0; + dialog_mixedgauge(title, pprompt, 0, 0, progress, nfiles, + __DECONST(char **, items)); + while ((retval = archive_read_next_header(archive, &entry)) == ARCHIVE_OK) { last_progress = progress; @@ -216,8 +299,7 @@ extract_files(int nfiles, const char **f items[i*2 + 1] = status; if (progress > last_progress) - dialog_mixedgauge("Archive Extraction", - "Extracting distribution files...", 0, 0, + dialog_mixedgauge(title, pprompt, 0, 0, progress, nfiles, __DECONST(char **, items)); @@ -240,12 +322,16 @@ extract_files(int nfiles, const char **f "Error while extracting %s: %s\n", items[i*2], archive_error_string(archive)); items[i*2 + 1] = "Failed"; - dialog_msgbox("Extract Error", errormsg, 0, 0, - TRUE); + dialog_msgbox("Extract Error", errormsg, 0, 0, TRUE); return (retval); } + progress = (current_files*100)/total_files; + dialog_mixedgauge(title, pprompt, 0, 0, progress, nfiles, + __DECONST(char **, items)); + archive_read_free(archive); + i++; } return (EXIT_SUCCESS); Modified: head/usr.sbin/bsdinstall/distfetch/distfetch.c ============================================================================== --- head/usr.sbin/bsdinstall/distfetch/distfetch.c Wed Oct 1 18:07:34 2014 (r272378) +++ head/usr.sbin/bsdinstall/distfetch/distfetch.c Wed Oct 1 18:59:57 2014 (r272379) @@ -82,7 +82,7 @@ main(void) getenv("BSDINSTALL_DISTDIR"), strerror(errno)); dialog_msgbox("Error", error, 0, 0, TRUE); end_dialog(); - return (1); + return (EXIT_FAILURE); } nfetched = fetch_files(ndists, urls); @@ -94,7 +94,7 @@ main(void) free(urls[i]); free(urls); - return ((nfetched == ndists) ? 0 : 1); + return ((nfetched == ndists) ? EXIT_SUCCESS : EXIT_FAILURE); } static int From owner-svn-src-all@FreeBSD.ORG Wed Oct 1 19:03:09 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from hammer.pct.niksun.com (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by hub.freebsd.org (Postfix) with ESMTP id 75CA0FAB; Wed, 1 Oct 2014 19:03:08 +0000 (UTC) Message-ID: <542C4FEC.8010800@FreeBSD.org> Date: Wed, 01 Oct 2014 15:03:08 -0400 From: Jung-uk Kim User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 MIME-Version: 1.0 To: Will Andrews , Guido Falsi Subject: Re: svn commit: r272282 - head/share/mk References: <201409291505.s8TF5Nhh066884@svn.freebsd.org> <542C14F6.7020506@FreeBSD.org> In-Reply-To: Content-Type: multipart/mixed; boundary="------------020307090005080900090405" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, "src-committers@FreeBSD.org" , Baptiste Daroussin , Bryan Drewery X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 19:03:09 -0000 This is a multi-part message in MIME format. --------------020307090005080900090405 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2014-10-01 11:06:04 -0400, Will Andrews wrote: > If r272363 doesn't resolve the issue for you, let me know. portmaster still fails for me because: # ls -l /usr/ports lrwxr-xr-x 1 root wheel 16 10 1 14:37 /usr/ports -> /home/jkim/ports To work around the failure, I had to apply the attached patches. Jung-uk Kim > Thanks! --Will. > > On Wed, Oct 1, 2014 at 8:51 AM, Guido Falsi > wrote: >> On 09/29/14 17:05, Will Andrews wrote: >>> Author: will Date: Mon Sep 29 15:05:23 2014 New Revision: >>> 272282 URL: http://svnweb.freebsd.org/changeset/base/272282 >>> >>> Log: Search for the nearest PORTSDIR where Mk/bsd.ports.mk >>> exists, from .CURDIR. This will only take effect if PORTSDIR >>> is not set, as previously supported. >>> >>> Use .if exists(), for four specific possibilities relative to >>> .CURDIR: ., .., ../.., and ../../.. The fourth possibility is >>> primarily in case ports ever grows a third level. If none of >>> these paths exist, fall back to the old default of /usr/ports. >>> >>> This removes the need to set PORTSDIR explicitly (or via >>> wrapper script) if one is running out of a ports tree that is >>> not in /usr/ports, but in a home directory. >>> >>> Reviewed by: bapt, bdrewery (older version) CR: D799 MFC >>> after: 1 week Sponsored by: Spectra Logic >>> >> >> Hi, >> >> I just refreshed my machines head r272349 and this change is >> creating problems to me. >> >> Maybe I've always been doing something wrong but this is what is >> happening: >> >> root@marvin:~ [0]# cd /usr/ports/x11/nvidia-driver >> root@marvin:/usr/ports/x11/nvidia-driver [0]# make -V PORTSDIR >> /usr/ports/x11/nvidia-driver/../.. >> >> this is problematic since now all dependencies are relative >> paths, this is said to be unsupported in bsd.sanity.mk, line 35 >> and following ones. >> >> It also makes poudriere builds fail: >> >> root@marvin:~ [0]# poudriere bulk -C -p mptest -t -j 11amd64 >> x11/xlogo ====>> Creating the reference jail... done ====>> >> Mounting system devices for 11amd64-mptest ====>> Mounting >> ports/packages/distfiles ====>> Mounting packages from: >> /poudriere/data/packages/11amd64-mptest ====>> Logs: >> /poudriere/data/logs/bulk/11amd64-mptest/2014-10-01_16h44m56s >> ====>> WWW: >> http://pkg.madpilot.net:8888/logs/bulk/11amd64-mptest/2014-10-01_16h44m56s >> >> >> ====>> Appending to make.conf: /usr/local/etc/poudriere.d/make.conf >> ====>> DEVELOPER=yes ignored from make.conf. Use 'bulk -t' or >> 'testport' for testing instead. /etc/resolv.conf -> >> /poudriere/data/build/11amd64-mptest/ref/etc/resolv.conf ====>> >> Starting jail 11amd64-mptest ====>> Loading MOVED ====>> >> Calculating ports order and dependencies ====>> Error: >> Duplicated origin for pkgconf-0.9.7: >> devel/xorg-macros/../../devel/pkgconf AND >> x11/xlogo/../../devel/pkgconf. Rerun with -vv to see which ports >> are depending on these. ====>> Cleaning up ====>> Umounting file >> systems >> >> (the ports nvidia-driver and xlogo in these small logs are taken >> at random) >> >> It also completely breaks portmaster. >> >> Maybe this patch is excessive and should first try to discover >> if we already are in the standard /usr/ports subtree? >> >> I have not tried but I'm quite confident I can :fix: this by >> adding PORTSTREE=/usr/ports in /etc/make.conf, but this does not >> look like a good solution. >> >> -- Guido Falsi -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJULE/rAAoJEHyflib82/FGuM8IAInuaiLVvxrRG/th0Q/o8cQ2 vFlBry7cDOVeibnYAcNzKmQBYjVD/XdwQYIJu5Hrpdwj1o6JVfUvlOQYZV++m/Yz G5zvwhqvBqgKMi95mZCXEqPDUXN241f627jnLYX6OrTnQRDqapELtMfdcVssXDMt jQcYK+0Q0F3CtHSQhUicwsUYIl2bff1uOS+vgGU/C/kvDwImla5XuCMf3WJHq87H P5X9yKADc5FzqXoCyaCN++cwHKYx0Dw9p1ym4rfX1VfbZrPjaBUsswxW55lcLQ5/ 9BWJ1sGvcuXt82M9UkcIoxstL4+uQrH3B92MAgXVI49j1iB7u2+iFU2dgZCocZs= =Epd0 -----END PGP SIGNATURE----- --------------020307090005080900090405 Content-Type: text/x-patch; name="ports.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="ports.diff" Index: share/mk/bsd.port.mk =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- share/mk/bsd.port.mk (revision 272375) +++ share/mk/bsd.port.mk (working copy) @@ -12,6 +12,8 @@ PORTSDIR!=3D realpath ${.CURDIR}/.. PORTSDIR!=3D realpath ${.CURDIR}/../.. .elif exists(${.CURDIR}/../../../Mk/bsd.port.mk) PORTSDIR!=3D realpath ${.CURDIR}/../../.. +.elif exists(/usr/ports/Mk/bsd.port.mk) +PORTSDIR!=3D realpath /usr/ports .else PORTSDIR=3D /usr/ports .endif Index: share/mk/bsd.port.subdir.mk =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- share/mk/bsd.port.subdir.mk (revision 272375) +++ share/mk/bsd.port.subdir.mk (working copy) @@ -12,6 +12,8 @@ PORTSDIR!=3D realpath ${.CURDIR}/.. PORTSDIR!=3D realpath ${.CURDIR}/../.. .elif exists(${.CURDIR}/../../../Mk/bsd.port.mk) PORTSDIR!=3D realpath ${.CURDIR}/../../.. +.elif exists(/usr/ports/Mk/bsd.port.mk) +PORTSDIR!=3D realpath /usr/ports .else PORTSDIR=3D /usr/ports .endif --------------020307090005080900090405 Content-Type: text/x-patch; name="portmaster.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="portmaster.diff" --- portmaster.orig 2014-10-01 14:44:28.919316000 -0400 +++ portmaster 2014-10-01 14:44:28.919316000 -0400 @@ -359,7 +359,7 @@ if [ "$$" -eq "$PM_PARENT_PID" ]; then if [ -z "$pd" ]; then if [ -z "$PORTSDIR" ]; then - [ -d /usr/ports ] && pd=3D/usr/ports + [ -d /usr/ports ] && pd=3D`realpath /usr/ports` [ -z "$pd" ] && pd=3D`pm_make_b -f/usr/share/mk/bsd.port.mk -V PORTSDIR 2>/dev/null`= else --------------020307090005080900090405-- From owner-svn-src-all@FreeBSD.ORG Wed Oct 1 19:54:14 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0DF401CA for ; Wed, 1 Oct 2014 19:54:14 +0000 (UTC) Received: from mail-qa0-f41.google.com (mail-qa0-f41.google.com [209.85.216.41]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BE123D89 for ; Wed, 1 Oct 2014 19:54:13 +0000 (UTC) Received: by mail-qa0-f41.google.com with SMTP id n8so852905qaq.28 for ; Wed, 01 Oct 2014 12:54:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=mp7RO1PXcDMakIMZaQM4rXzlB5FYNM+gHMWNnUfDKW8=; b=OA6GggnGuXMMvNfbuLVdhauY5BE6PexwCRPCUmKGUxPe5ctrlSE+tOoFZj7bKkb6oB 6lC6MgYtBL1ASdzmz3gWaRgBWTHqi2IZNCPi0g306XApwkd2kdtugfABep72bzkFnFga E8kZoP5Bb469m+BZLwbobmYgWnMwYhKC3p3LdqngOB7uBOZgwOk24qqNIlRVW+DXlOFg nxbSN7TU0/I/6ZwGOAu5iYPqIGhJvUADbLbbwIDOMJOqDQRZ1n7B4iIOag4WiNdCMJWX 2f04OyJMuqF4Y9SKOOhVf2KntDhpP9TDrS+EXChbhJqL0wp9mgvRo17BSCKmbf8/3iXx Iaxw== X-Gm-Message-State: ALoCoQmv00vKAVqJXNfF0DuNEW1tJe7SvcV9nk7NU1M9XmWSQLNUmdTlBvKPzzDTxi7OsHEQ4Kec MIME-Version: 1.0 X-Received: by 10.224.32.138 with SMTP id c10mr66581994qad.1.1412193246574; Wed, 01 Oct 2014 12:54:06 -0700 (PDT) Received: by 10.140.31.36 with HTTP; Wed, 1 Oct 2014 12:54:06 -0700 (PDT) In-Reply-To: <542C4FEC.8010800@FreeBSD.org> References: <201409291505.s8TF5Nhh066884@svn.freebsd.org> <542C14F6.7020506@FreeBSD.org> <542C4FEC.8010800@FreeBSD.org> Date: Wed, 1 Oct 2014 13:54:06 -0600 Message-ID: Subject: Re: svn commit: r272282 - head/share/mk From: Will Andrews To: Jung-uk Kim Content-Type: text/plain; charset=UTF-8 Cc: Baptiste Daroussin , "src-committers@FreeBSD.org" , "svn-src-all@freebsd.org" , Bryan Drewery , "svn-src-head@freebsd.org" , Guido Falsi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 19:54:14 -0000 What kind of problem did this cause compared to the original version? Could you provide the details of what you saw? Thanks, --Will. On Wed, Oct 1, 2014 at 1:03 PM, Jung-uk Kim wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 2014-10-01 11:06:04 -0400, Will Andrews wrote: >> If r272363 doesn't resolve the issue for you, let me know. > > portmaster still fails for me because: > > # ls -l /usr/ports > lrwxr-xr-x 1 root wheel 16 10 1 14:37 /usr/ports -> /home/jkim/ports > > To work around the failure, I had to apply the attached patches. > > Jung-uk Kim > >> Thanks! --Will. >> >> On Wed, Oct 1, 2014 at 8:51 AM, Guido Falsi >> wrote: >>> On 09/29/14 17:05, Will Andrews wrote: >>>> Author: will Date: Mon Sep 29 15:05:23 2014 New Revision: >>>> 272282 URL: http://svnweb.freebsd.org/changeset/base/272282 >>>> >>>> Log: Search for the nearest PORTSDIR where Mk/bsd.ports.mk >>>> exists, from .CURDIR. This will only take effect if PORTSDIR >>>> is not set, as previously supported. >>>> >>>> Use .if exists(), for four specific possibilities relative to >>>> .CURDIR: ., .., ../.., and ../../.. The fourth possibility is >>>> primarily in case ports ever grows a third level. If none of >>>> these paths exist, fall back to the old default of /usr/ports. >>>> >>>> This removes the need to set PORTSDIR explicitly (or via >>>> wrapper script) if one is running out of a ports tree that is >>>> not in /usr/ports, but in a home directory. >>>> >>>> Reviewed by: bapt, bdrewery (older version) CR: D799 MFC >>>> after: 1 week Sponsored by: Spectra Logic >>>> >>> >>> Hi, >>> >>> I just refreshed my machines head r272349 and this change is >>> creating problems to me. >>> >>> Maybe I've always been doing something wrong but this is what is >>> happening: >>> >>> root@marvin:~ [0]# cd /usr/ports/x11/nvidia-driver >>> root@marvin:/usr/ports/x11/nvidia-driver [0]# make -V PORTSDIR >>> /usr/ports/x11/nvidia-driver/../.. >>> >>> this is problematic since now all dependencies are relative >>> paths, this is said to be unsupported in bsd.sanity.mk, line 35 >>> and following ones. >>> >>> It also makes poudriere builds fail: >>> >>> root@marvin:~ [0]# poudriere bulk -C -p mptest -t -j 11amd64 >>> x11/xlogo ====>> Creating the reference jail... done ====>> >>> Mounting system devices for 11amd64-mptest ====>> Mounting >>> ports/packages/distfiles ====>> Mounting packages from: >>> /poudriere/data/packages/11amd64-mptest ====>> Logs: >>> /poudriere/data/logs/bulk/11amd64-mptest/2014-10-01_16h44m56s >>> ====>> WWW: >>> http://pkg.madpilot.net:8888/logs/bulk/11amd64-mptest/2014-10-01_16h44m56s >>> >>> >>> > ====>> Appending to make.conf: /usr/local/etc/poudriere.d/make.conf >>> ====>> DEVELOPER=yes ignored from make.conf. Use 'bulk -t' or >>> 'testport' for testing instead. /etc/resolv.conf -> >>> /poudriere/data/build/11amd64-mptest/ref/etc/resolv.conf ====>> >>> Starting jail 11amd64-mptest ====>> Loading MOVED ====>> >>> Calculating ports order and dependencies ====>> Error: >>> Duplicated origin for pkgconf-0.9.7: >>> devel/xorg-macros/../../devel/pkgconf AND >>> x11/xlogo/../../devel/pkgconf. Rerun with -vv to see which ports >>> are depending on these. ====>> Cleaning up ====>> Umounting file >>> systems >>> >>> (the ports nvidia-driver and xlogo in these small logs are taken >>> at random) >>> >>> It also completely breaks portmaster. >>> >>> Maybe this patch is excessive and should first try to discover >>> if we already are in the standard /usr/ports subtree? >>> >>> I have not tried but I'm quite confident I can :fix: this by >>> adding PORTSTREE=/usr/ports in /etc/make.conf, but this does not >>> look like a good solution. >>> >>> -- Guido Falsi > > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2 > > iQEcBAEBAgAGBQJULE/rAAoJEHyflib82/FGuM8IAInuaiLVvxrRG/th0Q/o8cQ2 > vFlBry7cDOVeibnYAcNzKmQBYjVD/XdwQYIJu5Hrpdwj1o6JVfUvlOQYZV++m/Yz > G5zvwhqvBqgKMi95mZCXEqPDUXN241f627jnLYX6OrTnQRDqapELtMfdcVssXDMt > jQcYK+0Q0F3CtHSQhUicwsUYIl2bff1uOS+vgGU/C/kvDwImla5XuCMf3WJHq87H > P5X9yKADc5FzqXoCyaCN++cwHKYx0Dw9p1ym4rfX1VfbZrPjaBUsswxW55lcLQ5/ > 9BWJ1sGvcuXt82M9UkcIoxstL4+uQrH3B92MAgXVI49j1iB7u2+iFU2dgZCocZs= > =Epd0 > -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Wed Oct 1 20:03:48 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A1DB44CA; Wed, 1 Oct 2014 20:03:48 +0000 (UTC) Received: from mail-ig0-x231.google.com (mail-ig0-x231.google.com [IPv6:2607:f8b0:4001:c05::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 562C7E67; Wed, 1 Oct 2014 20:03:48 +0000 (UTC) Received: by mail-ig0-f177.google.com with SMTP id a13so273769igq.4 for ; Wed, 01 Oct 2014 13:03:47 -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=bHWrNX/I2/GQehfspK1q+ZO/gqJGDXcXR7483ReIbps=; b=YQxp06ZruxgVgOODYuukZTpU291Dm+Q9U2tR+Zr56aRbFTy09gdg2cvy2AktEAWwyv bCWFt/ZiuUg4JeDl0R6U1GfZp8ku1LCY4eVi458Cy1GpO1A+ZhITF8/mKi8Ei6/Td236 ceTAKtYTVA6sGBFAEEvFee+E2vJVsnzx8yiEMds5OP+4/d1qjunkdu75i+CrumJVNS8Q 7QL3ZL9Na1gabjIZlDrbWoLTIKMmdKZXTQ0txht8nL9olq+aCJenqRWKd65ls9OnV9+E Ck+WJ0EADy25GEhYf7Alx1K3n7OWHYRO4klAdF4de2oU0LkLwX+5tysHLu93fbn1hdAs FjzQ== MIME-Version: 1.0 X-Received: by 10.50.44.71 with SMTP id c7mr22533148igm.49.1412193827699; Wed, 01 Oct 2014 13:03:47 -0700 (PDT) Received: by 10.50.227.42 with HTTP; Wed, 1 Oct 2014 13:03:47 -0700 (PDT) In-Reply-To: <201409291505.s8TF5Nhh066884@svn.freebsd.org> References: <201409291505.s8TF5Nhh066884@svn.freebsd.org> Date: Wed, 1 Oct 2014 13:03:47 -0700 Message-ID: Subject: Re: svn commit: r272282 - head/share/mk From: NGie Cooper To: Will Andrews Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 20:03:48 -0000 On Mon, Sep 29, 2014 at 8:05 AM, Will Andrews wrote: > Author: will > Date: Mon Sep 29 15:05:23 2014 > New Revision: 272282 > URL: http://svnweb.freebsd.org/changeset/base/272282 > > Log: > Search for the nearest PORTSDIR where Mk/bsd.ports.mk exists, from .CURDIR. > This will only take effect if PORTSDIR is not set, as previously supported. > > Use .if exists(), for four specific possibilities relative to .CURDIR: > ., .., ../.., and ../../.. The fourth possibility is primarily in case > ports ever grows a third level. If none of these paths exist, fall back to > the old default of /usr/ports. > > This removes the need to set PORTSDIR explicitly (or via wrapper script) if > one is running out of a ports tree that is not in /usr/ports, but in a > home directory. > > Reviewed by: bapt, bdrewery (older version) > CR: D799 > MFC after: 1 week > Sponsored by: Spectra Logic > > Modified: > head/share/mk/bsd.port.mk > head/share/mk/bsd.port.subdir.mk This change seems like it introduces a lot of unnecessary complexity in lieu of someone setting PORTSDIR to the root of their ports tree in the environment. Why isn't it using a for-loop by the way? Thanks! From owner-svn-src-all@FreeBSD.ORG Wed Oct 1 20:14:00 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from hammer.pct.niksun.com (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by hub.freebsd.org (Postfix) with ESMTP id 06CB973E; Wed, 1 Oct 2014 20:13:59 +0000 (UTC) Message-ID: <542C6087.2060909@FreeBSD.org> Date: Wed, 01 Oct 2014 16:13:59 -0400 From: Jung-uk Kim User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 MIME-Version: 1.0 To: Will Andrews Subject: Re: svn commit: r272282 - head/share/mk References: <201409291505.s8TF5Nhh066884@svn.freebsd.org> <542C14F6.7020506@FreeBSD.org> <542C4FEC.8010800@FreeBSD.org> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Cc: Baptiste Daroussin , "src-committers@FreeBSD.org" , "svn-src-all@freebsd.org" , Bryan Drewery , "svn-src-head@freebsd.org" , Guido Falsi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 20:14:00 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2014-10-01 15:54:06 -0400, Will Andrews wrote: > What kind of problem did this cause compared to the original > version? Could you provide the details of what you saw? # portmaster devel/autoconf devel/autoconf-wrapper ===>>> Working on: devel/autoconf devel/autoconf-wrapper ===>>> devel/autoconf 1/2 ===>>> Gathering distinfo list for installed ports ===>>> Currently installed version: autoconf-2.69 ===>>> Port directory: /usr/ports/devel/autoconf ===>>> Launching 'make checksum' for devel/autoconf in background ===>>> Gathering dependency list for devel/autoconf from ports ===>>> Launching child to install /usr/home/jkim/ports/devel/autoconf-wrapper ===>>> devel/autoconf 1/2 >> /usr/home/jkim/ports/devel/autoconf-wrapper (1/1) ===>>> No valid installed port, or port directory given ===>>> Try portmaster --help ===>>> Update for /usr/home/jkim/ports/devel/autoconf-wrapper failed ===>>> Aborting update ===>>> Update for devel/autoconf failed ===>>> Aborting update Actually, portmaster.diff is just enough to fix portmaster problem. ports.diff is for consistency. Jung-uk Kim > Thanks, --Will. > > On Wed, Oct 1, 2014 at 1:03 PM, Jung-uk Kim > wrote:> On 2014-10-01 11:06:04 -0400, Will Andrews wrote: >>>> If r272363 doesn't resolve the issue for you, let me know. > > portmaster still fails for me because: > > # ls -l /usr/ports lrwxr-xr-x 1 root wheel 16 10 1 14:37 > /usr/ports -> /home/jkim/ports > > To work around the failure, I had to apply the attached patches. > > Jung-uk Kim > >>>> Thanks! --Will. >>>> >>>> On Wed, Oct 1, 2014 at 8:51 AM, Guido Falsi >>>> wrote: >>>>> On 09/29/14 17:05, Will Andrews wrote: >>>>>> Author: will Date: Mon Sep 29 15:05:23 2014 New >>>>>> Revision: 272282 URL: >>>>>> http://svnweb.freebsd.org/changeset/base/272282 >>>>>> >>>>>> Log: Search for the nearest PORTSDIR where >>>>>> Mk/bsd.ports.mk exists, from .CURDIR. This will only take >>>>>> effect if PORTSDIR is not set, as previously supported. >>>>>> >>>>>> Use .if exists(), for four specific possibilities >>>>>> relative to .CURDIR: ., .., ../.., and ../../.. The >>>>>> fourth possibility is primarily in case ports ever grows >>>>>> a third level. If none of these paths exist, fall back >>>>>> to the old default of /usr/ports. >>>>>> >>>>>> This removes the need to set PORTSDIR explicitly (or via >>>>>> wrapper script) if one is running out of a ports tree >>>>>> that is not in /usr/ports, but in a home directory. >>>>>> >>>>>> Reviewed by: bapt, bdrewery (older version) CR: >>>>>> D799 MFC after: 1 week Sponsored by: Spectra >>>>>> Logic >>>>>> >>>>> >>>>> Hi, >>>>> >>>>> I just refreshed my machines head r272349 and this change >>>>> is creating problems to me. >>>>> >>>>> Maybe I've always been doing something wrong but this is >>>>> what is happening: >>>>> >>>>> root@marvin:~ [0]# cd /usr/ports/x11/nvidia-driver >>>>> root@marvin:/usr/ports/x11/nvidia-driver [0]# make -V >>>>> PORTSDIR /usr/ports/x11/nvidia-driver/../.. >>>>> >>>>> this is problematic since now all dependencies are >>>>> relative paths, this is said to be unsupported in >>>>> bsd.sanity.mk, line 35 and following ones. >>>>> >>>>> It also makes poudriere builds fail: >>>>> >>>>> root@marvin:~ [0]# poudriere bulk -C -p mptest -t -j >>>>> 11amd64 x11/xlogo ====>> Creating the reference jail... >>>>> done ====>> Mounting system devices for 11amd64-mptest >>>>> ====>> Mounting ports/packages/distfiles ====>> Mounting >>>>> packages from: /poudriere/data/packages/11amd64-mptest >>>>> ====>> Logs: >>>>> /poudriere/data/logs/bulk/11amd64-mptest/2014-10-01_16h44m56s >>>>> >>>>> ====>> WWW: >>>>> http://pkg.madpilot.net:8888/logs/bulk/11amd64-mptest/2014-10-01_16h44m56s >>>>> >>>>> >>>>> > >>>>> ====>> Appending to make.conf: /usr/local/etc/poudriere.d/make.conf >>>>> ====>> DEVELOPER=yes ignored from make.conf. Use 'bulk -t' >>>>> or 'testport' for testing instead. /etc/resolv.conf -> >>>>> /poudriere/data/build/11amd64-mptest/ref/etc/resolv.conf >>>>> ====>> Starting jail 11amd64-mptest ====>> Loading MOVED >>>>> ====>> Calculating ports order and dependencies ====>> >>>>> Error: Duplicated origin for pkgconf-0.9.7: >>>>> devel/xorg-macros/../../devel/pkgconf AND >>>>> x11/xlogo/../../devel/pkgconf. Rerun with -vv to see which >>>>> ports are depending on these. ====>> Cleaning up ====>> >>>>> Umounting file systems >>>>> >>>>> (the ports nvidia-driver and xlogo in these small logs are >>>>> taken at random) >>>>> >>>>> It also completely breaks portmaster. >>>>> >>>>> Maybe this patch is excessive and should first try to >>>>> discover if we already are in the standard /usr/ports >>>>> subtree? >>>>> >>>>> I have not tried but I'm quite confident I can :fix: this >>>>> by adding PORTSTREE=/usr/ports in /etc/make.conf, but this >>>>> does not look like a good solution. >>>>> >>>>> -- Guido Falsi -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJULGCHAAoJEHyflib82/FGFoMH/1BARQu10hK1avJl3W6lYl3y HeiKU7IvC0+DtfXZvA0Ixn9eGfCzmLi0TqPQTUQRQniIWBNggUTG41mD1Ar6a1nv 3e7AF8vquCwKXYpm9LS/vc4I4U4k7PguUcE2DrX2NaRdkOrNWN09b/NKO8uZndMS sFhzUcp2euCY0X9aV+hBiy7JWmZ5KF5JOA0wXWx33glduuHDHqARJeDzmGKS3ufH RNTRR4rJlWpgALGwjYwAPlS1z7EQgJ4mJBYjMmy1Q10i7sX9oFB7oQc7w/qnUndX q9RtNEgtkgZzKY5JgdUWqIitwr0wl4YCjkpGiylEp+54b7hn+n/qfhXde9G5wyA= =pH7W -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Wed Oct 1 20:15:49 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6E08F8C7; Wed, 1 Oct 2014 20:15:49 +0000 (UTC) Received: from mail-ie0-x22f.google.com (mail-ie0-x22f.google.com [IPv6:2607:f8b0:4001:c03::22f]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 029ACFB9; Wed, 1 Oct 2014 20:15:48 +0000 (UTC) Received: by mail-ie0-f175.google.com with SMTP id x19so243393ier.20 for ; Wed, 01 Oct 2014 13:15:48 -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=t+t3okt0XYT2GhwyJF9CWNEd1X6PKjzr2zGSdkeSh6Q=; b=ZebT6JUqmVEN+Wqhfrz5hGIuZqIghnjSZZZCWEwHbTJ9rVMGzpF4Mf544054bDmhaP fuIbVK9pfixXDyE9DmwqzLDvmqdDYC7lXBczcVhmZc20Dmnr7FdRHQhbsezroXbJw/7g fw1AZy1WvodcIc1pB00bCH0+kk9rdDhD4xTsKA7UaTe4K1XfY8/nkxRYlgMGO5P8ygGS iL3h1LhJjh836soF1jexjp+gnPBC0PMio/t6DWKi90vVUljZFQjzIP8F+f9bzDGnd2C6 68u81QgrL5uDUQuIzqnBKZkVBFS/QDQQzpDWfBYf86lbiTlfBSoViUeIHUsD+SqJThOU +0SQ== MIME-Version: 1.0 X-Received: by 10.50.253.193 with SMTP id ac1mr23079789igd.49.1412194548101; Wed, 01 Oct 2014 13:15:48 -0700 (PDT) Received: by 10.50.227.42 with HTTP; Wed, 1 Oct 2014 13:15:48 -0700 (PDT) In-Reply-To: <542C6087.2060909@FreeBSD.org> References: <201409291505.s8TF5Nhh066884@svn.freebsd.org> <542C14F6.7020506@FreeBSD.org> <542C4FEC.8010800@FreeBSD.org> <542C6087.2060909@FreeBSD.org> Date: Wed, 1 Oct 2014 13:15:48 -0700 Message-ID: Subject: Re: svn commit: r272282 - head/share/mk From: NGie Cooper To: Jung-uk Kim Content-Type: text/plain; charset=UTF-8 Cc: Baptiste Daroussin , "src-committers@FreeBSD.org" , "svn-src-all@freebsd.org" , Bryan Drewery , "svn-src-head@freebsd.org" , Will Andrews , Guido Falsi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 20:15:49 -0000 On Wed, Oct 1, 2014 at 1:13 PM, Jung-uk Kim wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 2014-10-01 15:54:06 -0400, Will Andrews wrote: >> What kind of problem did this cause compared to the original >> version? Could you provide the details of what you saw? > > # portmaster devel/autoconf devel/autoconf-wrapper > > ===>>> Working on: > devel/autoconf > devel/autoconf-wrapper > > > ===>>> devel/autoconf 1/2 > ===>>> Gathering distinfo list for installed ports > > > ===>>> Currently installed version: autoconf-2.69 > ===>>> Port directory: /usr/ports/devel/autoconf > > ===>>> Launching 'make checksum' for devel/autoconf in background > ===>>> Gathering dependency list for devel/autoconf from ports > ===>>> Launching child to install > /usr/home/jkim/ports/devel/autoconf-wrapper > > ===>>> devel/autoconf 1/2 >> > /usr/home/jkim/ports/devel/autoconf-wrapper (1/1) > > ===>>> No valid installed port, or port directory given > ===>>> Try portmaster --help > > > ===>>> Update for /usr/home/jkim/ports/devel/autoconf-wrapper failed > ===>>> Aborting update > > ===>>> Update for devel/autoconf failed > ===>>> Aborting update > > Actually, portmaster.diff is just enough to fix portmaster problem. > ports.diff is for consistency. This is actually one of the problems that people have identified on the -current list recently that they thought was a bug in portmaster. Cheers, From owner-svn-src-all@FreeBSD.ORG Wed Oct 1 20:16:59 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5FE77B11 for ; Wed, 1 Oct 2014 20:16:59 +0000 (UTC) Received: from mail-qg0-f48.google.com (mail-qg0-f48.google.com [209.85.192.48]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1FD03FCB for ; Wed, 1 Oct 2014 20:16:58 +0000 (UTC) Received: by mail-qg0-f48.google.com with SMTP id i50so970020qgf.21 for ; Wed, 01 Oct 2014 13:16:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=cJThrLAmqxL/Ddpo/3IF3nLaHQ7qvQNVKSsZFW7dZqo=; b=YZz6hB0ETGWvb8MJcWF2tR5R4P0m79DNhj6FwtOoKe78/athoNu5EBi5DYJlEqr1IY X7fXtbVpQAvthObAjKv/LVmXYAAcq8ZKjd0TKTdhjGNMOySjjPpLPJ3oR3TZ2/gXW3e8 XEo2oKhVcG6GVQIHUOGI+MLXulhoiDR9l6ggNTkS5DcmISk2mnVJgQsxJraUViGb9L6z /yqf62k+Eo8V0N4dSsYkmTJV/wEqV8NSPGgSvbfkqQBZ4K+EOLqSGuxohq2179rBeF0s 6LZLIwcT0oglNB3X2hPsYhgFDWY4HQQb0ImPHAs7Qzac5b3CtEZiRs336ub/pfNNL1DF EHIw== X-Gm-Message-State: ALoCoQkvHu6XP5zhct9D0cv+p0W2qAdWIpZPn85SMkuZmIJvpUH+r+gfnvYwXaGFJ4IPeL+WQiFv MIME-Version: 1.0 X-Received: by 10.224.127.131 with SMTP id g3mr35814371qas.81.1412194612640; Wed, 01 Oct 2014 13:16:52 -0700 (PDT) Received: by 10.140.31.36 with HTTP; Wed, 1 Oct 2014 13:16:52 -0700 (PDT) In-Reply-To: References: <201409291505.s8TF5Nhh066884@svn.freebsd.org> Date: Wed, 1 Oct 2014 14:16:52 -0600 Message-ID: Subject: Re: svn commit: r272282 - head/share/mk From: Will Andrews To: NGie Cooper Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 20:16:59 -0000 On Wed, Oct 1, 2014 at 2:03 PM, NGie Cooper wrote: > This change seems like it introduces a lot of unnecessary complexity > in lieu of someone setting PORTSDIR to the root of their ports tree in > the environment. Sure, but people that are trying to use it somewhere other than /usr/ports shouldn't be surprised by misbehavior. I've worked with several people (who aren't steeped in the usage of ports) who were astonished by this behavior. > Why isn't it using a for-loop by the way? My original implementation used a shell for loop (see the CR), but given the lack of a legitimate use case for looking farther up than three parent directories, it seemed easier not to. I suppose one could use a static list of paths in the for loop though. --Will. From owner-svn-src-all@FreeBSD.ORG Wed Oct 1 20:33:32 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3C2252DB for ; Wed, 1 Oct 2014 20:33:32 +0000 (UTC) Received: from mail-qc0-f174.google.com (mail-qc0-f174.google.com [209.85.216.174]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EDD75302 for ; Wed, 1 Oct 2014 20:33:31 +0000 (UTC) Received: by mail-qc0-f174.google.com with SMTP id m20so1108411qcx.33 for ; Wed, 01 Oct 2014 13:33:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=6A8bZeX4025K5YBj1l1gy/z+RwFBe2d95rsvBDhyIRw=; b=EwpJWTbeFWmupxs1vk/xNalzoV7KqK6Ofl5gg9lt7MfFusHiNrPEap+DXwiYVXf7Tf vGqpb5KViO0fH30ZQG32SvqQH5eo4nayd0HMj5FaoThSCYcPeXaBlXmUivYk5euN7+I1 Nue9G2AdHOLyHYlNr6bhuix8/SooEPGHh3uHBdvjcQx0JdKSu+Tnmu3BqO0tKa/vqbZ1 /Sa2NBkgeikrfoTzhSCBtSsqXWi65UdH3aynDDIjzwIlki0oOSvOzlF5frweh7vCQpbL TyyP8ORxalB83H6vz0BGOpk3hoo5C2bJ9ZIgJ4pHbQN4gPdItls0ZgpNLJmKhpbddnXI 9KgQ== X-Gm-Message-State: ALoCoQlFlmKyzZ0/MnG6JxkMEZdHFSuHmDi/0jDjG7l1+1wzcdZFd67LNf5eGfCPaIfrfaYNE9Ss MIME-Version: 1.0 X-Received: by 10.224.32.138 with SMTP id c10mr67036630qad.1.1412195610628; Wed, 01 Oct 2014 13:33:30 -0700 (PDT) Received: by 10.140.31.36 with HTTP; Wed, 1 Oct 2014 13:33:30 -0700 (PDT) In-Reply-To: <542C6087.2060909@FreeBSD.org> References: <201409291505.s8TF5Nhh066884@svn.freebsd.org> <542C14F6.7020506@FreeBSD.org> <542C4FEC.8010800@FreeBSD.org> <542C6087.2060909@FreeBSD.org> Date: Wed, 1 Oct 2014 14:33:30 -0600 Message-ID: Subject: Re: svn commit: r272282 - head/share/mk From: Will Andrews To: Jung-uk Kim Content-Type: text/plain; charset=UTF-8 Cc: Baptiste Daroussin , "src-committers@FreeBSD.org" , "svn-src-all@freebsd.org" , Bryan Drewery , "svn-src-head@freebsd.org" , Guido Falsi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 20:33:32 -0000 On Wed, Oct 1, 2014 at 2:13 PM, Jung-uk Kim wrote: > Actually, portmaster.diff is just enough to fix portmaster problem. > ports.diff is for consistency. So I guess portmaster is doing a string comparison to decide whether to install a port? That sounds like a bug in portmaster. I suggest changing it to always ask make for the value of PORTSDIR. --Will. From owner-svn-src-all@FreeBSD.ORG Wed Oct 1 20:37:16 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 243184B8; Wed, 1 Oct 2014 20:37:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 10ECE34F; Wed, 1 Oct 2014 20:37:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s91KbFbV097058; Wed, 1 Oct 2014 20:37:15 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s91KbFfW097057; Wed, 1 Oct 2014 20:37:15 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201410012037.s91KbFfW097057@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Wed, 1 Oct 2014 20:37:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272382 - head/usr.bin/mkimg X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 20:37:16 -0000 Author: marcel Date: Wed Oct 1 20:37:15 2014 New Revision: 272382 URL: https://svnweb.freebsd.org/changeset/base/272382 Log: Suffix the cookie constants with ULL to silence warnings from compilers that try to treat them as 32-bit values. Modified: head/usr.bin/mkimg/vhd.c Modified: head/usr.bin/mkimg/vhd.c ============================================================================== --- head/usr.bin/mkimg/vhd.c Wed Oct 1 19:25:02 2014 (r272381) +++ head/usr.bin/mkimg/vhd.c Wed Oct 1 20:37:15 2014 (r272382) @@ -64,7 +64,7 @@ __FBSDID("$FreeBSD$"); struct vhd_footer { uint64_t cookie; -#define VHD_FOOTER_COOKIE 0x636f6e6563746978 +#define VHD_FOOTER_COOKIE 0x636f6e6563746978ULL uint32_t features; #define VHD_FEATURES_TEMPORARY 0x01 #define VHD_FEATURES_RESERVED 0x02 @@ -236,7 +236,7 @@ vhd_resize(lba_t imgsz) struct vhd_dyn_header { uint64_t cookie; -#define VHD_HEADER_COOKIE 0x6378737061727365 +#define VHD_HEADER_COOKIE 0x6378737061727365ULL uint64_t data_offset; uint64_t table_offset; uint32_t version; From owner-svn-src-all@FreeBSD.ORG Wed Oct 1 20:52:09 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 35BDE976; Wed, 1 Oct 2014 20:52:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 08A937D9; Wed, 1 Oct 2014 20:52:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s91Kq8bn005973; Wed, 1 Oct 2014 20:52:08 GMT (envelope-from will@FreeBSD.org) Received: (from will@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s91Kq8Md005971; Wed, 1 Oct 2014 20:52:08 GMT (envelope-from will@FreeBSD.org) Message-Id: <201410012052.s91Kq8Md005971@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: will set sender to will@FreeBSD.org using -f From: Will Andrews Date: Wed, 1 Oct 2014 20:52:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272383 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 20:52:09 -0000 Author: will Date: Wed Oct 1 20:52:08 2014 New Revision: 272383 URL: https://svnweb.freebsd.org/changeset/base/272383 Log: Revise r272363 by collapsing the tests into a for loop. This has the side effect of ensuring that realpath is also run for the nominal case of PORTSDIR=/usr/ports (assuming .CURDIR is a ports directory that relies on /usr/ports but is not rooted in it). This ensures that any generated PORTSDIR used is always the actual location. Submitted by: jkim (different implementation) Modified: head/share/mk/bsd.port.mk head/share/mk/bsd.port.subdir.mk Modified: head/share/mk/bsd.port.mk ============================================================================== --- head/share/mk/bsd.port.mk Wed Oct 1 20:37:15 2014 (r272382) +++ head/share/mk/bsd.port.mk Wed Oct 1 20:52:08 2014 (r272383) @@ -4,17 +4,13 @@ # Autodetect if the command is being run in a ports tree that's not rooted # in the default /usr/ports. The ../../.. case is in case ports ever grows # a third level. -.if exists(${.CURDIR}/Mk/bsd.port.mk) -PORTSDIR!= realpath ${.CURDIR} -.elif exists(${.CURDIR}/../Mk/bsd.port.mk) -PORTSDIR!= realpath ${.CURDIR}/.. -.elif exists(${.CURDIR}/../../Mk/bsd.port.mk) -PORTSDIR!= realpath ${.CURDIR}/../.. -.elif exists(${.CURDIR}/../../../Mk/bsd.port.mk) -PORTSDIR!= realpath ${.CURDIR}/../../.. -.else -PORTSDIR= /usr/ports +.for RELPATH in . .. ../.. ../../.. +.if !defined(_PORTSDIR) && exists(${.CURDIR}/${RELPATH}/Mk/bsd.port.mk) +_PORTSDIR= ${.CURDIR}/${RELPATH} .endif +.endfor +_PORTSDIR?= /usr/ports +PORTSDIR!= realpath ${_PORTSDIR} .endif BSDPORTMK?= ${PORTSDIR}/Mk/bsd.port.mk Modified: head/share/mk/bsd.port.subdir.mk ============================================================================== --- head/share/mk/bsd.port.subdir.mk Wed Oct 1 20:37:15 2014 (r272382) +++ head/share/mk/bsd.port.subdir.mk Wed Oct 1 20:52:08 2014 (r272383) @@ -4,17 +4,13 @@ # Autodetect if the command is being run in a ports tree that's not rooted # in the default /usr/ports. The ../../.. case is in case ports ever grows # a third level. -.if exists(${.CURDIR}/Mk/bsd.port.mk) -PORTSDIR!= realpath ${.CURDIR} -.elif exists(${.CURDIR}/../Mk/bsd.port.mk) -PORTSDIR!= realpath ${.CURDIR}/.. -.elif exists(${.CURDIR}/../../Mk/bsd.port.mk) -PORTSDIR!= realpath ${.CURDIR}/../.. -.elif exists(${.CURDIR}/../../../Mk/bsd.port.mk) -PORTSDIR!= realpath ${.CURDIR}/../../.. -.else -PORTSDIR= /usr/ports +.for RELPATH in . .. ../.. ../../.. +.if !defined(_PORTSDIR) && exists(${.CURDIR}/${RELPATH}/Mk/bsd.port.mk) +_PORTSDIR= ${.CURDIR}/${RELPATH} .endif +.endfor +_PORTSDIR?= /usr/ports +PORTSDIR!= realpath ${_PORTSDIR} .endif BSDPORTSUBDIRMK?= ${PORTSDIR}/Mk/bsd.port.subdir.mk From owner-svn-src-all@FreeBSD.ORG Wed Oct 1 21:03:18 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E394D150; Wed, 1 Oct 2014 21:03:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C4EB293F; Wed, 1 Oct 2014 21:03:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s91L3H1E010908; Wed, 1 Oct 2014 21:03:17 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s91L3HR0010906; Wed, 1 Oct 2014 21:03:17 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201410012103.s91L3HR0010906@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Wed, 1 Oct 2014 21:03:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272384 - head/usr.bin/mkimg X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 21:03:18 -0000 Author: marcel Date: Wed Oct 1 21:03:17 2014 New Revision: 272384 URL: https://svnweb.freebsd.org/changeset/base/272384 Log: Improve performance of mking(1) by keeping a list of "chunks" in memory, that keeps track of a particular region of the image. In particular the image_data() function needs to return to the caller whether a region contains data or is all zeroes. This required reading the region from the temporary file and comparing the bytes. When image_data() is used multiple times for the same region, this will get painful fast. With a chunk describing a region of the image, we now also have a way to refer to the image provided on the command line. This means we don't need to copy the image into a temporary file. We just keep track of the file descriptor and offset within the source file on a per-chunk basis. For streams (pipes, sockets, fifos, etc) we now use the temporary file as a swap file. We read from the input file and create a chunk of type "zeroes" for each sequence of zeroes that's a multiple of the sector size. Otherwise, we allocte from the swap file, mmap(2) it, read into the mmap(2)'d memory and create a chunk representing data. For regular files, we use SEEK_HOLE and SEEK_DATA to handle sparse files eficiently and create a chunk of type zeroes for holes and a chunk of type data for data regions. For data regions, we still compare the bytes we read to handle differences between a file system's block size and our sector size. After reading all files, image_write() is used by schemes to scribble in the reserved sectors. Since this never amounts to much, keep this data in memory in chunks of exactly 1 sector. The output image is created by looking using the chunk list to find the data and write it out to the output file. For chunks of type "zeroes" we prefer to seek, but fall back to writing zeroes to handle pipes. For chunks of type "file" and "memoty" we simply write. The net effect of this is that for reasonably large images the execution time drops from 1-2 minutes to 10-20 seconds. A typical speedup is about 5 to 8 times, depending on partition sizes, output format whether in input files are sparse or not. Bump version to 20141001. Modified: head/usr.bin/mkimg/Makefile head/usr.bin/mkimg/image.c Directory Properties: head/usr.bin/mkimg/ (props changed) Modified: head/usr.bin/mkimg/Makefile ============================================================================== --- head/usr.bin/mkimg/Makefile Wed Oct 1 20:52:08 2014 (r272383) +++ head/usr.bin/mkimg/Makefile Wed Oct 1 21:03:17 2014 (r272384) @@ -6,7 +6,7 @@ PROG= mkimg SRCS= format.c image.c mkimg.c scheme.c MAN= mkimg.1 -MKIMG_VERSION=20140927 +MKIMG_VERSION=20141001 CFLAGS+=-DMKIMG_VERSION=${MKIMG_VERSION} CFLAGS+=-DSPARSE_WRITE Modified: head/usr.bin/mkimg/image.c ============================================================================== --- head/usr.bin/mkimg/image.c Wed Oct 1 20:52:08 2014 (r272383) +++ head/usr.bin/mkimg/image.c Wed Oct 1 21:03:17 2014 (r272384) @@ -27,71 +27,462 @@ #include __FBSDID("$FreeBSD$"); +#include +#include +#include #include #include #include #include #include +#include #include #include +#include #include #include "image.h" #include "mkimg.h" -#define BUFFER_SIZE (1024*1024) +struct chunk { + STAILQ_ENTRY(chunk) ch_list; + size_t ch_size; /* Size of chunk in bytes. */ + lba_t ch_block; /* Block address in image. */ + union { + struct { + off_t ofs; /* Offset in backing file. */ + int fd; /* FD of backing file. */ + } file; + struct { + void *ptr; /* Pointer to data in memory */ + } mem; + } ch_u; + u_int ch_type; +#define CH_TYPE_ZEROES 0 /* Chunk is a gap (no data). */ +#define CH_TYPE_FILE 1 /* File-backed chunk. */ +#define CH_TYPE_MEMORY 2 /* Memory-backed chunk */ +}; + +static STAILQ_HEAD(chunk_head, chunk) image_chunks; +static u_int image_nchunks; + +static char image_swap_file[PATH_MAX]; +static int image_swap_fd = -1; +static u_int image_swap_pgsz; +static off_t image_swap_size; -static char image_tmpfile[PATH_MAX]; -static int image_fd = -1; static lba_t image_size; -static void -cleanup(void) +static int +is_empty_sector(void *buf) { + uint64_t *p = buf; + size_t n, max; + + assert(((uintptr_t)p & 3) == 0); - if (image_fd != -1) - close(image_fd); - unlink(image_tmpfile); + max = secsz / sizeof(uint64_t); + for (n = 0; n < max; n++) { + if (p[n] != 0UL) + return (0); + } + return (1); } -int -image_copyin(lba_t blk, int fd, uint64_t *sizep) +/* + * Swap file handlng. + */ + +static off_t +image_swap_alloc(size_t size) +{ + off_t ofs; + size_t unit; + + unit = (secsz > image_swap_pgsz) ? secsz : image_swap_pgsz; + assert((unit & (unit - 1)) == 0); + + size = (size + unit - 1) & ~(unit - 1); + + ofs = image_swap_size; + image_swap_size += size; + if (ftruncate(image_swap_fd, image_swap_size) == -1) { + image_swap_size = ofs; + ofs = -1LL; + } + return (ofs); +} + +/* + * Image chunk handling. + */ + +static struct chunk * +image_chunk_find(lba_t blk) +{ + static struct chunk *last = NULL; + struct chunk *ch; + + ch = (last != NULL && last->ch_block <= blk) + ? last : STAILQ_FIRST(&image_chunks); + while (ch != NULL) { + if (ch->ch_block <= blk && + (lba_t)(ch->ch_block + (ch->ch_size / secsz)) > blk) { + last = ch; + break; + } + ch = STAILQ_NEXT(ch, ch_list); + } + return (ch); +} + +static size_t +image_chunk_grow(struct chunk *ch, size_t sz) +{ + size_t dsz, newsz; + + newsz = ch->ch_size + sz; + if (newsz > ch->ch_size) { + ch->ch_size = newsz; + return (0); + } + /* We would overflow -- create new chunk for remainder. */ + dsz = SIZE_MAX - ch->ch_size; + assert(dsz < sz); + ch->ch_size = SIZE_MAX; + return (sz - dsz); +} + +static struct chunk * +image_chunk_memory(struct chunk *ch, lba_t blk) +{ + struct chunk *new; + void *ptr; + + ptr = calloc(1, secsz); + if (ptr == NULL) + return (NULL); + + if (ch->ch_block < blk) { + new = malloc(sizeof(*new)); + if (new == NULL) { + free(ptr); + return (NULL); + } + memcpy(new, ch, sizeof(*new)); + ch->ch_size = (blk - ch->ch_block) * secsz; + new->ch_block = blk; + new->ch_size -= ch->ch_size; + STAILQ_INSERT_AFTER(&image_chunks, ch, new, ch_list); + image_nchunks++; + ch = new; + } + + if (ch->ch_size > secsz) { + new = malloc(sizeof(*new)); + if (new == NULL) { + free(ptr); + return (NULL); + } + memcpy(new, ch, sizeof(*new)); + ch->ch_size = secsz; + new->ch_block++; + new->ch_size -= secsz; + STAILQ_INSERT_AFTER(&image_chunks, ch, new, ch_list); + image_nchunks++; + } + + ch->ch_type = CH_TYPE_MEMORY; + ch->ch_u.mem.ptr = ptr; + return (ch); +} + +static int +image_chunk_skipto(lba_t to) +{ + struct chunk *ch; + lba_t from; + size_t sz; + + ch = STAILQ_LAST(&image_chunks, chunk, ch_list); + from = (ch != NULL) ? ch->ch_block + (ch->ch_size / secsz) : 0LL; + + assert(from <= to); + + /* Nothing to do? */ + if (from == to) + return (0); + /* Avoid bugs due to overflows. */ + if ((uintmax_t)(to - from) > (uintmax_t)(SIZE_MAX / secsz)) + return (EFBIG); + sz = (to - from) * secsz; + if (ch != NULL && ch->ch_type == CH_TYPE_ZEROES) { + sz = image_chunk_grow(ch, sz); + if (sz == 0) + return (0); + from = ch->ch_block + (ch->ch_size / secsz); + } + ch = malloc(sizeof(*ch)); + if (ch == NULL) + return (ENOMEM); + memset(ch, 0, sizeof(*ch)); + ch->ch_block = from; + ch->ch_size = sz; + ch->ch_type = CH_TYPE_ZEROES; + STAILQ_INSERT_TAIL(&image_chunks, ch, ch_list); + image_nchunks++; + return (0); +} + +static int +image_chunk_append(lba_t blk, size_t sz, off_t ofs, int fd) +{ + struct chunk *ch; + + ch = STAILQ_LAST(&image_chunks, chunk, ch_list); + if (ch != NULL && ch->ch_type == CH_TYPE_FILE) { + if (fd == ch->ch_u.file.fd && + blk == (lba_t)(ch->ch_block + (ch->ch_size / secsz)) && + ofs == (off_t)(ch->ch_u.file.ofs + ch->ch_size)) { + sz = image_chunk_grow(ch, sz); + if (sz == 0) + return (0); + blk = ch->ch_block + (ch->ch_size / secsz); + ofs = ch->ch_u.file.ofs + ch->ch_size; + } + } + ch = malloc(sizeof(*ch)); + if (ch == NULL) + return (ENOMEM); + memset(ch, 0, sizeof(*ch)); + ch->ch_block = blk; + ch->ch_size = sz; + ch->ch_type = CH_TYPE_FILE; + ch->ch_u.file.ofs = ofs; + ch->ch_u.file.fd = fd; + STAILQ_INSERT_TAIL(&image_chunks, ch, ch_list); + image_nchunks++; + return (0); +} + +static int +image_chunk_copyin(lba_t blk, void *buf, size_t sz, off_t ofs, int fd) +{ + uint8_t *p = buf; + int error; + + error = 0; + sz = (sz + secsz - 1) & ~(secsz - 1); + while (!error && sz > 0) { + if (is_empty_sector(p)) + error = image_chunk_skipto(blk + 1); + else + error = image_chunk_append(blk, secsz, ofs, fd); + blk++; + p += secsz; + sz -= secsz; + ofs += secsz; + } + return (error); +} + +/* + * File mapping support. + */ + +static void * +image_file_map(int fd, off_t ofs, size_t sz) +{ + void *ptr; + size_t unit; + int flags, prot; + + unit = (secsz > image_swap_pgsz) ? secsz : image_swap_pgsz; + assert((unit & (unit - 1)) == 0); + + flags = MAP_NOCORE | MAP_NOSYNC | MAP_SHARED; + /* Allow writing to our swap file only. */ + prot = PROT_READ | ((fd == image_swap_fd) ? PROT_WRITE : 0); + sz = (sz + unit - 1) & ~(unit - 1); + ptr = mmap(NULL, sz, prot, flags, fd, ofs); + return ((ptr == MAP_FAILED) ? NULL : ptr); +} + +static int +image_file_unmap(void *buffer, size_t sz) +{ + size_t unit; + + unit = (secsz > image_swap_pgsz) ? secsz : image_swap_pgsz; + sz = (sz + unit - 1) & ~(unit - 1); + munmap(buffer, sz); + return (0); +} + +/* + * Input/source file handling. + */ + +static int +image_copyin_stream(lba_t blk, int fd, uint64_t *sizep) { char *buffer; uint64_t bytesize; - ssize_t bcnt, rdsz; - int error, partial; + off_t swofs; + size_t iosz; + ssize_t rdsz; + int error; - assert(BUFFER_SIZE % secsz == 0); + /* + * This makes sure we're doing I/O in multiples of the page + * size as well as of the sector size. 2MB is the minimum + * by virtue of secsz at least 512 bytes and the page size + * at least 4K bytes. + */ + iosz = secsz * image_swap_pgsz; - buffer = malloc(BUFFER_SIZE); - if (buffer == NULL) - return (ENOMEM); bytesize = 0; - partial = 0; - while (1) { - rdsz = read(fd, buffer, BUFFER_SIZE); - if (rdsz <= 0) { - error = (rdsz < 0) ? errno : 0; - break; - } - if (partial) - abort(); - bytesize += rdsz; - bcnt = (rdsz + secsz - 1) / secsz; - error = image_write(blk, buffer, bcnt); + do { + swofs = image_swap_alloc(iosz); + if (swofs == -1LL) + return (errno); + buffer = image_file_map(image_swap_fd, swofs, iosz); + if (buffer == NULL) + return (errno); + rdsz = read(fd, buffer, iosz); + if (rdsz > 0) + error = image_chunk_copyin(blk, buffer, rdsz, swofs, + image_swap_fd); + else if (rdsz < 0) + error = errno; + else + error = 0; + image_file_unmap(buffer, iosz); + /* XXX should we relinguish unused swap space? */ if (error) + return (error); + + bytesize += rdsz; + blk += (rdsz + secsz - 1) / secsz; + } while (rdsz > 0); + + if (sizep != NULL) + *sizep = bytesize; + return (0); +} + +static int +image_copyin_mapped(lba_t blk, int fd, uint64_t *sizep) +{ + off_t cur, data, end, hole, pos; + void *buf; + uint64_t bytesize; + size_t iosz, sz; + int error; + + /* + * We'd like to know the size of the file and we must + * be able to seek in order to mmap(2). If this isn't + * possible, then treat the file as a stream/pipe. + */ + end = lseek(fd, 0L, SEEK_END); + if (end == -1L) + return (image_copyin_stream(blk, fd, sizep)); + + /* + * We need the file opened for the duration and our + * caller is going to close the file. Make a dup(2) + * so that control the faith of the descriptor. + */ + fd = dup(fd); + if (fd == -1) + return (errno); + + iosz = secsz * image_swap_pgsz; + + bytesize = 0; + cur = pos = 0; + error = 0; + while (!error && cur < end) { + hole = lseek(fd, cur, SEEK_HOLE); + data = lseek(fd, cur, SEEK_DATA); + + /* + * Treat the entire file as data if sparse files + * are not supported by the underlying file system. + */ + if (hole == -1 && data == -1) { + data = cur; + hole = end; + } + + if (cur == hole && data > hole) { + hole = pos; + pos = data & ~((uint64_t)secsz - 1); + + blk += (pos - hole) / secsz; + error = image_chunk_skipto(blk); + + bytesize += pos - hole; + cur = data; + } else if (cur == data && hole > data) { + data = pos; + pos = (hole + secsz - 1) & ~((uint64_t)secsz - 1); + + while (data < pos) { + sz = (pos - data > (off_t)iosz) + ? iosz : (size_t)(pos - data); + + buf = image_file_map(fd, data, sz); + if (buf != NULL) { + error = image_chunk_copyin(blk, buf, + sz, data, fd); + image_file_unmap(buf, sz); + } else + error = errno; + + blk += sz / secsz; + bytesize += sz; + data += sz; + } + cur = hole; + } else { + /* + * I don't know what this means or whether it + * can happen at all... + */ + error = EDOOFUS; break; - blk += bcnt; - partial = ((ssize_t)(bcnt * secsz) != rdsz) ? 1 : 0; + } } - free(buffer); - if (sizep != NULL) + if (error) + close(fd); + if (!error && sizep != NULL) *sizep = bytesize; return (error); } int +image_copyin(lba_t blk, int fd, uint64_t *sizep) +{ + struct stat sb; + int error; + + error = image_chunk_skipto(blk); + if (!error) { + if (fstat(fd, &sb) == -1 || !S_ISREG(sb.st_mode)) + error = image_copyin_stream(blk, fd, sizep); + else + error = image_copyin_mapped(blk, fd, sizep); + } + return (error); +} + +/* + * Output/sink file handling. + */ + +int image_copyout(int fd) { int error; @@ -115,71 +506,124 @@ image_copyout_done(int fd) return (error); } -int -image_copyout_region(int fd, lba_t blk, lba_t size) +static int +image_copyout_memory(int fd, size_t size, void *ptr) { - char *buffer; - off_t ofs; + + if (write(fd, ptr, size) == -1) + return (errno); + return (0); +} + +static int +image_copyout_zeroes(int fd, size_t size) +{ + static uint8_t *zeroes = NULL; size_t sz; - ssize_t rdsz, wrsz; int error; - ofs = lseek(fd, 0L, SEEK_CUR); + if (lseek(fd, (off_t)size, SEEK_CUR) != -1) + return (0); + + /* + * If we can't seek, we must write. + */ + + if (zeroes == NULL) { + zeroes = calloc(1, secsz); + if (zeroes == NULL) + return (ENOMEM); + } + + while (size > 0) { + sz = (size > secsz) ? secsz : size; + error = image_copyout_memory(fd, sz, zeroes); + if (error) + return (error); + size -= sz; + } + return (0); +} + +static int +image_copyout_file(int fd, size_t size, int ifd, off_t iofs) +{ + void *buf; + size_t iosz, sz; + int error; + + iosz = secsz * image_swap_pgsz; + + while (size > 0) { + sz = (size > iosz) ? iosz : size; + buf = image_file_map(ifd, iofs, sz); + if (buf == NULL) + return (errno); + error = image_copyout_memory(fd, sz, buf); + image_file_unmap(buf, sz); + if (error) + return (error); + size -= sz; + iofs += sz; + } + return (0); +} + +int +image_copyout_region(int fd, lba_t blk, lba_t size) +{ + struct chunk *ch; + size_t ofs, sz; + int error; - blk *= secsz; - if (lseek(image_fd, blk, SEEK_SET) != blk) - return (errno); - buffer = malloc(BUFFER_SIZE); - if (buffer == NULL) - return (errno); - error = 0; size *= secsz; + while (size > 0) { - sz = (BUFFER_SIZE < size) ? BUFFER_SIZE : size; - rdsz = read(image_fd, buffer, sz); - if (rdsz <= 0) { - error = (rdsz < 0) ? errno : 0; + ch = image_chunk_find(blk); + if (ch == NULL) + return (EINVAL); + ofs = (blk - ch->ch_block) * secsz; + sz = ch->ch_size - ofs; + sz = ((lba_t)sz < size) ? sz : (size_t)size; + switch (ch->ch_type) { + case CH_TYPE_ZEROES: + error = image_copyout_zeroes(fd, sz); break; - } - wrsz = (ofs == -1) ? - write(fd, buffer, rdsz) : - sparse_write(fd, buffer, rdsz); - if (wrsz < 0) { - error = errno; + case CH_TYPE_FILE: + error = image_copyout_file(fd, sz, ch->ch_u.file.fd, + ch->ch_u.file.ofs + ofs); + break; + case CH_TYPE_MEMORY: + error = image_copyout_memory(fd, sz, ch->ch_u.mem.ptr); break; + default: + return (EDOOFUS); } - assert(wrsz == rdsz); - size -= rdsz; + size -= sz; + blk += sz / secsz; } - free(buffer); - return (error); + return (0); } int image_data(lba_t blk, lba_t size) { - char *buffer, *p; - - blk *= secsz; - if (lseek(image_fd, blk, SEEK_SET) != blk) - return (1); + struct chunk *ch; + lba_t lim; - size *= secsz; - buffer = malloc(size); - if (buffer == NULL) - return (1); - - if (read(image_fd, buffer, size) != (ssize_t)size) { - free(buffer); - return (1); + while (1) { + ch = image_chunk_find(blk); + if (ch == NULL) + return (0); + if (ch->ch_type != CH_TYPE_ZEROES) + return (1); + lim = ch->ch_block + (ch->ch_size / secsz); + if (lim >= blk + size) + return (0); + size -= lim - blk; + blk = lim; } - - p = buffer; - while (size > 0 && *p == '\0') - size--, p++; - - free(buffer); - return ((size == 0) ? 0 : 1); + /*NOTREACHED*/ } lba_t @@ -192,39 +636,87 @@ image_get_size(void) int image_set_size(lba_t blk) { + int error; - image_size = blk; - if (ftruncate(image_fd, blk * secsz) == -1) - return (errno); - return (0); + error = image_chunk_skipto(blk); + if (!error) + image_size = blk; + return (error); } int image_write(lba_t blk, void *buf, ssize_t len) { + struct chunk *ch; - blk *= secsz; - if (lseek(image_fd, blk, SEEK_SET) != blk) - return (errno); - len *= secsz; - if (sparse_write(image_fd, buf, len) != len) - return (errno); + while (len > 0) { + if (!is_empty_sector(buf)) { + ch = image_chunk_find(blk); + if (ch == NULL) + return (ENXIO); + /* We may not be able to write to files. */ + if (ch->ch_type == CH_TYPE_FILE) + return (EINVAL); + if (ch->ch_type == CH_TYPE_ZEROES) { + ch = image_chunk_memory(ch, blk); + if (ch == NULL) + return (ENOMEM); + } + assert(ch->ch_type == CH_TYPE_MEMORY); + memcpy(ch->ch_u.mem.ptr, buf, secsz); + } + blk++; + buf = (char *)buf + secsz; + len--; + } return (0); } +static void +image_cleanup(void) +{ + struct chunk *ch; + + while ((ch = STAILQ_FIRST(&image_chunks)) != NULL) { + switch (ch->ch_type) { + case CH_TYPE_FILE: + /* We may be closing the same file multiple times. */ + if (ch->ch_u.file.fd != -1) + close(ch->ch_u.file.fd); + break; + case CH_TYPE_MEMORY: + free(ch->ch_u.mem.ptr); + break; + default: + break; + } + STAILQ_REMOVE_HEAD(&image_chunks, ch_list); + free(ch); + } + if (image_swap_fd != -1) + close(image_swap_fd); + unlink(image_swap_file); +} + int image_init(void) { const char *tmpdir; - if (atexit(cleanup) == -1) + STAILQ_INIT(&image_chunks); + image_nchunks = 0; + + image_swap_size = 0; + image_swap_pgsz = getpagesize(); + + if (atexit(image_cleanup) == -1) return (errno); if ((tmpdir = getenv("TMPDIR")) == NULL || *tmpdir == '\0') tmpdir = _PATH_TMP; - snprintf(image_tmpfile, sizeof(image_tmpfile), "%s/mkimg-XXXXXX", + snprintf(image_swap_file, sizeof(image_swap_file), "%s/mkimg-XXXXXX", tmpdir); - image_fd = mkstemp(image_tmpfile); - if (image_fd == -1) + image_swap_fd = mkstemp(image_swap_file); + if (image_swap_fd == -1) return (errno); return (0); } From owner-svn-src-all@FreeBSD.ORG Wed Oct 1 21:21:56 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BB1C4718; Wed, 1 Oct 2014 21:21:56 +0000 (UTC) Received: from mail-ie0-x236.google.com (mail-ie0-x236.google.com [IPv6:2607:f8b0:4001:c03::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 758D5C15; Wed, 1 Oct 2014 21:21:56 +0000 (UTC) Received: by mail-ie0-f182.google.com with SMTP id rp18so1262812iec.41 for ; Wed, 01 Oct 2014 14:21:55 -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=r2K+/f0uOXmEDUbYDfZzdlWyWhYu1uu8in5uPB0KN14=; b=jrAWph9OAEikgMZf5LQYdksC95ihyZAsuEa/pxvVDXwyWRJ7Z6NIH1msQu18gzeMmU uWz2qjsc7wyVGaY2BPZaV9UAnb1ZFwnLcCwkxoFMJt9qS6nu1hOpvHr/zO6Aa9zcaW7y PNb3tnpo1++eGuUEc+yvicVXrPerAnkRBQcISViUVEDiGGvYGdOj1YS/YQAsqlJvaz8h +5dxchRQ9/58iAqncDNlUnAZvPENXwJeNJdPey9eBJQQq6YcQ1DB4qd0GlXOjp4n6MGT 4NkzIIL8oaGqr+PR8Qpb12uH7q5m3VFiwsABVQtaHV31VMe0JIs5FY0zaIJPgmqlEGVX og6g== MIME-Version: 1.0 X-Received: by 10.42.212.7 with SMTP id gq7mr4626064icb.28.1412198515747; Wed, 01 Oct 2014 14:21:55 -0700 (PDT) Received: by 10.50.227.42 with HTTP; Wed, 1 Oct 2014 14:21:55 -0700 (PDT) In-Reply-To: References: <201409291505.s8TF5Nhh066884@svn.freebsd.org> Date: Wed, 1 Oct 2014 14:21:55 -0700 Message-ID: Subject: Re: svn commit: r272282 - head/share/mk From: NGie Cooper To: Will Andrews Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 21:21:56 -0000 On Wed, Oct 1, 2014 at 1:16 PM, Will Andrews wrote: > On Wed, Oct 1, 2014 at 2:03 PM, NGie Cooper wrote: >> This change seems like it introduces a lot of unnecessary complexity >> in lieu of someone setting PORTSDIR to the root of their ports tree in >> the environment. > > Sure, but people that are trying to use it somewhere other than > /usr/ports shouldn't be surprised by misbehavior. I've worked with > several people (who aren't steeped in the usage of ports) who were > astonished by this behavior. Sounds like a documentation issue though (it's not listed in the handbook :(..: https://www.freebsd.org/doc/handbook/ports-using.html ) >> Why isn't it using a for-loop by the way? > > My original implementation used a shell for loop (see the CR), but > given the lack of a legitimate use case for looking farther up than > three parent directories, it seemed easier not to. I suppose one > could use a static list of paths in the for loop though. Yep -- that's what I meant :). Thanks! From owner-svn-src-all@FreeBSD.ORG Wed Oct 1 21:24:59 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B6B9E909; Wed, 1 Oct 2014 21:24:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A3C37C3D; Wed, 1 Oct 2014 21:24:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s91LOxGu020609; Wed, 1 Oct 2014 21:24:59 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s91LOxFU020608; Wed, 1 Oct 2014 21:24:59 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201410012124.s91LOxFU020608@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Wed, 1 Oct 2014 21:24:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272385 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 21:24:59 -0000 Author: melifaro Date: Wed Oct 1 21:24:58 2014 New Revision: 272385 URL: https://svnweb.freebsd.org/changeset/base/272385 Log: Free radix mask entries on main radix destroy. This is temporary commit to be merged to 10. Other approach (like hash table) should be used to store different masks. PR: 194078 Submitted by: Rumen Telbizov MFC after: 3 days Modified: head/sys/net/radix.c Modified: head/sys/net/radix.c ============================================================================== --- head/sys/net/radix.c Wed Oct 1 21:03:17 2014 (r272384) +++ head/sys/net/radix.c Wed Oct 1 21:24:58 2014 (r272385) @@ -1178,6 +1178,18 @@ rn_inithead(void **head, int off) return (1); } +static int +rn_freeentry(struct radix_node *rn, void *arg) +{ + struct radix_node_head * const rnh = arg; + struct radix_node *x; + + x = (struct radix_node *)rn_delete(rn + 2, NULL, rnh); + if (x != NULL) + Free(x); + return (0); +} + int rn_detachhead(void **head) { @@ -1188,6 +1200,7 @@ rn_detachhead(void **head) rnh = *head; + rn_walktree(rnh->rnh_masks, rn_freeentry, rnh->rnh_masks); rn_detachhead_internal((void **)&rnh->rnh_masks); rn_detachhead_internal(head); return (1); From owner-svn-src-all@FreeBSD.ORG Wed Oct 1 21:37:35 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1B0A9E5; Wed, 1 Oct 2014 21:37:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 06A5FDE2; Wed, 1 Oct 2014 21:37:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s91LbYi6025973; Wed, 1 Oct 2014 21:37:34 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s91LbXL4025967; Wed, 1 Oct 2014 21:37:33 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201410012137.s91LbXL4025967@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Wed, 1 Oct 2014 21:37:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272386 - in head: sbin/ifconfig share/man/man4 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 21:37:35 -0000 Author: hrs Date: Wed Oct 1 21:37:32 2014 New Revision: 272386 URL: https://svnweb.freebsd.org/changeset/base/272386 Log: Virtualize lagg(4) cloner. This change fixes a panic when tearing down if_lagg(4) interfaces which were cloned in a vnet jail. Sysctl nodes which are dynamically generated for each cloned interface (net.link.lagg.N.*) have been removed, and use_flowid and flowid_shift ifconfig(8) parameters have been added instead. Flags and per-interface statistics counters are displayed in "ifconfig -v". CR: D842 Modified: head/sbin/ifconfig/ifconfig.8 head/sbin/ifconfig/iflagg.c head/share/man/man4/lagg.4 head/sys/net/ieee8023ad_lacp.c head/sys/net/if_lagg.c head/sys/net/if_lagg.h Modified: head/sbin/ifconfig/ifconfig.8 ============================================================================== --- head/sbin/ifconfig/ifconfig.8 Wed Oct 1 21:24:58 2014 (r272385) +++ head/sbin/ifconfig/ifconfig.8 Wed Oct 1 21:37:32 2014 (r272386) @@ -28,7 +28,7 @@ .\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94 .\" $FreeBSD$ .\" -.Dd September 9, 2014 +.Dd October 1, 2014 .Dt IFCONFIG 8 .Os .Sh NAME @@ -679,7 +679,7 @@ Set a flag to enable Neighbor Unreachabi Clear a flag .Cm nud . .It Cm no_prefer_iface -Set a flag to not honor rule 5 of source address selection in RFC 3484. +Set a flag to not honor rule 5 of source address selection in RFC 3484. In practice this means the address on the outgoing interface will not be preferred, effectively yielding the decision to the address selection policy table, configurable with @@ -2331,9 +2331,16 @@ Remove the interface named by from the aggregation interface. .It Cm laggproto Ar proto Set the aggregation protocol. -The default is failover. -The available options are failover, lacp, loadbalance, roundrobin, broadcast -and none. +The default is +.Li failover . +The available options are +.Li failover , +.Li lacp , +.Li loadbalance , +.Li roundrobin , +.Li broadcast +and +.Li none . .It Cm lagghash Ar option Ns Oo , Ns Ar option Oc Set the packet layers to hash for aggregation protocols which load balance. The default is @@ -2348,6 +2355,34 @@ src/dst address for IPv4 or IPv6. .It Cm l4 src/dst port for TCP/UDP/SCTP. .El +.It Cm use_flowid +Enable local hash computation for RSS hash on the interface. +The +.Li loadbalance +and +.Li lacp +modes will use the RSS hash from the network card if available +to avoid computing one, this may give poor traffic distribution +if the hash is invalid or uses less of the protocol header information. +.Cm use_flowid +disables use of RSS hash from the network card. +The default value can be set via the +.Va net.link.lagg.default_use_flowid +.Xr sysctl 8 +variable. +.Li 0 +means +.Dq disabled +and +.Li 1 +means +.Dq enabled . +.It Cm -use_flowid +Disable local hash computation for RSS hash on the interface. +.It Cm flowid_shift Ar number +Set a shift parameter for RSS local hash computation. +Hash is calculated by using flowid bits in a packet header mbuf +which are shifted by the number of this parameter. .El .Pp The following parameters are specific to IP tunnel interfaces, Modified: head/sbin/ifconfig/iflagg.c ============================================================================== --- head/sbin/ifconfig/iflagg.c Wed Oct 1 21:24:58 2014 (r272385) +++ head/sbin/ifconfig/iflagg.c Wed Oct 1 21:37:32 2014 (r272386) @@ -68,7 +68,7 @@ setlaggproto(const char *val, int d, int bzero(&ra, sizeof(ra)); ra.ra_proto = LAGG_PROTO_MAX; - for (i = 0; i < (sizeof(lpr) / sizeof(lpr[0])); i++) { + for (i = 0; i < nitems(lpr); i++) { if (strcmp(val, lpr[i].lpr_name) == 0) { ra.ra_proto = lpr[i].lpr_proto; break; @@ -83,6 +83,48 @@ setlaggproto(const char *val, int d, int } static void +setlaggflowidshift(const char *val, int d, int s, const struct afswtch *afp) +{ + struct lagg_reqall ra; + + bzero(&ra, sizeof(ra)); + ra.ra_opts = LAGG_OPT_FLOWIDSHIFT; + strlcpy(ra.ra_ifname, name, sizeof(ra.ra_ifname)); + ra.ra_flowid_shift = (int)strtol(val, NULL, 10); + if (ra.ra_flowid_shift & ~LAGG_OPT_FLOWIDSHIFT_MASK) + errx(1, "Invalid flowid_shift option: %s", val); + + if (ioctl(s, SIOCSLAGG, &ra) != 0) + err(1, "SIOCSLAGG"); +} + +static void +setlaggsetopt(const char *val, int d, int s, const struct afswtch *afp) +{ + struct lagg_reqall ra; + + bzero(&ra, sizeof(ra)); + ra.ra_opts = d; + switch (ra.ra_opts) { + case LAGG_OPT_USE_FLOWID: + case -LAGG_OPT_USE_FLOWID: + case LAGG_OPT_LACP_STRICT: + case -LAGG_OPT_LACP_STRICT: + case LAGG_OPT_LACP_TXTEST: + case -LAGG_OPT_LACP_TXTEST: + case LAGG_OPT_LACP_RXTEST: + case -LAGG_OPT_LACP_RXTEST: + break; + default: + err(1, "Invalid lagg option"); + } + strlcpy(ra.ra_ifname, name, sizeof(ra.ra_ifname)); + + if (ioctl(s, SIOCSLAGG, &ra) != 0) + err(1, "SIOCSLAGG"); +} + +static void setlagghash(const char *val, int d, int s, const struct afswtch *afp) { struct lagg_reqflags rf; @@ -169,7 +211,7 @@ lagg_status(int s) if (ioctl(s, SIOCGLAGG, &ra) == 0) { lp = (struct lacp_opreq *)&ra.ra_lacpreq; - for (i = 0; i < (sizeof(lpr) / sizeof(lpr[0])); i++) { + for (i = 0; i < nitems(lpr); i++) { if (ra.ra_proto == lpr[i].lpr_proto) { proto = lpr[i].lpr_name; break; @@ -197,9 +239,28 @@ lagg_status(int s) if (isport) printf(" laggdev %s", rp.rp_ifname); putchar('\n'); - if (verbose && ra.ra_proto == LAGG_PROTO_LACP) - printf("\tlag id: %s\n", - lacp_format_peer(lp, "\n\t\t ")); + if (verbose) { + printf("\tlagg options:\n"); + printf("\t\tuse_flowid: %d\n", + (ra.ra_opts & LAGG_OPT_USE_FLOWID) ? 1 : 0); + printf("\t\tflowid_shift: %d\n", ra.ra_flowid_shift); + switch (ra.ra_proto) { + case LAGG_PROTO_LACP: + printf("\t\tlacp_strict: %d\n", + (ra.ra_opts & LAGG_OPT_LACP_STRICT) ? 1 : 0); + printf("\t\tlacp_rxtest: %d\n", + (ra.ra_opts & LAGG_OPT_LACP_RXTEST) ? 1 : 0); + printf("\t\tlacp_txtest: %d\n", + (ra.ra_opts & LAGG_OPT_LACP_TXTEST) ? 1 : 0); + } + printf("\tlagg statistics:\n"); + printf("\t\tactive ports: %d\n", ra.ra_active); + printf("\t\tflapping: %u\n", ra.ra_flapping); + if (ra.ra_proto == LAGG_PROTO_LACP) { + printf("\tlag id: %s\n", + lacp_format_peer(lp, "\n\t\t ")); + } + } for (i = 0; i < ra.ra_ports; i++) { lp = (struct lacp_opreq *)&rpbuf[i].rp_lacpreq; @@ -226,6 +287,15 @@ static struct cmd lagg_cmds[] = { DEF_CMD_ARG("-laggport", unsetlaggport), DEF_CMD_ARG("laggproto", setlaggproto), DEF_CMD_ARG("lagghash", setlagghash), + DEF_CMD("use_flowid", LAGG_OPT_USE_FLOWID, setlaggsetopt), + DEF_CMD("-use_flowid", -LAGG_OPT_USE_FLOWID, setlaggsetopt), + DEF_CMD("lacp_strict", LAGG_OPT_LACP_STRICT, setlaggsetopt), + DEF_CMD("-lacp_strict", -LAGG_OPT_LACP_STRICT, setlaggsetopt), + DEF_CMD("lacp_txtest", LAGG_OPT_LACP_TXTEST, setlaggsetopt), + DEF_CMD("-lacp_txtest", -LAGG_OPT_LACP_TXTEST, setlaggsetopt), + DEF_CMD("lacp_rxtest", LAGG_OPT_LACP_RXTEST, setlaggsetopt), + DEF_CMD("-lacp_rxtest", -LAGG_OPT_LACP_RXTEST, setlaggsetopt), + DEF_CMD_ARG("flowid_shift", setlaggflowidshift), }; static struct afswtch af_lagg = { .af_name = "af_lagg", Modified: head/share/man/man4/lagg.4 ============================================================================== --- head/share/man/man4/lagg.4 Wed Oct 1 21:24:58 2014 (r272385) +++ head/share/man/man4/lagg.4 Wed Oct 1 21:37:32 2014 (r272386) @@ -16,7 +16,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 23, 2012 +.Dd October 1, 2014 .Dt LAGG 4 .Os .Sh NAME @@ -143,9 +143,9 @@ modes will use the RSS hash from the net computing one, this may give poor traffic distribution if the hash is invalid or uses less of the protocol header information. Local hash computation can be forced per interface by setting the -.Va net.link.lagg.X.use_flowid -.Xr sysctl 8 -variable to zero where X is the interface number. +.Cm use_flowid +.Xr ifconfig 8 +flag. The default for new interfaces is set via the .Va net.link.lagg.default_use_flowid .Xr sysctl 8 . Modified: head/sys/net/ieee8023ad_lacp.c ============================================================================== --- head/sys/net/ieee8023ad_lacp.c Wed Oct 1 21:24:58 2014 (r272385) +++ head/sys/net/ieee8023ad_lacp.c Wed Oct 1 21:37:32 2014 (r272386) @@ -190,14 +190,15 @@ static const char *lacp_format_portid(co static void lacp_dprintf(const struct lacp_port *, const char *, ...) __attribute__((__format__(__printf__, 2, 3))); -static int lacp_debug = 0; +static VNET_DEFINE(int, lacp_debug); +#define V_lacp_debug VNET(lacp_debug) SYSCTL_NODE(_net_link_lagg, OID_AUTO, lacp, CTLFLAG_RD, 0, "ieee802.3ad"); -SYSCTL_INT(_net_link_lagg_lacp, OID_AUTO, debug, CTLFLAG_RWTUN, - &lacp_debug, 0, "Enable LACP debug logging (1=debug, 2=trace)"); +SYSCTL_INT(_net_link_lagg_lacp, OID_AUTO, debug, CTLFLAG_RWTUN | CTLFLAG_VNET, + &VNET_NAME(lacp_debug), 0, "Enable LACP debug logging (1=debug, 2=trace)"); -#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 ; } +#define LACP_DPRINTF(a) if (V_lacp_debug & 0x01) { lacp_dprintf a ; } +#define LACP_TRACE(a) if (V_lacp_debug & 0x02) { lacp_dprintf(a,"%s\n",__func__); } +#define LACP_TPRINTF(a) if (V_lacp_debug & 0x04) { lacp_dprintf a ; } /* * partner administration variables. @@ -300,7 +301,7 @@ lacp_pdu_input(struct lacp_port *lp, str goto bad; } - if (lacp_debug > 0) { + if (V_lacp_debug > 0) { lacp_dprintf(lp, "lacpdu receive\n"); lacp_dump_lacpdu(du); } @@ -385,7 +386,7 @@ lacp_xmit_lacpdu(struct lacp_port *lp) sizeof(du->ldu_collector)); du->ldu_collector.lci_maxdelay = 0; - if (lacp_debug > 0) { + if (V_lacp_debug > 0) { lacp_dprintf(lp, "lacpdu transmit\n"); lacp_dump_lacpdu(du); } @@ -497,12 +498,14 @@ lacp_tick(void *arg) if ((lp->lp_state & LACP_STATE_AGGREGATION) == 0) continue; + CURVNET_SET(lp->lp_ifp->if_vnet); lacp_run_timers(lp); lacp_select(lp); lacp_sm_mux(lp); lacp_sm_tx(lp); lacp_sm_ptx_tx_schedule(lp); + CURVNET_RESTORE(); } callout_reset(&lsc->lsc_callout, hz, lacp_tick, lsc); } @@ -747,48 +750,10 @@ lacp_transit_expire(void *vp) lsc->lsc_suppress_distributing = FALSE; } -static void -lacp_attach_sysctl(struct lacp_softc *lsc, struct sysctl_oid *p_oid) -{ - struct lagg_softc *sc = lsc->lsc_softc; - - SYSCTL_ADD_UINT(&sc->ctx, SYSCTL_CHILDREN(p_oid), OID_AUTO, - "lacp_strict_mode", - CTLFLAG_RW, - &lsc->lsc_strict_mode, - lsc->lsc_strict_mode, - "Enable LACP strict mode"); -} - -static void -lacp_attach_sysctl_debug(struct lacp_softc *lsc, struct sysctl_oid *p_oid) -{ - struct lagg_softc *sc = lsc->lsc_softc; - struct sysctl_oid *oid; - - /* Create a child of the parent lagg interface */ - oid = SYSCTL_ADD_NODE(&sc->ctx, SYSCTL_CHILDREN(p_oid), - OID_AUTO, "debug", CTLFLAG_RD, NULL, "DEBUG"); - - SYSCTL_ADD_UINT(&sc->ctx, SYSCTL_CHILDREN(oid), OID_AUTO, - "rx_test", - CTLFLAG_RW, - &lsc->lsc_debug.lsc_rx_test, - lsc->lsc_debug.lsc_rx_test, - "Bitmap of if_dunit entries to drop RX frames for"); - SYSCTL_ADD_UINT(&sc->ctx, SYSCTL_CHILDREN(oid), OID_AUTO, - "tx_test", - CTLFLAG_RW, - &lsc->lsc_debug.lsc_tx_test, - lsc->lsc_debug.lsc_tx_test, - "Bitmap of if_dunit entries to drop TX frames for"); -} - void lacp_attach(struct lagg_softc *sc) { struct lacp_softc *lsc; - struct sysctl_oid *oid; lsc = malloc(sizeof(struct lacp_softc), M_DEVBUF, M_WAITOK | M_ZERO); @@ -802,14 +767,6 @@ lacp_attach(struct lagg_softc *sc) TAILQ_INIT(&lsc->lsc_aggregators); LIST_INIT(&lsc->lsc_ports); - /* Create a child of the parent lagg interface */ - oid = SYSCTL_ADD_NODE(&sc->ctx, SYSCTL_CHILDREN(sc->sc_oid), - OID_AUTO, "lacp", CTLFLAG_RD, NULL, "LACP"); - - /* Attach sysctl nodes */ - lacp_attach_sysctl(lsc, oid); - lacp_attach_sysctl_debug(lsc, oid); - callout_init_mtx(&lsc->lsc_transit_callout, &lsc->lsc_mtx, 0); callout_init_mtx(&lsc->lsc_callout, &lsc->lsc_mtx, 0); @@ -875,7 +832,7 @@ lacp_select_tx_port(struct lagg_softc *s return (NULL); } - if (sc->use_flowid && (m->m_flags & M_FLOWID)) + if ((sc->sc_opts & LAGG_OPT_USE_FLOWID) && (m->m_flags & M_FLOWID)) hash = m->m_pkthdr.flowid >> sc->flowid_shift; else hash = lagg_hashmbuf(sc, m, lsc->lsc_hashkey); @@ -1374,7 +1331,7 @@ lacp_sm_mux(struct lacp_port *lp) enum lacp_selected selected = lp->lp_selected; struct lacp_aggregator *la; - if (lacp_debug > 1) + if (V_lacp_debug > 1) 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); Modified: head/sys/net/if_lagg.c ============================================================================== --- head/sys/net/if_lagg.c Wed Oct 1 21:24:58 2014 (r272385) +++ head/sys/net/if_lagg.c Wed Oct 1 21:37:32 2014 (r272386) @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #if defined(INET) || defined(INET6) #include @@ -81,13 +82,21 @@ static struct { {0, NULL} }; -SLIST_HEAD(__trhead, lagg_softc) lagg_list; /* list of laggs */ -static struct mtx lagg_list_mtx; +VNET_DEFINE(SLIST_HEAD(__trhead, lagg_softc), lagg_list); /* list of laggs */ +#define V_lagg_list VNET(lagg_list) +static VNET_DEFINE(struct mtx, lagg_list_mtx); +#define V_lagg_list_mtx VNET(lagg_list_mtx) +#define LAGG_LIST_LOCK_INIT(x) mtx_init(&V_lagg_list_mtx, \ + "if_lagg list", NULL, MTX_DEF) +#define LAGG_LIST_LOCK_DESTROY(x) mtx_destroy(&V_lagg_list_mtx) +#define LAGG_LIST_LOCK(x) mtx_lock(&V_lagg_list_mtx) +#define LAGG_LIST_UNLOCK(x) mtx_unlock(&V_lagg_list_mtx) eventhandler_tag lagg_detach_cookie = NULL; static int lagg_clone_create(struct if_clone *, int, caddr_t); static void lagg_clone_destroy(struct ifnet *); -static struct if_clone *lagg_cloner; +static VNET_DEFINE(struct if_clone *, lagg_cloner); +#define V_lagg_cloner VNET(lagg_cloner) static const char laggname[] = "lagg"; static void lagg_lladdr(struct lagg_softc *, uint8_t *); @@ -123,7 +132,6 @@ 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 void lagg_rr_attach(struct lagg_softc *); @@ -232,29 +240,55 @@ SYSCTL_DECL(_net_link); 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 */ -SYSCTL_INT(_net_link_lagg, OID_AUTO, failover_rx_all, CTLFLAG_RW, - &lagg_failover_rx_all, 0, +/* Allow input on any failover links */ +static VNET_DEFINE(int, lagg_failover_rx_all); +#define V_lagg_failover_rx_all VNET(lagg_failover_rx_all) +SYSCTL_INT(_net_link_lagg, OID_AUTO, failover_rx_all, CTLFLAG_RW | CTLFLAG_VNET, + &VNET_NAME(lagg_failover_rx_all), 0, "Accept input from any interface in a failover lagg"); -static int def_use_flowid = 1; /* Default value for using M_FLOWID */ + +/* Default value for using M_FLOWID */ +static VNET_DEFINE(int, def_use_flowid) = 1; +#define V_def_use_flowid VNET(def_use_flowid) SYSCTL_INT(_net_link_lagg, OID_AUTO, default_use_flowid, CTLFLAG_RWTUN, - &def_use_flowid, 0, + &VNET_NAME(def_use_flowid), 0, "Default setting for using flow id for load sharing"); -static int def_flowid_shift = 16; /* Default value for using M_FLOWID */ + +/* Default value for using M_FLOWID */ +static VNET_DEFINE(int, def_flowid_shift) = 16; +#define V_def_flowid_shift VNET(def_flowid_shift) SYSCTL_INT(_net_link_lagg, OID_AUTO, default_flowid_shift, CTLFLAG_RWTUN, - &def_flowid_shift, 0, + &VNET_NAME(def_flowid_shift), 0, "Default setting for flowid shift for load sharing"); +static void +vnet_lagg_init(const void *unused __unused) +{ + + LAGG_LIST_LOCK_INIT(); + SLIST_INIT(&V_lagg_list); + V_lagg_cloner = if_clone_simple(laggname, lagg_clone_create, + lagg_clone_destroy, 0); +} +VNET_SYSINIT(vnet_lagg_init, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY, + vnet_lagg_init, NULL); + +static void +vnet_lagg_uninit(const void *unused __unused) +{ + + if_clone_detach(V_lagg_cloner); + LAGG_LIST_LOCK_DESTROY(); +} +VNET_SYSUNINIT(vnet_lagg_uninit, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY, + vnet_lagg_uninit, NULL); + static int lagg_modevent(module_t mod, int type, void *data) { switch (type) { case MOD_LOAD: - mtx_init(&lagg_list_mtx, "if_lagg list", NULL, MTX_DEF); - SLIST_INIT(&lagg_list); - lagg_cloner = if_clone_simple(laggname, lagg_clone_create, - lagg_clone_destroy, 0); lagg_input_p = lagg_input; lagg_linkstate_p = lagg_port_state; lagg_detach_cookie = EVENTHANDLER_REGISTER( @@ -264,10 +298,8 @@ lagg_modevent(module_t mod, int type, vo case MOD_UNLOAD: EVENTHANDLER_DEREGISTER(ifnet_departure_event, lagg_detach_cookie); - if_clone_detach(lagg_cloner); lagg_input_p = NULL; lagg_linkstate_p = NULL; - mtx_destroy(&lagg_list_mtx); break; default: return (EOPNOTSUPP); @@ -445,8 +477,6 @@ lagg_clone_create(struct if_clone *ifc, struct lagg_softc *sc; struct ifnet *ifp; static const u_char eaddr[6]; /* 00:00:00:00:00:00 */ - struct sysctl_oid *oid; - char num[14]; /* sufficient for 32 bits */ sc = malloc(sizeof(*sc), M_DEVBUF, M_WAITOK|M_ZERO); ifp = sc->sc_ifp = if_alloc(IFT_ETHER); @@ -455,29 +485,10 @@ lagg_clone_create(struct if_clone *ifc, return (ENOSPC); } - sysctl_ctx_init(&sc->ctx); - snprintf(num, sizeof(num), "%u", unit); - sc->use_flowid = def_use_flowid; - sc->flowid_shift = def_flowid_shift; - sc->sc_oid = oid = SYSCTL_ADD_NODE(&sc->ctx, - &SYSCTL_NODE_CHILDREN(_net_link, lagg), - OID_AUTO, num, CTLFLAG_RD, NULL, ""); - SYSCTL_ADD_INT(&sc->ctx, SYSCTL_CHILDREN(oid), OID_AUTO, - "use_flowid", CTLTYPE_INT|CTLFLAG_RW, &sc->use_flowid, - sc->use_flowid, "Use flow id for load sharing"); - SYSCTL_ADD_INT(&sc->ctx, SYSCTL_CHILDREN(oid), OID_AUTO, - "flowid_shift", CTLTYPE_INT|CTLFLAG_RW, &sc->flowid_shift, - sc->flowid_shift, - "Shift flowid bits to prevent multiqueue collisions"); - 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"); + if (V_def_use_flowid) + sc->sc_opts |= LAGG_OPT_USE_FLOWID; + sc->flowid_shift = V_def_flowid_shift; + /* Hash all layers by default */ sc->sc_flags = LAGG_F_HASHL2|LAGG_F_HASHL3|LAGG_F_HASHL4; @@ -515,9 +526,9 @@ lagg_clone_create(struct if_clone *ifc, lagg_unregister_vlan, sc, EVENTHANDLER_PRI_FIRST); /* Insert into the global list of laggs */ - mtx_lock(&lagg_list_mtx); - SLIST_INSERT_HEAD(&lagg_list, sc, sc_entries); - mtx_unlock(&lagg_list_mtx); + LAGG_LIST_LOCK(); + SLIST_INSERT_HEAD(&V_lagg_list, sc, sc_entries); + LAGG_LIST_UNLOCK(); return (0); } @@ -542,14 +553,13 @@ lagg_clone_destroy(struct ifnet *ifp) /* Unhook the aggregation protocol */ lagg_proto_detach(sc); - sysctl_ctx_free(&sc->ctx); ifmedia_removeall(&sc->sc_media); ether_ifdetach(ifp); if_free(ifp); - mtx_lock(&lagg_list_mtx); - SLIST_REMOVE(&lagg_list, sc, lagg_softc, sc_entries); - mtx_unlock(&lagg_list_mtx); + LAGG_LIST_LOCK(); + SLIST_REMOVE(&V_lagg_list, sc, lagg_softc, sc_entries); + LAGG_LIST_UNLOCK(); taskqueue_drain(taskqueue_swi, &sc->sc_lladdr_task); LAGG_LOCK_DESTROY(sc); @@ -752,10 +762,10 @@ lagg_port_create(struct lagg_softc *sc, return (ENOMEM); /* Check if port is a stacked lagg */ - mtx_lock(&lagg_list_mtx); - SLIST_FOREACH(sc_ptr, &lagg_list, sc_entries) { + LAGG_LIST_LOCK(); + SLIST_FOREACH(sc_ptr, &V_lagg_list, sc_entries) { if (ifp == sc_ptr->sc_ifp) { - mtx_unlock(&lagg_list_mtx); + LAGG_LIST_UNLOCK(); free(lp, M_DEVBUF); return (EINVAL); /* XXX disable stacking for the moment, its untested */ @@ -763,14 +773,14 @@ lagg_port_create(struct lagg_softc *sc, lp->lp_flags |= LAGG_PORT_STACK; if (lagg_port_checkstacking(sc_ptr) >= LAGG_MAX_STACKING) { - mtx_unlock(&lagg_list_mtx); + LAGG_LIST_UNLOCK(); free(lp, M_DEVBUF); return (E2BIG); } #endif } } - mtx_unlock(&lagg_list_mtx); + LAGG_LIST_UNLOCK(); /* Change the interface type */ lp->lp_iftype = ifp->if_type; @@ -1205,6 +1215,31 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd LAGG_RLOCK(sc, &tracker); ra->ra_proto = sc->sc_proto; lagg_proto_request(sc, &ra->ra_psc); + ra->ra_opts = sc->sc_opts; + if (sc->sc_proto == LAGG_PROTO_LACP) { + struct lacp_softc *lsc; + + lsc = (struct lacp_softc *)sc->sc_psc; + if (lsc->lsc_debug.lsc_tx_test != 0) + ra->ra_opts |= LAGG_OPT_LACP_TXTEST; + if (lsc->lsc_debug.lsc_rx_test != 0) + ra->ra_opts |= LAGG_OPT_LACP_RXTEST; + if (lsc->lsc_strict_mode != 0) + ra->ra_opts |= LAGG_OPT_LACP_STRICT; + + ra->ra_active = sc->sc_active; + } else { + /* + * LACP tracks active links automatically, + * the others do not. + */ + ra->ra_active = 0; + SLIST_FOREACH(lp, &sc->sc_ports, lp_entries) + ra->ra_active += LAGG_PORTACTIVE(lp); + } + ra->ra_flapping = sc->sc_flapping; + ra->ra_flowid_shift = sc->flowid_shift; + count = 0; buf = outbuf; len = min(ra->ra_size, buflen); @@ -1225,9 +1260,88 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd free(outbuf, M_TEMP); break; case SIOCSLAGG: + /* + * Set options or protocol depending on + * ra->ra_opts and ra->ra_proto. + */ error = priv_check(td, PRIV_NET_LAGG); if (error) break; + if (ra->ra_opts != 0) { + /* + * Set options. LACP options are stored in sc->sc_psc, + * not in sc_opts. + */ + int valid, lacp; + + switch (ra->ra_opts) { + case LAGG_OPT_USE_FLOWID: + case -LAGG_OPT_USE_FLOWID: + case LAGG_OPT_FLOWIDSHIFT: + valid = 1; + lacp = 0; + break; + case LAGG_OPT_LACP_TXTEST: + case -LAGG_OPT_LACP_TXTEST: + case LAGG_OPT_LACP_RXTEST: + case -LAGG_OPT_LACP_RXTEST: + case LAGG_OPT_LACP_STRICT: + case -LAGG_OPT_LACP_STRICT: + valid = lacp = 1; + break; + default: + valid = lacp = 0; + break; + } + + LAGG_WLOCK(sc); + if (valid == 0 || + (lacp == 1 && sc->sc_proto != LAGG_PROTO_LACP)) { + /* Invalid combination of options specified. */ + error = EINVAL; + LAGG_WUNLOCK(sc); + break; /* Return from SIOCSLAGG. */ + } + /* + * Store new options into sc->sc_opts except for + * FLOWIDSHIFT and LACP options. + */ + if (lacp == 0) { + if (ra->ra_opts == LAGG_OPT_FLOWIDSHIFT) + sc->flowid_shift = ra->ra_flowid_shift; + else if (ra->ra_opts > 0) + sc->sc_opts |= ra->ra_opts; + else + sc->sc_opts &= ~ra->ra_opts; + } else { + struct lacp_softc *lsc; + + lsc = (struct lacp_softc *)sc->sc_psc; + + switch (ra->ra_opts) { + case LAGG_OPT_LACP_TXTEST: + lsc->lsc_debug.lsc_tx_test = 1; + break; + case -LAGG_OPT_LACP_TXTEST: + lsc->lsc_debug.lsc_tx_test = 0; + break; + case LAGG_OPT_LACP_RXTEST: + lsc->lsc_debug.lsc_rx_test = 1; + break; + case -LAGG_OPT_LACP_RXTEST: + lsc->lsc_debug.lsc_rx_test = 0; + break; + case LAGG_OPT_LACP_STRICT: + lsc->lsc_strict_mode = 1; + break; + case -LAGG_OPT_LACP_STRICT: + lsc->lsc_strict_mode = 0; + break; + } + } + LAGG_WUNLOCK(sc); + break; /* Return from SIOCSLAGG. */ + } if (ra->ra_proto < 1 || ra->ra_proto >= LAGG_PROTO_MAX) { error = EPROTONOSUPPORT; break; @@ -1687,27 +1801,6 @@ 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) { @@ -1948,7 +2041,7 @@ lagg_fail_input(struct lagg_softc *sc, s struct ifnet *ifp = sc->sc_ifp; struct lagg_port *tmp_tp; - if (lp == sc->sc_primary || lagg_failover_rx_all) { + if (lp == sc->sc_primary || V_lagg_failover_rx_all) { m->m_pkthdr.rcvif = ifp; return (m); } @@ -2043,7 +2136,7 @@ lagg_lb_start(struct lagg_softc *sc, str struct lagg_port *lp = NULL; uint32_t p = 0; - if (sc->use_flowid && (m->m_flags & M_FLOWID)) + if ((sc->sc_opts & LAGG_OPT_USE_FLOWID) && (m->m_flags & M_FLOWID)) p = m->m_pkthdr.flowid >> sc->flowid_shift; else p = lagg_hashmbuf(sc, m, lb->lb_key); Modified: head/sys/net/if_lagg.h ============================================================================== --- head/sys/net/if_lagg.h Wed Oct 1 21:24:58 2014 (r272385) +++ head/sys/net/if_lagg.h Wed Oct 1 21:37:32 2014 (r272386) @@ -125,6 +125,19 @@ struct lagg_reqall { struct lacp_opreq rpsc_lacp; } ra_psc; #define ra_lacpreq ra_psc.rpsc_lacp + int ra_opts; /* Option bitmap */ +#define LAGG_OPT_NONE 0x00 +#define LAGG_OPT_USE_FLOWID 0x01 /* use M_FLOWID */ +/* Pseudo flags which are used in ra_opts but not stored into sc_opts. */ +#define LAGG_OPT_FLOWIDSHIFT 0x02 /* Set flowid */ +#define LAGG_OPT_FLOWIDSHIFT_MASK 0x1f /* flowid is uint32_t */ +#define LAGG_OPT_LACP_STRICT 0x10 /* LACP strict mode */ +#define LAGG_OPT_LACP_TXTEST 0x20 /* LACP debug: txtest */ +#define LAGG_OPT_LACP_RXTEST 0x40 /* LACP debug: rxtest */ + u_int ra_count; /* number of ports */ + u_int ra_active; /* active port count */ + u_int ra_flapping; /* number of flapping */ + int ra_flowid_shift; /* shift the flowid */ }; #define SIOCGLAGG _IOWR('i', 143, struct lagg_reqall) @@ -212,9 +225,7 @@ struct lagg_softc { eventhandler_tag vlan_attach; eventhandler_tag vlan_detach; struct callout sc_callout; - struct sysctl_ctx_list ctx; /* sysctl variables */ - struct sysctl_oid *sc_oid; /* sysctl tree oid */ - int use_flowid; /* use M_FLOWID */ + u_int sc_opts; int flowid_shift; /* shift the flowid */ struct lagg_counters detached_counters; /* detached ports sum */ }; From owner-svn-src-all@FreeBSD.ORG Wed Oct 1 22:11:01 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 44D80D37 for ; Wed, 1 Oct 2014 22:11:01 +0000 (UTC) Received: from mail-qg0-f42.google.com (mail-qg0-f42.google.com [209.85.192.42]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 04E532FF for ; Wed, 1 Oct 2014 22:11:00 +0000 (UTC) Received: by mail-qg0-f42.google.com with SMTP id z60so1031480qgd.15 for ; Wed, 01 Oct 2014 15:10:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=o14yQrWWqjqlrCVvdZy1KjTpRwkw1MxzLy7jcEfjmiE=; b=Z4wAEHJrwMoEZxZkYZL4nZV2KDuywwOWX6CgwYlBe1LeYtnk8nHa1/eeA8cM8hzXdy EVnHMlicpS7VGqj8zqN2xTHaqkfghp41em8RyW+HO9WzOh/9cEtmCIGy0vgGR7Tmmq0r aMgtAusWWP+tkNrLN9RPQZMFxj5Hek6HOtQ4/S7PcY4lEVt5i68XlBWoQ0BV+aiKCqvD sYQnSRKPQlAzTCyeEaa7uewkLBDLMFXdWkMEsmulQ1Fu76w1uOUCHRXhijw58isugQ0K psqqo7sHMCleugv254MhTh03kit3CjcQ5QMY+z5YRVZ/KrokIogcUrbRA0qD+aCaZ4KZ 3ZSw== X-Gm-Message-State: ALoCoQlVqbWnAi1vxc9NEtbxiY6GtVIVZmNE1NA+AxNg0M4kHASOsfOZykge3Be0cuF9MZTaIkyV MIME-Version: 1.0 X-Received: by 10.224.4.72 with SMTP id 8mr36619333qaq.79.1412201454558; Wed, 01 Oct 2014 15:10:54 -0700 (PDT) Received: by 10.140.31.36 with HTTP; Wed, 1 Oct 2014 15:10:54 -0700 (PDT) In-Reply-To: References: <201409291505.s8TF5Nhh066884@svn.freebsd.org> Date: Wed, 1 Oct 2014 16:10:54 -0600 Message-ID: Subject: Re: svn commit: r272282 - head/share/mk From: Will Andrews To: NGie Cooper Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 22:11:01 -0000 On Wed, Oct 1, 2014 at 3:21 PM, NGie Cooper wrote: > Sounds like a documentation issue though (it's not listed in the > handbook :(..: https://www.freebsd.org/doc/handbook/ports-using.html ) Well, I would argue this sort of thing should not need to be documented in the first place. --Will. From owner-svn-src-all@FreeBSD.ORG Wed Oct 1 22:18:07 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D1062474; Wed, 1 Oct 2014 22:18:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BE8733B0; Wed, 1 Oct 2014 22:18:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s91MI78A046089; Wed, 1 Oct 2014 22:18:07 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s91MI78V046088; Wed, 1 Oct 2014 22:18:07 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201410012218.s91MI78V046088@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Wed, 1 Oct 2014 22:18:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272387 - head/lib/libc/stdtime X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 22:18:07 -0000 Author: pfg Date: Wed Oct 1 22:18:07 2014 New Revision: 272387 URL: https://svnweb.freebsd.org/changeset/base/272387 Log: strptime: fix bug introduced in r272273. Reported by: portmgr (antoine) Fix by: Andrey Chernov, David Carlier PR: 137307 (follow up) Modified: head/lib/libc/stdtime/strptime.c Modified: head/lib/libc/stdtime/strptime.c ============================================================================== --- head/lib/libc/stdtime/strptime.c Wed Oct 1 21:37:32 2014 (r272386) +++ head/lib/libc/stdtime/strptime.c Wed Oct 1 22:18:07 2014 (r272387) @@ -56,7 +56,7 @@ __FBSDID("$FreeBSD$"); #include "libc_private.h" #include "timelocal.h" #include "tzfile.h" -#include + static char * _strptime(const char *, const char *, struct tm *, int *, locale_t); #define asizeof(a) (sizeof(a) / sizeof((a)[0])) @@ -342,6 +342,7 @@ label: if (i == asizeof(tptr->weekday)) return (NULL); + buf += len; tm->tm_wday = i; flags |= FLAG_WDAY; break; From owner-svn-src-all@FreeBSD.ORG Wed Oct 1 23:15:24 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5B32FBA9; Wed, 1 Oct 2014 23:15:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 47C6BCBF; Wed, 1 Oct 2014 23:15:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s91NFOKn074883; Wed, 1 Oct 2014 23:15:24 GMT (envelope-from grehan@FreeBSD.org) Received: (from grehan@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s91NFOPY074882; Wed, 1 Oct 2014 23:15:24 GMT (envelope-from grehan@FreeBSD.org) Message-Id: <201410012315.s91NFOPY074882@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: grehan set sender to grehan@FreeBSD.org using -f From: Peter Grehan Date: Wed, 1 Oct 2014 23:15:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272388 - stable/10/sys/amd64/vmm/io X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 23:15:24 -0000 Author: grehan Date: Wed Oct 1 23:15:23 2014 New Revision: 272388 URL: https://svnweb.freebsd.org/changeset/base/272388 Log: MFC r272193 Allow the PIC's IMR register to be read before ICW initialisation. As of git submit e179f6914152eca9, the Linux kernel does a simple probe of the PIC by writing a pattern to the IMR and then reading it back, prior to the init sequence of ICW words. The bhyve PIC emulation wasn't allowing the IMR to be read until the ICW sequence was complete. This limitation isn't required so relax the test. With this change, Linux kernels 3.15-rc2 and later won't hang on boot when calibrating the local APIC. Approved by: re (gjb) Modified: stable/10/sys/amd64/vmm/io/vatpic.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/vmm/io/vatpic.c ============================================================================== --- stable/10/sys/amd64/vmm/io/vatpic.c Wed Oct 1 22:18:07 2014 (r272387) +++ stable/10/sys/amd64/vmm/io/vatpic.c Wed Oct 1 23:15:23 2014 (r272388) @@ -600,20 +600,19 @@ vatpic_write(struct vatpic *vatpic, stru VATPIC_LOCK(vatpic); if (port & ICU_IMR_OFFSET) { - if (atpic->ready) { + switch (atpic->icw_num) { + case 2: + error = vatpic_icw2(vatpic, atpic, val); + break; + case 3: + error = vatpic_icw3(vatpic, atpic, val); + break; + case 4: + error = vatpic_icw4(vatpic, atpic, val); + break; + default: error = vatpic_ocw1(vatpic, atpic, val); - } else { - switch (atpic->icw_num) { - case 2: - error = vatpic_icw2(vatpic, atpic, val); - break; - case 3: - error = vatpic_icw3(vatpic, atpic, val); - break; - case 4: - error = vatpic_icw4(vatpic, atpic, val); - break; - } + break; } } else { if (val & (1 << 4)) From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 00:13:09 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BBDE76A5; Thu, 2 Oct 2014 00:13:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A83202DF; Thu, 2 Oct 2014 00:13:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s920D9Dw003618; Thu, 2 Oct 2014 00:13:09 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s920D9rt003617; Thu, 2 Oct 2014 00:13:09 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201410020013.s920D9rt003617@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 2 Oct 2014 00:13:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272389 - head/sys/cddl/boot/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 00:13:09 -0000 Author: delphij Date: Thu Oct 2 00:13:08 2014 New Revision: 272389 URL: https://svnweb.freebsd.org/changeset/base/272389 Log: Diff reduction with kernel code: instruct the compiler that the data of these types may be unaligned to their "normal" alignment and exercise caution when accessing them. PR: 194071 MFC after: 3 days Modified: head/sys/cddl/boot/zfs/lz4.c Modified: head/sys/cddl/boot/zfs/lz4.c ============================================================================== --- head/sys/cddl/boot/zfs/lz4.c Wed Oct 1 23:15:23 2014 (r272388) +++ head/sys/cddl/boot/zfs/lz4.c Thu Oct 2 00:13:08 2014 (r272389) @@ -83,6 +83,17 @@ lz4_decompress(void *s_start, void *d_st #endif /* + * Unaligned memory access is automatically enabled for "common" CPU, + * such as x86. For others CPU, the compiler will be more cautious, and + * insert extra code to ensure aligned access is respected. If you know + * your target CPU supports unaligned memory access, you may want to + * force this option manually to improve performance + */ +#if defined(__ARM_FEATURE_UNALIGNED) +#define LZ4_FORCE_UNALIGNED_ACCESS 1 +#endif + +/* * Compiler Options */ #if __STDC_VERSION__ >= 199901L /* C99 */ @@ -113,6 +124,10 @@ lz4_decompress(void *s_start, void *d_st #define S32 int32_t #define U64 uint64_t +#ifndef LZ4_FORCE_UNALIGNED_ACCESS +#pragma pack(1) +#endif + typedef struct _U16_S { U16 v; } U16_S; @@ -123,6 +138,10 @@ typedef struct _U64_S { U64 v; } U64_S; +#ifndef LZ4_FORCE_UNALIGNED_ACCESS +#pragma pack() +#endif + #define A64(x) (((U64_S *)(x))->v) #define A32(x) (((U32_S *)(x))->v) #define A16(x) (((U16_S *)(x))->v) From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 00:19:25 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AE97390E; Thu, 2 Oct 2014 00:19:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9B7BE334; Thu, 2 Oct 2014 00:19:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s920JPM3004431; Thu, 2 Oct 2014 00:19:25 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s920JPp5004430; Thu, 2 Oct 2014 00:19:25 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201410020019.s920JPp5004430@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Thu, 2 Oct 2014 00:19:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272390 - head/sbin/ifconfig X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 00:19:25 -0000 Author: hrs Date: Thu Oct 2 00:19:24 2014 New Revision: 272390 URL: https://svnweb.freebsd.org/changeset/base/272390 Log: Add IFCAP_HWSTATS. Modified: head/sbin/ifconfig/ifconfig.c Modified: head/sbin/ifconfig/ifconfig.c ============================================================================== --- head/sbin/ifconfig/ifconfig.c Thu Oct 2 00:13:08 2014 (r272389) +++ head/sbin/ifconfig/ifconfig.c Thu Oct 2 00:19:24 2014 (r272390) @@ -903,7 +903,7 @@ unsetifdescr(const char *val, int value, "\020\1RXCSUM\2TXCSUM\3NETCONS\4VLAN_MTU\5VLAN_HWTAGGING\6JUMBO_MTU\7POLLING" \ "\10VLAN_HWCSUM\11TSO4\12TSO6\13LRO\14WOL_UCAST\15WOL_MCAST\16WOL_MAGIC" \ "\17TOE4\20TOE6\21VLAN_HWFILTER\23VLAN_HWTSO\24LINKSTATE\25NETMAP" \ -"\26RXCSUM_IPV6\27TXCSUM_IPV6" +"\26RXCSUM_IPV6\27TXCSUM_IPV6\30HWSTATS" /* * Print the status of the interface. If an address family was From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 00:25:58 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 76009D8E; Thu, 2 Oct 2014 00:25:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 621225F0; Thu, 2 Oct 2014 00:25:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s920Pw5b008960; Thu, 2 Oct 2014 00:25:58 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s920PvEW008958; Thu, 2 Oct 2014 00:25:57 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201410020025.s920PvEW008958@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Thu, 2 Oct 2014 00:25:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272391 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 00:25:58 -0000 Author: hrs Date: Thu Oct 2 00:25:57 2014 New Revision: 272391 URL: https://svnweb.freebsd.org/changeset/base/272391 Log: Add an additional routing table lookup when m->m_pkthdr.fibnum is changed at a PFIL hook in ip{,6}_output(). IPFW setfib rule did not perform a routing table lookup when the destination address was not changed. CR: D805 Modified: head/sys/netinet/ip_output.c head/sys/netinet6/ip6_output.c Modified: head/sys/netinet/ip_output.c ============================================================================== --- head/sys/netinet/ip_output.c Thu Oct 2 00:19:24 2014 (r272390) +++ head/sys/netinet/ip_output.c Thu Oct 2 00:25:57 2014 (r272391) @@ -136,7 +136,9 @@ ip_output(struct mbuf *m, struct mbuf *o struct rtentry *rte; /* cache for ro->ro_rt */ struct in_addr odst; struct m_tag *fwd_tag = NULL; + uint32_t fibnum; int have_ia_ref; + int needfiblookup; #ifdef IPSEC int no_route_but_check_spd = 0; #endif @@ -202,6 +204,7 @@ ip_output(struct mbuf *m, struct mbuf *o * therefore we need restore gw if we're redoing lookup. */ gw = dst = (struct sockaddr_in *)&ro->ro_dst; + fibnum = (inp != NULL) ? inp->inp_inc.inc_fibnum : M_GETFIB(m); again: ia = NULL; have_ia_ref = 0; @@ -283,10 +286,9 @@ again: #ifdef RADIX_MPATH rtalloc_mpath_fib(ro, ntohl(ip->ip_src.s_addr ^ ip->ip_dst.s_addr), - inp ? inp->inp_inc.inc_fibnum : M_GETFIB(m)); + fibnum); #else - in_rtalloc_ign(ro, 0, - inp ? inp->inp_inc.inc_fibnum : M_GETFIB(m)); + in_rtalloc_ign(ro, 0, fibnum); #endif rte = ro->ro_rt; } @@ -504,6 +506,7 @@ sendit: goto done; ip = mtod(m, struct ip *); + needfiblookup = 0; /* See if destination IP address was changed by packet filter. */ if (odst.s_addr != ip->ip_dst.s_addr) { @@ -529,9 +532,18 @@ sendit: } else { if (have_ia_ref) ifa_free(&ia->ia_ifa); - goto again; /* Redo the routing table lookup. */ + needfiblookup = 1; /* Redo the routing table lookup. */ } } + /* See if fib was changed by packet filter. */ + if (fibnum != M_GETFIB(m)) { + m->m_flags |= M_SKIP_FIREWALL; + fibnum = M_GETFIB(m); + RO_RTFREE(ro); + needfiblookup = 1; + } + if (needfiblookup) + goto again; /* See if local, if yes, send it to netisr with IP_FASTFWD_OURS. */ if (m->m_flags & M_FASTFWD_OURS) { Modified: head/sys/netinet6/ip6_output.c ============================================================================== --- head/sys/netinet6/ip6_output.c Thu Oct 2 00:19:24 2014 (r272390) +++ head/sys/netinet6/ip6_output.c Thu Oct 2 00:25:57 2014 (r272391) @@ -255,6 +255,8 @@ ip6_output(struct mbuf *m0, struct ip6_p struct route_in6 *ro_pmtu = NULL; int hdrsplit = 0; int sw_csum, tso; + int needfiblookup; + uint32_t fibnum; struct m_tag *fwd_tag = NULL; ip6 = mtod(m, struct ip6_hdr *); @@ -448,6 +450,7 @@ ip6_output(struct mbuf *m0, struct ip6_p if (ro->ro_rt == NULL) (void )flowtable_lookup(AF_INET6, m, (struct route *)ro); #endif + fibnum = (inp != NULL) ? inp->inp_inc.inc_fibnum : M_GETFIB(m); again: /* * if specified, try to fill in the traffic class field. @@ -489,7 +492,7 @@ again: dst_sa.sin6_addr = ip6->ip6_dst; } error = in6_selectroute_fib(&dst_sa, opt, im6o, ro, &ifp, - &rt, inp ? inp->inp_inc.inc_fibnum : M_GETFIB(m)); + &rt, fibnum); if (error != 0) { if (ifp != NULL) in6_ifstat_inc(ifp, ifs6_out_discard); @@ -649,7 +652,7 @@ again: /* Determine path MTU. */ if ((error = ip6_getpmtu(ro_pmtu, ro, ifp, &finaldst, &mtu, - &alwaysfrag, inp ? inp->inp_inc.inc_fibnum : M_GETFIB(m))) != 0) + &alwaysfrag, fibnum)) != 0) goto bad; /* @@ -727,6 +730,7 @@ again: goto done; ip6 = mtod(m, struct ip6_hdr *); + needfiblookup = 0; /* See if destination IP address was changed by packet filter. */ if (!IN6_ARE_ADDR_EQUAL(&odst, &ip6->ip6_dst)) { m->m_flags |= M_SKIP_FIREWALL; @@ -747,8 +751,17 @@ again: error = netisr_queue(NETISR_IPV6, m); goto done; } else - goto again; /* Redo the routing table lookup. */ + needfiblookup = 1; /* Redo the routing table lookup. */ } + /* See if fib was changed by packet filter. */ + if (fibnum != M_GETFIB(m)) { + m->m_flags |= M_SKIP_FIREWALL; + fibnum = M_GETFIB(m); + RO_RTFREE(ro); + needfiblookup = 1; + } + if (needfiblookup) + goto again; /* See if local, if yes, send it to netisr. */ if (m->m_flags & M_FASTFWD_OURS) { From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 01:16:31 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 407EEE73; Thu, 2 Oct 2014 01:16:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2CDA0B51; Thu, 2 Oct 2014 01:16:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s921GVo0033934; Thu, 2 Oct 2014 01:16:31 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s921GVTZ033933; Thu, 2 Oct 2014 01:16:31 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201410020116.s921GVTZ033933@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Thu, 2 Oct 2014 01:16:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272393 - head/etc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 01:16:31 -0000 Author: hrs Date: Thu Oct 2 01:16:30 2014 New Revision: 272393 URL: https://svnweb.freebsd.org/changeset/base/272393 Log: Resurrect set_rcvar() as a function to define a rc.conf variable. It defines a variable and its default value in load_rc_config() just after rc.conf is loaded. "rcvar" command shows the current and the default values. This is an attempt to solve a problem that rc.d scripts from third-party software do not have entries in /etc/defaults/rc.conf. The fact that load_rc_config() reads rc.conf only once and /etc/rc invokes the function before running rc.d scripts made developers confused for a long time because load_rc_config() just before run_rc_command() in each rc.d script overrides variables only when the script is directly invoked, not from /etc/rc. Variables defined in set_rcvar are always set in load_rc_config() after loading rc.conf. An rc.d script can now be written in a self-contained manner regarding the related variables as follows: --- name=foo rcvar=foo_enable set_rcvar foo_enable YES "Enable $name" set_rcvar foo_flags "-s" "Flags to $name" ... load_rc_config $name run_rc_command "$@" --- Modified: head/etc/rc.subr Modified: head/etc/rc.subr ============================================================================== --- head/etc/rc.subr Thu Oct 2 00:34:03 2014 (r272392) +++ head/etc/rc.subr Thu Oct 2 01:16:30 2014 (r272393) @@ -68,6 +68,39 @@ list_vars() done; } } +# set_rcvar [var] [defval] [desc] +# +# Echo or define a rc.conf(5) variable name. Global variable +# $rcvars is used. +# +# If no argument is specified, echo "${name}_enable". +# +# If only a var is specified, echo "${var}_enable". +# +# If var and defval are specified, the ${var} is defined as +# rc.conf(5) variable and the default value is ${defvar}. An +# optional argument $desc can also be specified to add a +# description for that. +# +set_rcvar() +{ + local _var + + case $# in + 0) echo ${name}_enable ;; + 1) echo ${1}_enable ;; + *) + debug "set_rcvar: \$$1=$2 is added" \ + " as a rc.conf(5) variable." + _var=$1 + rcvars="${rcvars# } $_var" + eval ${_var}_defval=\"$2\" + shift 2 + eval ${_var}_desc=\"$*\" + ;; + esac +} + # set_rcvar_obsolete oldvar [newvar] [msg] # Define obsolete variable. # Global variable $rcvars_obsolete is used. @@ -76,7 +109,7 @@ set_rcvar_obsolete() { local _var _var=$1 - debug "rcvar_obsolete: \$$1(old) -> \$$2(new) is defined" + debug "set_rcvar_obsolete: \$$1(old) -> \$$2(new) is defined" rcvars_obsolete="${rcvars_obsolete# } $1" eval ${1}_newvar=\"$2\" @@ -1091,8 +1124,8 @@ $command $rc_flags $command_args" echo "" fi echo "#" - # Get unique vars in $rcvar - for _v in $rcvar; do + # Get unique vars in $rcvar $rcvars + for _v in $rcvar $rcvars; do case $v in $_v\ *|\ *$_v|*\ $_v\ *) ;; *) v="${v# } $_v" ;; @@ -1238,7 +1271,7 @@ run_rc_script() unset name command command_args command_interpreter \ extra_commands pidfile procname \ - rcvar rcvars_obsolete required_dirs required_files \ + rcvar rcvars rcvars_obsolete required_dirs required_files \ required_vars eval unset ${_arg}_cmd ${_arg}_precmd ${_arg}_postcmd @@ -1306,7 +1339,7 @@ load_rc_config() done # Set defaults if defined. - for _var in $rcvar; do + for _var in $rcvar $rcvars; do eval _defval=\$${_var}_defval if [ -n "$_defval" ]; then eval : \${$_var:=\$${_var}_defval} From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 01:31:06 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 687AFE0 for ; Thu, 2 Oct 2014 01:31:06 +0000 (UTC) Received: from o3.shared.sendgrid.net (o3.shared.sendgrid.net [208.117.48.85]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C37ECBB for ; Thu, 2 Oct 2014 01:31:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sendgrid.info; h=from:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding; s=smtpapi; bh=p6iDGWq1t9DSuD47Va0EeS7SgC8=; b=mPXHvFndCa+TmtkzhJ HuMYEqHy26iOMf1SoAU/Dk2do0HXVO93PlaT8tGrbAuMpA7KBc/yS7By7/gwd26Q U8f9ZfPq3fw5a9ZT/JmxNfc1fopYux8+k19diwwiyTahdgw6UN8meB1QFleOY6jf p+CAsDo9eJ7Fevx697NBRKuIU= Received: by filter0215p1mdw1.sendgrid.net with SMTP id filter0215p1mdw1.15174.542CAACE4 2014-10-02 01:30:58.336447139 +0000 UTC Received: from mail.tarsnap.com (unknown [10.100.60.97]) by ismtpd-004.iad1.sendgrid.net (SG) with ESMTP id 148ce7b7414.1917.2cd20e for ; Thu, 02 Oct 2014 01:31:10 +0000 (GMT) Received: (qmail 91469 invoked from network); 2 Oct 2014 01:30:57 -0000 Received: from unknown (HELO clamshell.daemonology.net) (127.0.0.1) by ec2-107-20-205-189.compute-1.amazonaws.com with ESMTP; 2 Oct 2014 01:30:57 -0000 Received: (qmail 18543 invoked from network); 2 Oct 2014 01:30:36 -0000 Received: from unknown (HELO clamshell.daemonology.net) (127.0.0.1) by clamshell.daemonology.net with SMTP; 2 Oct 2014 01:30:36 -0000 Message-ID: <542CAABB.5090900@freebsd.org> Date: Wed, 01 Oct 2014 18:30:35 -0700 From: Colin Percival User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.0 MIME-Version: 1.0 To: Hiroki Sato , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r272393 - head/etc References: <201410020116.s921GVTZ033933@svn.freebsd.org> In-Reply-To: <201410020116.s921GVTZ033933@svn.freebsd.org> X-Enigmail-Version: 1.5.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-SG-EID: A6W2xSVPHetogaU8rnzccWwgBYtN+QvIzXyjfe/10PEuwbOutzKV4prYjGp4zJM88/daf+56R9KlkbxnG9M8HvAE39AKIyeVozazdqtES2drb2Yevnuxv0chyTPVetBPkyt13zy0hEXMqjxqmiZOlnVDfeZL3P3OYeyUX12HJ9ulKyRG8QRuyOVIsm9BaMC+ X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 01:31:06 -0000 On 10/01/14 18:16, Hiroki Sato wrote: > This is an attempt to solve a problem that rc.d scripts from third-party > software do not have entries in /etc/defaults/rc.conf. Isn't this why we have the > : ${foo_enable="NO"} idiom in ports rc.d files? > The fact that > load_rc_config() reads rc.conf only once and /etc/rc invokes the function > before running rc.d scripts made developers confused for a long time because > load_rc_config() just before run_rc_command() in each rc.d script overrides > variables only when the script is directly invoked, not from /etc/rc. If a script is setting variables for its own use, there's no need to use functions from rc.subr -- it can just set the variables directly. If a script is editing rc.conf, sending a SIGALRM to $$ will signal /etc/rc to re-source rc.conf. I'm really not clear on what this commit accomplishes. -- Colin Percival Security Officer Emeritus, FreeBSD | The power to serve Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 02:00:22 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BCA273AA; Thu, 2 Oct 2014 02:00:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A80E5E90; Thu, 2 Oct 2014 02:00:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9220M5V055013; Thu, 2 Oct 2014 02:00:22 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9220M4E055012; Thu, 2 Oct 2014 02:00:22 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201410020200.s9220M4E055012@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Thu, 2 Oct 2014 02:00:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272394 - head/sys/netipsec X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 02:00:22 -0000 Author: ae Date: Thu Oct 2 02:00:21 2014 New Revision: 272394 URL: https://svnweb.freebsd.org/changeset/base/272394 Log: Do not strip outer header when operating in transport mode. Instead requeue mbuf back to IPv4 protocol handler. If there is one extra IP-IP encapsulation, it will be handled with tunneling interface. And thus proper interface will be exposed into mbuf's rcvif. Also, tcpdump that listens on tunneling interface will see packets in both directions. Sponsored by: Yandex LLC Modified: head/sys/netipsec/ipsec_input.c Modified: head/sys/netipsec/ipsec_input.c ============================================================================== --- head/sys/netipsec/ipsec_input.c Thu Oct 2 01:16:30 2014 (r272393) +++ head/sys/netipsec/ipsec_input.c Thu Oct 2 02:00:21 2014 (r272394) @@ -391,7 +391,8 @@ ipsec4_common_input_cb(struct mbuf *m, s #endif /* DEV_ENC */ /* IP-in-IP encapsulation */ - if (prot == IPPROTO_IPIP) { + if (prot == IPPROTO_IPIP && + saidx->mode != IPSEC_MODE_TRANSPORT) { if (m->m_pkthdr.len - skip < sizeof(struct ip)) { IPSEC_ISTAT(sproto, hdrops); @@ -431,7 +432,8 @@ ipsec4_common_input_cb(struct mbuf *m, s } #ifdef INET6 /* IPv6-in-IP encapsulation. */ - if (prot == IPPROTO_IPV6) { + if (prot == IPPROTO_IPV6 && + saidx->mode != IPSEC_MODE_TRANSPORT) { if (m->m_pkthdr.len - skip < sizeof(struct ip6_hdr)) { IPSEC_ISTAT(sproto, hdrops); @@ -502,6 +504,12 @@ ipsec4_common_input_cb(struct mbuf *m, s key_sa_recordxfer(sav, m); /* record data transfer */ + /* + * In transport mode requeue decrypted mbuf back to IPv4 protocol + * handler. This is necessary to correctly expose rcvif. + */ + if (saidx->mode == IPSEC_MODE_TRANSPORT) + prot = IPPROTO_IPIP; #ifdef DEV_ENC /* * Pass the mbuf to enc0 for bpf and pfil. From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 03:39:31 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4BBFDF26; Thu, 2 Oct 2014 03:39:31 +0000 (UTC) Received: from mail.allbsd.org (gatekeeper.allbsd.org [IPv6:2001:2f0:104:e001::32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.allbsd.org", Issuer "RapidSSL CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5007BACC; Thu, 2 Oct 2014 03:39:30 +0000 (UTC) Received: from alph.d.allbsd.org ([IPv6:2001:2f0:104:e010:862b:2bff:febc:8956]) (authenticated bits=56) by mail.allbsd.org (8.14.9/8.14.8) with ESMTP id s923d4ma051923 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 2 Oct 2014 12:39:15 +0900 (JST) (envelope-from hrs@FreeBSD.org) Received: from localhost (localhost [IPv6:::1]) (authenticated bits=0) by alph.d.allbsd.org (8.14.8/8.14.8) with ESMTP id s923d1h5015132; Thu, 2 Oct 2014 12:39:04 +0900 (JST) (envelope-from hrs@FreeBSD.org) Date: Thu, 02 Oct 2014 12:37:47 +0900 (JST) Message-Id: <20141002.123747.2156790647982484029.hrs@allbsd.org> To: cperciva@freebsd.org Subject: Re: svn commit: r272393 - head/etc From: Hiroki Sato In-Reply-To: <542CAABB.5090900@freebsd.org> References: <201410020116.s921GVTZ033933@svn.freebsd.org> <542CAABB.5090900@freebsd.org> X-PGPkey-fingerprint: BDB3 443F A5DD B3D0 A530 FFD7 4F2C D3D8 2793 CF2D X-Mailer: Mew version 6.6 on Emacs 24.3 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Multipart/Signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="--Security_Multipart(Thu_Oct__2_12_37_47_2014_642)--" Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.97.4 at gatekeeper.allbsd.org X-Virus-Status: Clean X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (mail.allbsd.org [IPv6:2001:2f0:104:e001::32]); Thu, 02 Oct 2014 12:39:24 +0900 (JST) X-Spam-Status: No, score=-97.9 required=13.0 tests=CONTENT_TYPE_PRESENT, RDNS_NONE,SPF_SOFTFAIL,USER_IN_WHITELIST autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on gatekeeper.allbsd.org Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 03:39:31 -0000 ----Security_Multipart(Thu_Oct__2_12_37_47_2014_642)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Colin Percival wrote in <542CAABB.5090900@freebsd.org>: cp> On 10/01/14 18:16, Hiroki Sato wrote: cp> > This is an attempt to solve a problem that rc.d scripts from third-party cp> > software do not have entries in /etc/defaults/rc.conf. cp> cp> Isn't this why we have the cp> > : ${foo_enable="NO"} cp> idiom in ports rc.d files? cp> cp> > The fact that cp> > load_rc_config() reads rc.conf only once and /etc/rc invokes the function cp> > before running rc.d scripts made developers confused for a long time because cp> > load_rc_config() just before run_rc_command() in each rc.d script overrides cp> > variables only when the script is directly invoked, not from /etc/rc. cp> cp> If a script is setting variables for its own use, there's no need to use cp> functions from rc.subr -- it can just set the variables directly. If a cp> script is editing rc.conf, sending a SIGALRM to $$ will signal /etc/rc to cp> re-source rc.conf. cp> cp> I'm really not clear on what this commit accomplishes. The primary purpose is to make it clear which variables are used in the script for *user configuration* and provide a consistent writing style for scripts from both base and ports. More specifically, I want to implement a way to list user-configurable variables and which one is changed from the default value, by effectively replacing functionality of defaults/rc.conf with set_rcvar(). Use of : ${foo="NO"} idiom after load_rc_config() works as you pointed out. However, it does not work with listing variables. Plus, there are many scripts written in an inconsistent way. Some scripts call load_rc_config() multiple times, some have the idioms between load_rc_config() and run_rc_command(), and some have them mistakenly before load_rc_config(). I think this is due to confusion about how load_rc_config() works and all of them can be fixed/rewritten consistently of course, but I think gathering definitions at the head of the scripts and making them being defined at the end of load_rc_config() as set_rcvar_obsolete() does are more intuitive. -- Hiroki ----Security_Multipart(Thu_Oct__2_12_37_47_2014_642)-- Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEABECAAYFAlQsyIsACgkQTyzT2CeTzy3ZdwCfQh1CkzJMQ76OfJ4xbHEaNoY+ f10An0h6thcsnu9IOdidwWkrXYB2SpAP =NkWt -----END PGP SIGNATURE----- ----Security_Multipart(Thu_Oct__2_12_37_47_2014_642)---- From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 04:07:46 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 96EAC3E2; Thu, 2 Oct 2014 04:07:46 +0000 (UTC) Received: from mail109.syd.optusnet.com.au (mail109.syd.optusnet.com.au [211.29.132.80]) by mx1.freebsd.org (Postfix) with ESMTP id 56917D86; Thu, 2 Oct 2014 04:07:45 +0000 (UTC) Received: from c122-106-147-133.carlnfd1.nsw.optusnet.com.au (c122-106-147-133.carlnfd1.nsw.optusnet.com.au [122.106.147.133]) by mail109.syd.optusnet.com.au (Postfix) with ESMTPS id E8C89D6247C; Thu, 2 Oct 2014 14:07:35 +1000 (EST) Date: Thu, 2 Oct 2014 14:07:12 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Mateusz Guzik Subject: Re: svn commit: r272366 - head/sys/kern In-Reply-To: <20141001181825.GA16048@dft-labs.eu> Message-ID: <20141002133405.W1665@besplex.bde.org> References: <201410011532.s91FWTZL050853@svn.freebsd.org> <20141001181825.GA16048@dft-labs.eu> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=fvDlOjIf c=1 sm=1 tr=0 a=7NqvjVvQucbO2RlWB8PEog==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=6I5d2MoRAAAA:8 a=UiRU701cgEFRS5dujKwA:9 a=CjuIK1q_8ugA:10 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Will Andrews X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 04:07:46 -0000 On Wed, 1 Oct 2014, Mateusz Guzik wrote: > On Wed, Oct 01, 2014 at 03:32:29PM +0000, Will Andrews wrote: >> Author: will >> Date: Wed Oct 1 15:32:28 2014 >> New Revision: 272366 >> URL: https://svnweb.freebsd.org/changeset/base/272366 >> >> Log: >> In the syncer, drop the sync mutex while patting the watchdog. >> >> Some watchdog drivers (like ipmi) need to sleep while patting the watchdog. >> See sys/dev/ipmi/ipmi.c:ipmi_wd_event(), which calls malloc(M_WAITOK). > > Is not such malloc inherently bad in case of watchdog? > > It looks like the code waits for request completion and then frees it > unconditionally. As such, a local var on stack would do the trick. > > The code msleeps later, so this hack of dropping sync_mtx is still > needed. It's not a hack then. Then it is at the end of the loop, so any state changes are picked up by looping. However, sync_vnode() has _always_ just released the lock and re-acquired it, so there is no new problem, and probably no old one either. It is just hard to see that there is no problem in code that doesn't check for state changes after sleeping. % while (!LIST_EMPTY(slp)) { % error = sync_vnode(slp, &bo, td); % if (error == 1) { % LIST_REMOVE(bo, bo_synclist); % LIST_INSERT_HEAD(next, bo, bo_synclist); % continue; % } Since we get here, sync_vnode() didn't return early; it unlocked, and the last statement in it is to re-lock... (All sync_vnode() did before unlocking was to read a vnode from the list and lock and hold it.) % % if (first_printf == 0) ... so we can sprinkle any number of unlock/lock pairs here without adding any new problems. % wdog_kern_pat(WD_LASTVAL); % % } Bruce From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 04:56:11 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 592819DC; Thu, 2 Oct 2014 04:56:11 +0000 (UTC) Received: from mail108.syd.optusnet.com.au (mail108.syd.optusnet.com.au [211.29.132.59]) by mx1.freebsd.org (Postfix) with ESMTP id 1B2D61D9; Thu, 2 Oct 2014 04:56:10 +0000 (UTC) Received: from c122-106-147-133.carlnfd1.nsw.optusnet.com.au (c122-106-147-133.carlnfd1.nsw.optusnet.com.au [122.106.147.133]) by mail108.syd.optusnet.com.au (Postfix) with ESMTPS id 777BC1A2354; Thu, 2 Oct 2014 14:56:08 +1000 (EST) Date: Thu, 2 Oct 2014 14:56:05 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Glen Barber Subject: Re: svn commit: r272372 - stable/10/bin/rm In-Reply-To: <201410011618.s91GIfR5071251@svn.freebsd.org> Message-ID: <20141002141656.Y1807@besplex.bde.org> References: <201410011618.s91GIfR5071251@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.1 cv=dMCfxopb c=1 sm=1 tr=0 a=7NqvjVvQucbO2RlWB8PEog==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=5KYu8npawQ8VuZliGPcA:9 a=CjuIK1q_8ugA:10 Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 04:56:11 -0000 On Wed, 1 Oct 2014, Glen Barber wrote: > Log: > MFC r268376 (imp): > > rm -rf can fail sometimes with an error from fts_read. Make it > honor fflag to ignore fts_read errors, but stop deleting from > that directory because no further progress can be made. I asked for this to be backed out in -current. It is not suitable for MFC. > When building a kernel with a high -j value on a high core count > machine, during the cleanobj phase we can wind up doing multiple > rm -rf at the same time for modules that have subdirectories. This > exposed this race (sometimes) as fts_read can return an error if > the directory is removed by another rm -rf. Since the intent of > the -f flag was to ignore errors, even if this was a bug in > fts_read, we should ignore the error like we've been instructed > to do. That may be the intent for sloppy uses, but the meaning of the -f flag is to suppress confirmation and diagnostic messages and modification of the exit status in the case of nonexistent files. (Note that POSIX's OPTIONS section is buggy and only says that this applies to nonexistent operands. Only the main part of the specification says that -f applies recursively.) It is not for breaking reporting of all detected errors. > ============================================================================== > --- stable/10/bin/rm/rm.c Wed Oct 1 16:16:01 2014 (r272371) > +++ stable/10/bin/rm/rm.c Wed Oct 1 16:18:40 2014 (r272372) > @@ -335,7 +335,7 @@ err: > warn("%s", p->fts_path); > eval = 1; > } > - if (errno) > + if (!fflag && errno) > err(1, "fts_read"); > fts_close(fts); > } All other checks of errno in limit the effect of fflag to ENOENT errors. Changing the above to to the same might give conformance to POSIX, depending on whether fts_read() sets errno to ENOENT only when there is an ENOENT error relevant to rm. But I don't like that either. It is only correct to ignore the error for races between multiple rm's where the the interference is limited enough to allow one of the rm's to complete the removal, and moreover, all of the rm's that fail early wait to synchronize with one that actually completes. But the races are caused in the first place by lack of synchronization. See old mail for more details. Bruce From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 04:59:28 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 31CB6B23; Thu, 2 Oct 2014 04:59:28 +0000 (UTC) Received: from shxd.cx (unknown [64.201.244.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1A3D71E8; Thu, 2 Oct 2014 04:59:28 +0000 (UTC) Received: from [64.201.244.132] (port=59586 helo=THEMADHATTER) by shxd.cx with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1XZSka-000049-3F; Wed, 01 Oct 2014 15:52:00 -0700 From: To: "'Hiroki Sato'" , References: <201410020116.s921GVTZ033933@svn.freebsd.org> <542CAABB.5090900@freebsd.org> <20141002.123747.2156790647982484029.hrs@allbsd.org> In-Reply-To: <20141002.123747.2156790647982484029.hrs@allbsd.org> Subject: RE: svn commit: r272393 - head/etc Date: Wed, 1 Oct 2014 21:59:11 -0700 Message-ID: <193c01cfddfd$9b1c6ef0$d1554cd0$@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 15.0 Thread-Index: AQIKWLejTHnCEajZOhjMlj6r7bWH2AH0PTEWApew9nObgumf0A== Content-Language: en-us Sender: devin@shxd.cx Cc: svn-src-head@freebsd.org, dteske@FreeBSD.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 04:59:28 -0000 > -----Original Message----- > From: owner-src-committers@freebsd.org [mailto:owner-src- > committers@freebsd.org] On Behalf Of Hiroki Sato > Sent: Wednesday, October 1, 2014 8:38 PM > To: cperciva@freebsd.org > Cc: src-committers@freebsd.org; svn-src-all@freebsd.org; svn-src- > head@freebsd.org > Subject: Re: svn commit: r272393 - head/etc > > Colin Percival wrote > in <542CAABB.5090900@freebsd.org>: > > cp> On 10/01/14 18:16, Hiroki Sato wrote: > cp> > This is an attempt to solve a problem that rc.d scripts from third-party > cp> > software do not have entries in /etc/defaults/rc.conf. > cp> > cp> Isn't this why we have the > cp> > : ${foo_enable="NO"} > cp> idiom in ports rc.d files? > cp> > cp> > The fact that > cp> > load_rc_config() reads rc.conf only once and /etc/rc invokes the > function > cp> > before running rc.d scripts made developers confused for a long time > because > cp> > load_rc_config() just before run_rc_command() in each rc.d script > overrides > cp> > variables only when the script is directly invoked, not from /etc/rc. > cp> > cp> If a script is setting variables for its own use, there's no need to use > cp> functions from rc.subr -- it can just set the variables directly. If a > cp> script is editing rc.conf, sending a SIGALRM to $$ will signal /etc/rc to > cp> re-source rc.conf. > cp> > cp> I'm really not clear on what this commit accomplishes. > > The primary purpose is to make it clear which variables are used in > the script for *user configuration* and provide a consistent writing > style for scripts from both base and ports. More specifically, I > want to implement a way to list user-configurable variables and which > one is changed from the default value, by effectively replacing > functionality of defaults/rc.conf with set_rcvar(). > > Use of : ${foo="NO"} idiom after load_rc_config() works as you > pointed out. However, it does not work with listing variables. > Plus, there are many scripts written in an inconsistent way. Some > scripts call load_rc_config() multiple times, some have the idioms > between load_rc_config() and run_rc_command(), and some have them > mistakenly before load_rc_config(). I think this is due to confusion > about how load_rc_config() works and all of them can be > fixed/rewritten consistently of course, but I think gathering > definitions at the head of the scripts and making them being defined > at the end of load_rc_config() as set_rcvar_obsolete() does are more > intuitive. > I'm going to chime in here. I'm equally befuddled because for years (properly understanding load_rc_config()) would just create a file under /etc/rc.conf.d/. There's your stand-in for /etc/defaults/rc.conf right there; a file in the little-known and even less talked-about /etc/rc.conf.d/ directory -- where I believe you it is that one precisely does what it is you're looking for (based on your description). -- Devin From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 05:32:30 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3BEEEF83; Thu, 2 Oct 2014 05:32:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C5966EA; Thu, 2 Oct 2014 05:32:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s925WTVe054902; Thu, 2 Oct 2014 05:32:29 GMT (envelope-from neel@FreeBSD.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s925WTHU054901; Thu, 2 Oct 2014 05:32:29 GMT (envelope-from neel@FreeBSD.org) Message-Id: <201410020532.s925WTHU054901@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: neel set sender to neel@FreeBSD.org using -f From: Neel Natu Date: Thu, 2 Oct 2014 05:32:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272395 - head/sys/amd64/vmm/intel X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 05:32:30 -0000 Author: neel Date: Thu Oct 2 05:32:29 2014 New Revision: 272395 URL: https://svnweb.freebsd.org/changeset/base/272395 Log: Get rid of code that dealt with the hardware not being able to save/restore the PAT MSR on guest exit/entry. This workaround was done for a beta release of VMware Fusion 5 but is no longer needed in later versions. All Intel CPUs since Nehalem have supported saving and restoring MSR_PAT in the VM exit and entry controls. Discussed with: grehan Modified: head/sys/amd64/vmm/intel/vmx.c Modified: head/sys/amd64/vmm/intel/vmx.c ============================================================================== --- head/sys/amd64/vmm/intel/vmx.c Thu Oct 2 02:00:21 2014 (r272394) +++ head/sys/amd64/vmm/intel/vmx.c Thu Oct 2 05:32:29 2014 (r272395) @@ -94,23 +94,18 @@ __FBSDID("$FreeBSD$"); #define PROCBASED_CTLS2_ONE_SETTING PROCBASED2_ENABLE_EPT #define PROCBASED_CTLS2_ZERO_SETTING 0 -#define VM_EXIT_CTLS_ONE_SETTING_NO_PAT \ +#define VM_EXIT_CTLS_ONE_SETTING \ (VM_EXIT_HOST_LMA | \ VM_EXIT_SAVE_EFER | \ - VM_EXIT_LOAD_EFER) - -#define VM_EXIT_CTLS_ONE_SETTING \ - (VM_EXIT_CTLS_ONE_SETTING_NO_PAT | \ + VM_EXIT_LOAD_EFER | \ VM_EXIT_ACKNOWLEDGE_INTERRUPT | \ VM_EXIT_SAVE_PAT | \ VM_EXIT_LOAD_PAT) + #define VM_EXIT_CTLS_ZERO_SETTING VM_EXIT_SAVE_DEBUG_CONTROLS -#define VM_ENTRY_CTLS_ONE_SETTING_NO_PAT VM_ENTRY_LOAD_EFER +#define VM_ENTRY_CTLS_ONE_SETTING (VM_ENTRY_LOAD_EFER | VM_ENTRY_LOAD_PAT) -#define VM_ENTRY_CTLS_ONE_SETTING \ - (VM_ENTRY_CTLS_ONE_SETTING_NO_PAT | \ - VM_ENTRY_LOAD_PAT) #define VM_ENTRY_CTLS_ZERO_SETTING \ (VM_ENTRY_LOAD_DEBUG_CONTROLS | \ VM_ENTRY_INTO_SMM | \ @@ -152,10 +147,6 @@ SYSCTL_INT(_hw_vmm_vmx, OID_AUTO, initia */ static SYSCTL_NODE(_hw_vmm_vmx, OID_AUTO, cap, CTLFLAG_RW, NULL, NULL); -static int vmx_patmsr; -SYSCTL_INT(_hw_vmm_vmx_cap, OID_AUTO, patmsr, CTLFLAG_RD, &vmx_patmsr, 0, - "PAT MSR saved and restored in VCMS"); - static int cap_halt_exit; SYSCTL_INT(_hw_vmm_vmx_cap, OID_AUTO, halt_exit, CTLFLAG_RD, &cap_halt_exit, 0, "HLT triggers a VM-exit"); @@ -615,48 +606,24 @@ vmx_init(int ipinum) } /* Check support for VM-exit controls */ - vmx_patmsr = 1; error = vmx_set_ctlreg(MSR_VMX_EXIT_CTLS, MSR_VMX_TRUE_EXIT_CTLS, VM_EXIT_CTLS_ONE_SETTING, VM_EXIT_CTLS_ZERO_SETTING, &exit_ctls); if (error) { - /* Try again without the PAT MSR bits */ - error = vmx_set_ctlreg(MSR_VMX_EXIT_CTLS, - MSR_VMX_TRUE_EXIT_CTLS, - VM_EXIT_CTLS_ONE_SETTING_NO_PAT, - VM_EXIT_CTLS_ZERO_SETTING, - &exit_ctls); - if (error) { - printf("vmx_init: processor does not support desired " - "exit controls\n"); - return (error); - } else { - if (bootverbose) - printf("vmm: PAT MSR access not supported\n"); - vmx_patmsr = 0; - } + printf("vmx_init: processor does not support desired " + "exit controls\n"); + return (error); } /* Check support for VM-entry controls */ - if (vmx_patmsr) { - error = vmx_set_ctlreg(MSR_VMX_ENTRY_CTLS, - MSR_VMX_TRUE_ENTRY_CTLS, - VM_ENTRY_CTLS_ONE_SETTING, - VM_ENTRY_CTLS_ZERO_SETTING, - &entry_ctls); - } else { - error = vmx_set_ctlreg(MSR_VMX_ENTRY_CTLS, - MSR_VMX_TRUE_ENTRY_CTLS, - VM_ENTRY_CTLS_ONE_SETTING_NO_PAT, - VM_ENTRY_CTLS_ZERO_SETTING, - &entry_ctls); - } - + error = vmx_set_ctlreg(MSR_VMX_ENTRY_CTLS, MSR_VMX_TRUE_ENTRY_CTLS, + VM_ENTRY_CTLS_ONE_SETTING, VM_ENTRY_CTLS_ZERO_SETTING, + &entry_ctls); if (error) { printf("vmx_init: processor does not support desired " - "entry controls\n"); - return (error); + "entry controls\n"); + return (error); } /* @@ -889,6 +856,10 @@ vmx_vminit(struct vm *vm, pmap_t pmap) * VM exit and entry respectively. It is also restored from the * host VMCS area on a VM exit. * + * MSR_PAT is saved and restored in the guest VMCS are on a VM exit + * and entry respectively. It is also restored from the host VMCS + * area on a VM exit. + * * The TSC MSR is exposed read-only. Writes are disallowed as that * will impact the host TSC. * XXX Writes would be implemented with a wrmsr trap, and @@ -900,19 +871,10 @@ vmx_vminit(struct vm *vm, pmap_t pmap) guest_msr_rw(vmx, MSR_SYSENTER_ESP_MSR) || guest_msr_rw(vmx, MSR_SYSENTER_EIP_MSR) || guest_msr_rw(vmx, MSR_EFER) || + guest_msr_rw(vmx, MSR_PAT) || guest_msr_ro(vmx, MSR_TSC)) panic("vmx_vminit: error setting guest msr access"); - /* - * MSR_PAT is saved and restored in the guest VMCS are on a VM exit - * and entry respectively. It is also restored from the host VMCS - * area on a VM exit. However, if running on a system with no - * MSR_PAT save/restore support, leave access disabled so accesses - * will be trapped. - */ - if (vmx_patmsr && guest_msr_rw(vmx, MSR_PAT)) - panic("vmx_vminit: error setting guest pat msr access"); - vpid_alloc(vpid, VM_MAXCPU); if (virtual_interrupt_delivery) { From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 05:56:18 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9F03535A; Thu, 2 Oct 2014 05:56:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8BC428E9; Thu, 2 Oct 2014 05:56:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s925uIgD064422; Thu, 2 Oct 2014 05:56:18 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s925uIY4064421; Thu, 2 Oct 2014 05:56:18 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201410020556.s925uIY4064421@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Thu, 2 Oct 2014 05:56:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272396 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 05:56:18 -0000 Author: hrs Date: Thu Oct 2 05:56:17 2014 New Revision: 272396 URL: https://svnweb.freebsd.org/changeset/base/272396 Log: Virtualize net.link.vlan.soft_pad. Modified: head/sys/net/if_vlan.c Modified: head/sys/net/if_vlan.c ============================================================================== --- head/sys/net/if_vlan.c Thu Oct 2 05:32:29 2014 (r272395) +++ head/sys/net/if_vlan.c Thu Oct 2 05:56:17 2014 (r272396) @@ -148,9 +148,10 @@ static SYSCTL_NODE(_net_link, IFT_L2VLAN static SYSCTL_NODE(_net_link_vlan, PF_LINK, link, CTLFLAG_RW, 0, "for consistency"); -static int soft_pad = 0; -SYSCTL_INT(_net_link_vlan, OID_AUTO, soft_pad, CTLFLAG_RW, &soft_pad, 0, - "pad short frames before tagging"); +static VNET_DEFINE(int, soft_pad); +#define V_soft_pad VNET(soft_pad) +SYSCTL_INT(_net_link_vlan, OID_AUTO, soft_pad, CTLFLAG_RW | CTLFLAG_VNET, + &VNET_NAME(soft_pad), 0, "pad short frames before tagging"); static const char vlanname[] = "vlan"; static MALLOC_DEFINE(M_VLAN, vlanname, "802.1Q Virtual LAN Interface"); @@ -1082,7 +1083,7 @@ vlan_transmit(struct ifnet *ifp, struct * devices that just discard such runts instead or mishandle * them somehow. */ - if (soft_pad && p->if_type == IFT_ETHER) { + if (V_soft_pad && p->if_type == IFT_ETHER) { static char pad[8]; /* just zeros */ int n; From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 06:00:56 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F200A5AD; Thu, 2 Oct 2014 06:00:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DE8F098D; Thu, 2 Oct 2014 06:00:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9260tGs066201; Thu, 2 Oct 2014 06:00:55 GMT (envelope-from ganbold@FreeBSD.org) Received: (from ganbold@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9260tqI066200; Thu, 2 Oct 2014 06:00:55 GMT (envelope-from ganbold@FreeBSD.org) Message-Id: <201410020600.s9260tqI066200@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ganbold set sender to ganbold@FreeBSD.org using -f From: Ganbold Tsagaankhuu Date: Thu, 2 Oct 2014 06:00:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272397 - head/sys/arm/allwinner X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 06:00:56 -0000 Author: ganbold Date: Thu Oct 2 06:00:55 2014 New Revision: 272397 URL: https://svnweb.freebsd.org/changeset/base/272397 Log: Allow timer0 to run at full 24MHz not at 24MHz/16 by setting prescale to 1. Approved by: stas (mentor) Modified: head/sys/arm/allwinner/timer.c Modified: head/sys/arm/allwinner/timer.c ============================================================================== --- head/sys/arm/allwinner/timer.c Thu Oct 2 05:56:17 2014 (r272396) +++ head/sys/arm/allwinner/timer.c Thu Oct 2 06:00:55 2014 (r272397) @@ -72,7 +72,7 @@ __FBSDID("$FreeBSD$"); #define TIMER_ENABLE (1<<0) #define TIMER_AUTORELOAD (1<<1) #define TIMER_OSC24M (1<<2) /* oscillator = 24mhz */ -#define TIMER_PRESCALAR (4<<4) /* prescalar = 16 */ +#define TIMER_PRESCALAR (0<<4) /* prescalar = 1 */ #define SYS_TIMER_CLKSRC 24000000 /* clock source */ From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 06:16:34 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from hub.FreeBSD.org (hub.freebsd.org [IPv6:2001:1900:2254:206c::16:88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4D6E58A0; Thu, 2 Oct 2014 06:16:33 +0000 (UTC) Date: Thu, 2 Oct 2014 02:16:28 -0400 From: Glen Barber To: Bruce Evans Subject: Re: svn commit: r272372 - stable/10/bin/rm Message-ID: <20141002061628.GO1275@hub.FreeBSD.org> References: <201410011618.s91GIfR5071251@svn.freebsd.org> <20141002141656.Y1807@besplex.bde.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="tbUdrdPJASQ8VKrP" Content-Disposition: inline In-Reply-To: <20141002141656.Y1807@besplex.bde.org> X-Operating-System: FreeBSD 11.0-CURRENT amd64 X-SCUD-Definition: Sudden Completely Unexpected Dataloss X-SULE-Definition: Sudden Unexpected Learning Event User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 06:16:34 -0000 --tbUdrdPJASQ8VKrP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Oct 02, 2014 at 02:56:05PM +1000, Bruce Evans wrote: > On Wed, 1 Oct 2014, Glen Barber wrote: >=20 > >Log: > > MFC r268376 (imp): > > > > rm -rf can fail sometimes with an error from fts_read. Make it > > honor fflag to ignore fts_read errors, but stop deleting from > > that directory because no further progress can be made. >=20 > I asked for this to be backed out in -current. It is not suitable for MF= C. >=20 It fixes an immediate issue that prevents high-concurrent make(1) jobs =66rom stomping over each other. If there is a more suitable solution, it needs to be introduced in head/ first, pending MFC for 10.1-RELEASE. In the meantime, we lack any alternate fix, and this resolves the immediate issue at hand. > See old mail for more details. >=20 I saw the original email. I do not see a proposed patch. Glen --tbUdrdPJASQ8VKrP Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJULO28AAoJEAMUWKVHj+KTRb4QAJPHU3MvHC6fZCb3dO18+IW7 aAk8flpEKs7uXmpxNebzJhP5pu3zSk+6H/gkmAtTVPJkc+WQZ9RtlmdZrx/LaZrl 26AreERBOzVQy5E4m7hYkmTwuGRHo9+JRu2inPLgEQoAaeLDv82D/su4dCTzs7vV clVwcLLJi7mZ3aHYKSL8TW+v3jK4gwXMLqfEQMQbyB2Vd185iD0N3G6w+iKKf4Zh jfMGclmvVnCZg7Cq7dM9yL5JgyDuojRRj+AvD5SbA8XcFfyBO+XmAXsMJ7dYpGC/ IySwKKo4HzQn7Bkdlt2nNMOk0WrPX4i3KovCTr/Nj5BTsD9mtMH/5qq199v29DKn NpMmZUXcLf5L7tYLhn1sH4bELZ3TlNICUrcLIUYEkqjln1f50w0rnznFUu80uVek Y9WSDqHCekD/gPSsa/32RZLj99+/aDWDG9jHMmn0IdSRePHny9X/ha6JNOlzjG9T fDAQm9Q/LiiuF7RSiNhAZGC/e4FY9PHdP6GPSHR7xhIqwy4CEuSi3zPewpEMRVNg eRhOiBZtSnXYiYDIaqOMwR/Q7byV/Y+aBp8P7YXo1qBP5oISPm1fKkvBoBYKp9K4 9R9la3v9VHDP5gGSNKlhxqjcwN1C0dYgaS638a+0HFYtuYLwYA2pX4Uwc0krBg9s sFeXRKjjR+feNxL03g5S =6Xl2 -----END PGP SIGNATURE----- --tbUdrdPJASQ8VKrP-- From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 06:25:17 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 01BB1D9A; Thu, 2 Oct 2014 06:25:17 +0000 (UTC) Received: from mail-ig0-x22c.google.com (mail-ig0-x22c.google.com [IPv6:2607:f8b0:4001:c05::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A0494BCB; Thu, 2 Oct 2014 06:25:16 +0000 (UTC) Received: by mail-ig0-f172.google.com with SMTP id r2so1413795igi.5 for ; Wed, 01 Oct 2014 23:25:15 -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=Me6UIyK4/wTNux/jKnXhkavPJRnR6KM7gT4BTWTdTBk=; b=GV5o0ROjiR+qN3US+rtvxp/mWIhTpC8XAA7eO2dXm8UNaIUmFQQdRP6eYe+7ybVSIE 25nfYOLyN4j3ZmTmxJc/2hmrvK38PN7lgz+Ge7vTMKcipz2s7iAfAAzsdw40WpYlWSZh nHJHb5u9CwpNJTDYVVKp2Tsi3Xyy6eQ2Q2I3Hi8E2bZv1FudEl/0CoZrKugtIzeRNLTY jrI1uJGFYWM5cmX63rAL21uVkGI1Rzp+IDznStKjGON6r/mXs8MmfQegpbqN/Px5oTs3 bbtXqrOYIlXNf4efwcUi7Cyjcp0ffx/6kczlXupMr5LGqfl/RyhO7pTBFHEVSpCoBDdQ ttog== MIME-Version: 1.0 X-Received: by 10.50.57.110 with SMTP id h14mr1681081igq.26.1412231115811; Wed, 01 Oct 2014 23:25:15 -0700 (PDT) Received: by 10.50.227.42 with HTTP; Wed, 1 Oct 2014 23:25:15 -0700 (PDT) In-Reply-To: <20141002061628.GO1275@hub.FreeBSD.org> References: <201410011618.s91GIfR5071251@svn.freebsd.org> <20141002141656.Y1807@besplex.bde.org> <20141002061628.GO1275@hub.FreeBSD.org> Date: Wed, 1 Oct 2014 23:25:15 -0700 Message-ID: Subject: Re: svn commit: r272372 - stable/10/bin/rm From: NGie Cooper To: Glen Barber Content-Type: text/plain; charset=UTF-8 Cc: svn-src-stable@freebsd.org, "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , svn-src-stable-10@freebsd.org, Bruce Evans X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 06:25:17 -0000 On Wed, Oct 1, 2014 at 11:16 PM, Glen Barber wrote: > On Thu, Oct 02, 2014 at 02:56:05PM +1000, Bruce Evans wrote: >> On Wed, 1 Oct 2014, Glen Barber wrote: >> >> >Log: >> > MFC r268376 (imp): >> > >> > rm -rf can fail sometimes with an error from fts_read. Make it >> > honor fflag to ignore fts_read errors, but stop deleting from >> > that directory because no further progress can be made. >> >> I asked for this to be backed out in -current. It is not suitable for MFC. >> > > It fixes an immediate issue that prevents high-concurrent make(1) jobs > from stomping over each other. The real problem is noted in this bug: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192490 ; the SUBDIR_PARALLEL logic is executing multiple instances of the clean/cleandir .PHONY targets. I agree with bde@ that this commit is papering over a bigger problem, but it's annoying enough and causes enough false positives that I understand why gjb@ MFCed the commit imp@ did in head. Thank you.. From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 06:29:49 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CD74CF60; Thu, 2 Oct 2014 06:29:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B7D26BEE; Thu, 2 Oct 2014 06:29:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s926Tn4i078871; Thu, 2 Oct 2014 06:29:49 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s926TnT1078870; Thu, 2 Oct 2014 06:29:49 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201410020629.s926TnT1078870@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 2 Oct 2014 06:29:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272398 - head/usr.bin/sort X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 06:29:49 -0000 Author: bapt Date: Thu Oct 2 06:29:49 2014 New Revision: 272398 URL: https://svnweb.freebsd.org/changeset/base/272398 Log: Make sure to not skip any argument when converting from deprecated +POS1, -POS2 to -kPOS1,POS2, so that sort +0n gets translated to sort -k1,1n as it is expected PR: 193994 Submitted by: rodrigo MFC after: 3 days Modified: head/usr.bin/sort/sort.c Modified: head/usr.bin/sort/sort.c ============================================================================== --- head/usr.bin/sort/sort.c Thu Oct 2 06:00:55 2014 (r272397) +++ head/usr.bin/sort/sort.c Thu Oct 2 06:29:49 2014 (r272398) @@ -897,7 +897,7 @@ fix_obsolete_keys(int *argc, char **argv } } } - sprintf(sopt, "-k%d.%d", f1, c1); + sprintf(sopt, "-k%d.%d%s", f1, c1, sopts1); argv[i] = sort_strdup(sopt); } } From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 08:12:43 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9BF2DCF2; Thu, 2 Oct 2014 08:12:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 86588A81; Thu, 2 Oct 2014 08:12:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s928Chd5029803; Thu, 2 Oct 2014 08:12:43 GMT (envelope-from ganbold@FreeBSD.org) Received: (from ganbold@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s928CgKE029799; Thu, 2 Oct 2014 08:12:42 GMT (envelope-from ganbold@FreeBSD.org) Message-Id: <201410020812.s928CgKE029799@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ganbold set sender to ganbold@FreeBSD.org using -f From: Ganbold Tsagaankhuu Date: Thu, 2 Oct 2014 08:12:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272399 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 08:12:43 -0000 Author: ganbold Date: Thu Oct 2 08:12:42 2014 New Revision: 272399 URL: https://svnweb.freebsd.org/changeset/base/272399 Log: Add uart driver for Qualcomm MSM 7000/8000 series chips. It is working on IFC6410 board which has Qualcomm Snapdragon SoC. Approved by: stas (mentor) Added: head/sys/dev/uart/uart_dev_msm.c (contents, props changed) head/sys/dev/uart/uart_dev_msm.h (contents, props changed) Modified: head/sys/dev/uart/uart.h head/sys/dev/uart/uart_bus_fdt.c Modified: head/sys/dev/uart/uart.h ============================================================================== --- head/sys/dev/uart/uart.h Thu Oct 2 06:29:49 2014 (r272398) +++ head/sys/dev/uart/uart.h Thu Oct 2 08:12:42 2014 (r272399) @@ -65,6 +65,7 @@ struct uart_bas { struct uart_class; extern struct uart_class uart_imx_class __attribute__((weak)); +extern struct uart_class uart_msm_class __attribute__((weak)); extern struct uart_class uart_ns8250_class __attribute__((weak)); extern struct uart_class uart_quicc_class __attribute__((weak)); extern struct uart_class uart_s3c2410_class __attribute__((weak)); Modified: head/sys/dev/uart/uart_bus_fdt.c ============================================================================== --- head/sys/dev/uart/uart_bus_fdt.c Thu Oct 2 06:29:49 2014 (r272398) +++ head/sys/dev/uart/uart_bus_fdt.c Thu Oct 2 08:12:42 2014 (r272399) @@ -84,6 +84,7 @@ static struct ofw_compat_data compat_dat {"fsl,imx21-uart", (uintptr_t)&uart_imx_class}, {"fsl,mvf600-uart", (uintptr_t)&uart_vybrid_class}, {"lpc,uart", (uintptr_t)&uart_lpc_class}, + {"qcom,uart-dm", (uintptr_t)&uart_msm_class}, {"ti,ns16550", (uintptr_t)&uart_ti8250_class}, {"ns16550", (uintptr_t)&uart_ns8250_class}, {NULL, (uintptr_t)NULL}, Added: head/sys/dev/uart/uart_dev_msm.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/uart/uart_dev_msm.c Thu Oct 2 08:12:42 2014 (r272399) @@ -0,0 +1,568 @@ +/*- + * Copyright (c) 2014 Ganbold Tsagaankhuu + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* Qualcomm MSM7K/8K uart driver */ + +#include +__FBSDID("$FreeBSD$"); + +#include "opt_ddb.h" + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "uart_if.h" + +#define DEF_CLK 7372800 + +#define GETREG(bas, reg) \ + bus_space_read_4((bas)->bst, (bas)->bsh, (reg)) +#define SETREG(bas, reg, value) \ + bus_space_write_4((bas)->bst, (bas)->bsh, (reg), (value)) + +static int msm_uart_param(struct uart_bas *, int, int, int, int); + +/* + * Low-level UART interface. + */ +static int msm_probe(struct uart_bas *bas); +static void msm_init(struct uart_bas *bas, int, int, int, int); +static void msm_term(struct uart_bas *bas); +static void msm_putc(struct uart_bas *bas, int); +static int msm_rxready(struct uart_bas *bas); +static int msm_getc(struct uart_bas *bas, struct mtx *mtx); + +extern SLIST_HEAD(uart_devinfo_list, uart_devinfo) uart_sysdevs; + +static int +msm_uart_param(struct uart_bas *bas, int baudrate, int databits, + int stopbits, int parity) +{ + int ulcon; + + ulcon = 0; + + switch (databits) { + case 5: + ulcon |= (UART_DM_5_BPS << 4); + break; + case 6: + ulcon |= (UART_DM_6_BPS << 4); + break; + case 7: + ulcon |= (UART_DM_7_BPS << 4); + break; + case 8: + ulcon |= (UART_DM_8_BPS << 4); + break; + default: + return (EINVAL); + } + + switch (parity) { + case UART_PARITY_NONE: + ulcon |= UART_DM_NO_PARITY; + break; + case UART_PARITY_ODD: + ulcon |= UART_DM_ODD_PARITY; + break; + case UART_PARITY_EVEN: + ulcon |= UART_DM_EVEN_PARITY; + break; + case UART_PARITY_SPACE: + ulcon |= UART_DM_SPACE_PARITY; + break; + case UART_PARITY_MARK: + default: + return (EINVAL); + } + + switch (stopbits) { + case 1: + ulcon |= (UART_DM_SBL_1 << 2); + break; + case 2: + ulcon |= (UART_DM_SBL_2 << 2); + break; + default: + return (EINVAL); + } + uart_setreg(bas, UART_DM_MR2, ulcon); + + /* Set 115200 for both TX and RX. */; + uart_setreg(bas, UART_DM_CSR, UART_DM_CSR_115200); + uart_barrier(bas); + + return (0); +} + +struct uart_ops uart_msm_ops = { + .probe = msm_probe, + .init = msm_init, + .term = msm_term, + .putc = msm_putc, + .rxready = msm_rxready, + .getc = msm_getc, +}; + +static int +msm_probe(struct uart_bas *bas) +{ + + return (0); +} + +static void +msm_init(struct uart_bas *bas, int baudrate, int databits, int stopbits, + int parity) +{ + + if (bas->rclk == 0) + bas->rclk = DEF_CLK; + + KASSERT(bas->rclk != 0, ("msm_init: Invalid rclk")); + + /* Set default parameters */ + msm_uart_param(bas, baudrate, databits, stopbits, parity); + + /* + * Configure UART mode registers MR1 and MR2. + * Hardware flow control isn't supported. + */ + uart_setreg(bas, UART_DM_MR1, 0x0); + + /* Reset interrupt mask register. */ + uart_setreg(bas, UART_DM_IMR, 0); + + /* + * Configure Tx and Rx watermarks configuration registers. + * TX watermark value is set to 0 - interrupt is generated when + * FIFO level is less than or equal to 0. + */ + uart_setreg(bas, UART_DM_TFWR, UART_DM_TFW_VALUE); + + /* Set RX watermark value */ + uart_setreg(bas, UART_DM_RFWR, UART_DM_RFW_VALUE); + + /* + * Configure Interrupt Programming Register. + * Set initial Stale timeout value. + */ + uart_setreg(bas, UART_DM_IPR, UART_DM_STALE_TIMEOUT_LSB); + + /* Disable IRDA mode */ + uart_setreg(bas, UART_DM_IRDA, 0x0); + + /* + * Configure and enable sim interface if required. + * Configure hunt character value in HCR register. + * Keep it in reset state. + */ + uart_setreg(bas, UART_DM_HCR, 0x0); + + /* Issue soft reset command */ + SETREG(bas, UART_DM_CR, UART_DM_RESET_TX); + SETREG(bas, UART_DM_CR, UART_DM_RESET_RX); + SETREG(bas, UART_DM_CR, UART_DM_RESET_ERROR_STATUS); + SETREG(bas, UART_DM_CR, UART_DM_RESET_BREAK_INT); + SETREG(bas, UART_DM_CR, UART_DM_RESET_STALE_INT); + + /* Enable/Disable Rx/Tx DM interfaces */ + /* Disable Data Mover for now. */ + uart_setreg(bas, UART_DM_DMEN, 0x0); + + /* Enable transmitter and receiver */ + uart_setreg(bas, UART_DM_CR, UART_DM_CR_RX_ENABLE); + uart_setreg(bas, UART_DM_CR, UART_DM_CR_TX_ENABLE); + + uart_barrier(bas); +} + +static void +msm_term(struct uart_bas *bas) +{ + + /* XXX */ +} + +static void +msm_putc(struct uart_bas *bas, int c) +{ + int limit; + + /* + * Write to NO_CHARS_FOR_TX register the number of characters + * to be transmitted. However, before writing TX_FIFO must + * be empty as indicated by TX_READY interrupt in IMR register + */ + + /* + * Check if transmit FIFO is empty. + * If not wait for TX_READY interrupt. + */ + limit = 1000; + if (!(uart_getreg(bas, UART_DM_SR) & UART_DM_SR_TXEMT)) { + while ((uart_getreg(bas, UART_DM_ISR) & UART_DM_TX_READY) == 0 + && --limit) + DELAY(4); + } + /* FIFO is ready, write number of characters to be written */ + uart_setreg(bas, UART_DM_NO_CHARS_FOR_TX, 1); + + /* Wait till TX FIFO has space */ + while ((uart_getreg(bas, UART_DM_SR) & UART_DM_SR_TXRDY) == 0) + DELAY(4); + + /* TX FIFO has space. Write char */ + SETREG(bas, UART_DM_TF(0), (c & 0xff)); +} + +static int +msm_rxready(struct uart_bas *bas) +{ + + /* Wait for a character to come ready */ + return ((uart_getreg(bas, UART_DM_SR) & UART_DM_SR_RXRDY) == + UART_DM_SR_RXRDY); +} + +static int +msm_getc(struct uart_bas *bas, struct mtx *mtx) +{ + int c; + + uart_lock(mtx); + + /* Wait for a character to come ready */ + while ((uart_getreg(bas, UART_DM_SR) & UART_DM_SR_RXRDY) != + UART_DM_SR_RXRDY) + DELAY(4); + + /* Check for Overrun error. If so reset Error Status */ + if (uart_getreg(bas, UART_DM_SR) & UART_DM_SR_UART_OVERRUN) + uart_setreg(bas, UART_DM_CR, UART_DM_RESET_ERROR_STATUS); + + /* Read char */ + c = uart_getreg(bas, UART_DM_RF(0)); + + uart_unlock(mtx); + + return (c); +} + +/* + * High-level UART interface. + */ +struct msm_uart_softc { + struct uart_softc base; + uint32_t ier; +}; + +static int msm_bus_probe(struct uart_softc *sc); +static int msm_bus_attach(struct uart_softc *sc); +static int msm_bus_flush(struct uart_softc *, int); +static int msm_bus_getsig(struct uart_softc *); +static int msm_bus_ioctl(struct uart_softc *, int, intptr_t); +static int msm_bus_ipend(struct uart_softc *); +static int msm_bus_param(struct uart_softc *, int, int, int, int); +static int msm_bus_receive(struct uart_softc *); +static int msm_bus_setsig(struct uart_softc *, int); +static int msm_bus_transmit(struct uart_softc *); +static void msm_bus_grab(struct uart_softc *); +static void msm_bus_ungrab(struct uart_softc *); + +static kobj_method_t msm_methods[] = { + KOBJMETHOD(uart_probe, msm_bus_probe), + KOBJMETHOD(uart_attach, msm_bus_attach), + KOBJMETHOD(uart_flush, msm_bus_flush), + KOBJMETHOD(uart_getsig, msm_bus_getsig), + KOBJMETHOD(uart_ioctl, msm_bus_ioctl), + KOBJMETHOD(uart_ipend, msm_bus_ipend), + KOBJMETHOD(uart_param, msm_bus_param), + KOBJMETHOD(uart_receive, msm_bus_receive), + KOBJMETHOD(uart_setsig, msm_bus_setsig), + KOBJMETHOD(uart_transmit, msm_bus_transmit), + KOBJMETHOD(uart_grab, msm_bus_grab), + KOBJMETHOD(uart_ungrab, msm_bus_ungrab), + {0, 0 } +}; + +int +msm_bus_probe(struct uart_softc *sc) +{ + + sc->sc_txfifosz = 64; + sc->sc_rxfifosz = 64; + + device_set_desc(sc->sc_dev, "Qualcomm HSUART"); + + return (0); +} + +static int +msm_bus_attach(struct uart_softc *sc) +{ + struct msm_uart_softc *u = (struct msm_uart_softc *)sc; + struct uart_bas *bas = &sc->sc_bas; + + sc->sc_hwiflow = 0; + sc->sc_hwoflow = 0; + + /* Set TX_READY, TXLEV, RXLEV, RXSTALE */ + u->ier = UART_DM_IMR_ENABLED; + + /* Configure Interrupt Mask register IMR */ + uart_setreg(bas, UART_DM_IMR, u->ier); + + return (0); +} + +/* + * Write the current transmit buffer to the TX FIFO. + */ +static int +msm_bus_transmit(struct uart_softc *sc) +{ + struct msm_uart_softc *u = (struct msm_uart_softc *)sc; + struct uart_bas *bas = &sc->sc_bas; + int i; + + uart_lock(sc->sc_hwmtx); + + /* Write some data */ + for (i = 0; i < sc->sc_txdatasz; i++) { + /* Write TX data */ + msm_putc(bas, sc->sc_txbuf[i]); + uart_barrier(bas); + } + + /* TX FIFO is empty now, enable TX_READY interrupt */ + u->ier |= UART_DM_TX_READY; + SETREG(bas, UART_DM_IMR, u->ier); + uart_barrier(bas); + + /* + * Inform upper layer that it is transmitting data to hardware, + * this will be cleared when TXIDLE interrupt occurs. + */ + sc->sc_txbusy = 1; + uart_unlock(sc->sc_hwmtx); + + return (0); +} + +static int +msm_bus_setsig(struct uart_softc *sc, int sig) +{ + + return (0); +} + +static int +msm_bus_receive(struct uart_softc *sc) +{ + struct msm_uart_softc *u = (struct msm_uart_softc *)sc; + struct uart_bas *bas; + int c; + + bas = &sc->sc_bas; + uart_lock(sc->sc_hwmtx); + + /* Initialize Receive Path and interrupt */ + SETREG(bas, UART_DM_CR, UART_DM_RESET_STALE_INT); + SETREG(bas, UART_DM_CR, UART_DM_STALE_EVENT_ENABLE); + u->ier |= UART_DM_RXLEV; + SETREG(bas, UART_DM_IMR, u->ier); + + /* Loop over until we are full, or no data is available */ + while (uart_getreg(bas, UART_DM_SR) & UART_DM_SR_RXRDY) { + if (uart_rx_full(sc)) { + /* No space left in input buffer */ + sc->sc_rxbuf[sc->sc_rxput] = UART_STAT_OVERRUN; + break; + } + + /* Read RX FIFO */ + c = uart_getreg(bas, UART_DM_RF(0)); + uart_barrier(bas); + + uart_rx_put(sc, c); + } + + uart_unlock(sc->sc_hwmtx); + + return (0); +} + +static int +msm_bus_param(struct uart_softc *sc, int baudrate, int databits, + int stopbits, int parity) +{ + int error; + + if (sc->sc_bas.rclk == 0) + sc->sc_bas.rclk = DEF_CLK; + + KASSERT(sc->sc_bas.rclk != 0, ("msm_init: Invalid rclk")); + + uart_lock(sc->sc_hwmtx); + error = msm_uart_param(&sc->sc_bas, baudrate, databits, stopbits, + parity); + uart_unlock(sc->sc_hwmtx); + + return (error); +} + +static int +msm_bus_ipend(struct uart_softc *sc) +{ + struct msm_uart_softc *u = (struct msm_uart_softc *)sc; + struct uart_bas *bas = &sc->sc_bas; + uint32_t isr; + int ipend; + + uart_lock(sc->sc_hwmtx); + + /* Get ISR status */ + isr = GETREG(bas, UART_DM_MISR); + + ipend = 0; + + /* Uart RX starting, notify upper layer */ + if (isr & UART_DM_RXLEV) { + u->ier &= ~UART_DM_RXLEV; + SETREG(bas, UART_DM_IMR, u->ier); + uart_barrier(bas); + ipend |= SER_INT_RXREADY; + } + + /* Stale RX interrupt */ + if (isr & UART_DM_RXSTALE) { + /* Disable and reset it */ + SETREG(bas, UART_DM_CR, UART_DM_STALE_EVENT_DISABLE); + SETREG(bas, UART_DM_CR, UART_DM_RESET_STALE_INT); + uart_barrier(bas); + ipend |= SER_INT_RXREADY; + } + + /* TX READY interrupt */ + if (isr & UART_DM_TX_READY) { + /* Clear TX Ready */ + SETREG(bas, UART_DM_CR, UART_DM_CLEAR_TX_READY); + + /* Disable TX_READY */ + u->ier &= ~UART_DM_TX_READY; + SETREG(bas, UART_DM_IMR, u->ier); + uart_barrier(bas); + + if (sc->sc_txbusy != 0) + ipend |= SER_INT_TXIDLE; + } + + if (isr & UART_DM_TXLEV) { + /* TX FIFO is empty */ + u->ier &= ~UART_DM_TXLEV; + SETREG(bas, UART_DM_IMR, u->ier); + uart_barrier(bas); + + if (sc->sc_txbusy != 0) + ipend |= SER_INT_TXIDLE; + } + + uart_unlock(sc->sc_hwmtx); + return (ipend); +} + +static int +msm_bus_flush(struct uart_softc *sc, int what) +{ + + return (0); +} + +static int +msm_bus_getsig(struct uart_softc *sc) +{ + + return (0); +} + +static int +msm_bus_ioctl(struct uart_softc *sc, int request, intptr_t data) +{ + + return (EINVAL); +} + +static void +msm_bus_grab(struct uart_softc *sc) +{ + struct uart_bas *bas = &sc->sc_bas; + + /* + * XXX: Turn off all interrupts to enter polling mode. Leave the + * saved mask alone. We'll restore whatever it was in ungrab. + */ + uart_lock(sc->sc_hwmtx); + SETREG(bas, UART_DM_CR, UART_DM_RESET_STALE_INT); + SETREG(bas, UART_DM_IMR, 0); + uart_barrier(bas); + uart_unlock(sc->sc_hwmtx); +} + +static void +msm_bus_ungrab(struct uart_softc *sc) +{ + struct msm_uart_softc *u = (struct msm_uart_softc *)sc; + struct uart_bas *bas = &sc->sc_bas; + + /* + * Restore previous interrupt mask + */ + uart_lock(sc->sc_hwmtx); + SETREG(bas, UART_DM_IMR, u->ier); + uart_barrier(bas); + uart_unlock(sc->sc_hwmtx); +} + +struct uart_class uart_msm_class = { + "msm", + msm_methods, + sizeof(struct msm_uart_softc), + .uc_ops = &uart_msm_ops, + .uc_range = 8, + .uc_rclk = DEF_CLK, +}; Added: head/sys/dev/uart/uart_dev_msm.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/uart/uart_dev_msm.h Thu Oct 2 08:12:42 2014 (r272399) @@ -0,0 +1,229 @@ +/*- + * Copyright (c) 2014 Ganbold Tsagaankhuu + * 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 _UART_DM_H_ +#define _UART_DM_H_ + +#define UART_DM_EXTR_BITS(value, start_pos, end_pos) \ + ((value << (32 - end_pos)) >> (32 - (end_pos - start_pos))) + +/* UART Parity Mode */ +enum UART_DM_PARITY_MODE { + UART_DM_NO_PARITY, + UART_DM_ODD_PARITY, + UART_DM_EVEN_PARITY, + UART_DM_SPACE_PARITY +}; + +/* UART Stop Bit Length */ +enum UART_DM_STOP_BIT_LEN { + UART_DM_SBL_9_16, + UART_DM_SBL_1, + UART_DM_SBL_1_9_16, + UART_DM_SBL_2 +}; + +/* UART Bits per Char */ +enum UART_DM_BITS_PER_CHAR { + UART_DM_5_BPS, + UART_DM_6_BPS, + UART_DM_7_BPS, + UART_DM_8_BPS +}; + +/* 8-N-1 Configuration */ +#define UART_DM_8_N_1_MODE (UART_DM_NO_PARITY | \ + (UART_DM_SBL_1 << 2) | \ + (UART_DM_8_BPS << 4)) + +/* UART_DM Registers */ + +/* UART Operational Mode Registers (HSUART) */ +#define UART_DM_MR1 0x00 +#define UART_DM_MR1_AUTO_RFR_LEVEL1_BMSK 0xffffff00 +#define UART_DM_MR1_AUTO_RFR_LEVEL0_BMSK 0x3f +#define UART_DM_MR1_CTS_CTL_BMSK 0x40 +#define UART_DM_MR1_RX_RDY_CTL_BMSK 0x80 + +#define UART_DM_MR2 0x04 +#define UART_DM_MR2_ERROR_MODE_BMSK 0x40 +#define UART_DM_MR2_BITS_PER_CHAR_BMSK 0x30 +#define UART_DM_MR2_STOP_BIT_LEN_BMSK 0x0c +#define UART_DM_MR2_PARITY_MODE_BMSK 0x03 +#define UART_DM_RXBRK_ZERO_CHAR_OFF (1 << 8) +#define UART_DM_LOOPBACK (1 << 7) + +/* UART Clock Selection Register, write only */ +#define UART_DM_CSR 0x08 +#define UART_DM_CSR_115200 0xff +#define UART_DM_CSR_57600 0xee +#define UART_DM_CSR_38400 0xdd +#define UART_DM_CSR_28800 0xcc +#define UART_DM_CSR_19200 0xbb +#define UART_DM_CSR_14400 0xaa +#define UART_DM_CSR_9600 0x99 +#define UART_DM_CSR_7200 0x88 +#define UART_DM_CSR_4800 0x77 +#define UART_DM_CSR_3600 0x66 +#define UART_DM_CSR_2400 0x55 +#define UART_DM_CSR_1200 0x44 +#define UART_DM_CSR_600 0x33 +#define UART_DM_CSR_300 0x22 +#define UART_DM_CSR_150 0x11 +#define UART_DM_CSR_75 0x00 + +/* UART DM TX FIFO Registers - 4, write only */ +#define UART_DM_TF(x) (0x70 + (4 * (x))) + +/* UART Command Register, write only */ +#define UART_DM_CR 0x10 +#define UART_DM_CR_RX_ENABLE (1 << 0) +#define UART_DM_CR_RX_DISABLE (1 << 1) +#define UART_DM_CR_TX_ENABLE (1 << 2) +#define UART_DM_CR_TX_DISABLE (1 << 3) + +/* UART_DM_CR channel command bit value (register field is bits 8:4) */ +#define UART_DM_RESET_RX 0x10 +#define UART_DM_RESET_TX 0x20 +#define UART_DM_RESET_ERROR_STATUS 0x30 +#define UART_DM_RESET_BREAK_INT 0x40 +#define UART_DM_START_BREAK 0x50 +#define UART_DM_STOP_BREAK 0x60 +#define UART_DM_RESET_CTS 0x70 +#define UART_DM_RESET_STALE_INT 0x80 +#define UART_DM_RFR_LOW 0xD0 +#define UART_DM_RFR_HIGH 0xE0 +#define UART_DM_CR_PROTECTION_EN 0x100 +#define UART_DM_STALE_EVENT_ENABLE 0x500 +#define UART_DM_STALE_EVENT_DISABLE 0x600 +#define UART_DM_FORCE_STALE_EVENT 0x400 +#define UART_DM_CLEAR_TX_READY 0x300 +#define UART_DM_RESET_TX_ERROR 0x800 +#define UART_DM_RESET_TX_DONE 0x810 + +/* UART Interrupt Mask Register */ +#define UART_DM_IMR 0x14 +/* these can be used for both ISR and IMR registers */ +#define UART_DM_TXLEV (1 << 0) +#define UART_DM_RXHUNT (1 << 1) +#define UART_DM_RXBRK_CHNG (1 << 2) +#define UART_DM_RXSTALE (1 << 3) +#define UART_DM_RXLEV (1 << 4) +#define UART_DM_DELTA_CTS (1 << 5) +#define UART_DM_CURRENT_CTS (1 << 6) +#define UART_DM_TX_READY (1 << 7) +#define UART_DM_TX_ERROR (1 << 8) +#define UART_DM_TX_DONE (1 << 9) +#define UART_DM_RXBREAK_START (1 << 10) +#define UART_DM_RXBREAK_END (1 << 11) +#define UART_DM_PAR_FRAME_ERR_IRQ (1 << 12) + +#define UART_DM_IMR_ENABLED (UART_DM_TX_READY | \ + UART_DM_TXLEV | \ + UART_DM_RXLEV | \ + UART_DM_RXSTALE) + +/* UART Interrupt Programming Register */ +#define UART_DM_IPR 0x18 +#define UART_DM_STALE_TIMEOUT_LSB 0x0f +#define UART_DM_STALE_TIMEOUT_MSB 0x00 +#define UART_DM_IPR_STALE_TIMEOUT_MSB_BMSK 0xffffff80 +#define UART_DM_IPR_STALE_LSB_BMSK 0x1f + +/* UART Transmit/Receive FIFO Watermark Register */ +#define UART_DM_TFWR 0x1c +/* Interrupt is generated when FIFO level is less than or equal to this value */ +#define UART_DM_TFW_VALUE 0 + +#define UART_DM_RFWR 0x20 +/* Interrupt generated when no of words in RX FIFO is greater than this value */ +#define UART_DM_RFW_VALUE 0 + +/* UART Hunt Character Register */ +#define UART_DM_HCR 0x24 + +/* Used for RX transfer initialization */ +#define UART_DM_DMRX 0x34 +/* Default DMRX value - any value bigger than FIFO size would be fine */ +#define UART_DM_DMRX_DEF_VALUE 0x220 + +/* Register to enable IRDA function */ +#define UART_DM_IRDA 0x38 + +/* UART Data Mover Enable Register */ +#define UART_DM_DMEN 0x3c + +/* Number of characters for Transmission */ +#define UART_DM_NO_CHARS_FOR_TX 0x40 + +/* UART RX FIFO Base Address */ +#define UART_DM_BADR 0x44 + +#define UART_DM_SIM_CFG_ADDR 0x80 + +/* Read only registers */ +/* UART Status Register */ +#define UART_DM_SR 0x08 +/* register field mask mapping */ +#define UART_DM_SR_RXRDY (1 << 0) +#define UART_DM_SR_RXFULL (1 << 1) +#define UART_DM_SR_TXRDY (1 << 2) +#define UART_DM_SR_TXEMT (1 << 3) +#define UART_DM_SR_UART_OVERRUN (1 << 4) +#define UART_DM_SR_PAR_FRAME_ERR (1 << 5) +#define UART_DM_RX_BREAK (1 << 6) +#define UART_DM_HUNT_CHAR (1 << 7) +#define UART_DM_RX_BRK_START_LAST (1 << 8) + +/* UART Receive FIFO Registers - 4 in numbers */ +#define UART_DM_RF(x) (0x70 + (4 * (x))) + +/* UART Masked Interrupt Status Register */ +#define UART_DM_MISR 0x10 + +/* UART Interrupt Status Register */ +#define UART_DM_ISR 0x14 + +/* Number of characters received since the end of last RX transfer */ +#define UART_DM_RX_TOTAL_SNAP 0x38 + +/* UART TX FIFO Status Register */ +#define UART_DM_TXFS 0x4c +#define UART_DM_TXFS_STATE_LSB(x) UART_DM_EXTR_BITS(x,0,6) +#define UART_DM_TXFS_STATE_MSB(x) UART_DM_EXTR_BITS(x,14,31) +#define UART_DM_TXFS_BUF_STATE(x) UART_DM_EXTR_BITS(x,7,9) +#define UART_DM_TXFS_ASYNC_STATE(x) UART_DM_EXTR_BITS(x,10,13) + +/* UART RX FIFO Status Register */ +#define UART_DM_RXFS 0x50 +#define UART_DM_RXFS_STATE_LSB(x) UART_DM_EXTR_BITS(x,0,6) +#define UART_DM_RXFS_STATE_MSB(x) UART_DM_EXTR_BITS(x,14,31) +#define UART_DM_RXFS_BUF_STATE(x) UART_DM_EXTR_BITS(x,7,9) +#define UART_DM_RXFS_ASYNC_STATE(x) UART_DM_EXTR_BITS(x,10,13) + +#endif /* _UART_DM_H_ */ From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 08:17:21 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A389EFBC; Thu, 2 Oct 2014 08:17:21 +0000 (UTC) Received: from mail.ipfw.ru (mail.ipfw.ru [IPv6:2a01:4f8:120:6141::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3B400ACB; Thu, 2 Oct 2014 08:17:21 +0000 (UTC) Received: from [2a02:6b8:0:401:222:4dff:fe50:cd2f] (helo=ptichko.yndx.net) by mail.ipfw.ru with esmtpsa (TLSv1:DHE-RSA-AES128-SHA:128) (Exim 4.82 (FreeBSD)) (envelope-from ) id 1XZXaO-000BMn-5J; Thu, 02 Oct 2014 08:01:48 +0400 Message-ID: <542D09CF.5000803@FreeBSD.org> Date: Thu, 02 Oct 2014 12:16:15 +0400 From: "Alexander V. Chernikov" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 MIME-Version: 1.0 To: Hiroki Sato , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r272391 - in head/sys: netinet netinet6 References: <201410020025.s920PvEW008958@svn.freebsd.org> In-Reply-To: <201410020025.s920PvEW008958@svn.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 08:17:21 -0000 On 02.10.2014 04:25, Hiroki Sato wrote: > Author: hrs > Date: Thu Oct 2 00:25:57 2014 > New Revision: 272391 > URL: https://svnweb.freebsd.org/changeset/base/272391 > > Log: > Add an additional routing table lookup when m->m_pkthdr.fibnum is changed > at a PFIL hook in ip{,6}_output(). IPFW setfib rule did not perform > a routing table lookup when the destination address was not changed. > > CR: D805 > > Modified: > head/sys/netinet/ip_output.c > head/sys/netinet6/ip6_output.c I'm not very happy with this. We already have large conditional for checking if dst has changed, how you have added another conditional for fib.. This idea is quite weird: why should we try to check all this stuff for every packet instead of asking pfil consumers to provide information they already know? We'd better discuss something like M_DSTCHANGED flag instead of doing these hacks. Additionally, you haven't changed "ip_fastfwd" part so the behavior is now inconsistent. > > Modified: head/sys/netinet/ip_output.c > ============================================================================== > --- head/sys/netinet/ip_output.c Thu Oct 2 00:19:24 2014 (r272390) > +++ head/sys/netinet/ip_output.c Thu Oct 2 00:25:57 2014 (r272391) > @@ -136,7 +136,9 @@ ip_output(struct mbuf *m, struct mbuf *o > struct rtentry *rte; /* cache for ro->ro_rt */ > struct in_addr odst; > struct m_tag *fwd_tag = NULL; > + uint32_t fibnum; > int have_ia_ref; > + int needfiblookup; > #ifdef IPSEC > int no_route_but_check_spd = 0; > #endif > @@ -202,6 +204,7 @@ ip_output(struct mbuf *m, struct mbuf *o > * therefore we need restore gw if we're redoing lookup. > */ > gw = dst = (struct sockaddr_in *)&ro->ro_dst; > + fibnum = (inp != NULL) ? inp->inp_inc.inc_fibnum : M_GETFIB(m); > again: > ia = NULL; > have_ia_ref = 0; > @@ -283,10 +286,9 @@ again: > #ifdef RADIX_MPATH > rtalloc_mpath_fib(ro, > ntohl(ip->ip_src.s_addr ^ ip->ip_dst.s_addr), > - inp ? inp->inp_inc.inc_fibnum : M_GETFIB(m)); > + fibnum); > #else > - in_rtalloc_ign(ro, 0, > - inp ? inp->inp_inc.inc_fibnum : M_GETFIB(m)); > + in_rtalloc_ign(ro, 0, fibnum); > #endif > rte = ro->ro_rt; > } > @@ -504,6 +506,7 @@ sendit: > goto done; > > ip = mtod(m, struct ip *); > + needfiblookup = 0; > > /* See if destination IP address was changed by packet filter. */ > if (odst.s_addr != ip->ip_dst.s_addr) { > @@ -529,9 +532,18 @@ sendit: > } else { > if (have_ia_ref) > ifa_free(&ia->ia_ifa); > - goto again; /* Redo the routing table lookup. */ > + needfiblookup = 1; /* Redo the routing table lookup. */ > } > } > + /* See if fib was changed by packet filter. */ > + if (fibnum != M_GETFIB(m)) { > + m->m_flags |= M_SKIP_FIREWALL; > + fibnum = M_GETFIB(m); > + RO_RTFREE(ro); > + needfiblookup = 1; > + } > + if (needfiblookup) > + goto again; > > /* See if local, if yes, send it to netisr with IP_FASTFWD_OURS. */ > if (m->m_flags & M_FASTFWD_OURS) { > > Modified: head/sys/netinet6/ip6_output.c > ============================================================================== > --- head/sys/netinet6/ip6_output.c Thu Oct 2 00:19:24 2014 (r272390) > +++ head/sys/netinet6/ip6_output.c Thu Oct 2 00:25:57 2014 (r272391) > @@ -255,6 +255,8 @@ ip6_output(struct mbuf *m0, struct ip6_p > struct route_in6 *ro_pmtu = NULL; > int hdrsplit = 0; > int sw_csum, tso; > + int needfiblookup; > + uint32_t fibnum; > struct m_tag *fwd_tag = NULL; > > ip6 = mtod(m, struct ip6_hdr *); > @@ -448,6 +450,7 @@ ip6_output(struct mbuf *m0, struct ip6_p > if (ro->ro_rt == NULL) > (void )flowtable_lookup(AF_INET6, m, (struct route *)ro); > #endif > + fibnum = (inp != NULL) ? inp->inp_inc.inc_fibnum : M_GETFIB(m); > again: > /* > * if specified, try to fill in the traffic class field. > @@ -489,7 +492,7 @@ again: > dst_sa.sin6_addr = ip6->ip6_dst; > } > error = in6_selectroute_fib(&dst_sa, opt, im6o, ro, &ifp, > - &rt, inp ? inp->inp_inc.inc_fibnum : M_GETFIB(m)); > + &rt, fibnum); > if (error != 0) { > if (ifp != NULL) > in6_ifstat_inc(ifp, ifs6_out_discard); > @@ -649,7 +652,7 @@ again: > > /* Determine path MTU. */ > if ((error = ip6_getpmtu(ro_pmtu, ro, ifp, &finaldst, &mtu, > - &alwaysfrag, inp ? inp->inp_inc.inc_fibnum : M_GETFIB(m))) != 0) > + &alwaysfrag, fibnum)) != 0) > goto bad; > > /* > @@ -727,6 +730,7 @@ again: > goto done; > ip6 = mtod(m, struct ip6_hdr *); > > + needfiblookup = 0; > /* See if destination IP address was changed by packet filter. */ > if (!IN6_ARE_ADDR_EQUAL(&odst, &ip6->ip6_dst)) { > m->m_flags |= M_SKIP_FIREWALL; > @@ -747,8 +751,17 @@ again: > error = netisr_queue(NETISR_IPV6, m); > goto done; > } else > - goto again; /* Redo the routing table lookup. */ > + needfiblookup = 1; /* Redo the routing table lookup. */ > } > + /* See if fib was changed by packet filter. */ > + if (fibnum != M_GETFIB(m)) { > + m->m_flags |= M_SKIP_FIREWALL; > + fibnum = M_GETFIB(m); > + RO_RTFREE(ro); > + needfiblookup = 1; > + } > + if (needfiblookup) > + goto again; > > /* See if local, if yes, send it to netisr. */ > if (m->m_flags & M_FASTFWD_OURS) { > > From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 09:42:12 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 462CD772; Thu, 2 Oct 2014 09:42:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 26FBD649; Thu, 2 Oct 2014 09:42:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s929gCfk073412; Thu, 2 Oct 2014 09:42:12 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s929gCW7073411; Thu, 2 Oct 2014 09:42:12 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201410020942.s929gCW7073411@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 2 Oct 2014 09:42:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272401 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 09:42:12 -0000 Author: mav Date: Thu Oct 2 09:42:11 2014 New Revision: 272401 URL: https://svnweb.freebsd.org/changeset/base/272401 Log: Rework the logic of sequential SCSI LUN scanner. Previous logic was not differentiating disconnected LUNs and absent targets. That made it to stop scan if LUN 0 was not found for any reason. That made problematic, for example, using iSCSI targets declaring SPC-2 compliance and having no LUN 0 configured. The new logic continues sequential LUN scan if: -- we have more configured LUNs that need recheck; -- this LUN is connected and its SCSI version allows more LUNs; -- this LUN is disconnected, its SCSI version allows more LUNs and we guess they may be connected (we haven't scanned first 8 LUNs yet or kern.cam.cam_srch_hi sysctl is set to scan more). Reported by: trasz MFC after: 1 month Modified: head/sys/cam/scsi/scsi_xpt.c Modified: head/sys/cam/scsi/scsi_xpt.c ============================================================================== --- head/sys/cam/scsi/scsi_xpt.c Thu Oct 2 08:57:11 2014 (r272400) +++ head/sys/cam/scsi/scsi_xpt.c Thu Oct 2 09:42:11 2014 (r272401) @@ -1135,6 +1135,7 @@ out: u_int8_t periph_qual; path->device->flags |= CAM_DEV_INQUIRY_DATA_VALID; + scsi_find_quirk(path->device); inq_buf = &path->device->inq_data; periph_qual = SID_QUAL(inq_buf); @@ -1163,8 +1164,6 @@ out: goto out; } - scsi_find_quirk(path->device); - scsi_devise_transport(path); if (path->device->lun_id == 0 && @@ -1213,10 +1212,13 @@ out: : SF_RETRY_UA, &softc->saved_ccb) == ERESTART) { goto outr; - } else if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) { - /* Don't wedge the queue */ - xpt_release_devq(done_ccb->ccb_h.path, /*count*/1, - /*run_queue*/TRUE); + } else { + if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) { + /* Don't wedge the queue */ + xpt_release_devq(done_ccb->ccb_h.path, + /*count*/1, /*run_queue*/TRUE); + } + path->device->flags &= ~CAM_DEV_INQUIRY_DATA_VALID; } /* * If we get to this point, we got an error status back @@ -1975,7 +1977,7 @@ scsi_scan_bus(struct cam_periph *periph, struct cam_path *path, *oldpath; scsi_scan_bus_info *scan_info; struct cam_et *target; - struct cam_ed *device; + struct cam_ed *device, *nextdev; int next_target; path_id_t path_id; target_id_t target_id; @@ -1984,18 +1986,10 @@ scsi_scan_bus(struct cam_periph *periph, oldpath = request_ccb->ccb_h.path; status = cam_ccb_status(request_ccb); - /* Reuse the same CCB to query if a device was really found */ scan_info = (scsi_scan_bus_info *)request_ccb->ccb_h.ppriv_ptr0; - xpt_setup_ccb(&request_ccb->ccb_h, request_ccb->ccb_h.path, - request_ccb->ccb_h.pinfo.priority); - request_ccb->ccb_h.func_code = XPT_GDEV_TYPE; - - path_id = request_ccb->ccb_h.path_id; target_id = request_ccb->ccb_h.target_id; lun_id = request_ccb->ccb_h.target_lun; - xpt_action(request_ccb); - target = request_ccb->ccb_h.path->target; next_target = 1; @@ -2068,56 +2062,36 @@ scsi_scan_bus(struct cam_periph *periph, } } } else { - mtx_unlock(&target->luns_mtx); - if (request_ccb->ccb_h.status != CAM_REQ_CMP) { - int phl; - - /* - * If we already probed lun 0 successfully, or - * we have additional configured luns on this - * target that might have "gone away", go onto - * the next lun. - */ - /* - * We may touch devices that we don't - * hold references too, so ensure they - * don't disappear out from under us. - * The target above is referenced by the - * path in the request ccb. - */ - phl = 0; - device = TAILQ_FIRST(&target->ed_entries); - if (device != NULL) { - phl = CAN_SRCH_HI_SPARSE(device); - if (device->lun_id == 0) - device = TAILQ_NEXT(device, links); - } - if ((lun_id != 0) || (device != NULL)) { - if (lun_id < (CAM_SCSI2_MAXLUN-1) || phl) { - lun_id++; - next_target = 0; - } - } - if (lun_id == request_ccb->ccb_h.target_lun - || lun_id > scan_info->cpi->max_lun) - next_target = 1; - } else { - + mtx_unlock(&target->luns_mtx); device = request_ccb->ccb_h.path->device; - - if ((SCSI_QUIRK(device)->quirks & - CAM_QUIRK_NOLUNS) == 0) { - /* Try the next lun */ - if (lun_id < (CAM_SCSI2_MAXLUN-1) - || CAN_SRCH_HI_DENSE(device)) { - lun_id++; + /* Continue sequential LUN scan if: */ + /* -- we have more LUNs that need recheck */ + mtx_lock(&target->bus->eb_mtx); + nextdev = device; + while ((nextdev = TAILQ_NEXT(nextdev, links)) != NULL) + if ((nextdev->flags & CAM_DEV_UNCONFIGURED) == 0) + break; + mtx_unlock(&target->bus->eb_mtx); + if (nextdev != NULL) { + next_target = 0; + /* -- this LUN is connected and its SCSI version + * allows more LUNs. */ + } else if ((device->flags & CAM_DEV_UNCONFIGURED) == 0) { + if (lun_id < (CAM_SCSI2_MAXLUN-1) || + CAN_SRCH_HI_DENSE(device)) next_target = 0; - } + /* -- this LUN is disconnected, its SCSI version + * allows more LUNs and we guess they may be. */ + } else if ((device->flags & CAM_DEV_INQUIRY_DATA_VALID) != 0) { + if (lun_id < (CAM_SCSI2_MAXLUN-1) || + CAN_SRCH_HI_SPARSE(device)) + next_target = 0; + } + if (next_target == 0) { + lun_id++; + if (lun_id > scan_info->cpi->max_lun) + next_target = 1; } - if (lun_id == request_ccb->ccb_h.target_lun - || lun_id > scan_info->cpi->max_lun) - next_target = 1; - } } /* From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 10:02:39 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4086BDE0; Thu, 2 Oct 2014 10:02:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2C4BA8B0; Thu, 2 Oct 2014 10:02:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92A2dLM083011; Thu, 2 Oct 2014 10:02:39 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92A2dS8083010; Thu, 2 Oct 2014 10:02:39 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201410021002.s92A2dS8083010@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 2 Oct 2014 10:02:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272402 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 10:02:39 -0000 Author: mav Date: Thu Oct 2 10:02:38 2014 New Revision: 272402 URL: https://svnweb.freebsd.org/changeset/base/272402 Log: Restore CAM_QUIRK_NOLUNS check, lost in previous commit. MFC after: 1 month Modified: head/sys/cam/scsi/scsi_xpt.c Modified: head/sys/cam/scsi/scsi_xpt.c ============================================================================== --- head/sys/cam/scsi/scsi_xpt.c Thu Oct 2 09:42:11 2014 (r272401) +++ head/sys/cam/scsi/scsi_xpt.c Thu Oct 2 10:02:38 2014 (r272402) @@ -2074,6 +2074,9 @@ scsi_scan_bus(struct cam_periph *periph, mtx_unlock(&target->bus->eb_mtx); if (nextdev != NULL) { next_target = 0; + /* -- stop if CAM_QUIRK_NOLUNS is set. */ + } else if (SCSI_QUIRK(device)->quirks & CAM_QUIRK_NOLUNS) { + next_target = 1; /* -- this LUN is connected and its SCSI version * allows more LUNs. */ } else if ((device->flags & CAM_DEV_UNCONFIGURED) == 0) { From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 10:29:54 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 67059462; Thu, 2 Oct 2014 10:29:54 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id DDA8AB23; Thu, 2 Oct 2014 10:29:53 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id s92ATpGx089608 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 2 Oct 2014 14:29:51 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id s92ATpHY089607; Thu, 2 Oct 2014 14:29:51 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Thu, 2 Oct 2014 14:29:51 +0400 From: Gleb Smirnoff To: Hiroki Sato Subject: Re: svn commit: r272386 - in head: sbin/ifconfig share/man/man4 sys/net Message-ID: <20141002102951.GE73266@FreeBSD.org> References: <201410012137.s91LbXL4025967@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201410012137.s91LbXL4025967@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 10:29:54 -0000 On Wed, Oct 01, 2014 at 09:37:33PM +0000, Hiroki Sato wrote: H> Author: hrs H> Date: Wed Oct 1 21:37:32 2014 H> New Revision: 272386 H> URL: https://svnweb.freebsd.org/changeset/base/272386 H> H> Log: H> Virtualize lagg(4) cloner. This change fixes a panic when tearing down H> if_lagg(4) interfaces which were cloned in a vnet jail. H> H> Sysctl nodes which are dynamically generated for each cloned interface H> (net.link.lagg.N.*) have been removed, and use_flowid and flowid_shift H> ifconfig(8) parameters have been added instead. Flags and per-interface H> statistics counters are displayed in "ifconfig -v". Thanks a lot for this, Hiroki-san! -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 10:30:47 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2F72F5AC; Thu, 2 Oct 2014 10:30:47 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id A9063BBE; Thu, 2 Oct 2014 10:30:45 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id s92AUh7V089634 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 2 Oct 2014 14:30:43 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id s92AUhGq089633; Thu, 2 Oct 2014 14:30:43 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Thu, 2 Oct 2014 14:30:43 +0400 From: Gleb Smirnoff To: Hiroki Sato Subject: Re: svn commit: r272390 - head/sbin/ifconfig Message-ID: <20141002103043.GF73266@FreeBSD.org> References: <201410020019.s920JPp5004430@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201410020019.s920JPp5004430@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 10:30:47 -0000 On Thu, Oct 02, 2014 at 12:19:25AM +0000, Hiroki Sato wrote: H> Author: hrs H> Date: Thu Oct 2 00:19:24 2014 H> New Revision: 272390 H> URL: https://svnweb.freebsd.org/changeset/base/272390 H> H> Log: H> Add IFCAP_HWSTATS. Actually this flag was a temporary workaround, which I hope to remove soon. There is no reason to display it to userland. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 10:31:34 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EB5356ED; Thu, 2 Oct 2014 10:31:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D577ABC7; Thu, 2 Oct 2014 10:31:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92AVX6i096521; Thu, 2 Oct 2014 10:31:33 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92AVW0d096515; Thu, 2 Oct 2014 10:31:32 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201410021031.s92AVW0d096515@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 2 Oct 2014 10:31:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272403 - head/sys/fs/autofs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 10:31:34 -0000 Author: trasz Date: Thu Oct 2 10:31:32 2014 New Revision: 272403 URL: https://svnweb.freebsd.org/changeset/base/272403 Log: Make autofs timeout handling use timeout task instead of callout; that's because the handler can sleep on sx lock. Reviewed by: kib MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/sys/fs/autofs/autofs.c head/sys/fs/autofs/autofs.h head/sys/fs/autofs/autofs_vfsops.c head/sys/fs/autofs/autofs_vnops.c Modified: head/sys/fs/autofs/autofs.c ============================================================================== --- head/sys/fs/autofs/autofs.c Thu Oct 2 10:02:38 2014 (r272402) +++ head/sys/fs/autofs/autofs.c Thu Oct 2 10:31:32 2014 (r272403) @@ -76,6 +76,7 @@ #include #include #include +#include #include #include #include @@ -260,7 +261,7 @@ autofs_path(struct autofs_node *anp) } static void -autofs_callout(void *context) +autofs_task(void *context, int pending) { struct autofs_request *ar; @@ -414,9 +415,14 @@ autofs_trigger_one(struct autofs_node *a strlcpy(ar->ar_options, amp->am_options, sizeof(ar->ar_options)); - callout_init(&ar->ar_callout, 1); - callout_reset(&ar->ar_callout, - autofs_timeout * hz, autofs_callout, ar); + TIMEOUT_TASK_INIT(taskqueue_thread, &ar->ar_task, 0, + autofs_task, ar); + error = taskqueue_enqueue_timeout(taskqueue_thread, + &ar->ar_task, autofs_timeout * hz); + if (error != 0) { + AUTOFS_WARN("taskqueue_enqueue_timeout() failed " + "with error %d", error); + } refcount_init(&ar->ar_refcount, 1); TAILQ_INSERT_TAIL(&autofs_softc->sc_requests, ar, ar_next); } @@ -451,7 +457,8 @@ autofs_trigger_one(struct autofs_node *a * XXX: Is it safe? */ sx_xunlock(&autofs_softc->sc_lock); - callout_drain(&ar->ar_callout); + taskqueue_cancel_timeout(taskqueue_thread, &ar->ar_task, NULL); + taskqueue_drain_timeout(taskqueue_thread, &ar->ar_task); sx_xlock(&autofs_softc->sc_lock); uma_zfree(autofs_request_zone, ar); } Modified: head/sys/fs/autofs/autofs.h ============================================================================== --- head/sys/fs/autofs/autofs.h Thu Oct 2 10:02:38 2014 (r272402) +++ head/sys/fs/autofs/autofs.h Thu Oct 2 10:31:32 2014 (r272403) @@ -97,7 +97,7 @@ struct autofs_request { char ar_prefix[MAXPATHLEN]; char ar_key[MAXPATHLEN]; char ar_options[MAXPATHLEN]; - struct callout ar_callout; + struct timeout_task ar_task; volatile u_int ar_refcount; }; Modified: head/sys/fs/autofs/autofs_vfsops.c ============================================================================== --- head/sys/fs/autofs/autofs_vfsops.c Thu Oct 2 10:02:38 2014 (r272402) +++ head/sys/fs/autofs/autofs_vfsops.c Thu Oct 2 10:31:32 2014 (r272403) @@ -40,6 +40,7 @@ #include #include #include +#include #include #include Modified: head/sys/fs/autofs/autofs_vnops.c ============================================================================== --- head/sys/fs/autofs/autofs_vnops.c Thu Oct 2 10:02:38 2014 (r272402) +++ head/sys/fs/autofs/autofs_vnops.c Thu Oct 2 10:31:32 2014 (r272403) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 10:32:25 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9CD1F841; Thu, 2 Oct 2014 10:32:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7DC99BD5; Thu, 2 Oct 2014 10:32:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92AWPg6097132; Thu, 2 Oct 2014 10:32:25 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92AWOGn097128; Thu, 2 Oct 2014 10:32:24 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201410021032.s92AWOGn097128@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Thu, 2 Oct 2014 10:32:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272404 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 10:32:25 -0000 Author: tuexen Date: Thu Oct 2 10:32:24 2014 New Revision: 272404 URL: https://svnweb.freebsd.org/changeset/base/272404 Log: Fix the checksum computation for UDPLite/IPv6. This requires the usage of a function computing the checksum only over a part of the function. Therefore introduce in6_cksum_partial() and implement in6_cksum() based on that. While there, ensure that the UDPLite packet contains at least enough bytes to contain the header. Reviewed by: kevlo MFC after: 3 days Modified: head/sys/netinet6/in6.h head/sys/netinet6/in6_cksum.c head/sys/netinet6/udp6_usrreq.c Modified: head/sys/netinet6/in6.h ============================================================================== --- head/sys/netinet6/in6.h Thu Oct 2 10:31:32 2014 (r272403) +++ head/sys/netinet6/in6.h Thu Oct 2 10:32:24 2014 (r272404) @@ -647,6 +647,8 @@ struct ip6_hdr; int in6_cksum_pseudo(struct ip6_hdr *, uint32_t, uint8_t, uint16_t); int in6_cksum(struct mbuf *, u_int8_t, u_int32_t, u_int32_t); +int in6_cksum_partial(struct mbuf *, u_int8_t, u_int32_t, u_int32_t, + u_int32_t); int in6_localaddr(struct in6_addr *); int in6_localip(struct in6_addr *); int in6_addrscope(const struct in6_addr *); Modified: head/sys/netinet6/in6_cksum.c ============================================================================== --- head/sys/netinet6/in6_cksum.c Thu Oct 2 10:31:32 2014 (r272403) +++ head/sys/netinet6/in6_cksum.c Thu Oct 2 10:32:24 2014 (r272404) @@ -145,9 +145,11 @@ in6_cksum_pseudo(struct ip6_hdr *ip6, ui * off is an offset where TCP/UDP/ICMP6 header starts. * len is a total length of a transport segment. * (e.g. TCP header + TCP payload) + * cov is the number of bytes to be taken into account for the checksum */ int -in6_cksum(struct mbuf *m, u_int8_t nxt, u_int32_t off, u_int32_t len) +in6_cksum_partial(struct mbuf *m, u_int8_t nxt, u_int32_t off, + u_int32_t len, u_int32_t cov) { struct ip6_hdr *ip6; u_int16_t *w, scope; @@ -215,9 +217,9 @@ in6_cksum(struct mbuf *m, u_int8_t nxt, } w = (u_int16_t *)(mtod(m, u_char *) + off); mlen = m->m_len - off; - if (len < mlen) - mlen = len; - len -= mlen; + if (cov < mlen) + mlen = cov; + cov -= mlen; /* * Force to even boundary. */ @@ -273,7 +275,7 @@ in6_cksum(struct mbuf *m, u_int8_t nxt, * Lastly calculate a summary of the rest of mbufs. */ - for (;m && len; m = m->m_next) { + for (;m && cov; m = m->m_next) { if (m->m_len == 0) continue; w = mtod(m, u_int16_t *); @@ -290,12 +292,12 @@ in6_cksum(struct mbuf *m, u_int8_t nxt, sum += s_util.s; w = (u_int16_t *)((char *)w + 1); mlen = m->m_len - 1; - len--; + cov--; } else mlen = m->m_len; - if (len < mlen) - mlen = len; - len -= mlen; + if (cov < mlen) + mlen = cov; + cov -= mlen; /* * Force to even boundary. */ @@ -343,7 +345,7 @@ in6_cksum(struct mbuf *m, u_int8_t nxt, } else if (mlen == -1) s_util.c[0] = *(char *)w; } - if (len) + if (cov) panic("in6_cksum: out of data"); if (mlen == -1) { /* The last mbuf has odd # of bytes. Follow the @@ -355,3 +357,9 @@ in6_cksum(struct mbuf *m, u_int8_t nxt, REDUCE; return (~sum & 0xffff); } + +int +in6_cksum(struct mbuf *m, u_int8_t nxt, u_int32_t off, u_int32_t len) +{ + return (in6_cksum_partial(m, nxt, off, len, len)); +} Modified: head/sys/netinet6/udp6_usrreq.c ============================================================================== --- head/sys/netinet6/udp6_usrreq.c Thu Oct 2 10:31:32 2014 (r272403) +++ head/sys/netinet6/udp6_usrreq.c Thu Oct 2 10:32:24 2014 (r272404) @@ -227,11 +227,16 @@ udp6_input(struct mbuf **mp, int *offp, nxt = ip6->ip6_nxt; cscov_partial = (nxt == IPPROTO_UDPLITE) ? 1 : 0; - if (nxt == IPPROTO_UDPLITE && (ulen == 0 || ulen == plen)) { + if (nxt == IPPROTO_UDPLITE) { /* Zero means checksum over the complete packet. */ if (ulen == 0) ulen = plen; - cscov_partial = 0; + if (ulen == plen) + cscov_partial = 0; + if ((ulen < sizeof(struct udphdr)) || (ulen > plen)) { + /* XXX: What is the right UDPLite MIB counter? */ + goto badunlocked; + } } if (nxt == IPPROTO_UDP && plen != ulen) { UDPSTAT_INC(udps_badlen); @@ -257,7 +262,7 @@ udp6_input(struct mbuf **mp, int *offp, m->m_pkthdr.csum_data); uh_sum ^= 0xffff; } else - uh_sum = in6_cksum(m, nxt, off, ulen); + uh_sum = in6_cksum_partial(m, nxt, off, plen, ulen); if (uh_sum != 0) { UDPSTAT_INC(udps_badsum); @@ -844,8 +849,8 @@ udp6_output(struct inpcb *inp, struct mb ip6->ip6_dst = *faddr; if (cscov_partial) { - if ((udp6->uh_sum = in6_cksum(m, 0, - sizeof(struct ip6_hdr), cscov)) == 0) + if ((udp6->uh_sum = in6_cksum_partial(m, nxt, + sizeof(struct ip6_hdr), plen, cscov)) == 0) udp6->uh_sum = 0xffff; } else { udp6->uh_sum = in6_cksum_pseudo(ip6, plen, nxt, 0); From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 10:32:25 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C9FD0842; Thu, 2 Oct 2014 10:32:25 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D60FBD4; Thu, 2 Oct 2014 10:32:24 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id s92AWMtX089656 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 2 Oct 2014 14:32:22 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id s92AWM0L089655; Thu, 2 Oct 2014 14:32:22 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Thu, 2 Oct 2014 14:32:22 +0400 From: Gleb Smirnoff To: "Alexander V. Chernikov" Subject: Re: svn commit: r272391 - in head/sys: netinet netinet6 Message-ID: <20141002103222.GG73266@FreeBSD.org> References: <201410020025.s920PvEW008958@svn.freebsd.org> <542D09CF.5000803@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <542D09CF.5000803@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Hiroki Sato , src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 10:32:25 -0000 On Thu, Oct 02, 2014 at 12:16:15PM +0400, Alexander V. Chernikov wrote: A> On 02.10.2014 04:25, Hiroki Sato wrote: A> > Author: hrs A> > Date: Thu Oct 2 00:25:57 2014 A> > New Revision: 272391 A> > URL: https://svnweb.freebsd.org/changeset/base/272391 A> > A> > Log: A> > Add an additional routing table lookup when m->m_pkthdr.fibnum is changed A> > at a PFIL hook in ip{,6}_output(). IPFW setfib rule did not perform A> > a routing table lookup when the destination address was not changed. A> > A> > CR: D805 A> > A> > Modified: A> > head/sys/netinet/ip_output.c A> > head/sys/netinet6/ip6_output.c A> I'm not very happy with this. A> We already have large conditional for checking if dst has changed, how A> you have added another conditional for fib.. A> This idea is quite weird: why should we try to check all this stuff for A> every packet instead of asking pfil consumers A> to provide information they already know? A> A> We'd better discuss something like M_DSTCHANGED flag instead of doing A> these hacks. And here you suggest to abuse mbuf flags to merely carry return value of a pfil hook :) -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 10:35:59 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5F73BB01; Thu, 2 Oct 2014 10:35:59 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 3C4DBBF3; Thu, 2 Oct 2014 10:35:58 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id s92AZuEF089724 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 2 Oct 2014 14:35:56 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id s92AZuj9089723; Thu, 2 Oct 2014 14:35:56 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Thu, 2 Oct 2014 14:35:56 +0400 From: Gleb Smirnoff To: Edward Tomasz Napierala , kib@FreeBSD.org Subject: Re: svn commit: r272403 - head/sys/fs/autofs Message-ID: <20141002103556.GH73266@FreeBSD.org> References: <201410021031.s92AVW0d096515@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201410021031.s92AVW0d096515@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 10:35:59 -0000 On Thu, Oct 02, 2014 at 10:31:32AM +0000, Edward Tomasz Napierala wrote: E> Author: trasz E> Date: Thu Oct 2 10:31:32 2014 E> New Revision: 272403 E> URL: https://svnweb.freebsd.org/changeset/base/272403 E> E> Log: E> Make autofs timeout handling use timeout task instead of callout; E> that's because the handler can sleep on sx lock. How long can it sleep? AFAIU, the taskqueue_thread is used by other subsystems. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 10:37:57 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B27D8C58; Thu, 2 Oct 2014 10:37:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9ECF2C0C; Thu, 2 Oct 2014 10:37:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92AbvV1097856; Thu, 2 Oct 2014 10:37:57 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92AbvE3097855; Thu, 2 Oct 2014 10:37:57 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201410021037.s92AbvE3097855@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 2 Oct 2014 10:37:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272405 - head/sys/fs/autofs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 10:37:57 -0000 Author: trasz Date: Thu Oct 2 10:37:56 2014 New Revision: 272405 URL: https://svnweb.freebsd.org/changeset/base/272405 Log: Call uma_zfree() outside of lock, and improve comment. Sponsored by: The FreeBSD Foundation Modified: head/sys/fs/autofs/autofs.c Modified: head/sys/fs/autofs/autofs.c ============================================================================== --- head/sys/fs/autofs/autofs.c Thu Oct 2 10:32:24 2014 (r272404) +++ head/sys/fs/autofs/autofs.c Thu Oct 2 10:37:56 2014 (r272405) @@ -454,13 +454,13 @@ autofs_trigger_one(struct autofs_node *a if (last) { TAILQ_REMOVE(&autofs_softc->sc_requests, ar, ar_next); /* - * XXX: Is it safe? + * Unlock the sc_lock, so that autofs_task() can complete. */ sx_xunlock(&autofs_softc->sc_lock); taskqueue_cancel_timeout(taskqueue_thread, &ar->ar_task, NULL); taskqueue_drain_timeout(taskqueue_thread, &ar->ar_task); - sx_xlock(&autofs_softc->sc_lock); uma_zfree(autofs_request_zone, ar); + sx_xlock(&autofs_softc->sc_lock); } /* From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 10:39:08 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 15AEEDA1; Thu, 2 Oct 2014 10:39:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DDBEFC14; Thu, 2 Oct 2014 10:39:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92Ad7Kg098063; Thu, 2 Oct 2014 10:39:07 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92Ad7GF098062; Thu, 2 Oct 2014 10:39:07 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201410021039.s92Ad7GF098062@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 2 Oct 2014 10:39:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272406 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 10:39:08 -0000 Author: mav Date: Thu Oct 2 10:39:07 2014 New Revision: 272406 URL: https://svnweb.freebsd.org/changeset/base/272406 Log: Make disconnected LUN 0 don't remain in half-configured state if there are no LUNs on SPC-3 target after we tried REPORT LUNS. Modified: head/sys/cam/scsi/scsi_xpt.c Modified: head/sys/cam/scsi/scsi_xpt.c ============================================================================== --- head/sys/cam/scsi/scsi_xpt.c Thu Oct 2 10:37:56 2014 (r272405) +++ head/sys/cam/scsi/scsi_xpt.c Thu Oct 2 10:39:07 2014 (r272406) @@ -1194,12 +1194,6 @@ out: SID_ANSI_REV(inq_buf) > SCSI_REV_SPC2 && (SCSI_QUIRK(path->device)->quirks & CAM_QUIRK_NORPTLUNS) == 0) { - if (path->device->flags & - CAM_DEV_UNCONFIGURED) { - path->device->flags &= - ~CAM_DEV_UNCONFIGURED; - xpt_acquire_device(path->device); - } PROBE_SET_ACTION(softc, PROBE_REPORT_LUNS); periph->path->target->rpl_size = 16; xpt_release_ccb(done_ccb); @@ -1310,14 +1304,6 @@ out: tlun, 8); CAM_DEBUG(path, CAM_DEBUG_PROBE, ("lun 0 in position %u\n", idx)); - } else { - /* - * There is no lun 0 in our list. Destroy - * the validity of the inquiry data so we - * bail here and now. - */ - path->device->flags &= - ~CAM_DEV_INQUIRY_DATA_VALID; } } /* @@ -1330,7 +1316,8 @@ out: probe_purge_old(path, lp, softc->flags); lp = NULL; } - if (path->device->flags & CAM_DEV_INQUIRY_DATA_VALID) { + if (path->device->flags & CAM_DEV_INQUIRY_DATA_VALID && + SID_QUAL(&path->device->inq_data) == SID_QUAL_LU_CONNECTED) { struct scsi_inquiry_data *inq_buf; inq_buf = &path->device->inq_data; if (INQ_DATA_TQ_ENABLED(inq_buf)) @@ -1345,6 +1332,8 @@ out: if (lp) { free(lp, M_CAMXPT); } + PROBE_SET_ACTION(softc, PROBE_INVALID); + xpt_release_ccb(done_ccb); break; } case PROBE_MODE_SENSE: From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 10:46:16 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 937D3DE; Thu, 2 Oct 2014 10:46:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7AEC1CDE; Thu, 2 Oct 2014 10:46:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92AkGDn002518; Thu, 2 Oct 2014 10:46:16 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92AkD8D002493; Thu, 2 Oct 2014 10:46:13 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201410021046.s92AkD8D002493@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 2 Oct 2014 10:46:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272407 - in stable/10: contrib/ofed/libibverbs/examples contrib/ofed/libmlx4/src sys/conf sys/modules/mlx4 sys/modules/mlxen sys/ofed/drivers/infiniband/hw/mlx4 sys/ofed/drivers/net/ml... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 10:46:16 -0000 Author: hselasky Date: Thu Oct 2 10:46:12 2014 New Revision: 272407 URL: https://svnweb.freebsd.org/changeset/base/272407 Log: MFC r272027: Hardware driver update from Mellanox Technologies, including: - improved performance - better stability - new features - bugfixes Supported HCAs: - ConnectX-2 - ConnectX-3 - ConnectX-3 Pro NOTE: - TSO feature needs r271946, which is not yet merged. Sponsored by: Mellanox Technologies Approved by: re, glebius Added: stable/10/sys/ofed/drivers/net/mlx4/mlx4_stats.h - copied unchanged from r272027, head/sys/ofed/drivers/net/mlx4/mlx4_stats.h stable/10/sys/ofed/drivers/net/mlx4/utils.c - copied unchanged from r272027, head/sys/ofed/drivers/net/mlx4/utils.c stable/10/sys/ofed/drivers/net/mlx4/utils.h - copied unchanged from r272027, head/sys/ofed/drivers/net/mlx4/utils.h Modified: stable/10/contrib/ofed/libibverbs/examples/asyncwatch.c stable/10/contrib/ofed/libibverbs/examples/device_list.c stable/10/contrib/ofed/libibverbs/examples/devinfo.c stable/10/contrib/ofed/libmlx4/src/mlx4-abi.h stable/10/sys/conf/files stable/10/sys/modules/mlx4/Makefile stable/10/sys/modules/mlxen/Makefile stable/10/sys/ofed/drivers/infiniband/hw/mlx4/mad.c stable/10/sys/ofed/drivers/infiniband/hw/mlx4/main.c stable/10/sys/ofed/drivers/infiniband/hw/mlx4/qp.c stable/10/sys/ofed/drivers/net/mlx4/alloc.c stable/10/sys/ofed/drivers/net/mlx4/catas.c stable/10/sys/ofed/drivers/net/mlx4/cmd.c stable/10/sys/ofed/drivers/net/mlx4/cq.c stable/10/sys/ofed/drivers/net/mlx4/en_cq.c stable/10/sys/ofed/drivers/net/mlx4/en_ethtool.c stable/10/sys/ofed/drivers/net/mlx4/en_main.c stable/10/sys/ofed/drivers/net/mlx4/en_netdev.c stable/10/sys/ofed/drivers/net/mlx4/en_port.c stable/10/sys/ofed/drivers/net/mlx4/en_port.h stable/10/sys/ofed/drivers/net/mlx4/en_resources.c stable/10/sys/ofed/drivers/net/mlx4/en_rx.c stable/10/sys/ofed/drivers/net/mlx4/en_selftest.c stable/10/sys/ofed/drivers/net/mlx4/en_tx.c stable/10/sys/ofed/drivers/net/mlx4/eq.c stable/10/sys/ofed/drivers/net/mlx4/fw.c stable/10/sys/ofed/drivers/net/mlx4/fw.h stable/10/sys/ofed/drivers/net/mlx4/icm.c stable/10/sys/ofed/drivers/net/mlx4/icm.h stable/10/sys/ofed/drivers/net/mlx4/intf.c stable/10/sys/ofed/drivers/net/mlx4/main.c stable/10/sys/ofed/drivers/net/mlx4/mcg.c stable/10/sys/ofed/drivers/net/mlx4/mlx4.h stable/10/sys/ofed/drivers/net/mlx4/mlx4_en.h stable/10/sys/ofed/drivers/net/mlx4/mr.c stable/10/sys/ofed/drivers/net/mlx4/pd.c stable/10/sys/ofed/drivers/net/mlx4/port.c stable/10/sys/ofed/drivers/net/mlx4/profile.c stable/10/sys/ofed/drivers/net/mlx4/qp.c stable/10/sys/ofed/drivers/net/mlx4/reset.c stable/10/sys/ofed/drivers/net/mlx4/resource_tracker.c stable/10/sys/ofed/drivers/net/mlx4/sense.c stable/10/sys/ofed/drivers/net/mlx4/srq.c stable/10/sys/ofed/drivers/net/mlx4/sys_tune.c stable/10/sys/ofed/include/linux/mlx4/cmd.h stable/10/sys/ofed/include/linux/mlx4/cq.h stable/10/sys/ofed/include/linux/mlx4/device.h stable/10/sys/ofed/include/linux/mlx4/driver.h stable/10/sys/ofed/include/linux/mlx4/qp.h stable/10/sys/ofed/include/linux/mlx4/srq.h Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/ofed/libibverbs/examples/asyncwatch.c ============================================================================== --- stable/10/contrib/ofed/libibverbs/examples/asyncwatch.c Thu Oct 2 10:39:07 2014 (r272406) +++ stable/10/contrib/ofed/libibverbs/examples/asyncwatch.c Thu Oct 2 10:46:12 2014 (r272407) @@ -35,8 +35,6 @@ #endif /* HAVE_CONFIG_H */ #include -#include -#include #include Modified: stable/10/contrib/ofed/libibverbs/examples/device_list.c ============================================================================== --- stable/10/contrib/ofed/libibverbs/examples/device_list.c Thu Oct 2 10:39:07 2014 (r272406) +++ stable/10/contrib/ofed/libibverbs/examples/device_list.c Thu Oct 2 10:46:12 2014 (r272407) @@ -36,9 +36,6 @@ #include -#include -#include - #include #include Modified: stable/10/contrib/ofed/libibverbs/examples/devinfo.c ============================================================================== --- stable/10/contrib/ofed/libibverbs/examples/devinfo.c Thu Oct 2 10:39:07 2014 (r272406) +++ stable/10/contrib/ofed/libibverbs/examples/devinfo.c Thu Oct 2 10:46:12 2014 (r272407) @@ -41,8 +41,6 @@ #include #include #include -#include -#include #include #include Modified: stable/10/contrib/ofed/libmlx4/src/mlx4-abi.h ============================================================================== --- stable/10/contrib/ofed/libmlx4/src/mlx4-abi.h Thu Oct 2 10:39:07 2014 (r272406) +++ stable/10/contrib/ofed/libmlx4/src/mlx4-abi.h Thu Oct 2 10:46:12 2014 (r272407) @@ -36,7 +36,7 @@ #include #define MLX4_UVERBS_MIN_ABI_VERSION 2 -#define MLX4_UVERBS_MAX_ABI_VERSION 3 +#define MLX4_UVERBS_MAX_ABI_VERSION 4 struct mlx4_alloc_ucontext_resp { struct ibv_get_context_resp ibv_resp; Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Thu Oct 2 10:39:07 2014 (r272406) +++ stable/10/sys/conf/files Thu Oct 2 10:46:12 2014 (r272407) @@ -3745,7 +3745,7 @@ ofed/drivers/net/mlx4/sys_tune.c option ofed/drivers/net/mlx4/en_cq.c optional mlxen \ no-depend obj-prefix "mlx4_" \ compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" -ofed/drivers/net/mlx4/en_frag.c optional mlxen \ +ofed/drivers/net/mlx4/utils.c optional mlxen \ no-depend obj-prefix "mlx4_" \ compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" ofed/drivers/net/mlx4/en_main.c optional mlxen \ Modified: stable/10/sys/modules/mlx4/Makefile ============================================================================== --- stable/10/sys/modules/mlx4/Makefile Thu Oct 2 10:39:07 2014 (r272406) +++ stable/10/sys/modules/mlx4/Makefile Thu Oct 2 10:46:12 2014 (r272407) @@ -5,7 +5,7 @@ .PATH: ${.CURDIR}/../../ofed/include/linux KMOD = mlx4 -SRCS = device_if.h bus_if.h pci_if.h vnode_if.h +SRCS = device_if.h bus_if.h pci_if.h vnode_if.h opt_inet.h opt_inet6.h SRCS+= alloc.c catas.c cmd.c cq.c eq.c fw.c icm.c intf.c main.c mcg.c mr.c linux_compat.c linux_radix.c linux_idr.c SRCS+= pd.c port.c profile.c qp.c reset.c sense.c srq.c resource_tracker.c sys_tune.c Modified: stable/10/sys/modules/mlxen/Makefile ============================================================================== --- stable/10/sys/modules/mlxen/Makefile Thu Oct 2 10:39:07 2014 (r272406) +++ stable/10/sys/modules/mlxen/Makefile Thu Oct 2 10:46:12 2014 (r272407) @@ -5,8 +5,8 @@ KMOD = mlxen SRCS = device_if.h bus_if.h pci_if.h vnode_if.h -SRCS += en_cq.c en_frag.c en_main.c en_netdev.c en_port.c en_resources.c -SRCS += en_rx.c en_tx.c +SRCS += en_cq.c en_main.c en_netdev.c en_port.c en_resources.c +SRCS += en_rx.c en_tx.c utils.c SRCS += opt_inet.h opt_inet6.h CFLAGS+= -I${.CURDIR}/../../ofed/drivers/net/mlx4 CFLAGS+= -I${.CURDIR}/../../ofed/include/ Modified: stable/10/sys/ofed/drivers/infiniband/hw/mlx4/mad.c ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/hw/mlx4/mad.c Thu Oct 2 10:39:07 2014 (r272406) +++ stable/10/sys/ofed/drivers/infiniband/hw/mlx4/mad.c Thu Oct 2 10:46:12 2014 (r272407) @@ -1081,7 +1081,7 @@ static void handle_lid_change_event(stru if (mlx4_is_master(dev->dev) && !dev->sriov.is_going_down) mlx4_gen_slaves_port_mgt_ev(dev->dev, port_num, - MLX4_EQ_PORT_INFO_LID_CHANGE_MASK); + MLX4_EQ_PORT_INFO_LID_CHANGE_MASK, 0, 0); } static void handle_client_rereg_event(struct mlx4_ib_dev *dev, u8 port_num) @@ -1093,7 +1093,7 @@ static void handle_client_rereg_event(st if (!dev->sriov.is_going_down) { mlx4_ib_mcg_port_cleanup(&dev->sriov.demux[port_num - 1], 0); mlx4_gen_slaves_port_mgt_ev(dev->dev, port_num, - MLX4_EQ_PORT_INFO_CLIENT_REREG_MASK); + MLX4_EQ_PORT_INFO_CLIENT_REREG_MASK, 0, 0); } } mlx4_ib_dispatch_event(dev, port_num, IB_EVENT_CLIENT_REREGISTER); @@ -1191,7 +1191,7 @@ void handle_port_mgmt_change_event(struc /*if master, notify all slaves*/ if (mlx4_is_master(dev->dev)) mlx4_gen_slaves_port_mgt_ev(dev->dev, port, - MLX4_EQ_PORT_INFO_GID_PFX_CHANGE_MASK); + MLX4_EQ_PORT_INFO_GID_PFX_CHANGE_MASK, 0, 0); } if (changed_attr & MLX4_EQ_PORT_INFO_CLIENT_REREG_MASK) Modified: stable/10/sys/ofed/drivers/infiniband/hw/mlx4/main.c ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/hw/mlx4/main.c Thu Oct 2 10:39:07 2014 (r272406) +++ stable/10/sys/ofed/drivers/infiniband/hw/mlx4/main.c Thu Oct 2 10:46:12 2014 (r272407) @@ -1005,7 +1005,7 @@ static int flow_spec_to_net_rule(struct case IB_FLOW_IB_UC: spec_l2->id = MLX4_NET_TRANS_RULE_ID_IB; if(flow_spec->l2_id.ib_uc.qpn) { - spec_l2->ib.r_u_qpn = cpu_to_be32(flow_spec->l2_id.ib_uc.qpn); + spec_l2->ib.l3_qpn = cpu_to_be32(flow_spec->l2_id.ib_uc.qpn); spec_l2->ib.qpn_msk = cpu_to_be32(0xffffff); } break; @@ -2013,7 +2013,7 @@ static void *mlx4_ib_add(struct mlx4_dev for (i = 0; i < ibdev->num_ports; ++i) { if (mlx4_ib_port_link_layer(&ibdev->ib_dev, i + 1) == IB_LINK_LAYER_ETHERNET) { - err = mlx4_counter_alloc(ibdev->dev, &ibdev->counters[i]); + err = mlx4_counter_alloc(ibdev->dev, i + 1, &ibdev->counters[i]); if (err) ibdev->counters[i] = -1; } else @@ -2112,7 +2112,7 @@ err_steer_qp_release: err_counter: for (; i; --i) if (ibdev->counters[i - 1] != -1) - mlx4_counter_free(ibdev->dev, ibdev->counters[i - 1]); + mlx4_counter_free(ibdev->dev, i, ibdev->counters[i - 1]); err_map: iounmap(ibdev->priv_uar.map); @@ -2200,7 +2200,7 @@ static void mlx4_ib_remove(struct mlx4_d iounmap(ibdev->priv_uar.map); for (p = 0; p < ibdev->num_ports; ++p) if (ibdev->counters[p] != -1) - mlx4_counter_free(ibdev->dev, ibdev->counters[p]); + mlx4_counter_free(ibdev->dev, p + 1, ibdev->counters[p]); mlx4_foreach_port(p, dev, MLX4_PORT_TYPE_IB) mlx4_CLOSE_PORT(dev, p); Modified: stable/10/sys/ofed/drivers/infiniband/hw/mlx4/qp.c ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/hw/mlx4/qp.c Thu Oct 2 10:39:07 2014 (r272406) +++ stable/10/sys/ofed/drivers/infiniband/hw/mlx4/qp.c Thu Oct 2 10:46:12 2014 (r272407) @@ -2679,10 +2679,10 @@ static int mlx4_wq_overflow(struct mlx4_ static __be32 convert_access(int acc) { - return (acc & IB_ACCESS_REMOTE_ATOMIC ? cpu_to_be32(MLX4_WQE_FMR_PERM_ATOMIC) : 0) | - (acc & IB_ACCESS_REMOTE_WRITE ? cpu_to_be32(MLX4_WQE_FMR_PERM_REMOTE_WRITE) : 0) | - (acc & IB_ACCESS_REMOTE_READ ? cpu_to_be32(MLX4_WQE_FMR_PERM_REMOTE_READ) : 0) | - (acc & IB_ACCESS_LOCAL_WRITE ? cpu_to_be32(MLX4_WQE_FMR_PERM_LOCAL_WRITE) : 0) | + return (acc & IB_ACCESS_REMOTE_ATOMIC ? cpu_to_be32(MLX4_WQE_FMR_AND_BIND_PERM_ATOMIC) : 0) | + (acc & IB_ACCESS_REMOTE_WRITE ? cpu_to_be32(MLX4_WQE_FMR_AND_BIND_PERM_REMOTE_WRITE) : 0) | + (acc & IB_ACCESS_REMOTE_READ ? cpu_to_be32(MLX4_WQE_FMR_AND_BIND_PERM_REMOTE_READ) : 0) | + (acc & IB_ACCESS_LOCAL_WRITE ? cpu_to_be32(MLX4_WQE_FMR_PERM_LOCAL_WRITE) : 0) | cpu_to_be32(MLX4_WQE_FMR_PERM_LOCAL_READ); } @@ -2709,10 +2709,12 @@ static void set_fmr_seg(struct mlx4_wqe_ static void set_local_inv_seg(struct mlx4_wqe_local_inval_seg *iseg, u32 rkey) { - iseg->flags = 0; - iseg->mem_key = cpu_to_be32(rkey); - iseg->guest_id = 0; - iseg->pa = 0; + iseg->mem_key = cpu_to_be32(rkey); + + iseg->reserved1 = 0; + iseg->reserved2 = 0; + iseg->reserved3[0] = 0; + iseg->reserved3[1] = 0; } static __always_inline void set_raddr_seg(struct mlx4_wqe_raddr_seg *rseg, Modified: stable/10/sys/ofed/drivers/net/mlx4/alloc.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/alloc.c Thu Oct 2 10:39:07 2014 (r272406) +++ stable/10/sys/ofed/drivers/net/mlx4/alloc.c Thu Oct 2 10:46:12 2014 (r272407) @@ -1,6 +1,6 @@ /* * Copyright (c) 2006, 2007 Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2007, 2008 Mellanox Technologies. All rights reserved. + * Copyright (c) 2007, 2008, 2014 Mellanox Technologies. All rights reserved. * * This software is available to you under a choice of one of two * licenses. You may choose to be licensed under the terms of the GNU @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include #include @@ -70,9 +70,9 @@ u32 mlx4_bitmap_alloc(struct mlx4_bitmap return obj; } -void mlx4_bitmap_free(struct mlx4_bitmap *bitmap, u32 obj) +void mlx4_bitmap_free(struct mlx4_bitmap *bitmap, u32 obj, int use_rr) { - mlx4_bitmap_free_range(bitmap, obj, 1); + mlx4_bitmap_free_range(bitmap, obj, 1, use_rr); } static unsigned long find_aligned_range(unsigned long *bitmap, @@ -148,11 +148,17 @@ u32 mlx4_bitmap_avail(struct mlx4_bitmap return bitmap->avail; } -void mlx4_bitmap_free_range(struct mlx4_bitmap *bitmap, u32 obj, int cnt) +void mlx4_bitmap_free_range(struct mlx4_bitmap *bitmap, u32 obj, int cnt, + int use_rr) { obj &= bitmap->max + bitmap->reserved_top - 1; spin_lock(&bitmap->lock); + if (!use_rr) { + bitmap->last = min(bitmap->last, obj); + bitmap->top = (bitmap->top + bitmap->max + bitmap->reserved_top) + & bitmap->mask; + } bitmap_clear(bitmap->table, obj, cnt); bitmap->avail += cnt; spin_unlock(&bitmap->lock); Modified: stable/10/sys/ofed/drivers/net/mlx4/catas.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/catas.c Thu Oct 2 10:39:07 2014 (r272406) +++ stable/10/sys/ofed/drivers/net/mlx4/catas.c Thu Oct 2 10:46:12 2014 (r272407) @@ -1,6 +1,6 @@ /* * Copyright (c) 2007 Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2007, 2008 Mellanox Technologies. All rights reserved. + * Copyright (c) 2007, 2008, 2014 Mellanox Technologies. All rights reserved. * * This software is available to you under a choice of one of two * licenses. You may choose to be licensed under the terms of the GNU @@ -34,10 +34,11 @@ #include #include -#include "mlx4.h" +#include -#define MLX4_CATAS_POLL_INTERVAL (5 * HZ) +#include "mlx4.h" +#define MLX4_CATAS_POLL_INTERVAL (5 * HZ) static DEFINE_SPINLOCK(catas_lock); @@ -156,11 +157,13 @@ void mlx4_stop_catas_poll(struct mlx4_de del_timer_sync(&priv->catas_err.timer); - if (priv->catas_err.map) + if (priv->catas_err.map) { iounmap(priv->catas_err.map); + priv->catas_err.map = NULL; + } spin_lock_irq(&catas_lock); - list_del(&priv->catas_err.list); + list_del_init(&priv->catas_err.list); spin_unlock_irq(&catas_lock); } Modified: stable/10/sys/ofed/drivers/net/mlx4/cmd.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/cmd.c Thu Oct 2 10:39:07 2014 (r272406) +++ stable/10/sys/ofed/drivers/net/mlx4/cmd.c Thu Oct 2 10:46:12 2014 (r272407) @@ -1,6 +1,6 @@ /* * Copyright (c) 2004, 2005 Topspin Communications. All rights reserved. - * Copyright (c) 2005, 2006, 2007, 2008 Mellanox Technologies. All rights reserved. + * Copyright (c) 2005, 2006, 2007, 2008, 2014 Mellanox Technologies. All rights reserved. * Copyright (c) 2005, 2006, 2007 Cisco Systems, Inc. All rights reserved. * * This software is available to you under a choice of one of two @@ -34,14 +34,17 @@ #include #include +#include #include #include #include +#include #include #include #include +#include #include "mlx4.h" #include "fw.h" @@ -110,6 +113,14 @@ enum { GO_BIT_TIMEOUT_MSECS = 10000 }; +enum mlx4_vlan_transition { + MLX4_VLAN_TRANSITION_VST_VST = 0, + MLX4_VLAN_TRANSITION_VST_VGT = 1, + MLX4_VLAN_TRANSITION_VGT_VST = 2, + MLX4_VLAN_TRANSITION_VGT_VGT = 3, +}; + + struct mlx4_cmd_context { struct completion done; int result; @@ -152,6 +163,131 @@ static int mlx4_status_to_errno(u8 statu return trans_table[status]; } +static const char *cmd_to_str(u16 cmd) +{ + switch (cmd) { + case MLX4_CMD_SYS_EN: return "SYS_EN"; + case MLX4_CMD_SYS_DIS: return "SYS_DIS"; + case MLX4_CMD_MAP_FA: return "MAP_FA"; + case MLX4_CMD_UNMAP_FA: return "UNMAP_FA"; + case MLX4_CMD_RUN_FW: return "RUN_FW"; + case MLX4_CMD_MOD_STAT_CFG: return "MOD_STAT_CFG"; + case MLX4_CMD_QUERY_DEV_CAP: return "QUERY_DEV_CAP"; + case MLX4_CMD_QUERY_FW: return "QUERY_FW"; + case MLX4_CMD_ENABLE_LAM: return "ENABLE_LAM"; + case MLX4_CMD_DISABLE_LAM: return "DISABLE_LAM"; + case MLX4_CMD_QUERY_DDR: return "QUERY_DDR"; + case MLX4_CMD_QUERY_ADAPTER: return "QUERY_ADAPTER"; + case MLX4_CMD_INIT_HCA: return "INIT_HCA"; + case MLX4_CMD_CLOSE_HCA: return "CLOSE_HCA"; + case MLX4_CMD_INIT_PORT: return "INIT_PORT"; + case MLX4_CMD_CLOSE_PORT: return "CLOSE_PORT"; + case MLX4_CMD_QUERY_HCA: return "QUERY_HCA"; + case MLX4_CMD_QUERY_PORT: return "QUERY_PORT"; + case MLX4_CMD_SENSE_PORT: return "SENSE_PORT"; + case MLX4_CMD_HW_HEALTH_CHECK: return "HW_HEALTH_CHECK"; + case MLX4_CMD_SET_PORT: return "SET_PORT"; + case MLX4_CMD_SET_NODE: return "SET_NODE"; + case MLX4_CMD_QUERY_FUNC: return "QUERY_FUNC"; + case MLX4_CMD_MAP_ICM: return "MAP_ICM"; + case MLX4_CMD_UNMAP_ICM: return "UNMAP_ICM"; + case MLX4_CMD_MAP_ICM_AUX: return "MAP_ICM_AUX"; + case MLX4_CMD_UNMAP_ICM_AUX: return "UNMAP_ICM_AUX"; + case MLX4_CMD_SET_ICM_SIZE: return "SET_ICM_SIZE"; + /*master notify fw on finish for slave's flr*/ + case MLX4_CMD_INFORM_FLR_DONE: return "INFORM_FLR_DONE"; + case MLX4_CMD_GET_OP_REQ: return "GET_OP_REQ"; + + /* TPT commands */ + case MLX4_CMD_SW2HW_MPT: return "SW2HW_MPT"; + case MLX4_CMD_QUERY_MPT: return "QUERY_MPT"; + case MLX4_CMD_HW2SW_MPT: return "HW2SW_MPT"; + case MLX4_CMD_READ_MTT: return "READ_MTT"; + case MLX4_CMD_WRITE_MTT: return "WRITE_MTT"; + case MLX4_CMD_SYNC_TPT: return "SYNC_TPT"; + + /* EQ commands */ + case MLX4_CMD_MAP_EQ: return "MAP_EQ"; + case MLX4_CMD_SW2HW_EQ: return "SW2HW_EQ"; + case MLX4_CMD_HW2SW_EQ: return "HW2SW_EQ"; + case MLX4_CMD_QUERY_EQ: return "QUERY_EQ"; + + /* CQ commands */ + case MLX4_CMD_SW2HW_CQ: return "SW2HW_CQ"; + case MLX4_CMD_HW2SW_CQ: return "HW2SW_CQ"; + case MLX4_CMD_QUERY_CQ: return "QUERY_CQ:"; + case MLX4_CMD_MODIFY_CQ: return "MODIFY_CQ:"; + + /* SRQ commands */ + case MLX4_CMD_SW2HW_SRQ: return "SW2HW_SRQ"; + case MLX4_CMD_HW2SW_SRQ: return "HW2SW_SRQ"; + case MLX4_CMD_QUERY_SRQ: return "QUERY_SRQ"; + case MLX4_CMD_ARM_SRQ: return "ARM_SRQ"; + + /* QP/EE commands */ + case MLX4_CMD_RST2INIT_QP: return "RST2INIT_QP"; + case MLX4_CMD_INIT2RTR_QP: return "INIT2RTR_QP"; + case MLX4_CMD_RTR2RTS_QP: return "RTR2RTS_QP"; + case MLX4_CMD_RTS2RTS_QP: return "RTS2RTS_QP"; + case MLX4_CMD_SQERR2RTS_QP: return "SQERR2RTS_QP"; + case MLX4_CMD_2ERR_QP: return "2ERR_QP"; + case MLX4_CMD_RTS2SQD_QP: return "RTS2SQD_QP"; + case MLX4_CMD_SQD2SQD_QP: return "SQD2SQD_QP"; + case MLX4_CMD_SQD2RTS_QP: return "SQD2RTS_QP"; + case MLX4_CMD_2RST_QP: return "2RST_QP"; + case MLX4_CMD_QUERY_QP: return "QUERY_QP"; + case MLX4_CMD_INIT2INIT_QP: return "INIT2INIT_QP"; + case MLX4_CMD_SUSPEND_QP: return "SUSPEND_QP"; + case MLX4_CMD_UNSUSPEND_QP: return "UNSUSPEND_QP"; + /* special QP and management commands */ + case MLX4_CMD_CONF_SPECIAL_QP: return "CONF_SPECIAL_QP"; + case MLX4_CMD_MAD_IFC: return "MAD_IFC"; + + /* multicast commands */ + case MLX4_CMD_READ_MCG: return "READ_MCG"; + case MLX4_CMD_WRITE_MCG: return "WRITE_MCG"; + case MLX4_CMD_MGID_HASH: return "MGID_HASH"; + + /* miscellaneous commands */ + case MLX4_CMD_DIAG_RPRT: return "DIAG_RPRT"; + case MLX4_CMD_NOP: return "NOP"; + case MLX4_CMD_ACCESS_MEM: return "ACCESS_MEM"; + case MLX4_CMD_SET_VEP: return "SET_VEP"; + + /* Ethernet specific commands */ + case MLX4_CMD_SET_VLAN_FLTR: return "SET_VLAN_FLTR"; + case MLX4_CMD_SET_MCAST_FLTR: return "SET_MCAST_FLTR"; + case MLX4_CMD_DUMP_ETH_STATS: return "DUMP_ETH_STATS"; + + /* Communication channel commands */ + case MLX4_CMD_ARM_COMM_CHANNEL: return "ARM_COMM_CHANNEL"; + case MLX4_CMD_GEN_EQE: return "GEN_EQE"; + + /* virtual commands */ + case MLX4_CMD_ALLOC_RES: return "ALLOC_RES"; + case MLX4_CMD_FREE_RES: return "FREE_RES"; + case MLX4_CMD_MCAST_ATTACH: return "MCAST_ATTACH"; + case MLX4_CMD_UCAST_ATTACH: return "UCAST_ATTACH"; + case MLX4_CMD_PROMISC: return "PROMISC"; + case MLX4_CMD_QUERY_FUNC_CAP: return "QUERY_FUNC_CAP"; + case MLX4_CMD_QP_ATTACH: return "QP_ATTACH"; + + /* debug commands */ + case MLX4_CMD_QUERY_DEBUG_MSG: return "QUERY_DEBUG_MSG"; + case MLX4_CMD_SET_DEBUG_MSG: return "SET_DEBUG_MSG"; + + /* statistics commands */ + case MLX4_CMD_QUERY_IF_STAT: return "QUERY_IF_STAT"; + case MLX4_CMD_SET_IF_STAT: return "SET_IF_STAT"; + + /* register/delete flow steering network rules */ + case MLX4_QP_FLOW_STEERING_ATTACH: return "QP_FLOW_STEERING_ATTACH"; + case MLX4_QP_FLOW_STEERING_DETACH: return "QP_FLOW_STEERING_DETACH"; + case MLX4_FLOW_STEERING_IB_UC_QP_RANGE: return "FLOW_STEERING_IB_UC_QP_RANGE"; + default: return "OTHER"; + } +} + static u8 mlx4_errno_to_status(int errno) { switch (errno) { @@ -244,6 +380,17 @@ static int mlx4_comm_cmd_wait(struct mlx down(&cmd->event_sem); + end = msecs_to_jiffies(timeout) + jiffies; + while (comm_pending(dev) && time_before(jiffies, end)) + cond_resched(); + if (comm_pending(dev)) { + mlx4_warn(dev, "mlx4_comm_cmd_wait: Comm channel " + "is not idle. My toggle is %d (op: 0x%x)\n", + mlx4_priv(dev)->cmd.comm_toggle, op); + up(&cmd->event_sem); + return -EAGAIN; + } + spin_lock(&cmd->context_lock); BUG_ON(cmd->free_head < 0); context = &cmd->context[cmd->free_head]; @@ -255,12 +402,8 @@ static int mlx4_comm_cmd_wait(struct mlx mlx4_comm_cmd_post(dev, op, param); - if (!wait_for_completion_timeout(&context->done, - msecs_to_jiffies(timeout))) { - mlx4_warn(dev, "communication channel command 0x%x timed out\n", op); - err = -EBUSY; - goto out; - } + /* In slave, wait unconditionally for completion */ + wait_for_completion(&context->done); err = context->result; if (err && context->fw_status != CMD_STAT_MULTI_FUNC_REQ) { @@ -309,14 +452,29 @@ static int cmd_pending(struct mlx4_dev * !!(status & swab32(1 << HCR_T_BIT))); } -static int mlx4_cmd_post(struct mlx4_dev *dev, u64 in_param, u64 out_param, - u32 in_modifier, u8 op_modifier, u16 op, u16 token, - int event) +static int get_status(struct mlx4_dev *dev, u32 *status, int *go_bit, + int *t_bit) +{ + if (pci_channel_offline(dev->pdev)) + return -EIO; + + *status = readl(mlx4_priv(dev)->cmd.hcr + HCR_STATUS_OFFSET); + *t_bit = !!(*status & swab32(1 << HCR_T_BIT)); + *go_bit = !!(*status & swab32(1 << HCR_GO_BIT)); + + return 0; +} + +static int mlx4_cmd_post(struct mlx4_dev *dev, struct timespec *ts1, + u64 in_param, u64 out_param, u32 in_modifier, + u8 op_modifier, u16 op, u16 token, int event) { struct mlx4_cmd *cmd = &mlx4_priv(dev)->cmd; u32 __iomem *hcr = cmd->hcr; int ret = -EAGAIN; unsigned long end; + int err, go_bit = 0, t_bit = 0; + u32 status = 0; mutex_lock(&cmd->hcr_mutex); @@ -363,6 +521,9 @@ static int mlx4_cmd_post(struct mlx4_dev __raw_writel((__force u32) cpu_to_be32(out_param & 0xfffffffful), hcr + 4); __raw_writel((__force u32) cpu_to_be32(token << 16), hcr + 5); + if (ts1) + ktime_get_ts(ts1); + /* __raw_writel may not order writes. */ wmb(); @@ -383,6 +544,15 @@ static int mlx4_cmd_post(struct mlx4_dev ret = 0; out: + if (ret) { + err = get_status(dev, &status, &go_bit, &t_bit); + mlx4_warn(dev, "Could not post command %s (0x%x): ret=%d, " + "in_param=0x%llx, in_mod=0x%x, op_mod=0x%x, " + "get_status err=%d, status_reg=0x%x, go_bit=%d, " + "t_bit=%d, toggle=0x%x\n", cmd_to_str(op), op, ret, + (unsigned long long) in_param, in_modifier, op_modifier, err, status, + go_bit, t_bit, cmd->toggle); + } mutex_unlock(&cmd->hcr_mutex); return ret; } @@ -439,7 +609,7 @@ static int mlx4_slave_cmd(struct mlx4_de ret = mlx4_status_to_errno(vhcr->status); } else mlx4_err(dev, "failed execution of VHCR_POST command" - "opcode 0x%x\n", op); + "opcode %s (0x%x)\n", cmd_to_str(op), op); } mutex_unlock(&priv->cmd.slave_cmd_mutex); @@ -467,7 +637,7 @@ static int mlx4_cmd_poll(struct mlx4_dev goto out; } - err = mlx4_cmd_post(dev, in_param, out_param ? *out_param : 0, + err = mlx4_cmd_post(dev, NULL, in_param, out_param ? *out_param : 0, in_modifier, op_modifier, op, CMD_POLL_TOKEN, 0); if (err) goto out; @@ -487,7 +657,8 @@ static int mlx4_cmd_poll(struct mlx4_dev } if (cmd_pending(dev)) { - mlx4_warn(dev, "command 0x%x timed out (go bit not cleared)\n", op); + mlx4_warn(dev, "command %s (0x%x) timed out (go bit not cleared)\n", + cmd_to_str(op), op); err = -ETIMEDOUT; goto out; } @@ -502,8 +673,8 @@ static int mlx4_cmd_poll(struct mlx4_dev __raw_readl(hcr + HCR_STATUS_OFFSET)) >> 24; err = mlx4_status_to_errno(stat); if (err) - mlx4_err(dev, "command 0x%x failed: fw status = 0x%x\n", - op, stat); + mlx4_err(dev, "command %s (0x%x) failed: fw status = 0x%x\n", + cmd_to_str(op), op, stat); out: up(&priv->cmd.poll_sem); @@ -527,19 +698,6 @@ void mlx4_cmd_event(struct mlx4_dev *dev complete(&context->done); } -static int get_status(struct mlx4_dev *dev, u32 *status, int *go_bit, - int *t_bit) -{ - if (pci_channel_offline(dev->pdev)) - return -EIO; - - *status = readl(mlx4_priv(dev)->cmd.hcr + HCR_STATUS_OFFSET); - *t_bit = !!(*status & swab32(1 << HCR_T_BIT)); - *go_bit = !!(*status & swab32(1 << HCR_GO_BIT)); - - return 0; -} - static int mlx4_cmd_wait(struct mlx4_dev *dev, u64 in_param, u64 *out_param, int out_is_imm, u32 in_modifier, u8 op_modifier, u16 op, unsigned long timeout) @@ -549,6 +707,12 @@ static int mlx4_cmd_wait(struct mlx4_dev int err = 0; int go_bit = 0, t_bit = 0, stat_err; u32 status = 0; + struct timespec ts1, ts2; + ktime_t t1, t2, delta; + s64 ds; + + if (out_is_imm && !out_param) + return -EINVAL; down(&cmd->event_sem); @@ -561,29 +725,38 @@ static int mlx4_cmd_wait(struct mlx4_dev init_completion(&context->done); - err = mlx4_cmd_post(dev, in_param, out_param ? *out_param : 0, + err = mlx4_cmd_post(dev, &ts1, in_param, out_param ? *out_param : 0, in_modifier, op_modifier, op, context->token, 1); - if (err) { - mlx4_warn(dev, "command 0x%x could not be posted (%d)\n", - op, err); + if (err) goto out; - } if (!wait_for_completion_timeout(&context->done, msecs_to_jiffies(timeout))) { stat_err = get_status(dev, &status, &go_bit, &t_bit); - mlx4_warn(dev, "command 0x%x timed out: " - "get_status err=%d, status=0x%x, go_bit=%d, " - "t_bit=%d, toggle=0x%x\n", op, stat_err, status, - go_bit, t_bit, mlx4_priv(dev)->cmd.toggle); + mlx4_warn(dev, "command %s (0x%x) timed out: in_param=0x%llx, " + "in_mod=0x%x, op_mod=0x%x, get_status err=%d, " + "status_reg=0x%x, go_bit=%d, t_bit=%d, toggle=0x%x\n" + , cmd_to_str(op), op, (unsigned long long) in_param, in_modifier, + op_modifier, stat_err, status, go_bit, t_bit, + mlx4_priv(dev)->cmd.toggle); err = -EBUSY; goto out; } + if (mlx4_debug_level & MLX4_DEBUG_MASK_CMD_TIME) { + ktime_get_ts(&ts2); + t1 = timespec_to_ktime(ts1); + t2 = timespec_to_ktime(ts2); + delta = ktime_sub(t2, t1); + ds = ktime_to_ns(delta); + pr_info("mlx4: fw exec time for %s is %lld nsec\n", cmd_to_str(op), (long long) ds); + } err = context->result; if (err) { - mlx4_err(dev, "command 0x%x failed: fw status = 0x%x\n", - op, context->fw_status); + mlx4_err(dev, "command %s (0x%x) failed: in_param=0x%llx, " + "in_mod=0x%x, op_mod=0x%x, fw status = 0x%x\n", + cmd_to_str(op), op, (unsigned long long) in_param, in_modifier, + op_modifier, context->fw_status); goto out; } @@ -640,7 +813,7 @@ static int mlx4_ACCESS_MEM(struct mlx4_d (slave & ~0x7f) | (size & 0xff)) { mlx4_err(dev, "Bad access mem params - slave_addr:0x%llx " "master_addr:0x%llx slave_id:%d size:%d\n", - (long long)slave_addr, (long long)master_addr, slave, size); + (unsigned long long) slave_addr, (unsigned long long) master_addr, slave, size); return -EINVAL; } @@ -813,6 +986,24 @@ static int mlx4_MAD_IFC_wrapper(struct m vhcr->op, MLX4_CMD_TIME_CLASS_C, MLX4_CMD_NATIVE); } +static int MLX4_CMD_DIAG_RPRT_wrapper(struct mlx4_dev *dev, int slave, + struct mlx4_vhcr *vhcr, + struct mlx4_cmd_mailbox *inbox, + struct mlx4_cmd_mailbox *outbox, + struct mlx4_cmd_info *cmd) +{ + return -EPERM; +} + +static int MLX4_CMD_UPDATE_QP_wrapper(struct mlx4_dev *dev, int slave, + struct mlx4_vhcr *vhcr, + struct mlx4_cmd_mailbox *inbox, + struct mlx4_cmd_mailbox *outbox, + struct mlx4_cmd_info *cmd) +{ + return -EPERM; +} + int mlx4_DMA_wrapper(struct mlx4_dev *dev, int slave, struct mlx4_vhcr *vhcr, struct mlx4_cmd_mailbox *inbox, @@ -950,6 +1141,16 @@ static struct mlx4_cmd_info cmd_info[] = .wrapper = NULL }, { + .opcode = MLX4_CMD_DIAG_RPRT, + .has_inbox = false, + .has_outbox = false, + .out_is_imm = false, + .encode_slave_id = false, + .skip_err_print = true, + .verify = NULL, + .wrapper = MLX4_CMD_DIAG_RPRT_wrapper + }, + { .opcode = MLX4_CMD_NOP, .has_inbox = false, .has_outbox = false, @@ -1247,6 +1448,16 @@ static struct mlx4_cmd_info cmd_info[] = .wrapper = mlx4_GEN_QP_wrapper }, { + .opcode = MLX4_CMD_UPDATE_QP, + .has_inbox = false, + .has_outbox = false, + .out_is_imm = false, + .encode_slave_id = false, + .skip_err_print = true, + .verify = NULL, + .wrapper = MLX4_CMD_UPDATE_QP_wrapper + }, + { .opcode = MLX4_CMD_CONF_SPECIAL_QP, .has_inbox = false, .has_outbox = false, @@ -1348,6 +1559,17 @@ static struct mlx4_cmd_info cmd_info[] = .verify = NULL, .wrapper = mlx4_QP_FLOW_STEERING_DETACH_wrapper }, + /* wol commands */ + { + .opcode = MLX4_CMD_MOD_STAT_CFG, + .has_inbox = false, + .has_outbox = false, + .out_is_imm = false, + .encode_slave_id = false, + .skip_err_print = true, + .verify = NULL, + .wrapper = mlx4_MOD_STAT_CFG_wrapper + }, }; static int mlx4_master_process_vhcr(struct mlx4_dev *dev, int slave, @@ -1401,8 +1623,8 @@ static int mlx4_master_process_vhcr(stru } } if (!cmd) { - mlx4_err(dev, "Unknown command:0x%x accepted from slave:%d\n", - vhcr->op, slave); + mlx4_err(dev, "unparavirt command: %s (0x%x) accepted from slave:%d\n", + cmd_to_str(vhcr->op), vhcr->op, slave); vhcr_cmd->status = CMD_STAT_BAD_PARAM; goto out_status; } @@ -1420,8 +1642,8 @@ static int mlx4_master_process_vhcr(stru if (mlx4_ACCESS_MEM(dev, inbox->dma, slave, vhcr->in_param, MLX4_MAILBOX_SIZE, 1)) { - mlx4_err(dev, "%s: Failed reading inbox (cmd:0x%x)\n", - __func__, cmd->opcode); + mlx4_err(dev, "%s: Failed reading inbox for cmd %s (0x%x)\n", + __func__, cmd_to_str(cmd->opcode), cmd->opcode); vhcr_cmd->status = CMD_STAT_INTERNAL_ERR; goto out_status; } @@ -1429,9 +1651,9 @@ static int mlx4_master_process_vhcr(stru /* Apply permission and bound checks if applicable */ if (cmd->verify && cmd->verify(dev, slave, vhcr, inbox)) { - mlx4_warn(dev, "Command:0x%x from slave: %d failed protection " - "checks for resource_id:%d\n", vhcr->op, slave, - vhcr->in_modifier); + mlx4_warn(dev, "Command %s (0x%x) from slave: %d failed protection " + "checks for resource_id: %d\n", cmd_to_str(vhcr->op), + vhcr->op, slave, vhcr->in_modifier); vhcr_cmd->status = CMD_STAT_BAD_OP; goto out_status; } @@ -1470,9 +1692,13 @@ static int mlx4_master_process_vhcr(stru } if (err) { - mlx4_warn(dev, "vhcr command:0x%x slave:%d failed with" - " error:%d, status %d\n", - vhcr->op, slave, vhcr->errno, err); + if (!cmd->skip_err_print) + mlx4_warn(dev, "vhcr command %s (0x%x) slave:%d " + "in_param 0x%llx in_mod=0x%x, op_mod=0x%x " + "failed with error:%d, status %d\n", + cmd_to_str(vhcr->op), vhcr->op, slave, + (unsigned long long) vhcr->in_param, vhcr->in_modifier, + vhcr->op_modifier, vhcr->errno, err); vhcr_cmd->status = mlx4_errno_to_status(err); goto out_status; } @@ -1487,7 +1713,7 @@ static int mlx4_master_process_vhcr(stru /* If we failed to write back the outbox after the *command was successfully executed, we must fail this * slave, as it is now in undefined state */ - mlx4_err(dev, "%s:Failed writing outbox\n", __func__); + mlx4_err(dev, "%s: Failed writing outbox\n", __func__); goto out; } } @@ -1516,6 +1742,75 @@ out: return ret; } +static int mlx4_master_immediate_activate_vlan_qos(struct mlx4_priv *priv, + int slave, int port) +{ + struct mlx4_vport_oper_state *vp_oper; + struct mlx4_vport_state *vp_admin; + struct mlx4_vf_immed_vlan_work *work; + int err; + int admin_vlan_ix = NO_INDX; + + vp_oper = &priv->mfunc.master.vf_oper[slave].vport[port]; + vp_admin = &priv->mfunc.master.vf_admin[slave].vport[port]; + + if (vp_oper->state.default_vlan == vp_admin->default_vlan && + vp_oper->state.default_qos == vp_admin->default_qos) + return 0; + + work = kzalloc(sizeof(*work), GFP_KERNEL); + if (!work) + return -ENOMEM; + + if (vp_oper->state.default_vlan != vp_admin->default_vlan) { + if (MLX4_VGT != vp_admin->default_vlan) { + err = __mlx4_register_vlan(&priv->dev, port, + vp_admin->default_vlan, + &admin_vlan_ix); + if (err) { + mlx4_warn((&priv->dev), + "No vlan resources slave %d, port %d\n", + slave, port); + return err; + } + } else { + admin_vlan_ix = NO_INDX; + } + work->flags |= MLX4_VF_IMMED_VLAN_FLAG_VLAN; + mlx4_dbg((&(priv->dev)), + "alloc vlan %d idx %d slave %d port %d\n", + (int)(vp_admin->default_vlan), + admin_vlan_ix, slave, port); + } + + /* save original vlan ix and vlan id */ + work->orig_vlan_id = vp_oper->state.default_vlan; + work->orig_vlan_ix = vp_oper->vlan_idx; + + /* handle new qos */ + if (vp_oper->state.default_qos != vp_admin->default_qos) + work->flags |= MLX4_VF_IMMED_VLAN_FLAG_QOS; + + if (work->flags & MLX4_VF_IMMED_VLAN_FLAG_VLAN) + vp_oper->vlan_idx = admin_vlan_ix; + + vp_oper->state.default_vlan = vp_admin->default_vlan; + vp_oper->state.default_qos = vp_admin->default_qos; + + /* iterate over QPs owned by this slave, using UPDATE_QP */ + work->port = port; + work->slave = slave; + work->qos = vp_oper->state.default_qos; + work->vlan_id = vp_oper->state.default_vlan; + work->vlan_ix = vp_oper->vlan_idx; + work->priv = priv; + INIT_WORK(&work->work, mlx4_vf_immed_vlan_work_handler); + queue_work(priv->mfunc.master.comm_wq, &work->work); + + return 0; +} + + static int mlx4_master_activate_admin_state(struct mlx4_priv *priv, int slave) { int port, err; @@ -1527,7 +1822,7 @@ static int mlx4_master_activate_admin_st vp_admin = &priv->mfunc.master.vf_admin[slave].vport[port]; vp_oper->state = *vp_admin; if (MLX4_VGT != vp_admin->default_vlan) { - err = mlx4_register_vlan(&priv->dev, port, + err = __mlx4_register_vlan(&priv->dev, port, vp_admin->default_vlan, &(vp_oper->vlan_idx)); if (err) { vp_oper->vlan_idx = NO_INDX; @@ -1548,12 +1843,12 @@ static int mlx4_master_activate_admin_st err = vp_oper->mac_idx; vp_oper->mac_idx = NO_INDX; mlx4_warn((&priv->dev), - "No mac resorces slave %d, port %d\n", + "No mac resources slave %d, port %d\n", slave, port); return err; } mlx4_dbg((&(priv->dev)), "alloc mac %llx idx %d slave %d port %d\n", - (long long)vp_oper->state.mac, vp_oper->mac_idx, slave, port); + (unsigned long long) vp_oper->state.mac, vp_oper->mac_idx, slave, port); } } return 0; @@ -1599,6 +1894,7 @@ static void mlx4_master_do_cmd(struct ml if (cmd == MLX4_COMM_CMD_RESET) { mlx4_warn(dev, "Received reset from slave:%d\n", slave); slave_state[slave].active = false; + slave_state[slave].old_vlan_api = false; mlx4_master_deactivate_admin_state(priv, slave); for (i = 0; i < MLX4_EVENT_TYPES_NUM; ++i) { slave_state[slave].event_eq[i].eqn = -1; @@ -1619,7 +1915,7 @@ static void mlx4_master_do_cmd(struct ml /*command from slave in the middle of FLR*/ if (cmd != MLX4_COMM_CMD_RESET && MLX4_COMM_CMD_FLR == slave_state[slave].last_cmd) { - mlx4_warn(dev, "slave:%d is Trying to run cmd(0x%x) " + mlx4_warn(dev, "slave:%d is Trying to run cmd (0x%x) " "in the middle of FLR\n", slave, cmd); return; } @@ -1630,7 +1926,6 @@ static void mlx4_master_do_cmd(struct ml goto reset_slave; slave_state[slave].vhcr_dma = ((u64) param) << 48; priv->mfunc.master.slave_state[slave].cookie = 0; - mutex_init(&priv->mfunc.master.gen_eqe_mutex[slave]); break; case MLX4_COMM_CMD_VHCR1: if (slave_state[slave].last_cmd != MLX4_COMM_CMD_VHCR0) @@ -1658,7 +1953,7 @@ static void mlx4_master_do_cmd(struct ml mutex_lock(&priv->cmd.slave_cmd_mutex); if (mlx4_master_process_vhcr(dev, slave, NULL)) { - mlx4_err(dev, "Failed processing vhcr for slave:%d," + mlx4_err(dev, "Failed processing vhcr for slave: %d," " resetting slave.\n", slave); mutex_unlock(&priv->cmd.slave_cmd_mutex); goto reset_slave; @@ -1666,7 +1961,7 @@ static void mlx4_master_do_cmd(struct ml mutex_unlock(&priv->cmd.slave_cmd_mutex); break; default: - mlx4_warn(dev, "Bad comm cmd:%d from slave:%d\n", cmd, slave); + mlx4_warn(dev, "Bad comm cmd: %d from slave: %d\n", cmd, slave); goto reset_slave; } spin_lock_irqsave(&priv->mfunc.master.slave_state_lock, flags); @@ -1676,8 +1971,8 @@ static void mlx4_master_do_cmd(struct ml is_going_down = 1; spin_unlock_irqrestore(&priv->mfunc.master.slave_state_lock, flags); if (is_going_down) { - mlx4_warn(dev, "Slave is going down aborting command(%d)" - " executing from slave:%d\n", + mlx4_warn(dev, "Slave is going down aborting command (%d)" + " executing from slave: %d\n", cmd, slave); return; } @@ -1696,8 +1991,6 @@ reset_slave: spin_unlock_irqrestore(&priv->mfunc.master.slave_state_lock, flags); /*with slave in the middle of flr, no need to clean resources again.*/ inform_slave_state: - memset(&slave_state[slave].event_eq, 0, - sizeof(struct mlx4_slave_event_eq_info)); __raw_writel((__force u32) cpu_to_be32(reply), &priv->mfunc.comm[slave].slave_read); wmb(); @@ -1751,7 +2044,10 @@ void mlx4_master_comm_channel(struct wor comm_cmd >> 16 & 0xff, comm_cmd & 0xffff, toggle); ++served; - } + } else + mlx4_err(dev, "slave %d out of sync." + " read toggle %d, write toggle %d.\n", slave, slt, + toggle); } } @@ -1759,6 +2055,19 @@ void mlx4_master_comm_channel(struct wor mlx4_warn(dev, "Got command event with bitmask from %d slaves" " but %d were served\n", reported, served); +} +/* master command processing */ +void mlx4_master_arm_comm_channel(struct work_struct *work) +{ + struct mlx4_mfunc_master_ctx *master = + container_of(work, + struct mlx4_mfunc_master_ctx, + arm_comm_work); + struct mlx4_mfunc *mfunc = + container_of(master, struct mlx4_mfunc, master); + struct mlx4_priv *priv = + container_of(mfunc, struct mlx4_priv, mfunc); + struct mlx4_dev *dev = &priv->dev; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 10:49:02 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8B8E223E; Thu, 2 Oct 2014 10:49:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 77D14CF6; Thu, 2 Oct 2014 10:49:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92An26r002942; Thu, 2 Oct 2014 10:49:02 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92An2Mk002941; Thu, 2 Oct 2014 10:49:02 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201410021049.s92An2Mk002941@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Thu, 2 Oct 2014 10:49:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272408 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 10:49:02 -0000 Author: tuexen Date: Thu Oct 2 10:49:01 2014 New Revision: 272408 URL: https://svnweb.freebsd.org/changeset/base/272408 Log: Check for UDP/IPv6 packets that the length in the UDP header is at least the minimum. Make the check similar to the one for UDPLite/IPv6. MFC after: 3 days Modified: head/sys/netinet6/udp6_usrreq.c Modified: head/sys/netinet6/udp6_usrreq.c ============================================================================== --- head/sys/netinet6/udp6_usrreq.c Thu Oct 2 10:46:12 2014 (r272407) +++ head/sys/netinet6/udp6_usrreq.c Thu Oct 2 10:49:01 2014 (r272408) @@ -237,18 +237,9 @@ udp6_input(struct mbuf **mp, int *offp, /* XXX: What is the right UDPLite MIB counter? */ goto badunlocked; } - } - if (nxt == IPPROTO_UDP && plen != ulen) { - UDPSTAT_INC(udps_badlen); - goto badunlocked; - } - - /* - * Checksum extended UDP header and data. - */ - if (uh->uh_sum == 0) { - if (ulen > plen || ulen < sizeof(struct udphdr)) { - UDPSTAT_INC(udps_nosum); + } else { + if ((ulen < sizeof(struct udphdr)) || (plen != ulen)) { + UDPSTAT_INC(udps_badlen); goto badunlocked; } } From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 10:58:53 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9E15053F; Thu, 2 Oct 2014 10:58:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A9FDDD9; Thu, 2 Oct 2014 10:58:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92Awr05007651; Thu, 2 Oct 2014 10:58:53 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92AwraG007650; Thu, 2 Oct 2014 10:58:53 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201410021058.s92AwraG007650@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 2 Oct 2014 10:58:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272409 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 10:58:53 -0000 Author: mav Date: Thu Oct 2 10:58:52 2014 New Revision: 272409 URL: https://svnweb.freebsd.org/changeset/base/272409 Log: Use REPORT LUNS command for SPC-2 devices with LUN 0 disconnected. SPC-2 tells REPORT LUNS shall be supported by devices supporting LUNs other then LUN 0. If we see LUN 0 disconnected, guess there may be others, and so REPORT LUNS shall be supported. MFC after: 1 month Modified: head/sys/cam/scsi/scsi_xpt.c Modified: head/sys/cam/scsi/scsi_xpt.c ============================================================================== --- head/sys/cam/scsi/scsi_xpt.c Thu Oct 2 10:49:01 2014 (r272408) +++ head/sys/cam/scsi/scsi_xpt.c Thu Oct 2 10:58:52 2014 (r272409) @@ -1191,7 +1191,7 @@ out: xpt_schedule(periph, priority); goto out; } else if (path->device->lun_id == 0 && - SID_ANSI_REV(inq_buf) > SCSI_REV_SPC2 && + SID_ANSI_REV(inq_buf) >= SCSI_REV_SPC2 && (SCSI_QUIRK(path->device)->quirks & CAM_QUIRK_NORPTLUNS) == 0) { PROBE_SET_ACTION(softc, PROBE_REPORT_LUNS); From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 12:27:43 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3206BEAB; Thu, 2 Oct 2014 12:27:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 03B8BA09; Thu, 2 Oct 2014 12:27:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92CRgCV052415; Thu, 2 Oct 2014 12:27:42 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92CRgFK052409; Thu, 2 Oct 2014 12:27:42 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201410021227.s92CRgFK052409@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 2 Oct 2014 12:27:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272410 - in head: share/man/man4 sys/dev/usb sys/dev/usb/wlan X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 12:27:43 -0000 Author: hselasky Date: Thu Oct 2 12:27:41 2014 New Revision: 272410 URL: https://svnweb.freebsd.org/changeset/base/272410 Log: Add new USB ID. PR: 194091 MFC after: 3 days Modified: head/share/man/man4/urtwn.4 head/sys/dev/usb/usbdevs head/sys/dev/usb/wlan/if_urtwn.c Modified: head/share/man/man4/urtwn.4 ============================================================================== --- head/share/man/man4/urtwn.4 Thu Oct 2 10:58:52 2014 (r272409) +++ head/share/man/man4/urtwn.4 Thu Oct 2 12:27:41 2014 (r272410) @@ -19,7 +19,7 @@ .Os .Sh NAME .Nm urtwn -.Nd Realtek RTL8188CU/RTL8188EU/RTL8192CU USB IEEE 802.11b/g/n wireless network device +.Nd Realtek RTL8188CU/RTL8188RU/RTL8188EU/RTL8192CU USB IEEE 802.11b/g/n wireless network device .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -82,10 +82,11 @@ firmware license .Sh HARDWARE The .Nm -driver supports Realtek RTL8188CU/RTL8188EU/RTL8192CU based USB +driver supports Realtek RTL8188CU/RTL8188RU/RTL8188EU/RTL8192CU based USB IEEE 802.11b/g/n wireless network adapters, including: .Pp .Bl -tag -width Ds -offset indent -compact +.It Alfa AWUS036NHR v2 .It ASUS USB-N10 NANO .It Belkin F7D1102 Surf Wireless Micro .It D-Link DWA-125 rev D1 Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Thu Oct 2 10:58:52 2014 (r272409) +++ head/sys/dev/usb/usbdevs Thu Oct 2 12:27:41 2014 (r272410) @@ -3717,6 +3717,7 @@ product REALTEK RTL8191CU 0x8177 RTL8191 product REALTEK RTL8192CU 0x8178 RTL8192CU product REALTEK RTL8192CE 0x817c RTL8192CE product REALTEK RTL8188RU_1 0x817d RTL8188RU +product REALTEK RTL8188RU_3 0x817f RTL8188RU product REALTEK RTL8712 0x8712 RTL8712 product REALTEK RTL8713 0x8712 RTL8713 product REALTEK RTL8188RU_2 0x317f RTL8188RU Modified: head/sys/dev/usb/wlan/if_urtwn.c ============================================================================== --- head/sys/dev/usb/wlan/if_urtwn.c Thu Oct 2 10:58:52 2014 (r272409) +++ head/sys/dev/usb/wlan/if_urtwn.c Thu Oct 2 12:27:41 2014 (r272410) @@ -141,6 +141,7 @@ static const STRUCT_USB_HOST_ID urtwn_de URTWN_DEV(REALTEK, RTL8188CUS), URTWN_DEV(REALTEK, RTL8188RU_1), URTWN_DEV(REALTEK, RTL8188RU_2), + URTWN_DEV(REALTEK, RTL8188RU_3), URTWN_DEV(REALTEK, RTL8191CU), URTWN_DEV(REALTEK, RTL8192CE), URTWN_DEV(REALTEK, RTL8192CU), From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 14:44:03 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 84E68973; Thu, 2 Oct 2014 14:44:03 +0000 (UTC) Received: from mail-ig0-x230.google.com (mail-ig0-x230.google.com [IPv6:2607:f8b0:4001:c05::230]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 38A01CB9; Thu, 2 Oct 2014 14:44:03 +0000 (UTC) Received: by mail-ig0-f176.google.com with SMTP id hn15so1482809igb.3 for ; Thu, 02 Oct 2014 07:44:02 -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:from:date:message-id :subject:to:cc:content-type; bh=ZUmUX7OSZvYZNcuIkV+Y7gWkFmhC0taLNeUeHXWUerE=; b=0mDIkjVgvPajVDY3EGUB+IOmlC1Lwwv5oGSPVJ7tsFz2FDOFmPq1e4V+w2PRJEmYh0 62KYS4Hl/r+FFHcCW7WJzJIqbsWRMpH851DjHhQV5YdGa4qO+K94OR0ekczgDoDrz4IF QscfB90ZNxS0WysikGuny+utgp+D/OvFucdKOKiChzs9xrSX4Y8gnK2zOKnKQlARlRjP eDJYBK43jNh7FKxVwODi/xXOdESC/vCUDi7DQHu8bcbFbsqgjZqkr7c67sTp7l4gyTnk BUZ4PtwiqnVB1qNiCvSLeNX57iLPUrmzUyiAaThGk+XZMr7OokeYZwFySbPTxP5s/RKw 1/eg== X-Received: by 10.50.142.97 with SMTP id rv1mr5336077igb.11.1412261042546; Thu, 02 Oct 2014 07:44:02 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.44.196 with HTTP; Thu, 2 Oct 2014 07:43:42 -0700 (PDT) In-Reply-To: <201410012103.s91L3HR0010906@svn.freebsd.org> References: <201410012103.s91L3HR0010906@svn.freebsd.org> From: Ed Maste Date: Thu, 2 Oct 2014 10:43:42 -0400 X-Google-Sender-Auth: sctHYZ9w8Sd0Fi-2UlzKdT3hbTs Message-ID: Subject: Re: svn commit: r272384 - head/usr.bin/mkimg To: Marcel Moolenaar Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 14:44:03 -0000 On 1 October 2014 17:03, Marcel Moolenaar wrote: > Improve performance of mking(1) by keeping a list of "chunks" in memory, > that keeps track of a particular region of the image. Nice work, thanks Marcel! I've been using brooks' NO_ROOT support along with makefs / mkimg to build and test changes by creating an image to boot in QEMU. This change provides a noticeable improvement in the cycle time. From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 15:03:52 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 164B838A; Thu, 2 Oct 2014 15:03:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 02D28F34; Thu, 2 Oct 2014 15:03:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92F3pOw027838; Thu, 2 Oct 2014 15:03:51 GMT (envelope-from gnn@FreeBSD.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92F3p6B027837; Thu, 2 Oct 2014 15:03:51 GMT (envelope-from gnn@FreeBSD.org) Message-Id: <201410021503.s92F3p6B027837@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gnn set sender to gnn@FreeBSD.org using -f From: "George V. Neville-Neil" Date: Thu, 2 Oct 2014 15:03:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272411 - head/sys/dev/sfxge X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 15:03:52 -0000 Author: gnn Date: Thu Oct 2 15:03:51 2014 New Revision: 272411 URL: https://svnweb.freebsd.org/changeset/base/272411 Log: Properly handle a case that should never happen (the bus_dma callback being called with error set to non-zero). Modified: head/sys/dev/sfxge/sfxge_dma.c Modified: head/sys/dev/sfxge/sfxge_dma.c ============================================================================== --- head/sys/dev/sfxge/sfxge_dma.c Thu Oct 2 12:27:41 2014 (r272410) +++ head/sys/dev/sfxge/sfxge_dma.c Thu Oct 2 15:03:51 2014 (r272411) @@ -164,11 +164,14 @@ sfxge_dma_alloc(struct sfxge_softc *sc, /* * The callback gets error information about the mapping - * and will have set our vaddr to NULL if something went + * and will have set esm_addr to 0 if something went * wrong. */ - if (vaddr == NULL) + if (esmp->esm_addr == 0) { + bus_dmamem_free(esmp->esm_tag, esmp->esm_base, esmp->esm_map); + bus_dma_tag_destroy(esmp->esm_tag); return (ENOMEM); + } esmp->esm_base = vaddr; From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 16:13:14 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 42ED734C; Thu, 2 Oct 2014 16:13:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2D4579FD; Thu, 2 Oct 2014 16:13:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92GDEXf062311; Thu, 2 Oct 2014 16:13:14 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92GDCX9062300; Thu, 2 Oct 2014 16:13:12 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201410021613.s92GDCX9062300@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 2 Oct 2014 16:13:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272414 - in head: release release/amd64 release/i386 share/man/man7 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 16:13:14 -0000 Author: gjb Date: Thu Oct 2 16:13:12 2014 New Revision: 272414 URL: https://svnweb.freebsd.org/changeset/base/272414 Log: Merge the following revisions from ^/projects/release-vmimage: r272234, r272236, r272262, r272264, r272269, r272271, r272272, r272277, r272279, r272376, r272380, r272381, r272392, r272234, r272412: r272234: Initial commit to include virtual machine images as part of the FreeBSD release builds. This adds a make(1) environment variable requirement, WITH_VMIMAGES, which triggers the virtual machine image targets when not defined to an empty value. Relevant user-driven variables include: o VMFORMATS: The virtual machine image formats to create. Valid formats are provided by running 'mkimg --formats' o VMSIZE: The size of the resulting virtual machine image. Typical compression is roughly 140Mb, regardless of the target size (10GB, 15GB, 20GB, 40GB sizes have been tested with the same result). o VMBASE: The prefix of the virtual machine disk images. The VMBASE make(1) environment variable is suffixed with each format in VMFORMATS for each individual disk image, as well as '.img' for the source UFS filesystem passed to mkimg(1). This also includes a new script, mk-vmimage.sh, based on how the VM images for 10.0-RELEASE, 9.3-RELEASE, and 10.1-RELEASE were created (mk-vmimage.sh in ^/user/gjb/thermite/). With the order in which the stages need to occur, as well as sanity-checking error cases, it makes much more sense to execute a shell script called from make(1), using env(1) to set specific parameters for the target image than it does to do this in make(1) directly. r272236: Use VMBASE in place of a hard-coded filename in the CLEANFILES list. r272262: Remove a 'set -x' that snuck in during testing. r272264: release/Makefile: Connect the virtual machine image build to the release target if WITH_VMIMAGES is set to a non-empty value. release/release.sh: Add WITH_VMIMAGES to RELEASE_RMAKEFLAGS. release/release.conf.sample: Add commented entries for tuning the release build if the WITH_VMIMAGES make(1) environment variable is set to a non-empty value. r272269: release/Makefile: Include .OBJDIR in DESTDIR in the vm-base target. release/release.sh: Provide the full path to mddev. r272271: Fix UFS label for the root filesystem. r272272: Remove comments left in accidentally while testing, so the VM /etc/fstab is actually created. r272277: Remove the UFS label from the root filesystem since it is added by mkimg(1) as a gpt label, consistent with the fstab(5) entry. r272279: Comment cleanup in panic() message when mkimg(1) does not support the requested disk image format. r272376: Separate release/scripts/mk-vmimage.sh to machine-specific scripts, making it possible to mimic the functionality for non-x86 targets. Move echo output if MAKEFLAGS is empty outside of usage(). Remove TARGET/TARGET_ARCH evaluation. r272380: Avoid using env(1) to set values passed to mk-vmimage.sh, and instead pass the values as arguments to the script, making it easier to run this by hand, without 'make release'. Add usage_vm_base() and usage_vm_image() usage helpers. r272381: After evaluating WITH_VMIMAGES is non-empty, ensure the mk-vmimage.sh script exists before running it. r272392: Add WITH_COMPRESSED_VMIMAGES variable, which when set enables xz(1) compression of the virtual machine images. This is intentionally separate to allow more fine-grained tuning over which images are compressed, especially in cases where compressing 20GB sparse images can take hours. r272412: Document the new 'vm-image' target, and associated release.conf variables. r272413: Remove two stray comments added during the initial iterations of testing, no longer needed. MFC after: 5 days X-MFC-10.1: yes Tested on: r272269, r272272, r272279, r272380, r272392 Sponsored by: The FreeBSD Foundation Added: head/release/amd64/mk-vmimage.sh - copied, changed from r272376, projects/release-vmimage/release/amd64/mk-vmimage.sh head/release/i386/mk-vmimage.sh - copied, changed from r272376, projects/release-vmimage/release/i386/mk-vmimage.sh Modified: head/release/Makefile head/release/release.conf.sample head/release/release.sh head/share/man/man7/release.7 Modified: head/release/Makefile ============================================================================== --- head/release/Makefile Thu Oct 2 16:05:01 2014 (r272413) +++ head/release/Makefile Thu Oct 2 16:13:12 2014 (r272414) @@ -23,6 +23,9 @@ # WITH_DVD: if set, generate dvd1.iso # WITH_COMPRESSED_IMAGES: if set, compress installation images with xz(1) # (uncompressed images are not removed) +# WITH_VMIMAGES: if set, build virtual machine images with the release +# WITH_COMPRESSED_VMIMAGES: if set, compress virtual machine disk images +# with xz(1) (extremely time consuming) # TARGET/TARGET_ARCH: architecture of built release # @@ -94,6 +97,11 @@ IMAGES+= memstick.img IMAGES+= mini-memstick.img .endif +VMTARGETS= vm-base vm-image +VMFORMATS?= vhd vmdk qcow2 raw +VMSIZE?= 20G +VMBASE?= vm + CLEANFILES= packagesystem *.txz MANIFEST system ${IMAGES} .if defined(WITH_COMPRESSED_IMAGES) && !empty(WITH_COMPRESSED_IMAGES) . for I in ${IMAGES} @@ -103,7 +111,16 @@ CLEANFILES+= ${I}.xz .if defined(WITH_DVD) && !empty(WITH_DVD) CLEANFILES+= pkg-stage .endif +.if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) +CLEANFILES+= ${VMBASE}.img +. for FORMAT in ${VMFORMATS} +CLEANFILES+= ${VMBASE}.${FORMAT} +. endfor +.endif CLEANDIRS= dist ftp release bootonly dvd +.if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) +CLEANDIRS+= ${VMTARGETS} +.endif beforeclean: chflags -R noschg . .include @@ -263,6 +280,9 @@ ftp: packagesystem release: ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} obj ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} ${RELEASE_TARGETS} +.if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) + ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} ${VMTARGETS} +.endif install: .if defined(DESTDIR) && !empty(DESTDIR) @@ -277,3 +297,44 @@ install: .endfor cd ${DESTDIR} && sha256 ${OSRELEASE}* > ${DESTDIR}/CHECKSUM.SHA256 cd ${DESTDIR} && md5 ${OSRELEASE}* > ${DESTDIR}/CHECKSUM.MD5 +.if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) + mkdir -p ${DESTDIR}/vmimages +. for FORMAT in ${VMFORMATS} + cp -p ${VMBASE}.${FORMAT} \ + ${DESTDIR}/vmimages/${OSRELEASE}.${FORMAT} +. endfor +. if defined(WITH_COMPRESSED_VMIMAGES) && !empty(WITH_COMPRESSED_VMIMAGES) +# This is very time consuming, so defer it after the images are moved to +# the DESTDIR. +. for FORMAT in ${VMFORMATS} + # Don't keep the originals. There is a copy in ${.OBJDIR} if needed. + ${XZCMD} ${DESTDIR}/vmimages/${OSRELEASE}.${FORMAT} +. endfor +. endif + cd ${DESTDIR}/vmimages && sha256 ${OSRELEASE}* > \ + ${DESTDIR}/vmimages/CHECKSUM.SHA256 + cd ${DESTDIR}/vmimages && md5 ${OSRELEASE}* > \ + ${DESTDIR}/vmimages/CHECKSUM.MD5 +.endif + +vm-base: +.if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) +. if exists(${.CURDIR}/${TARGET}/mk-vmimage.sh) + env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + ${.CURDIR}/${TARGET}/mk-vmimage.sh ${.TARGET} \ + ${VMBASE}.img ${WORLDDIR} ${.OBJDIR}/${.TARGET} ${VMSIZE} +. endif +.endif + touch ${.TARGET} + +vm-image: vm-base +.if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) +. if exists(${.CURDIR}/${TARGET}/mk-vmimage.sh) +. for FORMAT in ${VMFORMATS} + env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + ${.CURDIR}/${TARGET}/mk-vmimage.sh ${.TARGET} \ + ${VMBASE}.img ${FORMAT} ${VMBASE}.${FORMAT} +. endfor +. endif +.endif + touch ${.TARGET} Copied and modified: head/release/amd64/mk-vmimage.sh (from r272376, projects/release-vmimage/release/amd64/mk-vmimage.sh) ============================================================================== --- projects/release-vmimage/release/amd64/mk-vmimage.sh Wed Oct 1 17:05:40 2014 (r272376, copy source) +++ head/release/amd64/mk-vmimage.sh Thu Oct 2 16:13:12 2014 (r272414) @@ -35,8 +35,25 @@ PATH="/bin:/usr/bin:/sbin:/usr/sbin" export PATH +usage_vm_base() { + echo -n "$(basename ${0}) vm-base " + echo " " + return 0 +} + +usage_vm_image() { + echo -n "$(basename ${0}) vm-image " + echo " " + return 0 +} + usage() { - echo "$(basename ${0}) [...]" + echo "Usage:" + echo "$(basename ${0}) [vm-base|vm-image] [...]" + echo + usage_vm_base + echo + usage_vm_image exit 1 } @@ -56,6 +73,20 @@ panic() { vm_create_baseimage() { # Creates the UFS root filesystem for the virtual machine disk, # written to the formatted disk image with mkimg(1). + # + # Arguments: + # vm-base + + VMBASE="${1}" + WORLDDIR="${2}" + DESTDIR="${3}" + VMSIZE="${4}" + + if [ -z "${VMBASE}" -o -z "${WORLDDIR}" -o -z "${DESTDIR}" \ + -o -z "${VMSIZE}" ]; then + usage + fi + i=0 mkdir -p ${DESTDIR} truncate -s ${VMSIZE} ${VMBASE} @@ -63,7 +94,7 @@ vm_create_baseimage() { newfs -j /dev/${mddev} mount /dev/${mddev} ${DESTDIR} cd ${WORLDDIR} && \ - ${IMAKE} DESTDIR=${DESTDIR} \ + make DESTDIR=${DESTDIR} \ installworld installkernel distribution || \ panic 1 "\n\nCannot install the base system to ${DESTDIR}." chroot ${DESTDIR} /usr/bin/newaliases @@ -89,6 +120,19 @@ vm_create_baseimage() { } vm_create_vmdisk() { + # Creates the virtual machine disk image from the raw disk image. + # + # Arguments: + # vm-image " + + VMBASE="${1}" + FORMAT="${2}" + VMIMAGE="${3}" + + if [ -z "${VMBASE}" -o -z "${FORMAT}" -o -z "${VMIMAGE}" ]; then + usage + fi + mkimg_version=$(mkimg --version 2>/dev/null | awk '{print $2}') # We need mkimg(1) '--version' output, at minimum, to be able to @@ -124,10 +168,7 @@ vm_create_vmdisk() { main() { cmd="${1}" - - if [ -z "${MAKEFLAGS}" ]; then - echo "It is probably not safe to run this by hand yet..." - fi + shift 1 case ${cmd} in vm-base) Copied and modified: head/release/i386/mk-vmimage.sh (from r272376, projects/release-vmimage/release/i386/mk-vmimage.sh) ============================================================================== --- projects/release-vmimage/release/i386/mk-vmimage.sh Wed Oct 1 17:05:40 2014 (r272376, copy source) +++ head/release/i386/mk-vmimage.sh Thu Oct 2 16:13:12 2014 (r272414) @@ -35,8 +35,25 @@ PATH="/bin:/usr/bin:/sbin:/usr/sbin" export PATH +usage_vm_base() { + echo -n "$(basename ${0}) vm-base " + echo " " + return 0 +} + +usage_vm_image() { + echo -n "$(basename ${0}) vm-image " + echo " " + return 0 +} + usage() { - echo "$(basename ${0}) [...]" + echo "Usage:" + echo "$(basename ${0}) [vm-base|vm-image] [...]" + echo + usage_vm_base + echo + usage_vm_image exit 1 } @@ -56,6 +73,20 @@ panic() { vm_create_baseimage() { # Creates the UFS root filesystem for the virtual machine disk, # written to the formatted disk image with mkimg(1). + # + # Arguments: + # vm-base + + VMBASE="${1}" + WORLDDIR="${2}" + DESTDIR="${3}" + VMSIZE="${4}" + + if [ -z "${VMBASE}" -o -z "${WORLDDIR}" -o -z "${DESTDIR}" \ + -o -z "${VMSIZE}" ]; then + usage + fi + i=0 mkdir -p ${DESTDIR} truncate -s ${VMSIZE} ${VMBASE} @@ -63,7 +94,7 @@ vm_create_baseimage() { newfs -j /dev/${mddev} mount /dev/${mddev} ${DESTDIR} cd ${WORLDDIR} && \ - ${IMAKE} DESTDIR=${DESTDIR} \ + make DESTDIR=${DESTDIR} \ installworld installkernel distribution || \ panic 1 "\n\nCannot install the base system to ${DESTDIR}." chroot ${DESTDIR} /usr/bin/newaliases @@ -89,6 +120,19 @@ vm_create_baseimage() { } vm_create_vmdisk() { + # Creates the virtual machine disk image from the raw disk image. + # + # Arguments: + # vm-image " + + VMBASE="${1}" + FORMAT="${2}" + VMIMAGE="${3}" + + if [ -z "${VMBASE}" -o -z "${FORMAT}" -o -z "${VMIMAGE}" ]; then + usage + fi + mkimg_version=$(mkimg --version 2>/dev/null | awk '{print $2}') # We need mkimg(1) '--version' output, at minimum, to be able to @@ -124,10 +168,7 @@ vm_create_vmdisk() { main() { cmd="${1}" - - if [ -z "${MAKEFLAGS}" ]; then - echo "It is probably not safe to run this by hand yet..." - fi + shift 1 case ${cmd} in vm-base) Modified: head/release/release.conf.sample ============================================================================== --- head/release/release.conf.sample Thu Oct 2 16:05:01 2014 (r272413) +++ head/release/release.conf.sample Thu Oct 2 16:13:12 2014 (r272414) @@ -77,3 +77,24 @@ PORTBRANCH="ports/head@rHEAD" ## as TARGET/TARGET_ARCH. #CHROOT_MAKEENV= +## Set to a non-empty value to build virtual machine images as part of the +## release build. +#WITH_VMIMAGES= + +## Set to a non-empty value to compress virtual machine images with xz(1) +## as part of the release build. +#WITH_COMPRESSED_VMIMAGES= + +## If WITH_VMIMAGES is set to a non-empty value, this is the name of the +## file to use for the installed userland/kernel. +#VMBASE="vm" + +## If WITH_VMIMAGES is set to a non-empty value, this is the size of the +## virtual machine disk filesystem. Valid size values are described in +## the truncate(1) manual page. +#VMSIZE="20G" + +## If WITH_VMIMAGES is set to a non-empty value, this is a list of disk +## image formats to create. Valid values are listed in the mkimg(1) +## manual page, as well as 'mkimg --formats' output. +#VMFORMATS="vhdf vmdk qcow2 raw" Modified: head/release/release.sh ============================================================================== --- head/release/release.sh Thu Oct 2 16:05:01 2014 (r272413) +++ head/release/release.sh Thu Oct 2 16:13:12 2014 (r272414) @@ -89,6 +89,11 @@ NOPORTS= WITH_DVD= WITH_COMPRESSED_IMAGES= +# Set to non-empty value to build virtual machine images as part of +# the release. +WITH_VMIMAGES= +WITH_COMPRESSED_VMIMAGES= + usage() { echo "Usage: $0 [-c release.conf]" exit 1 @@ -169,7 +174,7 @@ CHROOT_DMAKEFLAGS="${CONF_FILES}" RELEASE_WMAKEFLAGS="${MAKE_FLAGS} ${WORLD_FLAGS} ${ARCH_FLAGS} ${CONF_FILES}" RELEASE_KMAKEFLAGS="${MAKE_FLAGS} ${KERNEL_FLAGS} KERNCONF=\"${KERNEL}\" ${ARCH_FLAGS} ${CONF_FILES}" RELEASE_RMAKEFLAGS="${ARCH_FLAGS} KERNCONF=\"${KERNEL}\" ${CONF_FILES} \ - ${DOCPORTS} WITH_DVD=${WITH_DVD}" + ${DOCPORTS} WITH_DVD=${WITH_DVD} WITH_VMIMAGES=${WITH_VMIMAGES}" # Force src checkout if configured FORCE_SRC_KEY= @@ -274,4 +279,5 @@ eval chroot ${CHROOTDIR} make -C /usr/sr eval chroot ${CHROOTDIR} make -C /usr/src/release ${RELEASE_RMAKEFLAGS} \ release eval chroot ${CHROOTDIR} make -C /usr/src/release ${RELEASE_RMAKEFLAGS} \ - install DESTDIR=/R WITH_COMPRESSED_IMAGES=${WITH_COMPRESSED_IMAGES} + install DESTDIR=/R WITH_COMPRESSED_IMAGES=${WITH_COMPRESSED_IMAGES} \ + WITH_COMPRESSED_VMIMAGES=${WITH_COMPRESSED_VMIMAGES} Modified: head/share/man/man7/release.7 ============================================================================== --- head/share/man/man7/release.7 Thu Oct 2 16:05:01 2014 (r272413) +++ head/share/man/man7/release.7 Thu Oct 2 16:13:12 2014 (r272414) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 11, 2014 +.Dd October 2, 2014 .Dt RELEASE 7 .Os .Sh NAME @@ -351,6 +351,61 @@ Set to the target directory within to check out .Va ${UBOOTSRC}/${UBOOTBRANCH} . .El +.Sh VIRTUAL MACHINE DISK IMAGES +The following +.Fa release.conf +variables are relevant only to virtual machine disk image builds: +.Bl -tag -width Ev +.It Va WITH_VMIMAGES +Set to a non-null value to build virtual machine disk images as part +of the release build. +.Va WITH_VMIMAGES +may also be specified as an envirionment variable passed to +.Xr make 1 . +.Pp +The option requires +.Xr mkimg 1 +version 20140927 or later. +.It Va WITH_COMPRESSED_VMIMAGES +Set to a non-null value to compress the virtual machine disk images with +.Xr xz 1 +as part of the +.Cm install +.Xr make 1 +target. +Note that compressing virtual machine disk images may take a very long +time on some systems. +.It Va VMBASE +Set to change the name of the resulting virtual machine disk image file. +The default value is +.Va vm . +.It Va VMSIZE +Set to change the size of the virtual machine disk capacity. +The default value is +.Va 20G . +See +.Xr truncate 1 +for valid values. +.Pp +Virtual machine disk images are, by default, created as sparse images. +When +.Va WITH_COMPRESSED_VMIMAGES +is used, the resulting files compressed with +.Xr xz 1 +compress to roughly the same size, regardless of the specified disk image +size. +.It Va VMFORMATS +Set to the target virtual disk image format(s) to create. +By default, the +.Va vhdf , Va vmdk , Va qcow2 , +and +.Va raw +formats are created. +See +.Xr mkimg 1 +for valid format values +.Pq requires version 20140927 or later . +.El .Sh MAKEFILE TARGETS The release makefile .Pq Pa src/release/Makefile @@ -407,6 +462,14 @@ Creates a directory named .Pa ftp containing the distribution files used in network installations and suitable for upload to an FTP mirror. +.It Cm vm-image +Creates virtual machine disk images in various formats. +The +.Cm vm-image +target requires the +.Va WITH_VMIMAGES +.Xr make 1 +envirionment variable to be set to a non-null value. .El .Pp Major subtargets called by targets above: From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 16:36:38 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6ADF6B97; Thu, 2 Oct 2014 16:36:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B921CCF; Thu, 2 Oct 2014 16:36:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92Gacx2072772; Thu, 2 Oct 2014 16:36:38 GMT (envelope-from dumbbell@FreeBSD.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92GabUV072769; Thu, 2 Oct 2014 16:36:37 GMT (envelope-from dumbbell@FreeBSD.org) Message-Id: <201410021636.s92GabUV072769@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dumbbell set sender to dumbbell@FreeBSD.org using -f From: Jean-Sebastien Pedron Date: Thu, 2 Oct 2014 16:36:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272416 - head/sys/dev/vt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 16:36:38 -0000 Author: dumbbell Date: Thu Oct 2 16:36:37 2014 New Revision: 272416 URL: https://svnweb.freebsd.org/changeset/base/272416 Log: vt(4): Save/restore keyboard mode & LED states when switching window Add new functions to manipulate these mode & state, instead of calling kbdd_ioctl() everyhere. This fixes at least two bugs: 1. The state of the Scroll Lock LED and the state of scroll mode could be out-of-sync. For instance, if one enables scroll mode on window #1 and switches to window #2, the LED would remain on, but the window wouldn't be in scroll mode. Similarily, when switching between a console and an X.Org session, the LED states could be inconsistent with the real state. 2. When exiting from an X.Org session, the user could be unable to type anything. The workaround was to switch to another console window and come back. Differential Revision: https://reviews.freebsd.org/D821 Reviewed by: ray@ Approved by: ray@ Tested by: kwm@ MFC after: 3 days Modified: head/sys/dev/vt/vt.h head/sys/dev/vt/vt_core.c Modified: head/sys/dev/vt/vt.h ============================================================================== --- head/sys/dev/vt/vt.h Thu Oct 2 16:32:52 2014 (r272415) +++ head/sys/dev/vt/vt.h Thu Oct 2 16:36:37 2014 (r272416) @@ -260,6 +260,7 @@ struct vt_window { unsigned int vw_number; /* (c) Window number. */ int vw_kbdmode; /* (?) Keyboard mode. */ int vw_prev_kbdmode;/* (?) Previous mode. */ + int vw_kbdstate; /* (?) Keyboard state. */ int vw_grabbed; /* (?) Grab count. */ char *vw_kbdsq; /* Escape sequence queue*/ unsigned int vw_flags; /* (d) Per-window flags. */ Modified: head/sys/dev/vt/vt_core.c ============================================================================== --- head/sys/dev/vt/vt_core.c Thu Oct 2 16:32:52 2014 (r272415) +++ head/sys/dev/vt/vt_core.c Thu Oct 2 16:36:37 2014 (r272416) @@ -298,6 +298,97 @@ vt_switch_timer(void *arg) } static int +vt_save_kbd_mode(struct vt_window *vw, keyboard_t *kbd) +{ + int mode, ret; + + mode = 0; + ret = kbdd_ioctl(kbd, KDGKBMODE, (caddr_t)&mode); + if (ret == ENOIOCTL) + ret = ENODEV; + if (ret != 0) + return (ret); + + vw->vw_kbdmode = mode; + + return (0); +} + +static int +vt_update_kbd_mode(struct vt_window *vw, keyboard_t *kbd) +{ + int ret; + + ret = kbdd_ioctl(kbd, KDSKBMODE, (caddr_t)&vw->vw_kbdmode); + if (ret == ENOIOCTL) + ret = ENODEV; + + return (ret); +} + +static int +vt_save_kbd_state(struct vt_window *vw, keyboard_t *kbd) +{ + int state, ret; + + state = 0; + ret = kbdd_ioctl(kbd, KDGKBSTATE, (caddr_t)&state); + if (ret == ENOIOCTL) + ret = ENODEV; + if (ret != 0) + return (ret); + + vw->vw_kbdstate &= ~LOCK_MASK; + vw->vw_kbdstate |= state & LOCK_MASK; + + return (0); +} + +static int +vt_update_kbd_state(struct vt_window *vw, keyboard_t *kbd) +{ + int state, ret; + + state = vw->vw_kbdstate & LOCK_MASK; + ret = kbdd_ioctl(kbd, KDSKBSTATE, (caddr_t)&state); + if (ret == ENOIOCTL) + ret = ENODEV; + + return (ret); +} + +static int +vt_save_kbd_leds(struct vt_window *vw, keyboard_t *kbd) +{ + int leds, ret; + + leds = 0; + ret = kbdd_ioctl(kbd, KDGETLED, (caddr_t)&leds); + if (ret == ENOIOCTL) + ret = ENODEV; + if (ret != 0) + return (ret); + + vw->vw_kbdstate &= ~LED_MASK; + vw->vw_kbdstate |= leds & LED_MASK; + + return (0); +} + +static int +vt_update_kbd_leds(struct vt_window *vw, keyboard_t *kbd) +{ + int leds, ret; + + leds = vw->vw_kbdstate & LED_MASK; + ret = kbdd_ioctl(kbd, KDSETLED, (caddr_t)&leds); + if (ret == ENOIOCTL) + ret = ENODEV; + + return (ret); +} + +static int vt_window_preswitch(struct vt_window *vw, struct vt_window *curvw) { @@ -409,7 +500,11 @@ vt_window_switch(struct vt_window *vw) mtx_lock(&Giant); kbd = kbd_get_keyboard(vd->vd_keyboard); if (kbd != NULL) { - kbdd_ioctl(kbd, KDSKBMODE, (void *)&vw->vw_kbdmode); + if (curvw->vw_kbdmode == K_XLATE) + vt_save_kbd_state(curvw, kbd); + + vt_update_kbd_mode(vw, kbd); + vt_update_kbd_state(vw, kbd); } mtx_unlock(&Giant); DPRINTF(10, "%s(ttyv%d) done\n", __func__, vw->vw_number); @@ -602,7 +697,6 @@ static int vt_processkey(keyboard_t *kbd, struct vt_device *vd, int c) { struct vt_window *vw = vd->vd_curwindow; - int state = 0; #if VT_ALT_TO_ESC_HACK if (c & RELKEY) { @@ -665,10 +759,9 @@ vt_processkey(keyboard_t *kbd, struct vt vt_proc_window_switch(vw); return (0); case SLK: { - - kbdd_ioctl(kbd, KDGKBSTATE, (caddr_t)&state); + vt_save_kbd_state(vw, kbd); VT_LOCK(vd); - if (state & SLKED) { + if (vw->vw_kbdstate & SLKED) { /* Turn scrolling on. */ vw->vw_flags |= VWF_SCROLL; VTBUF_SLCK_ENABLE(&vw->vw_buf); @@ -1201,13 +1294,11 @@ vtterm_cngetc(struct terminal *tm) struct vt_window *vw = tm->tm_softc; struct vt_device *vd = vw->vw_device; keyboard_t *kbd; - int state; u_int c; if (vw->vw_kbdsq && *vw->vw_kbdsq) return (*vw->vw_kbdsq++); - state = 0; /* Make sure the splash screen is not there. */ if (vd->vd_flags & VDF_SPLASH) { /* Remove splash */ @@ -1223,8 +1314,8 @@ vtterm_cngetc(struct terminal *tm) return (-1); /* Force keyboard input mode to K_XLATE */ - c = K_XLATE; - kbdd_ioctl(kbd, KDSKBMODE, (void *)&c); + vw->vw_kbdmode = K_XLATE; + vt_update_kbd_mode(vw, kbd); /* Switch the keyboard to polling to make it work here. */ kbdd_poll(kbd, TRUE); @@ -1243,8 +1334,8 @@ vtterm_cngetc(struct terminal *tm) if (c & SPCLKEY) { switch (c) { case SPCLKEY | SLK: - kbdd_ioctl(kbd, KDGKBSTATE, (caddr_t)&state); - if (state & SLKED) { + vt_save_kbd_state(vw, kbd); + if (vw->vw_kbdstate & SLKED) { /* Turn scrolling on. */ vw->vw_flags |= VWF_SCROLL; VTBUF_SLCK_ENABLE(&vw->vw_buf); @@ -1311,7 +1402,7 @@ vtterm_cngrab(struct terminal *tm) /* We shall always use the keyboard in the XLATE mode here. */ vw->vw_prev_kbdmode = vw->vw_kbdmode; vw->vw_kbdmode = K_XLATE; - (void)kbdd_ioctl(kbd, KDSKBMODE, (caddr_t)&vw->vw_kbdmode); + vt_update_kbd_mode(vw, kbd); kbdd_poll(kbd, TRUE); } @@ -1336,7 +1427,7 @@ vtterm_cnungrab(struct terminal *tm) kbdd_poll(kbd, FALSE); vw->vw_kbdmode = vw->vw_prev_kbdmode; - (void)kbdd_ioctl(kbd, KDSKBMODE, (caddr_t)&vw->vw_kbdmode); + vt_update_kbd_mode(vw, kbd); kbdd_disable(kbd); } @@ -1890,12 +1981,8 @@ skip_thunk: case SETFKEY: case KDGKBINFO: case KDGKBTYPE: - case KDSKBSTATE: /* set keyboard state (locks) */ - case KDGKBSTATE: /* get keyboard state (locks) */ case KDGETREPEAT: /* get keyboard repeat & delay rates */ case KDSETREPEAT: /* set keyboard repeat & delay rates (new) */ - case KDSETLED: /* set keyboard LED status */ - case KDGETLED: /* get keyboard LED status */ case KBADDKBD: /* add/remove keyboard to/from mux */ case KBRELKBD: { error = 0; @@ -1915,18 +2002,101 @@ skip_thunk: } return (error); } + case KDGKBSTATE: { /* get keyboard state (locks) */ + error = 0; + + if (vw == vd->vd_curwindow) { + mtx_lock(&Giant); + kbd = kbd_get_keyboard(vd->vd_keyboard); + if (kbd != NULL) + error = vt_save_kbd_state(vw, kbd); + mtx_unlock(&Giant); + + if (error != 0) + return (error); + } + + *(int *)data = vw->vw_kbdstate & LOCK_MASK; + + return (error); + } + case KDSKBSTATE: { /* set keyboard state (locks) */ + int state; + + state = *(int *)data; + if (state & ~LOCK_MASK) + return (EINVAL); + + vw->vw_kbdstate &= ~LOCK_MASK; + vw->vw_kbdstate |= state; + + error = 0; + if (vw == vd->vd_curwindow) { + mtx_lock(&Giant); + kbd = kbd_get_keyboard(vd->vd_keyboard); + if (kbd != NULL) + error = vt_update_kbd_state(vw, kbd); + mtx_unlock(&Giant); + } + + return (error); + } + case KDGETLED: { /* get keyboard LED status */ + error = 0; + + if (vw == vd->vd_curwindow) { + mtx_lock(&Giant); + kbd = kbd_get_keyboard(vd->vd_keyboard); + if (kbd != NULL) + error = vt_save_kbd_leds(vw, kbd); + mtx_unlock(&Giant); + + if (error != 0) + return (error); + } + + *(int *)data = vw->vw_kbdstate & LED_MASK; + + return (error); + } + case KDSETLED: { /* set keyboard LED status */ + int leds; + + leds = *(int *)data; + if (leds & ~LED_MASK) + return (EINVAL); + + vw->vw_kbdstate &= ~LED_MASK; + vw->vw_kbdstate |= leds; + + error = 0; + if (vw == vd->vd_curwindow) { + mtx_lock(&Giant); + kbd = kbd_get_keyboard(vd->vd_keyboard); + if (kbd != NULL) + error = vt_update_kbd_leds(vw, kbd); + mtx_unlock(&Giant); + } + + return (error); + } case KDGKBMODE: { - int mode = -1; + error = 0; - mtx_lock(&Giant); - kbd = kbd_get_keyboard(vd->vd_keyboard); - if (kbd != NULL) { - kbdd_ioctl(kbd, KDGKBMODE, (void *)&mode); + if (vw == vd->vd_curwindow) { + mtx_lock(&Giant); + kbd = kbd_get_keyboard(vd->vd_keyboard); + if (kbd != NULL) + error = vt_save_kbd_mode(vw, kbd); + mtx_unlock(&Giant); + + if (error != 0) + return (error); } - mtx_unlock(&Giant); - DPRINTF(20, "mode %d, vw_kbdmode %d\n", mode, vw->vw_kbdmode); - *(int *)data = mode; - return (0); + + *(int *)data = vw->vw_kbdmode; + + return (error); } case KDSKBMODE: { int mode; @@ -1937,19 +2107,17 @@ skip_thunk: case K_RAW: case K_CODE: vw->vw_kbdmode = mode; - if (vw == vd->vd_curwindow) { - keyboard_t *kbd; - error = 0; + error = 0; + if (vw == vd->vd_curwindow) { mtx_lock(&Giant); kbd = kbd_get_keyboard(vd->vd_keyboard); - if (kbd != NULL) { - error = kbdd_ioctl(kbd, KDSKBMODE, - (void *)&mode); - } + if (kbd != NULL) + error = vt_update_kbd_mode(vw, kbd); mtx_unlock(&Giant); } - return (0); + + return (error); default: return (EINVAL); } @@ -1977,8 +2145,17 @@ skip_thunk: return (0); case CONS_GETINFO: { vid_info_t *vi = (vid_info_t *)data; + if (vi->size != sizeof(struct vid_info)) + return (EINVAL); + + if (vw == vd->vd_curwindow) { + kbd = kbd_get_keyboard(vd->vd_keyboard); + if (kbd != NULL) + vt_save_kbd_state(vw, kbd); + } vi->m_num = vd->vd_curwindow->vw_number + 1; + vi->mk_keylock = vw->vw_kbdstate & LOCK_MASK; /* XXX: other fields! */ return (0); } @@ -2093,13 +2270,14 @@ skip_thunk: (void *)vd, vt_kbdevent, vd); if (i >= 0) { if (vd->vd_keyboard != -1) { + vt_save_kbd_state(vd->vd_curwindow, kbd); kbd_release(kbd, (void *)vd); } kbd = kbd_get_keyboard(i); vd->vd_keyboard = i; - (void)kbdd_ioctl(kbd, KDSKBMODE, - (caddr_t)&vd->vd_curwindow->vw_kbdmode); + vt_update_kbd_mode(vd->vd_curwindow, kbd); + vt_update_kbd_state(vd->vd_curwindow, kbd); } else { error = EPERM; /* XXX */ } @@ -2115,6 +2293,7 @@ skip_thunk: mtx_unlock(&Giant); return (EINVAL); } + vt_save_kbd_state(vd->vd_curwindow, kbd); error = kbd_release(kbd, (void *)vd); if (error == 0) { vd->vd_keyboard = -1; From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 16:41:44 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5F9A1ED; Thu, 2 Oct 2014 16:41:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4083EDBF; Thu, 2 Oct 2014 16:41:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92GfiDv077123; Thu, 2 Oct 2014 16:41:44 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92GfieR077111; Thu, 2 Oct 2014 16:41:44 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201410021641.s92GfieR077111@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 2 Oct 2014 16:41:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272417 - stable/10/etc/devd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 16:41:44 -0000 Author: hselasky Date: Thu Oct 2 16:41:43 2014 New Revision: 272417 URL: https://svnweb.freebsd.org/changeset/base/272417 Log: MFC r272253: Regenerate usb.conf Approved by: re, gjb Modified: stable/10/etc/devd/usb.conf Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/devd/usb.conf ============================================================================== --- stable/10/etc/devd/usb.conf Thu Oct 2 16:36:37 2014 (r272416) +++ stable/10/etc/devd/usb.conf Thu Oct 2 16:41:43 2014 (r272417) @@ -65,7 +65,23 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x03f0"; - match "product" "(0x2016|0x2116|0x2216|0x3016|0x3116)"; + match "product" "(0x2016|0x2116|0x2216)"; + action "kldload -n uipaq"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x03f0"; + match "product" "(0x241d|0x251d)"; + action "kldload -n u3g"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x03f0"; + match "product" "(0x3016|0x3116)"; action "kldload -n uipaq"; }; @@ -129,7 +145,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0403"; - match "product" "(0x6001|0x6004|0x6006|0x6006|0x6010|0x6011|0x6014|0x6015|0x8372|0x9378|0x9379|0x937a|0x937c|0x9868|0x9e90|0x9f80|0xa6d0|0xabb8|0xb810|0xb811|0xb812|0xbaf8|0xbbe2|0xbca0|0xbca1|0xbca2|0xbca4|0xbcd8|0xbcd9|0xbcda|0xbdc8|0xbfd8|0xbfd9|0xbfda|0xbfdb|0xbfdc|0xc7d0|0xc850|0xc991|0xcaa0|0xcc48|0xcc49|0xcc4a|0xd010|0xd011|0xd012|0xd013|0xd014|0xd015|0xd016|0xd017|0xd070|0xd071|0xd388|0xd389|0xd38a|0xd38b|0xd38c|0xd38d|0xd38e|0xd38f|0xd578|0xd678|0xd738|0xd780|0xdaf8|0xdaf9|0xdafa|0xdafb|0xdafc|0xdafd|0xdafe|0xdaff|0xdc00|0xdc01|0xdd20|0xdf28|0xdf30|0xdf31|0xdf32|0xdf33|0xdf35|0xe000|0xe001|0xe002|0xe004|0xe006|0xe008|0xe009|0xe00a|0xe050|0xe0e8|0xe0e9|0xe0ea|0xe0eb|0xe0ec|0xe0ed|0xe0ee|0xe0ef|0xe0f0|0xe0f1|0xe0f2|0xe0f3|0xe0f4|0xe0f5|0xe0f6|0xe0f7|0xe40b|0xe520|0xe548|0xe6c8|0xe700|0xe729|0xe808|0xe809|0xe80a|0xe80b|0xe80c|0xe80d|0xe80e|0xe80f|0xe888|0xe889|0xe88a|0xe88b|0xe88c|0xe88d|0xe88e|0xe88f|0xea90|0xebe0|0xec88|0xec89|0xed22|0xed71|0xed72|0xed73|0xed74|0xee18|0xeee 8|0xeee9|0xeeea|0xeeeb|0xeeec|0xeeed|0xeeee|0xeeef|0xef50|0xef51|0xf068|0xf069|0xf06a|0xf06b|0xf06c|0xf06d|0xf06e|0xf06f|0xf070|0xf0c0|0xf0c8|0xf208|0xf2d0|0xf3c0|0xf3c1|0xf3c2|0xf448|0xf449|0xf44a|0xf44b|0xf44c|0xf460|0xf608|0xf60b|0xf680|0xf850|0xf857|0xf9d0|0xf9d1|0xf9d2|0xf9d3|0xf9d4|0xf9d5|0xfa00|0xfa01|0xfa02|0xfa03|0xfa04|0xfa05|0xfa06|0xfa10|0xfa33|0xfa88|0xfad0|0xfaf0|0xfb58|0xfb59|0xfb5a|0xfb5b|0xfb5c|0xfb5d|0xfb5e|0xfb5f|0xfb80|0xfb99|0xfbfa|0xfc08|0xfc09|0xfc0a|0xfc0b|0xfc0c|0xfc0d|0xfc0e|0xfc0f|0xfc60|0xfc70|0xfc71|0xfc72|0xfc73|0xfc82|0xfd60|0xfe38|0xff00|0xff18|0xff1c|0xff1d|0xff20|0xff38|0xff39|0xff3a|0xff3b|0xff3c|0xff3d|0xff3e|0xff3f|0xffa8)"; + match "product" "(0x6001|0x6004|0x6006|0x6006|0x6010|0x6011|0x6014|0x6015|0x8372|0x9378|0x9379|0x937a|0x937c|0x9868|0x9e90|0x9f80|0xa6d0|0xa6d1|0xabb8|0xb810|0xb811|0xb812|0xbaf8|0xbbe2|0xbca0|0xbca1|0xbca2|0xbca4|0xbcd8|0xbcd9|0xbcda|0xbdc8|0xbfd8|0xbfd9|0xbfda|0xbfdb|0xbfdc|0xc7d0|0xc850|0xc991|0xcaa0|0xcc48|0xcc49|0xcc4a|0xd010|0xd011|0xd012|0xd013|0xd014|0xd015|0xd016|0xd017|0xd070|0xd071|0xd388|0xd389|0xd38a|0xd38b|0xd38c|0xd38d|0xd38e|0xd38f|0xd578|0xd678|0xd738|0xd780|0xdaf8|0xdaf9|0xdafa|0xdafb|0xdafc|0xdafd|0xdafe|0xdaff|0xdc00|0xdc01|0xdd20|0xdf28|0xdf30|0xdf31|0xdf32|0xdf33|0xdf35|0xe000|0xe001|0xe002|0xe004|0xe006|0xe008|0xe009|0xe00a|0xe050|0xe0e8|0xe0e9|0xe0ea|0xe0eb|0xe0ec|0xe0ed|0xe0ee|0xe0ef|0xe0f0|0xe0f1|0xe0f2|0xe0f3|0xe0f4|0xe0f5|0xe0f6|0xe0f7|0xe40b|0xe520|0xe548|0xe6c8|0xe700|0xe729|0xe808|0xe809|0xe80a|0xe80b|0xe80c|0xe80d|0xe80e|0xe80f|0xe888|0xe889|0xe88a|0xe88b|0xe88c|0xe88d|0xe88e|0xe88f|0xea90|0xebe0|0xec88|0xec89|0xed22|0xed71|0xed72|0xed73|0xed74|0xee1 8|0xeee8|0xeee9|0xeeea|0xeeeb|0xeeec|0xeeed|0xeeee|0xeeef|0xef50|0xef51|0xf068|0xf069|0xf06a|0xf06b|0xf06c|0xf06d|0xf06e|0xf06f|0xf070|0xf0c0|0xf0c8|0xf208|0xf2d0|0xf3c0|0xf3c1|0xf3c2|0xf448|0xf449|0xf44a|0xf44b|0xf44c|0xf460|0xf608|0xf60b|0xf680|0xf850|0xf857|0xf9d0|0xf9d1|0xf9d2|0xf9d3|0xf9d4|0xf9d5|0xfa00|0xfa01|0xfa02|0xfa03|0xfa04|0xfa05|0xfa06|0xfa10|0xfa33|0xfa88|0xfad0|0xfaf0|0xfb58|0xfb59|0xfb5a|0xfb5b|0xfb5c|0xfb5d|0xfb5e|0xfb5f|0xfb80|0xfb99|0xfbfa|0xfc08|0xfc09|0xfc0a|0xfc0b|0xfc0c|0xfc0d|0xfc0e|0xfc0f|0xfc60|0xfc70|0xfc71|0xfc72|0xfc73|0xfc82|0xfd60|0xfe38|0xff00|0xff18|0xff1c|0xff1d|0xff20|0xff38|0xff39|0xff3a|0xff3b|0xff3c|0xff3d|0xff3e|0xff3f|0xffa8)"; action "kldload -n uftdi"; }; @@ -1057,7 +1073,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0586"; - match "product" "(0x3416|0x341a)"; + match "product" "(0x3416|0x341a|0x341e)"; action "kldload -n if_run"; }; @@ -1097,7 +1113,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x05ac"; - match "product" "(0x020d|0x020e|0x020f|0x0215|0x0217|0x0218|0x0219|0x021a|0x021b|0x021c)"; + match "product" "(0x020d|0x020e|0x020f|0x0210|0x0214|0x0215|0x0216|0x0217|0x0218|0x0219|0x021a|0x021b|0x021c)"; action "kldload -n atp"; }; @@ -2353,7 +2369,23 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0b05"; - match "product" "(0x17b5|0x17cb)"; + match "product" "0x17b5"; + action "kldload -n ng_ubt"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0b05"; + match "product" "0x17ba"; + action "kldload -n if_urtwn"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0b05"; + match "product" "0x17cb"; action "kldload -n ng_ubt"; }; @@ -2481,7 +2513,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0bda"; - match "product" "(0x018a|0x317f)"; + match "product" "(0x0179|0x018a|0x317f)"; action "kldload -n if_urtwn"; }; @@ -2513,7 +2545,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0bda"; - match "product" "(0x8176|0x8176|0x8177|0x8178|0x817a|0x817b|0x817c|0x817d|0x817e)"; + match "product" "(0x8176|0x8176|0x8177|0x8178|0x8179|0x817a|0x817b|0x817c|0x817d|0x817e)"; action "kldload -n if_urtwn"; }; @@ -2929,6 +2961,14 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0df6"; + match "product" "0x0072"; + action "kldload -n if_axge"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0df6"; match "product" "0x061c"; action "kldload -n if_axe"; }; @@ -3577,7 +3617,23 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x12d1"; - match "product" "(0x1001|0x1003|0x1004|0x1401|0x1402|0x1403|0x1404|0x1405|0x1406|0x1407|0x1408|0x1409|0x140a|0x140b|0x140c|0x140d|0x140e|0x140f|0x1410|0x1411|0x1412|0x1413|0x1414|0x1415|0x1416|0x1417|0x1418|0x1419|0x141a|0x141b|0x141c|0x141d|0x141e|0x141f|0x1420|0x1421|0x1422|0x1423|0x1424|0x1425|0x1426|0x1427|0x1428|0x1429|0x142a|0x142b|0x142c|0x142d|0x142e|0x142f|0x1430|0x1431|0x1432|0x1433|0x1434|0x1435|0x1436|0x1437|0x1438|0x1439|0x143a|0x143b|0x143c|0x143d|0x143e|0x143f|0x1446|0x1464|0x1465|0x14ac|0x14c9|0x14d1|0x14fe|0x1505|0x1506|0x1520|0x1521|0x1803|0x1c05|0x1c0b)"; + match "product" "(0x1001|0x1003|0x1004|0x1401|0x1402|0x1403|0x1404|0x1405|0x1406|0x1407|0x1408|0x1409|0x140a|0x140b|0x140c|0x140d|0x140e|0x140f|0x1410|0x1411|0x1412|0x1413|0x1414|0x1415|0x1416|0x1417|0x1418|0x1419|0x141a|0x141b|0x141c|0x141d|0x141e|0x141f|0x1420|0x1421|0x1422|0x1423|0x1424|0x1425|0x1426|0x1427|0x1428|0x1429|0x142a|0x142b|0x142c|0x142d|0x142e|0x142f|0x1430|0x1431|0x1432|0x1433|0x1434|0x1435|0x1436|0x1437|0x1438|0x1439|0x143a|0x143b|0x143c|0x143d|0x143e|0x143f|0x1446|0x1464|0x1465|0x14ac|0x14c9|0x14d1|0x14fe|0x1505|0x1506|0x1520|0x1521)"; + action "kldload -n u3g"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x12d1"; + match "product" "0x155b"; + action "kldload -n if_cdce"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x12d1"; + match "product" "(0x1803|0x1c05|0x1c0b)"; action "kldload -n u3g"; }; @@ -3753,7 +3809,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x1410"; - match "product" "(0x1100|0x1110|0x1120|0x1130|0x1400|0x1410|0x1420|0x1430|0x1450|0x2100|0x2110|0x2120|0x2130|0x2400|0x2410|0x2420|0x4100|0x4400|0x5010|0x5020|0x5041|0x5100|0x6000|0x6002|0x7042)"; + match "product" "(0x1100|0x1110|0x1120|0x1130|0x1400|0x1410|0x1420|0x1430|0x1450|0x2100|0x2110|0x2120|0x2130|0x2400|0x2410|0x2420|0x4100|0x4400|0x5010|0x5020|0x5041|0x5100|0x6000|0x6002|0x7001|0x7031|0x7042)"; action "kldload -n u3g"; }; @@ -4553,7 +4609,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x1cf1"; - match "product" "(0x0001|0x0004)"; + match "product" "(0x0001|0x0004|0x0022)"; action "kldload -n uftdi"; }; @@ -4568,6 +4624,14 @@ nomatch 32 { nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; + match "vendor" "0x1d34"; + match "product" "0x0004"; + action "kldload -n uled"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; match "vendor" "0x1d4d"; match "product" "(0x0002|0x000c|0x000e|0x0010)"; action "kldload -n if_run"; @@ -4633,7 +4697,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x2001"; - match "product" "(0x3307|0x3308|0x3309|0x330a|0x330d)"; + match "product" "(0x3307|0x3308|0x3309|0x330a|0x330d|0x330f)"; action "kldload -n if_urtwn"; }; @@ -4665,7 +4729,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x2001"; - match "product" "(0x3c09|0x3c0a|0x3c15|0x3c1a|0x3c1b|0x3c1f)"; + match "product" "(0x3c09|0x3c0a|0x3c15|0x3c1a|0x3c1b|0x3c1f|0x3c20)"; action "kldload -n if_run"; }; @@ -4689,6 +4753,14 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x2001"; + match "product" "0x4a00"; + action "kldload -n if_axge"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x2001"; match "product" "(0x7e12|0xa805)"; action "kldload -n u3g"; }; @@ -5232,6 +5304,36 @@ nomatch 32 { nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; + match "vendor" "0x12d1"; + match "intclass" "0xff"; + match "intsubclass" "0x02"; + match "intprotocol" "0x16"; + action "kldload -n if_cdce"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x12d1"; + match "intclass" "0xff"; + match "intsubclass" "0x02"; + match "intprotocol" "0x46"; + action "kldload -n if_cdce"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x12d1"; + match "intclass" "0xff"; + match "intsubclass" "0x02"; + match "intprotocol" "0x76"; + action "kldload -n if_cdce"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; match "intclass" "0x02"; match "intsubclass" "0x02"; match "intprotocol" "0x00"; @@ -5399,5 +5501,5 @@ nomatch 32 { action "kldload -n umass"; }; -# 2621 USB entries processed +# 2643 USB entries processed From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 16:43:37 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C61683C1; Thu, 2 Oct 2014 16:43:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A86A0DE4; Thu, 2 Oct 2014 16:43:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92GhbhK077621; Thu, 2 Oct 2014 16:43:37 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92Ghb4g077620; Thu, 2 Oct 2014 16:43:37 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201410021643.s92Ghb4g077620@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 2 Oct 2014 16:43:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r272418 - stable/9/etc/devd X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 16:43:38 -0000 Author: hselasky Date: Thu Oct 2 16:43:37 2014 New Revision: 272418 URL: https://svnweb.freebsd.org/changeset/base/272418 Log: MFC r272253: Regenerate usb.conf Modified: stable/9/etc/devd/usb.conf Directory Properties: stable/9/etc/ (props changed) Modified: stable/9/etc/devd/usb.conf ============================================================================== --- stable/9/etc/devd/usb.conf Thu Oct 2 16:41:43 2014 (r272417) +++ stable/9/etc/devd/usb.conf Thu Oct 2 16:43:37 2014 (r272418) @@ -65,7 +65,23 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x03f0"; - match "product" "(0x2016|0x2116|0x2216|0x3016|0x3116)"; + match "product" "(0x2016|0x2116|0x2216)"; + action "kldload -n uipaq"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x03f0"; + match "product" "(0x241d|0x251d)"; + action "kldload -n u3g"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x03f0"; + match "product" "(0x3016|0x3116)"; action "kldload -n uipaq"; }; @@ -129,7 +145,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0403"; - match "product" "(0x6001|0x6004|0x6006|0x6006|0x6010|0x6011|0x6014|0x6015|0x8372|0x9378|0x9379|0x937a|0x937c|0x9868|0x9e90|0x9f80|0xa6d0|0xabb8|0xb810|0xb811|0xb812|0xbaf8|0xbbe2|0xbca0|0xbca1|0xbca2|0xbca4|0xbcd8|0xbcd9|0xbcda|0xbdc8|0xbfd8|0xbfd9|0xbfda|0xbfdb|0xbfdc|0xc7d0|0xc850|0xc991|0xcaa0|0xcc48|0xcc49|0xcc4a|0xd010|0xd011|0xd012|0xd013|0xd014|0xd015|0xd016|0xd017|0xd070|0xd071|0xd388|0xd389|0xd38a|0xd38b|0xd38c|0xd38d|0xd38e|0xd38f|0xd578|0xd678|0xd738|0xd780|0xdaf8|0xdaf9|0xdafa|0xdafb|0xdafc|0xdafd|0xdafe|0xdaff|0xdc00|0xdc01|0xdd20|0xdf28|0xdf30|0xdf31|0xdf32|0xdf33|0xdf35|0xe000|0xe001|0xe002|0xe004|0xe006|0xe008|0xe009|0xe00a|0xe050|0xe0e8|0xe0e9|0xe0ea|0xe0eb|0xe0ec|0xe0ed|0xe0ee|0xe0ef|0xe0f0|0xe0f1|0xe0f2|0xe0f3|0xe0f4|0xe0f5|0xe0f6|0xe0f7|0xe40b|0xe520|0xe548|0xe6c8|0xe700|0xe729|0xe808|0xe809|0xe80a|0xe80b|0xe80c|0xe80d|0xe80e|0xe80f|0xe888|0xe889|0xe88a|0xe88b|0xe88c|0xe88d|0xe88e|0xe88f|0xea90|0xebe0|0xec88|0xec89|0xed22|0xed71|0xed72|0xed73|0xed74|0xee18|0xeee 8|0xeee9|0xeeea|0xeeeb|0xeeec|0xeeed|0xeeee|0xeeef|0xef50|0xef51|0xf068|0xf069|0xf06a|0xf06b|0xf06c|0xf06d|0xf06e|0xf06f|0xf070|0xf0c0|0xf0c8|0xf208|0xf2d0|0xf3c0|0xf3c1|0xf3c2|0xf448|0xf449|0xf44a|0xf44b|0xf44c|0xf460|0xf608|0xf60b|0xf680|0xf850|0xf857|0xf9d0|0xf9d1|0xf9d2|0xf9d3|0xf9d4|0xf9d5|0xfa00|0xfa01|0xfa02|0xfa03|0xfa04|0xfa05|0xfa06|0xfa10|0xfa33|0xfa88|0xfad0|0xfaf0|0xfb58|0xfb59|0xfb5a|0xfb5b|0xfb5c|0xfb5d|0xfb5e|0xfb5f|0xfb80|0xfb99|0xfbfa|0xfc08|0xfc09|0xfc0a|0xfc0b|0xfc0c|0xfc0d|0xfc0e|0xfc0f|0xfc60|0xfc70|0xfc71|0xfc72|0xfc73|0xfc82|0xfd60|0xfe38|0xff00|0xff18|0xff1c|0xff1d|0xff20|0xff38|0xff39|0xff3a|0xff3b|0xff3c|0xff3d|0xff3e|0xff3f|0xffa8)"; + match "product" "(0x6001|0x6004|0x6006|0x6006|0x6010|0x6011|0x6014|0x6015|0x8372|0x9378|0x9379|0x937a|0x937c|0x9868|0x9e90|0x9f80|0xa6d0|0xa6d1|0xabb8|0xb810|0xb811|0xb812|0xbaf8|0xbbe2|0xbca0|0xbca1|0xbca2|0xbca4|0xbcd8|0xbcd9|0xbcda|0xbdc8|0xbfd8|0xbfd9|0xbfda|0xbfdb|0xbfdc|0xc7d0|0xc850|0xc991|0xcaa0|0xcc48|0xcc49|0xcc4a|0xd010|0xd011|0xd012|0xd013|0xd014|0xd015|0xd016|0xd017|0xd070|0xd071|0xd388|0xd389|0xd38a|0xd38b|0xd38c|0xd38d|0xd38e|0xd38f|0xd578|0xd678|0xd738|0xd780|0xdaf8|0xdaf9|0xdafa|0xdafb|0xdafc|0xdafd|0xdafe|0xdaff|0xdc00|0xdc01|0xdd20|0xdf28|0xdf30|0xdf31|0xdf32|0xdf33|0xdf35|0xe000|0xe001|0xe002|0xe004|0xe006|0xe008|0xe009|0xe00a|0xe050|0xe0e8|0xe0e9|0xe0ea|0xe0eb|0xe0ec|0xe0ed|0xe0ee|0xe0ef|0xe0f0|0xe0f1|0xe0f2|0xe0f3|0xe0f4|0xe0f5|0xe0f6|0xe0f7|0xe40b|0xe520|0xe548|0xe6c8|0xe700|0xe729|0xe808|0xe809|0xe80a|0xe80b|0xe80c|0xe80d|0xe80e|0xe80f|0xe888|0xe889|0xe88a|0xe88b|0xe88c|0xe88d|0xe88e|0xe88f|0xea90|0xebe0|0xec88|0xec89|0xed22|0xed71|0xed72|0xed73|0xed74|0xee1 8|0xeee8|0xeee9|0xeeea|0xeeeb|0xeeec|0xeeed|0xeeee|0xeeef|0xef50|0xef51|0xf068|0xf069|0xf06a|0xf06b|0xf06c|0xf06d|0xf06e|0xf06f|0xf070|0xf0c0|0xf0c8|0xf208|0xf2d0|0xf3c0|0xf3c1|0xf3c2|0xf448|0xf449|0xf44a|0xf44b|0xf44c|0xf460|0xf608|0xf60b|0xf680|0xf850|0xf857|0xf9d0|0xf9d1|0xf9d2|0xf9d3|0xf9d4|0xf9d5|0xfa00|0xfa01|0xfa02|0xfa03|0xfa04|0xfa05|0xfa06|0xfa10|0xfa33|0xfa88|0xfad0|0xfaf0|0xfb58|0xfb59|0xfb5a|0xfb5b|0xfb5c|0xfb5d|0xfb5e|0xfb5f|0xfb80|0xfb99|0xfbfa|0xfc08|0xfc09|0xfc0a|0xfc0b|0xfc0c|0xfc0d|0xfc0e|0xfc0f|0xfc60|0xfc70|0xfc71|0xfc72|0xfc73|0xfc82|0xfd60|0xfe38|0xff00|0xff18|0xff1c|0xff1d|0xff20|0xff38|0xff39|0xff3a|0xff3b|0xff3c|0xff3d|0xff3e|0xff3f|0xffa8)"; action "kldload -n uftdi"; }; @@ -1057,7 +1073,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0586"; - match "product" "(0x3416|0x341a)"; + match "product" "(0x3416|0x341a|0x341e)"; action "kldload -n if_run"; }; @@ -1097,7 +1113,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x05ac"; - match "product" "(0x020d|0x020e|0x020f|0x0215|0x0217|0x0218|0x0219|0x021a|0x021b|0x021c)"; + match "product" "(0x020d|0x020e|0x020f|0x0210|0x0214|0x0215|0x0216|0x0217|0x0218|0x0219|0x021a|0x021b|0x021c)"; action "kldload -n atp"; }; @@ -2353,7 +2369,23 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0b05"; - match "product" "(0x17b5|0x17cb)"; + match "product" "0x17b5"; + action "kldload -n ng_ubt"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0b05"; + match "product" "0x17ba"; + action "kldload -n if_urtwn"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0b05"; + match "product" "0x17cb"; action "kldload -n ng_ubt"; }; @@ -2481,7 +2513,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0bda"; - match "product" "(0x018a|0x317f)"; + match "product" "(0x0179|0x018a|0x317f)"; action "kldload -n if_urtwn"; }; @@ -2513,7 +2545,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0bda"; - match "product" "(0x8176|0x8176|0x8177|0x8178|0x817a|0x817b|0x817c|0x817d|0x817e)"; + match "product" "(0x8176|0x8176|0x8177|0x8178|0x8179|0x817a|0x817b|0x817c|0x817d|0x817e)"; action "kldload -n if_urtwn"; }; @@ -2929,6 +2961,14 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0df6"; + match "product" "0x0072"; + action "kldload -n if_axge"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0df6"; match "product" "0x061c"; action "kldload -n if_axe"; }; @@ -3577,7 +3617,23 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x12d1"; - match "product" "(0x1001|0x1003|0x1004|0x1401|0x1402|0x1403|0x1404|0x1405|0x1406|0x1407|0x1408|0x1409|0x140a|0x140b|0x140c|0x140d|0x140e|0x140f|0x1410|0x1411|0x1412|0x1413|0x1414|0x1415|0x1416|0x1417|0x1418|0x1419|0x141a|0x141b|0x141c|0x141d|0x141e|0x141f|0x1420|0x1421|0x1422|0x1423|0x1424|0x1425|0x1426|0x1427|0x1428|0x1429|0x142a|0x142b|0x142c|0x142d|0x142e|0x142f|0x1430|0x1431|0x1432|0x1433|0x1434|0x1435|0x1436|0x1437|0x1438|0x1439|0x143a|0x143b|0x143c|0x143d|0x143e|0x143f|0x1446|0x1464|0x1465|0x14ac|0x14c9|0x14d1|0x14fe|0x1505|0x1506|0x1520|0x1521|0x1803|0x1c05|0x1c0b)"; + match "product" "(0x1001|0x1003|0x1004|0x1401|0x1402|0x1403|0x1404|0x1405|0x1406|0x1407|0x1408|0x1409|0x140a|0x140b|0x140c|0x140d|0x140e|0x140f|0x1410|0x1411|0x1412|0x1413|0x1414|0x1415|0x1416|0x1417|0x1418|0x1419|0x141a|0x141b|0x141c|0x141d|0x141e|0x141f|0x1420|0x1421|0x1422|0x1423|0x1424|0x1425|0x1426|0x1427|0x1428|0x1429|0x142a|0x142b|0x142c|0x142d|0x142e|0x142f|0x1430|0x1431|0x1432|0x1433|0x1434|0x1435|0x1436|0x1437|0x1438|0x1439|0x143a|0x143b|0x143c|0x143d|0x143e|0x143f|0x1446|0x1464|0x1465|0x14ac|0x14c9|0x14d1|0x14fe|0x1505|0x1506|0x1520|0x1521)"; + action "kldload -n u3g"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x12d1"; + match "product" "0x155b"; + action "kldload -n if_cdce"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x12d1"; + match "product" "(0x1803|0x1c05|0x1c0b)"; action "kldload -n u3g"; }; @@ -3753,7 +3809,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x1410"; - match "product" "(0x1100|0x1110|0x1120|0x1130|0x1400|0x1410|0x1420|0x1430|0x1450|0x2100|0x2110|0x2120|0x2130|0x2400|0x2410|0x2420|0x4100|0x4400|0x5010|0x5020|0x5041|0x5100|0x6000|0x6002|0x7042)"; + match "product" "(0x1100|0x1110|0x1120|0x1130|0x1400|0x1410|0x1420|0x1430|0x1450|0x2100|0x2110|0x2120|0x2130|0x2400|0x2410|0x2420|0x4100|0x4400|0x5010|0x5020|0x5041|0x5100|0x6000|0x6002|0x7001|0x7031|0x7042)"; action "kldload -n u3g"; }; @@ -4553,7 +4609,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x1cf1"; - match "product" "(0x0001|0x0004)"; + match "product" "(0x0001|0x0004|0x0022)"; action "kldload -n uftdi"; }; @@ -4568,6 +4624,14 @@ nomatch 32 { nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; + match "vendor" "0x1d34"; + match "product" "0x0004"; + action "kldload -n uled"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; match "vendor" "0x1d4d"; match "product" "(0x0002|0x000c|0x000e|0x0010)"; action "kldload -n if_run"; @@ -4633,7 +4697,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x2001"; - match "product" "(0x3307|0x3308|0x3309|0x330a|0x330d)"; + match "product" "(0x3307|0x3308|0x3309|0x330a|0x330d|0x330f)"; action "kldload -n if_urtwn"; }; @@ -4665,7 +4729,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x2001"; - match "product" "(0x3c09|0x3c0a|0x3c15|0x3c1a|0x3c1b|0x3c1f)"; + match "product" "(0x3c09|0x3c0a|0x3c15|0x3c1a|0x3c1b|0x3c1f|0x3c20)"; action "kldload -n if_run"; }; @@ -4689,6 +4753,14 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x2001"; + match "product" "0x4a00"; + action "kldload -n if_axge"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x2001"; match "product" "(0x7e12|0xa805)"; action "kldload -n u3g"; }; @@ -5232,6 +5304,36 @@ nomatch 32 { nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; + match "vendor" "0x12d1"; + match "intclass" "0xff"; + match "intsubclass" "0x02"; + match "intprotocol" "0x16"; + action "kldload -n if_cdce"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x12d1"; + match "intclass" "0xff"; + match "intsubclass" "0x02"; + match "intprotocol" "0x46"; + action "kldload -n if_cdce"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x12d1"; + match "intclass" "0xff"; + match "intsubclass" "0x02"; + match "intprotocol" "0x76"; + action "kldload -n if_cdce"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; match "intclass" "0x02"; match "intsubclass" "0x02"; match "intprotocol" "0x00"; @@ -5399,5 +5501,5 @@ nomatch 32 { action "kldload -n umass"; }; -# 2621 USB entries processed +# 2643 USB entries processed From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 16:48:06 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 20EE663C; Thu, 2 Oct 2014 16:48:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0C852E22; Thu, 2 Oct 2014 16:48:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92Gm5ax078441; Thu, 2 Oct 2014 16:48:05 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92Gm5j3078439; Thu, 2 Oct 2014 16:48:05 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201410021648.s92Gm5j3078439@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 2 Oct 2014 16:48:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r272420 - stable/9/sys/dev/sound/usb X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 16:48:06 -0000 Author: hselasky Date: Thu Oct 2 16:48:05 2014 New Revision: 272420 URL: https://svnweb.freebsd.org/changeset/base/272420 Log: MFC r272254: Instead of creating the full range of possible ports, try to figure out the actual number of so-called "embedded jacks" which are present when a USB MIDI device is attaching. Modified: stable/9/sys/dev/sound/usb/uaudio.c stable/9/sys/dev/sound/usb/uaudioreg.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/sound/usb/uaudio.c ============================================================================== --- stable/9/sys/dev/sound/usb/uaudio.c Thu Oct 2 16:45:00 2014 (r272419) +++ stable/9/sys/dev/sound/usb/uaudio.c Thu Oct 2 16:48:05 2014 (r272420) @@ -238,7 +238,7 @@ struct uaudio_chan { #define UAUDIO_SYNC_LESS 2 }; -#define UMIDI_CABLES_MAX 16 /* units */ +#define UMIDI_EMB_JACK_MAX 16 /* units */ #define UMIDI_TX_FRAMES 256 /* units */ #define UMIDI_TX_BUFFER (UMIDI_TX_FRAMES * 4) /* bytes */ @@ -269,7 +269,7 @@ struct umidi_sub_chan { struct umidi_chan { - struct umidi_sub_chan sub[UMIDI_CABLES_MAX]; + struct umidi_sub_chan sub[UMIDI_EMB_JACK_MAX]; struct mtx mtx; struct usb_xfer *xfer[UMIDI_N_TRANSFER]; @@ -281,7 +281,7 @@ struct umidi_chan { uint8_t write_open_refcount; uint8_t curr_cable; - uint8_t max_cable; + uint8_t max_emb_jack; uint8_t valid; uint8_t single_command; }; @@ -1487,6 +1487,7 @@ uaudio_chan_fill_info_sub(struct uaudio_ union uaudio_asid asid = { NULL }; union uaudio_asf1d asf1d = { NULL }; union uaudio_sed sed = { NULL }; + struct usb_midi_streaming_endpoint_descriptor *msid = NULL; usb_endpoint_descriptor_audio_t *ed1 = NULL; const struct usb_audio_control_descriptor *acdp = NULL; struct usb_config_descriptor *cd = usbd_get_config_descriptor(udev); @@ -1504,6 +1505,7 @@ uaudio_chan_fill_info_sub(struct uaudio_ uint8_t bChannels; uint8_t bBitResolution; uint8_t audio_if = 0; + uint8_t midi_if = 0; uint8_t uma_if_class; while ((desc = usb_desc_foreach(cd, desc))) { @@ -1539,7 +1541,8 @@ uaudio_chan_fill_info_sub(struct uaudio_ ((id->bInterfaceClass == UICLASS_VENDOR) && (sc->sc_uq_au_vendor_class != 0))); - if ((uma_if_class != 0) && (id->bInterfaceSubClass == UISUBCLASS_AUDIOSTREAM)) { + if ((uma_if_class != 0) && + (id->bInterfaceSubClass == UISUBCLASS_AUDIOSTREAM)) { audio_if = 1; } else { audio_if = 0; @@ -1551,13 +1554,16 @@ uaudio_chan_fill_info_sub(struct uaudio_ /* * XXX could allow multiple MIDI interfaces */ + midi_if = 1; if ((sc->sc_midi_chan.valid == 0) && - usbd_get_iface(udev, curidx)) { + (usbd_get_iface(udev, curidx) != NULL)) { sc->sc_midi_chan.iface_index = curidx; sc->sc_midi_chan.iface_alt_index = alt_index; sc->sc_midi_chan.valid = 1; } + } else { + midi_if = 0; } asid.v1 = NULL; asf1d.v1 = NULL; @@ -1566,14 +1572,25 @@ uaudio_chan_fill_info_sub(struct uaudio_ } if (audio_if == 0) { - if ((acdp == NULL) && - (desc->bDescriptorType == UDESC_CS_INTERFACE) && - (desc->bDescriptorSubtype == UDESCSUB_AC_HEADER) && - (desc->bLength >= sizeof(*acdp))) { - acdp = (void *)desc; - audio_rev = UGETW(acdp->bcdADC); - } + if (midi_if == 0) { + if ((acdp == NULL) && + (desc->bDescriptorType == UDESC_CS_INTERFACE) && + (desc->bDescriptorSubtype == UDESCSUB_AC_HEADER) && + (desc->bLength >= sizeof(*acdp))) { + acdp = (void *)desc; + audio_rev = UGETW(acdp->bcdADC); + } + } else { + msid = (void *)desc; + /* get the maximum number of embedded jacks in use, if any */ + if (msid->bLength >= sizeof(*msid) && + msid->bDescriptorType == UDESC_CS_ENDPOINT && + msid->bDescriptorSubtype == MS_GENERAL && + msid->bNumEmbMIDIJack > sc->sc_midi_chan.max_emb_jack) { + sc->sc_midi_chan.max_emb_jack = msid->bNumEmbMIDIJack; + } + } /* * Don't collect any USB audio descriptors if * this is not an USB audio stream interface. @@ -5225,8 +5242,7 @@ umidi_bulk_read_callback(struct usb_xfer */ sub = &chan->sub[cn]; - if ((cmd_len != 0) && - (cn < chan->max_cable) && + if ((cmd_len != 0) && (cn < chan->max_emb_jack) && (sub->read_open != 0)) { /* Send data to the application */ @@ -5462,7 +5478,7 @@ tr_setup: } chan->curr_cable++; - if (chan->curr_cable >= chan->max_cable) + if (chan->curr_cable >= chan->max_emb_jack) chan->curr_cable = 0; if (chan->curr_cable == start_cable) { @@ -5499,7 +5515,7 @@ umidi_sub_by_fifo(struct usb_fifo *fifo) struct umidi_sub_chan *sub; uint32_t n; - for (n = 0; n < UMIDI_CABLES_MAX; n++) { + for (n = 0; n < UMIDI_EMB_JACK_MAX; n++) { sub = &chan->sub[n]; if ((sub->fifo.fp[USB_FIFO_RX] == fifo) || (sub->fifo.fp[USB_FIFO_TX] == fifo)) { @@ -5682,12 +5698,12 @@ umidi_probe(device_t dev) if (chan->single_command != 0) device_printf(dev, "Single command MIDI quirk enabled\n"); - if ((chan->max_cable > UMIDI_CABLES_MAX) || - (chan->max_cable == 0)) { - chan->max_cable = UMIDI_CABLES_MAX; + if ((chan->max_emb_jack == 0) || + (chan->max_emb_jack > UMIDI_EMB_JACK_MAX)) { + chan->max_emb_jack = UMIDI_EMB_JACK_MAX; } - for (n = 0; n < chan->max_cable; n++) { + for (n = 0; n < chan->max_emb_jack; n++) { sub = &chan->sub[n]; @@ -5725,9 +5741,8 @@ umidi_detach(device_t dev) struct umidi_chan *chan = &sc->sc_midi_chan; uint32_t n; - for (n = 0; n < UMIDI_CABLES_MAX; n++) { + for (n = 0; n < UMIDI_EMB_JACK_MAX; n++) usb_fifo_detach(&chan->sub[n].fifo); - } mtx_lock(&chan->mtx); Modified: stable/9/sys/dev/sound/usb/uaudioreg.h ============================================================================== --- stable/9/sys/dev/sound/usb/uaudioreg.h Thu Oct 2 16:45:00 2014 (r272419) +++ stable/9/sys/dev/sound/usb/uaudioreg.h Thu Oct 2 16:48:05 2014 (r272420) @@ -119,6 +119,13 @@ struct usb_audio_streaming_endpoint_desc uWord wLockDelay; } __packed; +struct usb_midi_streaming_endpoint_descriptor { + uByte bLength; + uByte bDescriptorType; + uByte bDescriptorSubtype; + uByte bNumEmbMIDIJack; +} __packed; + struct usb_audio_streaming_type1_descriptor { uByte bLength; uByte bDescriptorType; @@ -378,6 +385,7 @@ struct usb_audio_extension_unit_1 { #define MASTER_CHAN 0 +#define MS_GENERAL 1 #define AS_GENERAL 1 #define FORMAT_TYPE 2 #define FORMAT_SPECIFIC 3 From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 16:49:24 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2539377F; Thu, 2 Oct 2014 16:49:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 10B32E2B; Thu, 2 Oct 2014 16:49:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92GnNdx078653; Thu, 2 Oct 2014 16:49:23 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92GnNIv078651; Thu, 2 Oct 2014 16:49:23 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201410021649.s92GnNIv078651@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 2 Oct 2014 16:49:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r272421 - stable/8/sys/dev/sound/usb X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 16:49:24 -0000 Author: hselasky Date: Thu Oct 2 16:49:22 2014 New Revision: 272421 URL: https://svnweb.freebsd.org/changeset/base/272421 Log: MFC r272254: Instead of creating the full range of possible ports, try to figure out the actual number of so-called "embedded jacks" which are present when a USB MIDI device is attaching. Modified: stable/8/sys/dev/sound/usb/uaudio.c stable/8/sys/dev/sound/usb/uaudioreg.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/sound/ (props changed) stable/8/sys/dev/sound/usb/ (props changed) Modified: stable/8/sys/dev/sound/usb/uaudio.c ============================================================================== --- stable/8/sys/dev/sound/usb/uaudio.c Thu Oct 2 16:48:05 2014 (r272420) +++ stable/8/sys/dev/sound/usb/uaudio.c Thu Oct 2 16:49:22 2014 (r272421) @@ -238,7 +238,7 @@ struct uaudio_chan { #define UAUDIO_SYNC_LESS 2 }; -#define UMIDI_CABLES_MAX 16 /* units */ +#define UMIDI_EMB_JACK_MAX 16 /* units */ #define UMIDI_TX_FRAMES 256 /* units */ #define UMIDI_TX_BUFFER (UMIDI_TX_FRAMES * 4) /* bytes */ @@ -269,7 +269,7 @@ struct umidi_sub_chan { struct umidi_chan { - struct umidi_sub_chan sub[UMIDI_CABLES_MAX]; + struct umidi_sub_chan sub[UMIDI_EMB_JACK_MAX]; struct mtx mtx; struct usb_xfer *xfer[UMIDI_N_TRANSFER]; @@ -281,7 +281,7 @@ struct umidi_chan { uint8_t write_open_refcount; uint8_t curr_cable; - uint8_t max_cable; + uint8_t max_emb_jack; uint8_t valid; uint8_t single_command; }; @@ -1487,6 +1487,7 @@ uaudio_chan_fill_info_sub(struct uaudio_ union uaudio_asid asid = { NULL }; union uaudio_asf1d asf1d = { NULL }; union uaudio_sed sed = { NULL }; + struct usb_midi_streaming_endpoint_descriptor *msid = NULL; usb_endpoint_descriptor_audio_t *ed1 = NULL; const struct usb_audio_control_descriptor *acdp = NULL; struct usb_config_descriptor *cd = usbd_get_config_descriptor(udev); @@ -1504,6 +1505,7 @@ uaudio_chan_fill_info_sub(struct uaudio_ uint8_t bChannels; uint8_t bBitResolution; uint8_t audio_if = 0; + uint8_t midi_if = 0; uint8_t uma_if_class; while ((desc = usb_desc_foreach(cd, desc))) { @@ -1539,7 +1541,8 @@ uaudio_chan_fill_info_sub(struct uaudio_ ((id->bInterfaceClass == UICLASS_VENDOR) && (sc->sc_uq_au_vendor_class != 0))); - if ((uma_if_class != 0) && (id->bInterfaceSubClass == UISUBCLASS_AUDIOSTREAM)) { + if ((uma_if_class != 0) && + (id->bInterfaceSubClass == UISUBCLASS_AUDIOSTREAM)) { audio_if = 1; } else { audio_if = 0; @@ -1551,13 +1554,16 @@ uaudio_chan_fill_info_sub(struct uaudio_ /* * XXX could allow multiple MIDI interfaces */ + midi_if = 1; if ((sc->sc_midi_chan.valid == 0) && - usbd_get_iface(udev, curidx)) { + (usbd_get_iface(udev, curidx) != NULL)) { sc->sc_midi_chan.iface_index = curidx; sc->sc_midi_chan.iface_alt_index = alt_index; sc->sc_midi_chan.valid = 1; } + } else { + midi_if = 0; } asid.v1 = NULL; asf1d.v1 = NULL; @@ -1566,14 +1572,25 @@ uaudio_chan_fill_info_sub(struct uaudio_ } if (audio_if == 0) { - if ((acdp == NULL) && - (desc->bDescriptorType == UDESC_CS_INTERFACE) && - (desc->bDescriptorSubtype == UDESCSUB_AC_HEADER) && - (desc->bLength >= sizeof(*acdp))) { - acdp = (void *)desc; - audio_rev = UGETW(acdp->bcdADC); - } + if (midi_if == 0) { + if ((acdp == NULL) && + (desc->bDescriptorType == UDESC_CS_INTERFACE) && + (desc->bDescriptorSubtype == UDESCSUB_AC_HEADER) && + (desc->bLength >= sizeof(*acdp))) { + acdp = (void *)desc; + audio_rev = UGETW(acdp->bcdADC); + } + } else { + msid = (void *)desc; + /* get the maximum number of embedded jacks in use, if any */ + if (msid->bLength >= sizeof(*msid) && + msid->bDescriptorType == UDESC_CS_ENDPOINT && + msid->bDescriptorSubtype == MS_GENERAL && + msid->bNumEmbMIDIJack > sc->sc_midi_chan.max_emb_jack) { + sc->sc_midi_chan.max_emb_jack = msid->bNumEmbMIDIJack; + } + } /* * Don't collect any USB audio descriptors if * this is not an USB audio stream interface. @@ -5225,8 +5242,7 @@ umidi_bulk_read_callback(struct usb_xfer */ sub = &chan->sub[cn]; - if ((cmd_len != 0) && - (cn < chan->max_cable) && + if ((cmd_len != 0) && (cn < chan->max_emb_jack) && (sub->read_open != 0)) { /* Send data to the application */ @@ -5462,7 +5478,7 @@ tr_setup: } chan->curr_cable++; - if (chan->curr_cable >= chan->max_cable) + if (chan->curr_cable >= chan->max_emb_jack) chan->curr_cable = 0; if (chan->curr_cable == start_cable) { @@ -5499,7 +5515,7 @@ umidi_sub_by_fifo(struct usb_fifo *fifo) struct umidi_sub_chan *sub; uint32_t n; - for (n = 0; n < UMIDI_CABLES_MAX; n++) { + for (n = 0; n < UMIDI_EMB_JACK_MAX; n++) { sub = &chan->sub[n]; if ((sub->fifo.fp[USB_FIFO_RX] == fifo) || (sub->fifo.fp[USB_FIFO_TX] == fifo)) { @@ -5682,12 +5698,12 @@ umidi_probe(device_t dev) if (chan->single_command != 0) device_printf(dev, "Single command MIDI quirk enabled\n"); - if ((chan->max_cable > UMIDI_CABLES_MAX) || - (chan->max_cable == 0)) { - chan->max_cable = UMIDI_CABLES_MAX; + if ((chan->max_emb_jack == 0) || + (chan->max_emb_jack > UMIDI_EMB_JACK_MAX)) { + chan->max_emb_jack = UMIDI_EMB_JACK_MAX; } - for (n = 0; n < chan->max_cable; n++) { + for (n = 0; n < chan->max_emb_jack; n++) { sub = &chan->sub[n]; @@ -5725,9 +5741,8 @@ umidi_detach(device_t dev) struct umidi_chan *chan = &sc->sc_midi_chan; uint32_t n; - for (n = 0; n < UMIDI_CABLES_MAX; n++) { + for (n = 0; n < UMIDI_EMB_JACK_MAX; n++) usb_fifo_detach(&chan->sub[n].fifo); - } mtx_lock(&chan->mtx); Modified: stable/8/sys/dev/sound/usb/uaudioreg.h ============================================================================== --- stable/8/sys/dev/sound/usb/uaudioreg.h Thu Oct 2 16:48:05 2014 (r272420) +++ stable/8/sys/dev/sound/usb/uaudioreg.h Thu Oct 2 16:49:22 2014 (r272421) @@ -119,6 +119,13 @@ struct usb_audio_streaming_endpoint_desc uWord wLockDelay; } __packed; +struct usb_midi_streaming_endpoint_descriptor { + uByte bLength; + uByte bDescriptorType; + uByte bDescriptorSubtype; + uByte bNumEmbMIDIJack; +} __packed; + struct usb_audio_streaming_type1_descriptor { uByte bLength; uByte bDescriptorType; @@ -378,6 +385,7 @@ struct usb_audio_extension_unit_1 { #define MASTER_CHAN 0 +#define MS_GENERAL 1 #define AS_GENERAL 1 #define FORMAT_TYPE 2 #define FORMAT_SPECIFIC 3 From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 16:56:00 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CF8A4AD2; Thu, 2 Oct 2014 16:56:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BB805F0E; Thu, 2 Oct 2014 16:56:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92Gu0P5082962; Thu, 2 Oct 2014 16:56:00 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92Gu0qi082961; Thu, 2 Oct 2014 16:56:00 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201410021656.s92Gu0qi082961@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 2 Oct 2014 16:56:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272422 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 16:56:00 -0000 Author: hselasky Date: Thu Oct 2 16:56:00 2014 New Revision: 272422 URL: https://svnweb.freebsd.org/changeset/base/272422 Log: Make sure we always set the maximum number of valid contexts. MFC after: 3 days Modified: head/sys/dev/usb/controller/xhci.c Modified: head/sys/dev/usb/controller/xhci.c ============================================================================== --- head/sys/dev/usb/controller/xhci.c Thu Oct 2 16:49:22 2014 (r272421) +++ head/sys/dev/usb/controller/xhci.c Thu Oct 2 16:56:00 2014 (r272422) @@ -2271,14 +2271,17 @@ xhci_configure_mask(struct usb_device *u /* adjust */ x--; - /* figure out maximum */ - if (x > sc->sc_hw.devs[index].context_num) { + /* figure out the maximum number of contexts */ + if (x > sc->sc_hw.devs[index].context_num) sc->sc_hw.devs[index].context_num = x; - temp = xhci_ctx_get_le32(sc, &pinp->ctx_slot.dwSctx0); - temp &= ~XHCI_SCTX_0_CTX_NUM_SET(31); - temp |= XHCI_SCTX_0_CTX_NUM_SET(x + 1); - xhci_ctx_set_le32(sc, &pinp->ctx_slot.dwSctx0, temp); - } + else + x = sc->sc_hw.devs[index].context_num; + + /* update number of contexts */ + temp = xhci_ctx_get_le32(sc, &pinp->ctx_slot.dwSctx0); + temp &= ~XHCI_SCTX_0_CTX_NUM_SET(31); + temp |= XHCI_SCTX_0_CTX_NUM_SET(x + 1); + xhci_ctx_set_le32(sc, &pinp->ctx_slot.dwSctx0, temp); } return (0); } From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 16:57:45 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8D4CDC3E; Thu, 2 Oct 2014 16:57:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 788AEF2D; Thu, 2 Oct 2014 16:57:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92Gvjr7083237; Thu, 2 Oct 2014 16:57:45 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92GvjDe083235; Thu, 2 Oct 2014 16:57:45 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201410021657.s92GvjDe083235@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 2 Oct 2014 16:57:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272423 - stable/10/sys/dev/sound/usb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 16:57:45 -0000 Author: hselasky Date: Thu Oct 2 16:57:44 2014 New Revision: 272423 URL: https://svnweb.freebsd.org/changeset/base/272423 Log: MFC r272254: Instead of creating the full range of possible ports, try to figure out the actual number of so-called "embedded jacks" which are present when a USB MIDI device is attaching. Approved by: re, gjb Modified: stable/10/sys/dev/sound/usb/uaudio.c stable/10/sys/dev/sound/usb/uaudioreg.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sound/usb/uaudio.c ============================================================================== --- stable/10/sys/dev/sound/usb/uaudio.c Thu Oct 2 16:56:00 2014 (r272422) +++ stable/10/sys/dev/sound/usb/uaudio.c Thu Oct 2 16:57:44 2014 (r272423) @@ -238,7 +238,7 @@ struct uaudio_chan { #define UAUDIO_SYNC_LESS 2 }; -#define UMIDI_CABLES_MAX 16 /* units */ +#define UMIDI_EMB_JACK_MAX 16 /* units */ #define UMIDI_TX_FRAMES 256 /* units */ #define UMIDI_TX_BUFFER (UMIDI_TX_FRAMES * 4) /* bytes */ @@ -269,7 +269,7 @@ struct umidi_sub_chan { struct umidi_chan { - struct umidi_sub_chan sub[UMIDI_CABLES_MAX]; + struct umidi_sub_chan sub[UMIDI_EMB_JACK_MAX]; struct mtx mtx; struct usb_xfer *xfer[UMIDI_N_TRANSFER]; @@ -281,7 +281,7 @@ struct umidi_chan { uint8_t write_open_refcount; uint8_t curr_cable; - uint8_t max_cable; + uint8_t max_emb_jack; uint8_t valid; uint8_t single_command; }; @@ -1487,6 +1487,7 @@ uaudio_chan_fill_info_sub(struct uaudio_ union uaudio_asid asid = { NULL }; union uaudio_asf1d asf1d = { NULL }; union uaudio_sed sed = { NULL }; + struct usb_midi_streaming_endpoint_descriptor *msid = NULL; usb_endpoint_descriptor_audio_t *ed1 = NULL; const struct usb_audio_control_descriptor *acdp = NULL; struct usb_config_descriptor *cd = usbd_get_config_descriptor(udev); @@ -1504,6 +1505,7 @@ uaudio_chan_fill_info_sub(struct uaudio_ uint8_t bChannels; uint8_t bBitResolution; uint8_t audio_if = 0; + uint8_t midi_if = 0; uint8_t uma_if_class; while ((desc = usb_desc_foreach(cd, desc))) { @@ -1539,7 +1541,8 @@ uaudio_chan_fill_info_sub(struct uaudio_ ((id->bInterfaceClass == UICLASS_VENDOR) && (sc->sc_uq_au_vendor_class != 0))); - if ((uma_if_class != 0) && (id->bInterfaceSubClass == UISUBCLASS_AUDIOSTREAM)) { + if ((uma_if_class != 0) && + (id->bInterfaceSubClass == UISUBCLASS_AUDIOSTREAM)) { audio_if = 1; } else { audio_if = 0; @@ -1551,13 +1554,16 @@ uaudio_chan_fill_info_sub(struct uaudio_ /* * XXX could allow multiple MIDI interfaces */ + midi_if = 1; if ((sc->sc_midi_chan.valid == 0) && - usbd_get_iface(udev, curidx)) { + (usbd_get_iface(udev, curidx) != NULL)) { sc->sc_midi_chan.iface_index = curidx; sc->sc_midi_chan.iface_alt_index = alt_index; sc->sc_midi_chan.valid = 1; } + } else { + midi_if = 0; } asid.v1 = NULL; asf1d.v1 = NULL; @@ -1566,14 +1572,25 @@ uaudio_chan_fill_info_sub(struct uaudio_ } if (audio_if == 0) { - if ((acdp == NULL) && - (desc->bDescriptorType == UDESC_CS_INTERFACE) && - (desc->bDescriptorSubtype == UDESCSUB_AC_HEADER) && - (desc->bLength >= sizeof(*acdp))) { - acdp = (void *)desc; - audio_rev = UGETW(acdp->bcdADC); - } + if (midi_if == 0) { + if ((acdp == NULL) && + (desc->bDescriptorType == UDESC_CS_INTERFACE) && + (desc->bDescriptorSubtype == UDESCSUB_AC_HEADER) && + (desc->bLength >= sizeof(*acdp))) { + acdp = (void *)desc; + audio_rev = UGETW(acdp->bcdADC); + } + } else { + msid = (void *)desc; + /* get the maximum number of embedded jacks in use, if any */ + if (msid->bLength >= sizeof(*msid) && + msid->bDescriptorType == UDESC_CS_ENDPOINT && + msid->bDescriptorSubtype == MS_GENERAL && + msid->bNumEmbMIDIJack > sc->sc_midi_chan.max_emb_jack) { + sc->sc_midi_chan.max_emb_jack = msid->bNumEmbMIDIJack; + } + } /* * Don't collect any USB audio descriptors if * this is not an USB audio stream interface. @@ -5225,8 +5242,7 @@ umidi_bulk_read_callback(struct usb_xfer */ sub = &chan->sub[cn]; - if ((cmd_len != 0) && - (cn < chan->max_cable) && + if ((cmd_len != 0) && (cn < chan->max_emb_jack) && (sub->read_open != 0)) { /* Send data to the application */ @@ -5462,7 +5478,7 @@ tr_setup: } chan->curr_cable++; - if (chan->curr_cable >= chan->max_cable) + if (chan->curr_cable >= chan->max_emb_jack) chan->curr_cable = 0; if (chan->curr_cable == start_cable) { @@ -5499,7 +5515,7 @@ umidi_sub_by_fifo(struct usb_fifo *fifo) struct umidi_sub_chan *sub; uint32_t n; - for (n = 0; n < UMIDI_CABLES_MAX; n++) { + for (n = 0; n < UMIDI_EMB_JACK_MAX; n++) { sub = &chan->sub[n]; if ((sub->fifo.fp[USB_FIFO_RX] == fifo) || (sub->fifo.fp[USB_FIFO_TX] == fifo)) { @@ -5682,12 +5698,12 @@ umidi_probe(device_t dev) if (chan->single_command != 0) device_printf(dev, "Single command MIDI quirk enabled\n"); - if ((chan->max_cable > UMIDI_CABLES_MAX) || - (chan->max_cable == 0)) { - chan->max_cable = UMIDI_CABLES_MAX; + if ((chan->max_emb_jack == 0) || + (chan->max_emb_jack > UMIDI_EMB_JACK_MAX)) { + chan->max_emb_jack = UMIDI_EMB_JACK_MAX; } - for (n = 0; n < chan->max_cable; n++) { + for (n = 0; n < chan->max_emb_jack; n++) { sub = &chan->sub[n]; @@ -5725,9 +5741,8 @@ umidi_detach(device_t dev) struct umidi_chan *chan = &sc->sc_midi_chan; uint32_t n; - for (n = 0; n < UMIDI_CABLES_MAX; n++) { + for (n = 0; n < UMIDI_EMB_JACK_MAX; n++) usb_fifo_detach(&chan->sub[n].fifo); - } mtx_lock(&chan->mtx); Modified: stable/10/sys/dev/sound/usb/uaudioreg.h ============================================================================== --- stable/10/sys/dev/sound/usb/uaudioreg.h Thu Oct 2 16:56:00 2014 (r272422) +++ stable/10/sys/dev/sound/usb/uaudioreg.h Thu Oct 2 16:57:44 2014 (r272423) @@ -119,6 +119,13 @@ struct usb_audio_streaming_endpoint_desc uWord wLockDelay; } __packed; +struct usb_midi_streaming_endpoint_descriptor { + uByte bLength; + uByte bDescriptorType; + uByte bDescriptorSubtype; + uByte bNumEmbMIDIJack; +} __packed; + struct usb_audio_streaming_type1_descriptor { uByte bLength; uByte bDescriptorType; @@ -378,6 +385,7 @@ struct usb_audio_extension_unit_1 { #define MASTER_CHAN 0 +#define MS_GENERAL 1 #define AS_GENERAL 1 #define FORMAT_TYPE 2 #define FORMAT_SPECIFIC 3 From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 17:19:33 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 98192330; Thu, 2 Oct 2014 17:19:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8177A23A; Thu, 2 Oct 2014 17:19:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92HJX87092987; Thu, 2 Oct 2014 17:19:33 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92HJX9v092986; Thu, 2 Oct 2014 17:19:33 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201410021719.s92HJX9v092986@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Thu, 2 Oct 2014 17:19:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272424 - stable/10/usr.sbin/bsdinstall/scripts X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 17:19:33 -0000 Author: allanjude (doc committer) Date: Thu Oct 2 17:19:32 2014 New Revision: 272424 URL: https://svnweb.freebsd.org/changeset/base/272424 Log: MFC r272274: Change the /var dataset in the default ZFS layout to have the ZFS property canmount=off, making /var/db/pkg part of the / dataset, so installed package files are consistent with the package database when using ZFS boot environments (beadm). PR: 193971 Reviewed by: Shawn Webb, bcr Approved by: re (gjb), jmg Relnotes: yes Sponsored by: ScaleEngine Inc. Modified: stable/10/usr.sbin/bsdinstall/scripts/zfsboot Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bsdinstall/scripts/zfsboot ============================================================================== --- stable/10/usr.sbin/bsdinstall/scripts/zfsboot Thu Oct 2 16:57:44 2014 (r272423) +++ stable/10/usr.sbin/bsdinstall/scripts/zfsboot Thu Oct 2 17:19:32 2014 (r272424) @@ -156,7 +156,7 @@ f_isset ZFSBOOT_DATASETS || ZFSBOOT_DATA /usr/src # Create /var and friends - /var mountpoint=/var + /var mountpoint=/var,canmount=off /var/crash exec=off,setuid=off /var/log exec=off,setuid=off /var/mail atime=on From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 17:41:28 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BF266CEA; Thu, 2 Oct 2014 17:41:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA9927AD; Thu, 2 Oct 2014 17:41:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92HfSbA004334; Thu, 2 Oct 2014 17:41:28 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92HfSCq004333; Thu, 2 Oct 2014 17:41:28 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201410021741.s92HfSCq004333@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 2 Oct 2014 17:41:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272425 - stable/10/sys/cddl/boot/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 17:41:28 -0000 Author: delphij Date: Thu Oct 2 17:41:27 2014 New Revision: 272425 URL: https://svnweb.freebsd.org/changeset/base/272425 Log: MFC r272389: Diff reduction with kernel code: instruct the compiler that the data of these types may be unaligned to their "normal" alignment and exercise caution when accessing them. PR: 194071 Approved by: re (gjb) Modified: stable/10/sys/cddl/boot/zfs/lz4.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/boot/zfs/lz4.c ============================================================================== --- stable/10/sys/cddl/boot/zfs/lz4.c Thu Oct 2 17:19:32 2014 (r272424) +++ stable/10/sys/cddl/boot/zfs/lz4.c Thu Oct 2 17:41:27 2014 (r272425) @@ -83,6 +83,17 @@ lz4_decompress(void *s_start, void *d_st #endif /* + * Unaligned memory access is automatically enabled for "common" CPU, + * such as x86. For others CPU, the compiler will be more cautious, and + * insert extra code to ensure aligned access is respected. If you know + * your target CPU supports unaligned memory access, you may want to + * force this option manually to improve performance + */ +#if defined(__ARM_FEATURE_UNALIGNED) +#define LZ4_FORCE_UNALIGNED_ACCESS 1 +#endif + +/* * Compiler Options */ #if __STDC_VERSION__ >= 199901L /* C99 */ @@ -113,6 +124,10 @@ lz4_decompress(void *s_start, void *d_st #define S32 int32_t #define U64 uint64_t +#ifndef LZ4_FORCE_UNALIGNED_ACCESS +#pragma pack(1) +#endif + typedef struct _U16_S { U16 v; } U16_S; @@ -123,6 +138,10 @@ typedef struct _U64_S { U64 v; } U64_S; +#ifndef LZ4_FORCE_UNALIGNED_ACCESS +#pragma pack() +#endif + #define A64(x) (((U64_S *)(x))->v) #define A32(x) (((U32_S *)(x))->v) #define A16(x) (((U16_S *)(x))->v) From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 17:42:03 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8D4DBE3B; Thu, 2 Oct 2014 17:42:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 792FA7CB; Thu, 2 Oct 2014 17:42:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92Hg3sG006304; Thu, 2 Oct 2014 17:42:03 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92Hg3Kl006303; Thu, 2 Oct 2014 17:42:03 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201410021742.s92Hg3Kl006303@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 2 Oct 2014 17:42:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r272426 - stable/9/sys/cddl/boot/zfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 17:42:03 -0000 Author: delphij Date: Thu Oct 2 17:42:02 2014 New Revision: 272426 URL: https://svnweb.freebsd.org/changeset/base/272426 Log: MFC r272389: Diff reduction with kernel code: instruct the compiler that the data of these types may be unaligned to their "normal" alignment and exercise caution when accessing them. PR: 194071 Modified: stable/9/sys/cddl/boot/zfs/lz4.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cddl/boot/zfs/lz4.c ============================================================================== --- stable/9/sys/cddl/boot/zfs/lz4.c Thu Oct 2 17:41:27 2014 (r272425) +++ stable/9/sys/cddl/boot/zfs/lz4.c Thu Oct 2 17:42:02 2014 (r272426) @@ -83,6 +83,17 @@ lz4_decompress(void *s_start, void *d_st #endif /* + * Unaligned memory access is automatically enabled for "common" CPU, + * such as x86. For others CPU, the compiler will be more cautious, and + * insert extra code to ensure aligned access is respected. If you know + * your target CPU supports unaligned memory access, you may want to + * force this option manually to improve performance + */ +#if defined(__ARM_FEATURE_UNALIGNED) +#define LZ4_FORCE_UNALIGNED_ACCESS 1 +#endif + +/* * Compiler Options */ #if __STDC_VERSION__ >= 199901L /* C99 */ @@ -113,6 +124,10 @@ lz4_decompress(void *s_start, void *d_st #define S32 int32_t #define U64 uint64_t +#ifndef LZ4_FORCE_UNALIGNED_ACCESS +#pragma pack(1) +#endif + typedef struct _U16_S { U16 v; } U16_S; @@ -123,6 +138,10 @@ typedef struct _U64_S { U64 v; } U64_S; +#ifndef LZ4_FORCE_UNALIGNED_ACCESS +#pragma pack() +#endif + #define A64(x) (((U64_S *)(x))->v) #define A32(x) (((U32_S *)(x))->v) #define A16(x) (((U16_S *)(x))->v) From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 17:42:21 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E24E4FBD; Thu, 2 Oct 2014 17:42:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CE3E77D8; Thu, 2 Oct 2014 17:42:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92HgLsO006417; Thu, 2 Oct 2014 17:42:21 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92HgLNb006416; Thu, 2 Oct 2014 17:42:21 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201410021742.s92HgLNb006416@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 2 Oct 2014 17:42:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r272427 - stable/8/sys/cddl/boot/zfs X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 17:42:22 -0000 Author: delphij Date: Thu Oct 2 17:42:21 2014 New Revision: 272427 URL: https://svnweb.freebsd.org/changeset/base/272427 Log: MFC r272389: Diff reduction with kernel code: instruct the compiler that the data of these types may be unaligned to their "normal" alignment and exercise caution when accessing them. PR: 194071 Modified: stable/8/sys/cddl/boot/zfs/lz4.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/cddl/ (props changed) Modified: stable/8/sys/cddl/boot/zfs/lz4.c ============================================================================== --- stable/8/sys/cddl/boot/zfs/lz4.c Thu Oct 2 17:42:02 2014 (r272426) +++ stable/8/sys/cddl/boot/zfs/lz4.c Thu Oct 2 17:42:21 2014 (r272427) @@ -83,6 +83,17 @@ lz4_decompress(void *s_start, void *d_st #endif /* + * Unaligned memory access is automatically enabled for "common" CPU, + * such as x86. For others CPU, the compiler will be more cautious, and + * insert extra code to ensure aligned access is respected. If you know + * your target CPU supports unaligned memory access, you may want to + * force this option manually to improve performance + */ +#if defined(__ARM_FEATURE_UNALIGNED) +#define LZ4_FORCE_UNALIGNED_ACCESS 1 +#endif + +/* * Compiler Options */ #if __STDC_VERSION__ >= 199901L /* C99 */ @@ -113,6 +124,10 @@ lz4_decompress(void *s_start, void *d_st #define S32 int32_t #define U64 uint64_t +#ifndef LZ4_FORCE_UNALIGNED_ACCESS +#pragma pack(1) +#endif + typedef struct _U16_S { U16 v; } U16_S; @@ -123,6 +138,10 @@ typedef struct _U64_S { U64 v; } U64_S; +#ifndef LZ4_FORCE_UNALIGNED_ACCESS +#pragma pack() +#endif + #define A64(x) (((U64_S *)(x))->v) #define A32(x) (((U32_S *)(x))->v) #define A16(x) (((U16_S *)(x))->v) From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 17:58:48 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7D7BF7B9; Thu, 2 Oct 2014 17:58:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 68B57943; Thu, 2 Oct 2014 17:58:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92HwmJ3012081; Thu, 2 Oct 2014 17:58:48 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92HwmGh012080; Thu, 2 Oct 2014 17:58:48 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201410021758.s92HwmGh012080@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 2 Oct 2014 17:58:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272428 - stable/10/usr.sbin/mountd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 17:58:48 -0000 Author: bdrewery Date: Thu Oct 2 17:58:47 2014 New Revision: 272428 URL: https://svnweb.freebsd.org/changeset/base/272428 Log: MFC r270183: Avoid showing stale errors when nmount(2) fails. This should not be documented in relnotes as it still fails due to a race with unmounting, but no longer shows bogus details. Approved by: re (gjb) Modified: stable/10/usr.sbin/mountd/mountd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/mountd/mountd.c ============================================================================== --- stable/10/usr.sbin/mountd/mountd.c Thu Oct 2 17:42:21 2014 (r272427) +++ stable/10/usr.sbin/mountd/mountd.c Thu Oct 2 17:58:47 2014 (r272428) @@ -1744,6 +1744,7 @@ get_exportlist(void) iov[3].iov_len = strlen(fsp->f_mntonname) + 1; iov[5].iov_base = fsp->f_mntfromname; iov[5].iov_len = strlen(fsp->f_mntfromname) + 1; + errmsg[0] = '\0'; if (nmount(iov, iovlen, fsp->f_flags) < 0 && errno != ENOENT && errno != ENOTSUP) { @@ -2501,6 +2502,7 @@ do_mount(struct exportlist *ep, struct g iov[3].iov_len = strlen(fsb->f_mntonname) + 1; iov[5].iov_base = fsb->f_mntfromname; /* "from" */ iov[5].iov_len = strlen(fsb->f_mntfromname) + 1; + errmsg[0] = '\0'; while (nmount(iov, iovlen, fsb->f_flags) < 0) { if (cp) From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 18:00:17 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 94289906; Thu, 2 Oct 2014 18:00:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7F9E8956; Thu, 2 Oct 2014 18:00:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92I0HLt014357; Thu, 2 Oct 2014 18:00:17 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92I0HHX014356; Thu, 2 Oct 2014 18:00:17 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201410021800.s92I0HHX014356@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 2 Oct 2014 18:00:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r272429 - stable/9/usr.sbin/mountd X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 18:00:17 -0000 Author: bdrewery Date: Thu Oct 2 18:00:16 2014 New Revision: 272429 URL: https://svnweb.freebsd.org/changeset/base/272429 Log: MFC r270183: Avoid showing stale errors when nmount(2) fails. Modified: stable/9/usr.sbin/mountd/mountd.c Directory Properties: stable/9/usr.sbin/mountd/ (props changed) Modified: stable/9/usr.sbin/mountd/mountd.c ============================================================================== --- stable/9/usr.sbin/mountd/mountd.c Thu Oct 2 17:58:47 2014 (r272428) +++ stable/9/usr.sbin/mountd/mountd.c Thu Oct 2 18:00:16 2014 (r272429) @@ -1747,6 +1747,7 @@ get_exportlist(void) iov[3].iov_len = strlen(fsp->f_mntonname) + 1; iov[5].iov_base = fsp->f_mntfromname; iov[5].iov_len = strlen(fsp->f_mntfromname) + 1; + errmsg[0] = '\0'; if (nmount(iov, iovlen, fsp->f_flags) < 0 && errno != ENOENT && errno != ENOTSUP) { @@ -2504,6 +2505,7 @@ do_mount(struct exportlist *ep, struct g iov[3].iov_len = strlen(fsb->f_mntonname) + 1; iov[5].iov_base = fsb->f_mntfromname; /* "from" */ iov[5].iov_len = strlen(fsb->f_mntfromname) + 1; + errmsg[0] = '\0'; while (nmount(iov, iovlen, fsb->f_flags) < 0) { if (cp) From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 18:05:01 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9E980ADA; Thu, 2 Oct 2014 18:05:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 89EC3A18; Thu, 2 Oct 2014 18:05:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92I51nk016570; Thu, 2 Oct 2014 18:05:01 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92I5183016569; Thu, 2 Oct 2014 18:05:01 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201410021805.s92I5183016569@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 2 Oct 2014 18:05:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272430 - stable/10/etc/periodic/daily X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 18:05:01 -0000 Author: bdrewery Date: Thu Oct 2 18:05:00 2014 New Revision: 272430 URL: https://svnweb.freebsd.org/changeset/base/272430 Log: MFC r271321: Don't cross mount boundaries when cleaning tmp files. Approved by: re (gjb) Relnotes: yes Modified: stable/10/etc/periodic/daily/110.clean-tmps Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/periodic/daily/110.clean-tmps ============================================================================== --- stable/10/etc/periodic/daily/110.clean-tmps Thu Oct 2 18:00:16 2014 (r272429) +++ stable/10/etc/periodic/daily/110.clean-tmps Thu Oct 2 18:05:00 2014 (r272430) @@ -45,8 +45,8 @@ case "$daily_clean_tmps_enable" in rc=$(for dir in $daily_clean_tmps_dirs do [ ."${dir#/}" != ."$dir" -a -d $dir ] && cd $dir && { - find -d . -type f $args -delete $print - find -d . ! -name . -type d $dargs -delete $print + find -x -d . -type f $args -delete $print + find -x -d . ! -name . -type d $dargs -delete $print } | sed "s,^\\., $dir," done | tee /dev/stderr | wc -l) [ -z "$print" ] && rc=0 From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 18:05:54 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BF60CC19; Thu, 2 Oct 2014 18:05:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA9B2A60; Thu, 2 Oct 2014 18:05:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92I5shm016764; Thu, 2 Oct 2014 18:05:54 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92I5s41016763; Thu, 2 Oct 2014 18:05:54 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201410021805.s92I5s41016763@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 2 Oct 2014 18:05:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r272431 - stable/9/etc/periodic/daily X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 18:05:54 -0000 Author: bdrewery Date: Thu Oct 2 18:05:53 2014 New Revision: 272431 URL: https://svnweb.freebsd.org/changeset/base/272431 Log: MFC r271321: Don't cross mount boundaries when cleaning tmp files. Relnotes: yes Modified: stable/9/etc/periodic/daily/110.clean-tmps Directory Properties: stable/9/etc/ (props changed) Modified: stable/9/etc/periodic/daily/110.clean-tmps ============================================================================== --- stable/9/etc/periodic/daily/110.clean-tmps Thu Oct 2 18:05:00 2014 (r272430) +++ stable/9/etc/periodic/daily/110.clean-tmps Thu Oct 2 18:05:53 2014 (r272431) @@ -45,8 +45,8 @@ case "$daily_clean_tmps_enable" in rc=$(for dir in $daily_clean_tmps_dirs do [ ."${dir#/}" != ."$dir" -a -d $dir ] && cd $dir && { - find -d . -type f $args -delete $print - find -d . ! -name . -type d $dargs -delete $print + find -x -d . -type f $args -delete $print + find -x -d . ! -name . -type d $dargs -delete $print } | sed "s,^\\., $dir," done | tee /dev/stderr | wc -l) [ -z "$print" ] && rc=0 From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 18:08:30 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B73DBD92; Thu, 2 Oct 2014 18:08:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A2ECAA7C; Thu, 2 Oct 2014 18:08:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92I8UuW017160; Thu, 2 Oct 2014 18:08:30 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92I8UGl017159; Thu, 2 Oct 2014 18:08:30 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201410021808.s92I8UGl017159@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 2 Oct 2014 18:08:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272432 - stable/10/usr.sbin/newsyslog X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 18:08:30 -0000 Author: bdrewery Date: Thu Oct 2 18:08:30 2014 New Revision: 272432 URL: https://svnweb.freebsd.org/changeset/base/272432 Log: MFC r272028: Make it more explicitly clear that -t will not change filename. Approved by: re (gjb) Modified: stable/10/usr.sbin/newsyslog/newsyslog.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/newsyslog/newsyslog.8 ============================================================================== --- stable/10/usr.sbin/newsyslog/newsyslog.8 Thu Oct 2 18:05:53 2014 (r272431) +++ stable/10/usr.sbin/newsyslog/newsyslog.8 Thu Oct 2 18:08:30 2014 (r272432) @@ -17,7 +17,7 @@ .\" the suitability of this software for any purpose. It is .\" provided "as is" without express or implied warranty. .\" -.Dd May 19, 2014 +.Dd September 23, 2014 .Dt NEWSYSLOG 8 .Os .Sh NAME @@ -156,6 +156,7 @@ will create the .Dq rotated logfiles using the specified time format instead of the default sequential filenames. +The filename used will be kept until it is deleted. The time format is described in the .Xr strftime 3 manual page. From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 18:09:32 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 324F6EE7; Thu, 2 Oct 2014 18:09:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1D905A88; Thu, 2 Oct 2014 18:09:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92I9VOO017474; Thu, 2 Oct 2014 18:09:31 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92I9Vut017473; Thu, 2 Oct 2014 18:09:31 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201410021809.s92I9Vut017473@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 2 Oct 2014 18:09:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r272433 - stable/9/usr.sbin/newsyslog X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 18:09:32 -0000 Author: bdrewery Date: Thu Oct 2 18:09:31 2014 New Revision: 272433 URL: https://svnweb.freebsd.org/changeset/base/272433 Log: MFC r272028: Make it more explicitly clear that -t will not change filename. Modified: stable/9/usr.sbin/newsyslog/newsyslog.8 Directory Properties: stable/9/usr.sbin/newsyslog/ (props changed) Modified: stable/9/usr.sbin/newsyslog/newsyslog.8 ============================================================================== --- stable/9/usr.sbin/newsyslog/newsyslog.8 Thu Oct 2 18:08:30 2014 (r272432) +++ stable/9/usr.sbin/newsyslog/newsyslog.8 Thu Oct 2 18:09:31 2014 (r272433) @@ -17,7 +17,7 @@ .\" the suitability of this software for any purpose. It is .\" provided "as is" without express or implied warranty. .\" -.Dd May 19, 2014 +.Dd September 23, 2014 .Dt NEWSYSLOG 8 .Os .Sh NAME @@ -156,6 +156,7 @@ will create the .Dq rotated logfiles using the specified time format instead of the default sequential filenames. +The filename used will be kept until it is deleted. The time format is described in the .Xr strftime 3 manual page. From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 18:11:14 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 880AE1F4; Thu, 2 Oct 2014 18:11:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 738EEAB4; Thu, 2 Oct 2014 18:11:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92IBEvG019352; Thu, 2 Oct 2014 18:11:14 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92IBEL8019351; Thu, 2 Oct 2014 18:11:14 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201410021811.s92IBEL8019351@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 2 Oct 2014 18:11:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272434 - stable/10/sbin/savecore X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 18:11:14 -0000 Author: bdrewery Date: Thu Oct 2 18:11:13 2014 New Revision: 272434 URL: https://svnweb.freebsd.org/changeset/base/272434 Log: MFC r271720: If fgets(3) fails in getbounds(), show strerror(3) if not an EOF. Also fix a FILE* leak in getbounds(). PR: 192032 Approved by: re (gjb) Modified: stable/10/sbin/savecore/savecore.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/savecore/savecore.c ============================================================================== --- stable/10/sbin/savecore/savecore.c Thu Oct 2 18:09:31 2014 (r272433) +++ stable/10/sbin/savecore/savecore.c Thu Oct 2 18:11:13 2014 (r272434) @@ -151,7 +151,10 @@ getbounds(void) { } if (fgets(buf, sizeof buf, fp) == NULL) { - syslog(LOG_WARNING, "unable to read from bounds, using 0"); + if (feof(fp)) + syslog(LOG_WARNING, "bounds file is empty, using 0"); + else + syslog(LOG_WARNING, "bounds file: %s", strerror(errno)); fclose(fp); return (ret); } @@ -160,6 +163,7 @@ getbounds(void) { ret = (int)strtol(buf, NULL, 10); if (ret == 0 && (errno == EINVAL || errno == ERANGE)) syslog(LOG_WARNING, "invalid value found in bounds, using 0"); + fclose(fp); return (ret); } From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 18:12:19 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CA6E432F; Thu, 2 Oct 2014 18:12:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B6010B53; Thu, 2 Oct 2014 18:12:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92ICJhw021462; Thu, 2 Oct 2014 18:12:19 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92ICJjE021461; Thu, 2 Oct 2014 18:12:19 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201410021812.s92ICJjE021461@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 2 Oct 2014 18:12:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r272435 - stable/9/sbin/savecore X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 18:12:19 -0000 Author: bdrewery Date: Thu Oct 2 18:12:18 2014 New Revision: 272435 URL: https://svnweb.freebsd.org/changeset/base/272435 Log: MFC r271720: If fgets(3) fails in getbounds(), show strerror(3) if not an EOF. Also fix a FILE* leak in getbounds(). PR: 192032 Modified: stable/9/sbin/savecore/savecore.c Directory Properties: stable/9/sbin/savecore/ (props changed) Modified: stable/9/sbin/savecore/savecore.c ============================================================================== --- stable/9/sbin/savecore/savecore.c Thu Oct 2 18:11:13 2014 (r272434) +++ stable/9/sbin/savecore/savecore.c Thu Oct 2 18:12:18 2014 (r272435) @@ -149,7 +149,10 @@ getbounds(void) { } if (fgets(buf, sizeof buf, fp) == NULL) { - syslog(LOG_WARNING, "unable to read from bounds, using 0"); + if (feof(fp)) + syslog(LOG_WARNING, "bounds file is empty, using 0"); + else + syslog(LOG_WARNING, "bounds file: %s", strerror(errno)); fclose(fp); return (ret); } @@ -158,6 +161,7 @@ getbounds(void) { ret = (int)strtol(buf, NULL, 10); if (ret == 0 && (errno == EINVAL || errno == ERANGE)) syslog(LOG_WARNING, "invalid value found in bounds, using 0"); + fclose(fp); return (ret); } From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 18:26:41 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DDB01CE9; Thu, 2 Oct 2014 18:26:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BA13FCA8; Thu, 2 Oct 2014 18:26:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92IQfRv027109; Thu, 2 Oct 2014 18:26:41 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92IQf0U027108; Thu, 2 Oct 2014 18:26:41 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201410021826.s92IQf0U027108@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 2 Oct 2014 18:26:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272438 - stable/10/usr.bin/at X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 18:26:42 -0000 Author: delphij Date: Thu Oct 2 18:26:40 2014 New Revision: 272438 URL: https://svnweb.freebsd.org/changeset/base/272438 Log: MFC r272288,272289: When setting environment variables in the atrun script, use the "export foo=bar" form instead of "foo=bar; export foo" since the former allows the shell to catch variable names that are not valid shell identifiers. This will cause /bin/sh to exit with an error (which gets mailed to the at user) and it will not run the script. Obtained from: OpenBSD (r1.63 millert) Approved by: re (gjb) Modified: stable/10/usr.bin/at/at.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/at/at.c ============================================================================== --- stable/10/usr.bin/at/at.c Thu Oct 2 18:23:53 2014 (r272437) +++ stable/10/usr.bin/at/at.c Thu Oct 2 18:26:40 2014 (r272438) @@ -367,6 +367,7 @@ writefile(time_t runtimer, char queue) if (export) { + (void)fputs("export ", fp); fwrite(*atenv, sizeof(char), eqp-*atenv, fp); for(ap = eqp;*ap != '\0'; ap++) { @@ -389,8 +390,6 @@ writefile(time_t runtimer, char queue) fputc(*ap, fp); } } - fputs("; export ", fp); - fwrite(*atenv, sizeof(char), eqp-*atenv -1, fp); fputc('\n', fp); } From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 18:32:18 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3AF2EF7F; Thu, 2 Oct 2014 18:32:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 26821D67; Thu, 2 Oct 2014 18:32:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92IWIV1031402; Thu, 2 Oct 2014 18:32:18 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92IWINC031401; Thu, 2 Oct 2014 18:32:18 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201410021832.s92IWINC031401@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 2 Oct 2014 18:32:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r272439 - stable/9/usr.bin/at X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 18:32:18 -0000 Author: delphij Date: Thu Oct 2 18:32:17 2014 New Revision: 272439 URL: https://svnweb.freebsd.org/changeset/base/272439 Log: MFC r272288,272289: When setting environment variables in the atrun script, use the "export foo=bar" form instead of "foo=bar; export foo" since the former allows the shell to catch variable names that are not valid shell identifiers. This will cause /bin/sh to exit with an error (which gets mailed to the at user) and it will not run the script. Obtained from: OpenBSD (r1.63 millert) Modified: stable/9/usr.bin/at/at.c Directory Properties: stable/9/usr.bin/at/ (props changed) Modified: stable/9/usr.bin/at/at.c ============================================================================== --- stable/9/usr.bin/at/at.c Thu Oct 2 18:26:40 2014 (r272438) +++ stable/9/usr.bin/at/at.c Thu Oct 2 18:32:17 2014 (r272439) @@ -369,6 +369,7 @@ writefile(time_t runtimer, char queue) if (export) { + (void)fputs("export ", fp); fwrite(*atenv, sizeof(char), eqp-*atenv, fp); for(ap = eqp;*ap != '\0'; ap++) { @@ -391,8 +392,6 @@ writefile(time_t runtimer, char queue) fputc(*ap, fp); } } - fputs("; export ", fp); - fwrite(*atenv, sizeof(char), eqp-*atenv -1, fp); fputc('\n', fp); } From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 18:32:30 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D9259136; Thu, 2 Oct 2014 18:32:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C5076D6A; Thu, 2 Oct 2014 18:32:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92IWU4u031486; Thu, 2 Oct 2014 18:32:30 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92IWUb3031485; Thu, 2 Oct 2014 18:32:30 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201410021832.s92IWUb3031485@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 2 Oct 2014 18:32:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r272440 - stable/8/usr.bin/at X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 18:32:31 -0000 Author: delphij Date: Thu Oct 2 18:32:30 2014 New Revision: 272440 URL: https://svnweb.freebsd.org/changeset/base/272440 Log: MFC r272288,272289: When setting environment variables in the atrun script, use the "export foo=bar" form instead of "foo=bar; export foo" since the former allows the shell to catch variable names that are not valid shell identifiers. This will cause /bin/sh to exit with an error (which gets mailed to the at user) and it will not run the script. Obtained from: OpenBSD (r1.63 millert) Modified: stable/8/usr.bin/at/at.c Directory Properties: stable/8/usr.bin/at/ (props changed) Modified: stable/8/usr.bin/at/at.c ============================================================================== --- stable/8/usr.bin/at/at.c Thu Oct 2 18:32:17 2014 (r272439) +++ stable/8/usr.bin/at/at.c Thu Oct 2 18:32:30 2014 (r272440) @@ -369,6 +369,7 @@ writefile(time_t runtimer, char queue) if (export) { + (void)fputs("export ", fp); fwrite(*atenv, sizeof(char), eqp-*atenv, fp); for(ap = eqp;*ap != '\0'; ap++) { @@ -391,8 +392,6 @@ writefile(time_t runtimer, char queue) fputc(*ap, fp); } } - fputs("; export ", fp); - fwrite(*atenv, sizeof(char), eqp-*atenv -1, fp); fputc('\n', fp); } From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 18:33:59 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0731C3ED; Thu, 2 Oct 2014 18:33:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E7D70D82; Thu, 2 Oct 2014 18:33:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92IXwu7031864; Thu, 2 Oct 2014 18:33:58 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92IXwr6031863; Thu, 2 Oct 2014 18:33:58 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201410021833.s92IXwr6031863@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Thu, 2 Oct 2014 18:33:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272441 - head/lib/libc/stdtime X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 18:33:59 -0000 Author: pfg Date: Thu Oct 2 18:33:58 2014 New Revision: 272441 URL: https://svnweb.freebsd.org/changeset/base/272441 Log: strptime: %s format fix. Almost never needed in real life because %s is tends to be only one format spec. 1) Return code of gmtime_r() is checked. 2) All flags are set. Submitted by: ache MFC after: 3 weeks Modified: head/lib/libc/stdtime/strptime.c Modified: head/lib/libc/stdtime/strptime.c ============================================================================== --- head/lib/libc/stdtime/strptime.c Thu Oct 2 18:32:30 2014 (r272440) +++ head/lib/libc/stdtime/strptime.c Thu Oct 2 18:33:58 2014 (r272441) @@ -503,8 +503,11 @@ label: } errno = sverrno; buf = cp; - gmtime_r(&t, tm); + if (gmtime_r(&t, tm) == NULL) + return (NULL); *GMTp = 1; + flags |= FLAG_YDAY | FLAG_WDAY | FLAG_MONTH | + FLAG_MDAY | FLAG_YEAR; } break; From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 18:35:31 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C89595B9; Thu, 2 Oct 2014 18:35:31 +0000 (UTC) Received: from mail.made4.biz (mail.made4.biz [IPv6:2001:41d0:2:c018::1:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8B5E9D98; Thu, 2 Oct 2014 18:35:31 +0000 (UTC) Received: from 2a02-8428-011b-e000-0290-f5ff-fe9d-b78c.rev.sfr.net ([2a02:8428:11b:e000:290:f5ff:fe9d:b78c] helo=magellan.dumbbell.fr) by mail.made4.biz with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.84 (FreeBSD)) (envelope-from ) id 1XZlDt-000NHa-Mf; Thu, 02 Oct 2014 20:35:29 +0200 Message-ID: <542D9AED.6060805@FreeBSD.org> Date: Thu, 02 Oct 2014 20:35:25 +0200 From: =?UTF-8?B?SmVhbi1Tw6liYXN0aWVuIFDDqWRyb24=?= User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 MIME-Version: 1.0 To: svn-src-all@freebsd.org, Hiroki Sato Subject: Re: svn commit: r272386 - in head: sbin/ifconfig share/man/man4 sys/net References: <201410012137.s91LbXL4025967@svn.freebsd.org> In-Reply-To: <201410012137.s91LbXL4025967@svn.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="INET5QpKHcGqpMp81aEvCN60libwLEbqG" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 18:35:32 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --INET5QpKHcGqpMp81aEvCN60libwLEbqG Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable > Author: hrs > Date: Wed Oct 1 21:37:32 2014 > New Revision: 272386 > URL: https://svnweb.freebsd.org/changeset/base/272386 >=20 > Log: > Virtualize lagg(4) cloner. This change fixes a panic when tearing do= wn > if_lagg(4) interfaces which were cloned in a vnet jail. Hi! I believe this change needs at least an entry in UPDATING, because an ifconfig(8) binary built before this commit fails to change laggproto on a kernel including this commit. The error is the following: # ifconfig lagg0 laggproto failover ifconfig: SIOCSLAGG: Invalid argument By quickly looking at the code, I would say that the culprit is the change in size of the "struct lag_reqall". The new "ra_opts" field in "struct lagg_reqall" isn't initialized in the incompatible ifconfig(8) binary. This could be considered invalid options, leading to "error =3D EINVAL" in if_lagg.c:1301. Another non-critical regression is that this ifconfig(8) binary doesn't display the laggproto and laggport lines. I mean those lines: # ifconfig lagg0 lagg0: flags=3D8843 (...) (...) laggproto failover lagghash l2,l3,l4 laggport: wlan0 flags=3D0<> laggport: re0 flags=3D5 Beside an UPDATING entry, how about a previously released world with this new kernel? Isn't this configuration supposed to work? --=20 Jean-S=C3=A9bastien P=C3=A9dron --INET5QpKHcGqpMp81aEvCN60libwLEbqG 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 iQJ8BAEBCgBmBQJULZrxXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2NzA4N0ZEMUFFQUUwRTEyREJDNkE2RjAz OUU5OTc2MUE1RkQ5NENDAAoJEDnpl2Gl/ZTMYVQP/0PPlnZusCHDst/k/zPqo31/ IdwUeUZWZWKXWQPWu2Ae/XSVysB683M0oasDFq/exalh7un70gBI+U0Pxr3xfzaR 323ZpX1X48guGKK1U6Do2wAPGCmhL1TXqyAnhlIdNVACEHuy3yTj+UIyrjwBDFVS tJ4PG3BK7PVLdOaWSFbqFDETmkqqO9xV2Kz+wQVT+gRBUUYeriA/0tGushfS9K2k ShDDIR7Gf7ik4b5ubKluHpYU6EkSOXeO+losjqR/pDNVbyp3QI3Y08we5BKaev2D MLfnjd5Gvuou3FKF5s3FXXdYRmA0+9vihRgTBfm9LEchUtk/UcSFYCWSg76D+6MC oTbuYK92Q4krGyl3PGtvHnIamndBP5vmiAMtPKS9tDZaXFIFJDnrUFg8nc14rOA/ 1bPQsJMSMqRZrvZ4rcLu8VWFo5kE/0QHaZpcRHApfgdfOzo+n0z4BwJJAr45Ueia tZHmmZq6bitdjLtuwVVTQkrOzi65AvsgagI3mqzTU9rAgzQfnWkrQmPV6CMJLaVx KGLUPLbtUGgTvXJVyoHUQ/skXDJ8YcCd3AmNcruQjiHD6CMw/N9h6/8zKzorq3QH OphOKF22GQPIigt1YnZ/eiJhSGCfT6Eyz+fYt9ZH9Wt2e//cnTIECPhV7UUrqxsm 7u5aO/kHSKHdas+nYSzj =195E -----END PGP SIGNATURE----- --INET5QpKHcGqpMp81aEvCN60libwLEbqG-- From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 18:45:01 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 39BEE9D9; Thu, 2 Oct 2014 18:45:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2620DE91; Thu, 2 Oct 2014 18:45:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92Ij1pk037199; Thu, 2 Oct 2014 18:45:01 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92Ij1ZW037196; Thu, 2 Oct 2014 18:45:01 GMT (envelope-from rpaulo@FreeBSD.org) Message-Id: <201410021845.s92Ij1ZW037196@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rpaulo set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo Date: Thu, 2 Oct 2014 18:45:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272442 - head/sys/modules/ncr X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 18:45:01 -0000 Author: rpaulo Date: Thu Oct 2 18:45:00 2014 New Revision: 272442 URL: https://svnweb.freebsd.org/changeset/base/272442 Log: Remove the extra CFLAGS now that the driver has been fixed by jhb. Modified: head/sys/modules/ncr/Makefile Modified: head/sys/modules/ncr/Makefile ============================================================================== --- head/sys/modules/ncr/Makefile Thu Oct 2 18:33:58 2014 (r272441) +++ head/sys/modules/ncr/Makefile Thu Oct 2 18:45:00 2014 (r272442) @@ -7,5 +7,3 @@ SRCS= ncr.c SRCS+= device_if.h bus_if.h pci_if.h opt_ncr.h opt_cam.h .include - -CFLAGS+=-Wno-error=unused-const-variable From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 18:52:30 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2B8B5D04; Thu, 2 Oct 2014 18:52:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 14047F7A; Thu, 2 Oct 2014 18:52:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92IqTw0041679; Thu, 2 Oct 2014 18:52:29 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92IqTnQ041678; Thu, 2 Oct 2014 18:52:29 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201410021852.s92IqTnQ041678@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Thu, 2 Oct 2014 18:52:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272443 - head/lib/libc/stdtime X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 18:52:30 -0000 Author: pfg Date: Thu Oct 2 18:52:29 2014 New Revision: 272443 URL: https://svnweb.freebsd.org/changeset/base/272443 Log: strptime(3): Update manpage for %U and %W. %U and %W were implemented as part of r272273 so take them out of the BUGS section and mention them in the SYNOPSIS. MFC after: 1 month Modified: head/lib/libc/stdtime/strptime.3 Modified: head/lib/libc/stdtime/strptime.3 ============================================================================== --- head/lib/libc/stdtime/strptime.3 Thu Oct 2 18:45:00 2014 (r272442) +++ head/lib/libc/stdtime/strptime.3 Thu Oct 2 18:52:29 2014 (r272443) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" " -.Dd June 25, 2012 +.Dd October 2, 2014 .Dt STRPTIME 3 .Os .Sh NAME @@ -79,7 +79,11 @@ and .Fa \&%D , are now interpreted as beginning at 1969 per POSIX requirements. Years 69-00 are interpreted in the 20th century (1969-2000), years -01-68 in the 21st century (2001-2068). +01-68 in the 21st century (2001-2068). The +.Fa \&%U +and +.Fa %W +format specifiers accept any value within the range 00 to 53. .Pp If the .Fa format @@ -161,14 +165,6 @@ and 12PM is taken as noon. .Pp The -.Fa \&%U -and -.Fa %W -format specifiers accept any value within the range 00 to 53 -without validating against other values supplied (like month -or day of the year, for example). -.Pp -The .Fa %Z format specifier only accepts time zone abbreviations of the local time zone, or the value "GMT". From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 19:11:20 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BE94E60D; Thu, 2 Oct 2014 19:11:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A5E3B259; Thu, 2 Oct 2014 19:11:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92JBKTU050342; Thu, 2 Oct 2014 19:11:20 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92JBJnO050314; Thu, 2 Oct 2014 19:11:19 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201410021911.s92JBJnO050314@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 2 Oct 2014 19:11:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272444 - in head: sys/conf sys/contrib/dev/acpica sys/contrib/dev/acpica/common sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/components/debugger sys/contrib/dev/acpica/compon... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 19:11:20 -0000 Author: jkim Date: Thu Oct 2 19:11:18 2014 New Revision: 272444 URL: https://svnweb.freebsd.org/changeset/base/272444 Log: Merge ACPICA 20140926. Added: head/sys/contrib/dev/acpica/common/acgetline.c - copied, changed from r256655, vendor-sys/acpica/dist/source/common/acgetline.c head/sys/contrib/dev/acpica/common/ahids.c - copied, changed from r263851, vendor-sys/acpica/dist/source/common/ahids.c head/sys/contrib/dev/acpica/common/ahuuids.c - copied, changed from r271440, vendor-sys/acpica/dist/source/common/ahuuids.c head/sys/contrib/dev/acpica/common/cmfsize.c - copied, changed from r263851, vendor-sys/acpica/dist/source/common/cmfsize.c head/sys/contrib/dev/acpica/compiler/aslascii.c - copied, changed from r271440, vendor-sys/acpica/dist/source/compiler/aslascii.c head/sys/contrib/dev/acpica/compiler/aslmapenter.c - copied, changed from r272286, vendor-sys/acpica/dist/source/compiler/aslmapenter.c head/sys/contrib/dev/acpica/compiler/aslmapoutput.c - copied, changed from r272286, vendor-sys/acpica/dist/source/compiler/aslmapoutput.c head/sys/contrib/dev/acpica/compiler/aslmaputils.c - copied, changed from r272286, vendor-sys/acpica/dist/source/compiler/aslmaputils.c head/sys/contrib/dev/acpica/compiler/aslmessages.c - copied, changed from r264919, vendor-sys/acpica/dist/source/compiler/aslmessages.c head/sys/contrib/dev/acpica/compiler/aslparser.y - copied, changed from r271440, vendor-sys/acpica/dist/source/compiler/aslparser.y head/sys/contrib/dev/acpica/compiler/aslrules.y - copied unchanged from r271440, vendor-sys/acpica/dist/source/compiler/aslrules.y head/sys/contrib/dev/acpica/compiler/aslsupport.y - copied, changed from r271440, vendor-sys/acpica/dist/source/compiler/aslsupport.y head/sys/contrib/dev/acpica/compiler/asltokens.y - copied unchanged from r271440, vendor-sys/acpica/dist/source/compiler/asltokens.y head/sys/contrib/dev/acpica/compiler/asltypes.y - copied unchanged from r271440, vendor-sys/acpica/dist/source/compiler/asltypes.y head/sys/contrib/dev/acpica/components/debugger/dbtest.c - copied, changed from r260659, vendor-sys/acpica/dist/source/components/debugger/dbtest.c head/sys/contrib/dev/acpica/components/tables/tbdata.c - copied, changed from r263851, vendor-sys/acpica/dist/source/components/tables/tbdata.c head/sys/contrib/dev/acpica/components/utilities/utfileio.c - copied, changed from r267974, vendor-sys/acpica/dist/source/components/utilities/utfileio.c head/sys/contrib/dev/acpica/components/utilities/uthex.c - copied, changed from r271440, vendor-sys/acpica/dist/source/components/utilities/uthex.c head/sys/contrib/dev/acpica/components/utilities/utprint.c - copied, changed from r267974, vendor-sys/acpica/dist/source/components/utilities/utprint.c head/sys/contrib/dev/acpica/components/utilities/utuuid.c - copied, changed from r271440, vendor-sys/acpica/dist/source/components/utilities/utuuid.c head/sys/contrib/dev/acpica/include/platform/acenvex.h - copied unchanged from r267974, vendor-sys/acpica/dist/source/include/platform/acenvex.h head/sys/contrib/dev/acpica/os_specific/service_layers/oslibcfs.c - copied, changed from r267974, vendor-sys/acpica/dist/source/os_specific/service_layers/oslibcfs.c Deleted: head/sys/contrib/dev/acpica/compiler/aslcompiler.y Modified: head/sys/conf/files head/sys/contrib/dev/acpica/acpica_prep.sh head/sys/contrib/dev/acpica/changes.txt head/sys/contrib/dev/acpica/common/adfile.c head/sys/contrib/dev/acpica/common/adisasm.c head/sys/contrib/dev/acpica/common/adwalk.c head/sys/contrib/dev/acpica/common/ahpredef.c head/sys/contrib/dev/acpica/common/dmextern.c head/sys/contrib/dev/acpica/common/dmrestag.c head/sys/contrib/dev/acpica/common/dmtable.c head/sys/contrib/dev/acpica/common/dmtbdump.c head/sys/contrib/dev/acpica/common/dmtbinfo.c head/sys/contrib/dev/acpica/common/getopt.c head/sys/contrib/dev/acpica/compiler/aslanalyze.c head/sys/contrib/dev/acpica/compiler/aslbtypes.c head/sys/contrib/dev/acpica/compiler/aslcodegen.c head/sys/contrib/dev/acpica/compiler/aslcompile.c head/sys/contrib/dev/acpica/compiler/aslcompiler.h head/sys/contrib/dev/acpica/compiler/aslcompiler.l head/sys/contrib/dev/acpica/compiler/asldefine.h head/sys/contrib/dev/acpica/compiler/aslerror.c head/sys/contrib/dev/acpica/compiler/aslfileio.c head/sys/contrib/dev/acpica/compiler/aslfiles.c head/sys/contrib/dev/acpica/compiler/aslfold.c head/sys/contrib/dev/acpica/compiler/aslglobal.h head/sys/contrib/dev/acpica/compiler/aslhex.c head/sys/contrib/dev/acpica/compiler/asllength.c head/sys/contrib/dev/acpica/compiler/asllisting.c head/sys/contrib/dev/acpica/compiler/asllistsup.c head/sys/contrib/dev/acpica/compiler/aslload.c head/sys/contrib/dev/acpica/compiler/asllookup.c head/sys/contrib/dev/acpica/compiler/aslmain.c head/sys/contrib/dev/acpica/compiler/aslmap.c head/sys/contrib/dev/acpica/compiler/aslmessages.h head/sys/contrib/dev/acpica/compiler/aslmethod.c head/sys/contrib/dev/acpica/compiler/aslnamesp.c head/sys/contrib/dev/acpica/compiler/asloffset.c head/sys/contrib/dev/acpica/compiler/aslopcodes.c head/sys/contrib/dev/acpica/compiler/asloperands.c head/sys/contrib/dev/acpica/compiler/aslopt.c head/sys/contrib/dev/acpica/compiler/asloptions.c head/sys/contrib/dev/acpica/compiler/aslpredef.c head/sys/contrib/dev/acpica/compiler/aslprepkg.c head/sys/contrib/dev/acpica/compiler/aslresource.c head/sys/contrib/dev/acpica/compiler/aslrestype1.c head/sys/contrib/dev/acpica/compiler/aslrestype1i.c head/sys/contrib/dev/acpica/compiler/aslrestype2.c head/sys/contrib/dev/acpica/compiler/aslrestype2d.c head/sys/contrib/dev/acpica/compiler/aslrestype2e.c head/sys/contrib/dev/acpica/compiler/aslrestype2q.c head/sys/contrib/dev/acpica/compiler/aslrestype2s.c head/sys/contrib/dev/acpica/compiler/aslrestype2w.c head/sys/contrib/dev/acpica/compiler/aslstartup.c head/sys/contrib/dev/acpica/compiler/aslstubs.c head/sys/contrib/dev/acpica/compiler/aslsupport.l head/sys/contrib/dev/acpica/compiler/asltransform.c head/sys/contrib/dev/acpica/compiler/asltree.c head/sys/contrib/dev/acpica/compiler/asltypes.h head/sys/contrib/dev/acpica/compiler/aslutils.c head/sys/contrib/dev/acpica/compiler/asluuid.c head/sys/contrib/dev/acpica/compiler/aslwalks.c head/sys/contrib/dev/acpica/compiler/aslxref.c head/sys/contrib/dev/acpica/compiler/dtcompile.c head/sys/contrib/dev/acpica/compiler/dtcompiler.h head/sys/contrib/dev/acpica/compiler/dtexpress.c head/sys/contrib/dev/acpica/compiler/dtfield.c head/sys/contrib/dev/acpica/compiler/dtio.c head/sys/contrib/dev/acpica/compiler/dtparser.l head/sys/contrib/dev/acpica/compiler/dtparser.y head/sys/contrib/dev/acpica/compiler/dtsubtable.c head/sys/contrib/dev/acpica/compiler/dttable.c head/sys/contrib/dev/acpica/compiler/dttemplate.c head/sys/contrib/dev/acpica/compiler/dttemplate.h head/sys/contrib/dev/acpica/compiler/dtutils.c head/sys/contrib/dev/acpica/compiler/preprocess.h head/sys/contrib/dev/acpica/compiler/prexpress.c head/sys/contrib/dev/acpica/compiler/prmacros.c head/sys/contrib/dev/acpica/compiler/prparser.l head/sys/contrib/dev/acpica/compiler/prparser.y head/sys/contrib/dev/acpica/compiler/prscan.c head/sys/contrib/dev/acpica/compiler/prutils.c head/sys/contrib/dev/acpica/components/debugger/dbcmds.c head/sys/contrib/dev/acpica/components/debugger/dbconvert.c head/sys/contrib/dev/acpica/components/debugger/dbdisply.c head/sys/contrib/dev/acpica/components/debugger/dbexec.c head/sys/contrib/dev/acpica/components/debugger/dbfileio.c head/sys/contrib/dev/acpica/components/debugger/dbhistry.c head/sys/contrib/dev/acpica/components/debugger/dbinput.c head/sys/contrib/dev/acpica/components/debugger/dbmethod.c head/sys/contrib/dev/acpica/components/debugger/dbnames.c head/sys/contrib/dev/acpica/components/debugger/dbstats.c head/sys/contrib/dev/acpica/components/debugger/dbutils.c head/sys/contrib/dev/acpica/components/debugger/dbxface.c head/sys/contrib/dev/acpica/components/disassembler/dmbuffer.c head/sys/contrib/dev/acpica/components/disassembler/dmdeferred.c head/sys/contrib/dev/acpica/components/disassembler/dmnames.c head/sys/contrib/dev/acpica/components/disassembler/dmobject.c head/sys/contrib/dev/acpica/components/disassembler/dmopcode.c head/sys/contrib/dev/acpica/components/disassembler/dmresrc.c head/sys/contrib/dev/acpica/components/disassembler/dmresrcl.c head/sys/contrib/dev/acpica/components/disassembler/dmresrcl2.c head/sys/contrib/dev/acpica/components/disassembler/dmresrcs.c head/sys/contrib/dev/acpica/components/disassembler/dmutils.c head/sys/contrib/dev/acpica/components/disassembler/dmwalk.c head/sys/contrib/dev/acpica/components/dispatcher/dsargs.c head/sys/contrib/dev/acpica/components/dispatcher/dscontrol.c head/sys/contrib/dev/acpica/components/dispatcher/dsfield.c head/sys/contrib/dev/acpica/components/dispatcher/dsinit.c head/sys/contrib/dev/acpica/components/dispatcher/dsmethod.c head/sys/contrib/dev/acpica/components/dispatcher/dsmthdat.c head/sys/contrib/dev/acpica/components/dispatcher/dsobject.c head/sys/contrib/dev/acpica/components/dispatcher/dsopcode.c head/sys/contrib/dev/acpica/components/dispatcher/dsutils.c head/sys/contrib/dev/acpica/components/dispatcher/dswexec.c head/sys/contrib/dev/acpica/components/dispatcher/dswload.c head/sys/contrib/dev/acpica/components/dispatcher/dswload2.c head/sys/contrib/dev/acpica/components/dispatcher/dswscope.c head/sys/contrib/dev/acpica/components/dispatcher/dswstate.c head/sys/contrib/dev/acpica/components/events/evevent.c head/sys/contrib/dev/acpica/components/events/evglock.c head/sys/contrib/dev/acpica/components/events/evgpe.c head/sys/contrib/dev/acpica/components/events/evgpeblk.c head/sys/contrib/dev/acpica/components/events/evgpeinit.c head/sys/contrib/dev/acpica/components/events/evgpeutil.c head/sys/contrib/dev/acpica/components/events/evhandler.c head/sys/contrib/dev/acpica/components/events/evmisc.c head/sys/contrib/dev/acpica/components/events/evregion.c head/sys/contrib/dev/acpica/components/events/evrgnini.c head/sys/contrib/dev/acpica/components/events/evsci.c head/sys/contrib/dev/acpica/components/events/evxface.c head/sys/contrib/dev/acpica/components/events/evxfevnt.c head/sys/contrib/dev/acpica/components/events/evxfgpe.c head/sys/contrib/dev/acpica/components/events/evxfregn.c head/sys/contrib/dev/acpica/components/executer/exconfig.c head/sys/contrib/dev/acpica/components/executer/exconvrt.c head/sys/contrib/dev/acpica/components/executer/excreate.c head/sys/contrib/dev/acpica/components/executer/exdebug.c head/sys/contrib/dev/acpica/components/executer/exdump.c head/sys/contrib/dev/acpica/components/executer/exfield.c head/sys/contrib/dev/acpica/components/executer/exfldio.c head/sys/contrib/dev/acpica/components/executer/exmisc.c head/sys/contrib/dev/acpica/components/executer/exmutex.c head/sys/contrib/dev/acpica/components/executer/exnames.c head/sys/contrib/dev/acpica/components/executer/exoparg1.c head/sys/contrib/dev/acpica/components/executer/exoparg2.c head/sys/contrib/dev/acpica/components/executer/exoparg3.c head/sys/contrib/dev/acpica/components/executer/exoparg6.c head/sys/contrib/dev/acpica/components/executer/exprep.c head/sys/contrib/dev/acpica/components/executer/exregion.c head/sys/contrib/dev/acpica/components/executer/exresnte.c head/sys/contrib/dev/acpica/components/executer/exresolv.c head/sys/contrib/dev/acpica/components/executer/exresop.c head/sys/contrib/dev/acpica/components/executer/exstore.c head/sys/contrib/dev/acpica/components/executer/exstoren.c head/sys/contrib/dev/acpica/components/executer/exstorob.c head/sys/contrib/dev/acpica/components/executer/exsystem.c head/sys/contrib/dev/acpica/components/executer/exutils.c head/sys/contrib/dev/acpica/components/hardware/hwacpi.c head/sys/contrib/dev/acpica/components/hardware/hwesleep.c head/sys/contrib/dev/acpica/components/hardware/hwgpe.c head/sys/contrib/dev/acpica/components/hardware/hwpci.c head/sys/contrib/dev/acpica/components/hardware/hwregs.c head/sys/contrib/dev/acpica/components/hardware/hwsleep.c head/sys/contrib/dev/acpica/components/hardware/hwtimer.c head/sys/contrib/dev/acpica/components/hardware/hwvalid.c head/sys/contrib/dev/acpica/components/hardware/hwxface.c head/sys/contrib/dev/acpica/components/hardware/hwxfsleep.c head/sys/contrib/dev/acpica/components/namespace/nsaccess.c head/sys/contrib/dev/acpica/components/namespace/nsalloc.c head/sys/contrib/dev/acpica/components/namespace/nsarguments.c head/sys/contrib/dev/acpica/components/namespace/nsconvert.c head/sys/contrib/dev/acpica/components/namespace/nsdump.c head/sys/contrib/dev/acpica/components/namespace/nsdumpdv.c head/sys/contrib/dev/acpica/components/namespace/nseval.c head/sys/contrib/dev/acpica/components/namespace/nsinit.c head/sys/contrib/dev/acpica/components/namespace/nsload.c head/sys/contrib/dev/acpica/components/namespace/nsnames.c head/sys/contrib/dev/acpica/components/namespace/nsobject.c head/sys/contrib/dev/acpica/components/namespace/nsparse.c head/sys/contrib/dev/acpica/components/namespace/nspredef.c head/sys/contrib/dev/acpica/components/namespace/nsprepkg.c head/sys/contrib/dev/acpica/components/namespace/nsrepair.c head/sys/contrib/dev/acpica/components/namespace/nsrepair2.c head/sys/contrib/dev/acpica/components/namespace/nssearch.c head/sys/contrib/dev/acpica/components/namespace/nsutils.c head/sys/contrib/dev/acpica/components/namespace/nswalk.c head/sys/contrib/dev/acpica/components/namespace/nsxfeval.c head/sys/contrib/dev/acpica/components/namespace/nsxfname.c head/sys/contrib/dev/acpica/components/namespace/nsxfobj.c head/sys/contrib/dev/acpica/components/parser/psargs.c head/sys/contrib/dev/acpica/components/parser/psloop.c head/sys/contrib/dev/acpica/components/parser/psobject.c head/sys/contrib/dev/acpica/components/parser/psopcode.c head/sys/contrib/dev/acpica/components/parser/psopinfo.c head/sys/contrib/dev/acpica/components/parser/psparse.c head/sys/contrib/dev/acpica/components/parser/psscope.c head/sys/contrib/dev/acpica/components/parser/pstree.c head/sys/contrib/dev/acpica/components/parser/psutils.c head/sys/contrib/dev/acpica/components/parser/pswalk.c head/sys/contrib/dev/acpica/components/parser/psxface.c head/sys/contrib/dev/acpica/components/resources/rsaddr.c head/sys/contrib/dev/acpica/components/resources/rscalc.c head/sys/contrib/dev/acpica/components/resources/rscreate.c head/sys/contrib/dev/acpica/components/resources/rsdump.c head/sys/contrib/dev/acpica/components/resources/rsdumpinfo.c head/sys/contrib/dev/acpica/components/resources/rsinfo.c head/sys/contrib/dev/acpica/components/resources/rsio.c head/sys/contrib/dev/acpica/components/resources/rsirq.c head/sys/contrib/dev/acpica/components/resources/rslist.c head/sys/contrib/dev/acpica/components/resources/rsmemory.c head/sys/contrib/dev/acpica/components/resources/rsmisc.c head/sys/contrib/dev/acpica/components/resources/rsserial.c head/sys/contrib/dev/acpica/components/resources/rsutils.c head/sys/contrib/dev/acpica/components/resources/rsxface.c head/sys/contrib/dev/acpica/components/tables/tbfadt.c head/sys/contrib/dev/acpica/components/tables/tbfind.c head/sys/contrib/dev/acpica/components/tables/tbinstal.c head/sys/contrib/dev/acpica/components/tables/tbprint.c head/sys/contrib/dev/acpica/components/tables/tbutils.c head/sys/contrib/dev/acpica/components/tables/tbxface.c head/sys/contrib/dev/acpica/components/tables/tbxfload.c head/sys/contrib/dev/acpica/components/tables/tbxfroot.c head/sys/contrib/dev/acpica/components/utilities/utaddress.c head/sys/contrib/dev/acpica/components/utilities/utalloc.c head/sys/contrib/dev/acpica/components/utilities/utbuffer.c head/sys/contrib/dev/acpica/components/utilities/utcache.c head/sys/contrib/dev/acpica/components/utilities/utcopy.c head/sys/contrib/dev/acpica/components/utilities/utdebug.c head/sys/contrib/dev/acpica/components/utilities/utdecode.c head/sys/contrib/dev/acpica/components/utilities/utdelete.c head/sys/contrib/dev/acpica/components/utilities/uterror.c head/sys/contrib/dev/acpica/components/utilities/uteval.c head/sys/contrib/dev/acpica/components/utilities/utexcep.c head/sys/contrib/dev/acpica/components/utilities/utglobal.c head/sys/contrib/dev/acpica/components/utilities/utids.c head/sys/contrib/dev/acpica/components/utilities/utinit.c head/sys/contrib/dev/acpica/components/utilities/utlock.c head/sys/contrib/dev/acpica/components/utilities/utmath.c head/sys/contrib/dev/acpica/components/utilities/utmisc.c head/sys/contrib/dev/acpica/components/utilities/utmutex.c head/sys/contrib/dev/acpica/components/utilities/utobject.c head/sys/contrib/dev/acpica/components/utilities/utosi.c head/sys/contrib/dev/acpica/components/utilities/utownerid.c head/sys/contrib/dev/acpica/components/utilities/utpredef.c head/sys/contrib/dev/acpica/components/utilities/utresrc.c head/sys/contrib/dev/acpica/components/utilities/utstate.c head/sys/contrib/dev/acpica/components/utilities/utstring.c head/sys/contrib/dev/acpica/components/utilities/uttrack.c head/sys/contrib/dev/acpica/components/utilities/utxface.c head/sys/contrib/dev/acpica/components/utilities/utxferror.c head/sys/contrib/dev/acpica/components/utilities/utxfinit.c head/sys/contrib/dev/acpica/components/utilities/utxfmutex.c head/sys/contrib/dev/acpica/include/acapps.h head/sys/contrib/dev/acpica/include/acbuffer.h head/sys/contrib/dev/acpica/include/accommon.h head/sys/contrib/dev/acpica/include/acconfig.h head/sys/contrib/dev/acpica/include/acdebug.h head/sys/contrib/dev/acpica/include/acdisasm.h head/sys/contrib/dev/acpica/include/acdispat.h head/sys/contrib/dev/acpica/include/acevents.h head/sys/contrib/dev/acpica/include/acexcep.h head/sys/contrib/dev/acpica/include/acglobal.h head/sys/contrib/dev/acpica/include/achware.h head/sys/contrib/dev/acpica/include/acinterp.h head/sys/contrib/dev/acpica/include/aclocal.h head/sys/contrib/dev/acpica/include/acmacros.h head/sys/contrib/dev/acpica/include/acnames.h head/sys/contrib/dev/acpica/include/acnamesp.h head/sys/contrib/dev/acpica/include/acobject.h head/sys/contrib/dev/acpica/include/acopcode.h head/sys/contrib/dev/acpica/include/acoutput.h head/sys/contrib/dev/acpica/include/acparser.h head/sys/contrib/dev/acpica/include/acpi.h head/sys/contrib/dev/acpica/include/acpiosxf.h head/sys/contrib/dev/acpica/include/acpixf.h head/sys/contrib/dev/acpica/include/acpredef.h head/sys/contrib/dev/acpica/include/acresrc.h head/sys/contrib/dev/acpica/include/acrestyp.h head/sys/contrib/dev/acpica/include/acstruct.h head/sys/contrib/dev/acpica/include/actables.h head/sys/contrib/dev/acpica/include/actbl.h head/sys/contrib/dev/acpica/include/actbl1.h head/sys/contrib/dev/acpica/include/actbl2.h head/sys/contrib/dev/acpica/include/actbl3.h head/sys/contrib/dev/acpica/include/actypes.h head/sys/contrib/dev/acpica/include/acutils.h head/sys/contrib/dev/acpica/include/amlcode.h head/sys/contrib/dev/acpica/include/amlresrc.h head/sys/contrib/dev/acpica/include/platform/acenv.h head/sys/contrib/dev/acpica/include/platform/acfreebsd.h head/sys/contrib/dev/acpica/include/platform/acgcc.h head/sys/contrib/dev/acpica/os_specific/service_layers/osunixxf.c head/sys/dev/acpica/Osd/OsdTable.c head/sys/dev/acpica/acpi.c head/usr.sbin/acpi/acpiconf/Makefile head/usr.sbin/acpi/acpidb/Makefile head/usr.sbin/acpi/acpidb/acpidb.c head/usr.sbin/acpi/acpidump/Makefile head/usr.sbin/acpi/acpidump/acpi.c head/usr.sbin/acpi/iasl/Makefile Directory Properties: head/sys/contrib/dev/acpica/ (props changed) Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Thu Oct 2 18:52:29 2014 (r272443) +++ head/sys/conf/files Thu Oct 2 19:11:18 2014 (r272444) @@ -255,6 +255,8 @@ contrib/altq/altq/altq_red.c optional a contrib/altq/altq/altq_rio.c optional altq contrib/altq/altq/altq_rmclass.c optional altq contrib/altq/altq/altq_subr.c optional altq +contrib/dev/acpica/common/ahids.c optional acpi acpi_debug +contrib/dev/acpica/common/ahuuids.c optional acpi acpi_debug contrib/dev/acpica/components/debugger/dbcmds.c optional acpi acpi_debug contrib/dev/acpica/components/debugger/dbconvert.c optional acpi acpi_debug contrib/dev/acpica/components/debugger/dbdisply.c optional acpi acpi_debug @@ -265,6 +267,7 @@ contrib/dev/acpica/components/debugger/d contrib/dev/acpica/components/debugger/dbmethod.c optional acpi acpi_debug contrib/dev/acpica/components/debugger/dbnames.c optional acpi acpi_debug contrib/dev/acpica/components/debugger/dbstats.c optional acpi acpi_debug +contrib/dev/acpica/components/debugger/dbtest.c optional acpi acpi_debug contrib/dev/acpica/components/debugger/dbutils.c optional acpi acpi_debug contrib/dev/acpica/components/debugger/dbxface.c optional acpi acpi_debug contrib/dev/acpica/components/disassembler/dmbuffer.c optional acpi acpi_debug @@ -387,6 +390,7 @@ contrib/dev/acpica/components/resources/ contrib/dev/acpica/components/resources/rsserial.c optional acpi contrib/dev/acpica/components/resources/rsutils.c optional acpi contrib/dev/acpica/components/resources/rsxface.c optional acpi +contrib/dev/acpica/components/tables/tbdata.c optional acpi contrib/dev/acpica/components/tables/tbfadt.c optional acpi contrib/dev/acpica/components/tables/tbfind.c optional acpi contrib/dev/acpica/components/tables/tbinstal.c optional acpi @@ -407,6 +411,7 @@ contrib/dev/acpica/components/utilities/ contrib/dev/acpica/components/utilities/uteval.c optional acpi contrib/dev/acpica/components/utilities/utexcep.c optional acpi contrib/dev/acpica/components/utilities/utglobal.c optional acpi +contrib/dev/acpica/components/utilities/uthex.c optional acpi contrib/dev/acpica/components/utilities/utids.c optional acpi contrib/dev/acpica/components/utilities/utinit.c optional acpi contrib/dev/acpica/components/utilities/utlock.c optional acpi @@ -420,6 +425,7 @@ contrib/dev/acpica/components/utilities/ contrib/dev/acpica/components/utilities/utresrc.c optional acpi contrib/dev/acpica/components/utilities/utstate.c optional acpi contrib/dev/acpica/components/utilities/utstring.c optional acpi +contrib/dev/acpica/components/utilities/utuuid.c optional acpi acpi_debug contrib/dev/acpica/components/utilities/utxface.c optional acpi contrib/dev/acpica/components/utilities/utxferror.c optional acpi contrib/dev/acpica/components/utilities/utxfinit.c optional acpi Modified: head/sys/contrib/dev/acpica/acpica_prep.sh ============================================================================== --- head/sys/contrib/dev/acpica/acpica_prep.sh Thu Oct 2 18:52:29 2014 (r272443) +++ head/sys/contrib/dev/acpica/acpica_prep.sh Thu Oct 2 19:11:18 2014 (r272444) @@ -19,9 +19,10 @@ fulldirs="common compiler components inc # files to remove stripdirs="generate libraries tests tools" stripfiles="Makefile README accygwin.h acefi.h achaiku.h acintel.h \ - aclinux.h acmacosx.h acmsvc.h acnetbsd.h acos2.h acwin.h \ - acwin64.h new_table.txt osfreebsdtbl.c oslinuxtbl.c osunixdir.c \ - osunixmap.c oswindir.c oswintbl.c oswinxf.c readme.txt utclib.c" + aclinux.h aclinuxex.h acmacosx.h acmsvc.h acnetbsd.h acos2.h \ + acwin.h acwin64.h new_table.txt osefitbl.c osefixf.c \ + osfreebsdtbl.c oslinuxtbl.c osunixdir.c osunixmap.c oswindir.c \ + oswintbl.c oswinxf.c readme.txt utclib.c" # include files to canonify src_headers="acapps.h acbuffer.h accommon.h acconfig.h acdebug.h \ @@ -30,8 +31,8 @@ src_headers="acapps.h acbuffer.h accommo acopcode.h acoutput.h acparser.h acpi.h acpiosxf.h acpixf.h \ acpredef.h acresrc.h acrestyp.h acstruct.h actables.h actbl.h \ actbl1.h actbl2.h actbl3.h actypes.h acutils.h amlcode.h \ - amlresrc.h platform/acenv.h platform/acfreebsd.h \ - platform/acgcc.h" + amlresrc.h platform/acenv.h platform/acenvex.h \ + platform/acfreebsd.h platform/acgcc.h" comp_headers="aslcompiler.h asldefine.h aslglobal.h aslmessages.h \ aslsupport.l asltypes.h dtcompiler.h dttemplate.h preprocess.h" platform_headers="acfreebsd.h acgcc.h" Modified: head/sys/contrib/dev/acpica/changes.txt ============================================================================== --- head/sys/contrib/dev/acpica/changes.txt Thu Oct 2 18:52:29 2014 (r272443) +++ head/sys/contrib/dev/acpica/changes.txt Thu Oct 2 19:11:18 2014 (r272444) @@ -1,4 +1,921 @@ ---------------------------------------- +26 September 2014. Summary of changes for version 20140926: + +1) ACPICA kernel-resident subsystem: + +Updated the GPIO operation region handler interface (GeneralPurposeIo). +In order to support GPIO Connection objects with multiple pins, along +with the related Field objects, the following changes to the interface +have been made: The Address is now defined to be the offset in bits of +the field unit from the previous invocation of a Connection. It can be +viewed as a "Pin Number Index" into the connection resource descriptor. +The BitWidth is the exact bit width of the field. It is usually one bit, +but not always. See the ACPICA reference guide (section 8.8.6.2.1) for +additional information and examples. + +GPE support: During ACPICA/GPE initialization, ensure that all GPEs with +corresponding _Lxx/_Exx methods are disabled (they may have been enabled +by the firmware), so that they cannot fire until they are enabled via +AcpiUpdateAllGpes. Rafael J. Wysocki. + +Added a new return flag for the Event/GPE status interfaces -- +AcpiGetEventStatus and AcpiGetGpeStatus. The new +ACPI_EVENT_FLAGS_HAS_HANDLER flag is used to indicate that the event or +GPE currently has a handler associated with it, and can thus actually +affect the system. Lv Zheng. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and +has a much larger code and data size. + + Current Release: + Non-Debug Version: 99.1K Code, 27.3K Data, 126.4K Total + Debug Version: 192.8K Code, 79.9K Data, 272.7K Total + Previous Release: + Non-Debug Version: 98.8K Code, 27.3K Data, 126.1K Total + Debug Version: 192.1K Code, 79.8K Data, 271.9K Total + +2) iASL Compiler/Disassembler and Tools: + +iASL: Fixed a memory allocation/free regression introduced in 20140828 +that could cause the compiler to crash. This was introduced inadvertently +during the effort to eliminate compiler memory leaks. ACPICA BZ 1111, +1113. + +iASL: Removed two error messages that have been found to create false +positives, until they can be fixed and fully validated (ACPICA BZ 1112): +1) Illegal forward reference within a method +2) Illegal reference across two methods + +iASL: Implemented a new option (-lm) to create a hardware mapping file +that summarizes all GPIO, I2C, SPI, and UART connections. This option +works for both the compiler and disassembler. See the iASL compiler user +guide for additional information and examples (section 6.4.6). + +AcpiDump: Added support for the version 1 (ACPI 1.0) RSDP in addition to +version 2. This corrects the AE_BAD_HEADER exception seen on systems with +a version 1 RSDP. Lv Zheng ACPICA BZ 1097. + +AcpiExec: For Unix versions, don't attempt to put STDIN into raw mode +unless STDIN is actually a terminal. Assists with batch-mode processing. +ACPICA BZ 1114. + +Disassembler/AcpiHelp: Added another large group of recognized _HID +values. + + +---------------------------------------- +28 August 2014. Summary of changes for version 20140828: + +1) ACPICA kernel-resident subsystem: + +Fixed a problem related to the internal use of the Timer() operator where +a 64-bit divide could cause an attempted link to a double-precision math +library. This divide is not actually necessary, so the code was +restructured to eliminate it. Lv Zheng. + +ACPI 5.1: Added support for the runtime validation of the _DSD package +(similar to the iASL support). + +ACPI 5.1/Headers: Added support for the GICC affinity subtable to the +SRAT table. Hanjun Guo . + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and +has a much larger code and data size. + + Current Release: + Non-Debug Version: 98.8K Code, 27.3K Data, 126.1K Total + Debug Version: 192.1K Code, 79.8K Data, 271.9K Total + Previous Release: + Non-Debug Version: 98.7K Code, 27.3K Data, 126.0K Total1 + Debug Version: 192.0K Code, 79.7K Data, 271.7K Total + +2) iASL Compiler/Disassembler and Tools: + +AcpiExec: Fixed a problem on unix systems where the original terminal +state was not always properly restored upon exit. Seen when using the -v +option. ACPICA BZ 1104. + +iASL: Fixed a problem with the validation of the ranges/length within the +Memory24 resource descriptor. There was a boundary condition when the +range was equal to the (length -1) caused by the fact that these values +are defined in 256-byte blocks, not bytes. ACPICA BZ 1098 + +Disassembler: Fixed a problem with the GpioInt descriptor interrupt +polarity +flags. The flags are actually 2 bits, not 1, and the "ActiveBoth" keyword +is +now supported properly. + +ACPI 5.1: Added the GICC affinity subtable to the SRAT table. Supported +in the disassembler, data table compiler, and table template generator. + +iASL: Added a requirement for Device() objects that one of either a _HID +or _ADR must exist within the scope of a Device, as per the ACPI +specification. Remove a similar requirement that was incorrectly in place +for the _DSD object. + +iASL: Added error detection for illegal named references within control +methods that would cause runtime failures. Now trapped as errors are: 1) +References to objects within a non-parent control method. 2) Forward +references (within a method) -- for control methods, AML interpreters use +a one-pass parse of control methods. ACPICA BZ 1008. + +iASL: Added error checking for dependencies related to the _PSx power +methods. ACPICA BZ 1029. +1) For _PS0, one of these must exist within the same scope: _PS1, _PS2, +_PS3. +2) For _PS1, _PS2, and PS3: A _PS0 object must exist within the same +scope. + +iASL and table compiler: Cleanup miscellaneous memory leaks by fully +deploying the existing object and string caches and adding new caches for +the table compiler. + +iASL: Split the huge parser source file into multiple subfiles to improve +manageability. Generation now requires the M4 macro preprocessor, which +is part of the Bison distribution on both unix and windows platforms. + +AcpiSrc: Fixed and removed all extraneous warnings generated during +entire ACPICA source code scan and/or conversion. + + +---------------------------------------- + +24 July 2014. Summary of changes for version 20140724: + +The ACPI 5.1 specification has been released and is available at: +http://uefi.org/specs/access + + +0) ACPI 5.1 support in ACPICA: + +ACPI 5.1 is fully supported in ACPICA as of this release. + +New predefined names. Support includes iASL and runtime ACPICA +validation. + _CCA (Cache Coherency Attribute). + _DSD (Device-Specific Data). David Box. + +Modifications to existing ACPI tables. Support includes headers, iASL +Data Table compiler, disassembler, and the template generator. + FADT - New fields and flags. Graeme Gregory. + GTDT - One new subtable and new fields. Tomasz Nowicki. + MADT - Two new subtables. Tomasz Nowicki. + PCCT - One new subtable. + +Miscellaneous. + New notification type for System Resource Affinity change events. + + +1) ACPICA kernel-resident subsystem: + +Fixed a regression introduced in 20140627 where a fault can happen during +the deletion of Alias AML namespace objects. The problem affected both +the core ACPICA and the ACPICA tools including iASL and AcpiExec. + +Implemented a new GPE public interface, AcpiMarkGpeForWake. Provides a +simple mechanism to enable wake GPEs that have no associated handler or +control method. Rafael Wysocki. + +Updated the AcpiEnableGpe interface to disallow the enable if there is no +handler or control method associated with the particular GPE. This will +help avoid meaningless GPEs and even GPE floods. Rafael Wysocki. + +Updated GPE handling and dispatch by disabling the GPE before clearing +the status bit for edge-triggered GPEs. Lv Zheng. + +Added Timer() support to the AML Debug object. The current timer value is +now displayed with each invocation of (Store to) the debug object to +enable simple generation of execution times for AML code (method +execution for example.) ACPICA BZ 1093. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and +has a much larger code and data size. + + Current Release: + Non-Debug Version: 98.7K Code, 27.3K Data, 126.0K Total + Debug Version: 192.0K Code, 79.7K Data, 271.7K Total + Previous Release: + Non-Debug Version: 98.7K Code, 27.2K Data, 125.9K Total + Debug Version: 191.7K Code, 79.6K Data, 271.3K Total + + +2) iASL Compiler/Disassembler and Tools: + +Fixed an issue with the recently added local printf implementation, +concerning width/precision specifiers that could cause incorrect output. +Lv Zheng. ACPICA BZ 1094. + +Disassembler: Added support to detect buffers that contain UUIDs and +disassemble them to an invocation of the ToUUID operator. Also emit +commented descriptions of known ACPI-related UUIDs. + +AcpiHelp: Added support to display known ACPI-related UUIDs. New option, +-u. Adds three new files. + +iASL: Update table compiler and disassembler for DMAR table changes that +were introduced in September 2013. With assistance by David Woodhouse. + +---------------------------------------- +27 June 2014. Summary of changes for version 20140627: + +1) ACPICA kernel-resident subsystem: + +Formatted Output: Implemented local versions of standard formatted output +utilities such as printf, etc. Over time, it has been discovered that +there are in fact many portability issues with printf, and the addition +of this feature will fix/prevent these issues once and for all. Some +known issues are summarized below: + +1) Output of 64-bit values is not portable. For example, UINT64 is %ull +for the Linux kernel and is %uI64 for some MSVC versions. +2) Invoking printf consistently in a manner that is portable across both +32-bit and 64-bit platforms is difficult at best in many situations. +3) The output format for pointers varies from system to system (leading +zeros especially), and leads to inconsistent output from ACPICA across +platforms. +4) Certain platform-specific printf formats may conflict with ACPICA use. +5) If there is no local C library available, ACPICA now has local support +for printf. + +-- To address these printf issues in a complete manner, ACPICA now +directly implements a small subset of printf format specifiers, only +those that it requires. Adds a new file, utilities/utprint.c. Lv Zheng. + +Implemented support for ACPICA generation within the EFI environment. +Initially, the AcpiDump utility is supported in the UEFI shell +environment. Lv Zheng. + +Added a new external interface, AcpiLogError, to improve ACPICA +portability. This allows the host to redirect error messages from the +ACPICA utilities. Lv Zheng. + +Added and deployed new OSL file I/O interfaces to improve ACPICA +portability: + AcpiOsOpenFile + AcpiOsCloseFile + AcpiOsReadFile + AcpiOsWriteFile + AcpiOsGetFileOffset + AcpiOsSetFileOffset +There are C library implementations of these functions in the new file +service_layers/oslibcfs.c -- however, the functions can be implemented by +the local host in any way necessary. Lv Zheng. + +Implemented a mechanism to disable/enable ACPI table checksum validation +at runtime. This can be useful when loading tables very early during OS +initialization when it may not be possible to map the entire table in +order to compute the checksum. Lv Zheng. + +Fixed a buffer allocation issue for the Generic Serial Bus support. +Originally, a fixed buffer length was used. This change allows for +variable-length buffers based upon the protocol indicated by the field +access attributes. Reported by Lan Tianyu. Lv Zheng. + +Fixed a problem where an object detached from a namespace node was not +properly terminated/cleared and could cause a circular list problem if +reattached. ACPICA BZ 1063. David Box. + +Fixed a possible recursive lock acquisition in hwregs.c. Rakib Mullick. + +Fixed a possible memory leak in an error return path within the function +AcpiUtCopyIobjectToIobject. ACPICA BZ 1087. Colin Ian King. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and +has a much larger code and data size. + + Current Release: + Non-Debug Version: 98.7K Code, 27.2K Data, 125.9K Total + Debug Version: 191.7K Code, 79.6K Data, 271.3K Total + Previous Release: + Non-Debug Version: 96.8K Code, 27.2K Data, 124.0K Total + Debug Version: 189.5K Code, 79.7K Data, 269.2K Total + + +2) iASL Compiler/Disassembler and Tools: + +Disassembler: Add dump of ASCII equivalent text within a comment at the +end of each line of the output for the Buffer() ASL operator. + +AcpiDump: Miscellaneous changes: + Fixed repetitive table dump in -n mode. + For older EFI platforms, use the ACPI 1.0 GUID during RSDP search if +the ACPI 2.0 GUID fails. + +iASL: Fixed a problem where the compiler could fault if incorrectly given +an acpidump output file as input. ACPICA BZ 1088. David Box. + +AcpiExec/AcpiNames: Fixed a problem where these utilities could fault if +they are invoked without any arguments. + +Debugger: Fixed a possible memory leak in an error return path. ACPICA BZ +1086. Colin Ian King. + +Disassembler: Cleaned up a block of code that extracts a parent Op +object. Added a comment that explains that the parent is guaranteed to be +valid in this case. ACPICA BZ 1069. + +---------------------------------------- +24 April 2014. Summary of changes for version 20140424: + +1) ACPICA kernel-resident subsystem: + +Implemented support to skip/ignore NULL address entries in the RSDT/XSDT. +Some of these tables are known to contain a trailing NULL entry. Lv +Zheng. + +Removed an extraneous error message for the case where there are a large +number of system GPEs (> 124). This was the "32-bit FADT register is too +long to convert to GAS struct" message, which is irrelevant for GPEs +since the GPEx_BLK_LEN fields of the FADT are always used instead of the +(limited capacity) GAS bit length. Also, several changes to ensure proper +support for GPE numbers > 255, where some "GPE number" fields were 8-bits +internally. + +Implemented and deployed additional configuration support for the public +ACPICA external interfaces. Entire classes of interfaces can now be +easily modified or configured out, replaced by stubbed inline functions +by default. Lv Zheng. + +Moved all public ACPICA runtime configuration globals to the public +ACPICA external interface file for convenience. Also, removed some +obsolete/unused globals. See the file acpixf.h. Lv Zheng. + +Documentation: Added a new section to the ACPICA reference describing the +maximum number of GPEs that can be supported by the FADT-defined GPEs in +block zero and one. About 1200 total. See section 4.4.1 of the ACPICA +reference. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and +has a much larger code and data size. + + Current Release: + Non-Debug Version: 96.8K Code, 27.2K Data, 124.0K Total + Debug Version: 189.5K Code, 79.7K Data, 269.2K Total + Previous Release: + Non-Debug Version: 97.0K Code, 27.2K Data, 124.2K Total + Debug Version: 189.7K Code, 79.5K Data, 269.2K Total + + +2) iASL Compiler/Disassembler and Tools: + +iASL and disassembler: Add full support for the LPIT table (Low Power +Idle Table). Includes support in the disassembler, data table compiler, +and template generator. + +AcpiDump utility: +1) Add option to force the use of the RSDT (over the XSDT). +2) Improve validation of the RSDP signature (use 8 chars instead of 4). + +iASL: Add check for predefined packages that are too large. For +predefined names that contain subpackages, check if each subpackage is +too large. (Check for too small already exists.) + +Debugger: Updated the GPE command (which simulates a GPE by executing the +GPE code paths in ACPICA). The GPE device is now optional, and defaults +to the GPE 0/1 FADT-defined blocks. + +Unix application OSL: Update line-editing support. Add additional error +checking and take care not to reset terminal attributes on exit if they +were never set. This should help guarantee that the terminal is always +left in the previous state on program exit. + +---------------------------------------- +25 March 2014. Summary of changes for version 20140325: + +1) ACPICA kernel-resident subsystem: + +Updated the auto-serialize feature for control methods. This feature +automatically serializes all methods that create named objects in order +to prevent runtime errors. The update adds support to ignore the +currently executing AML SyncLevel when invoking such a method, in order +to prevent disruption of any existing SyncLevel priorities that may exist +in the AML code. Although the use of SyncLevels is relatively rare, this +change fixes a regression where an AE_AML_MUTEX_ORDER exception can +appear on some machines starting with the 20140214 release. + +Added a new external interface to allow the host to install ACPI tables +very early, before the namespace is even created. AcpiInstallTable gives +the host additional flexibility for ACPI table management. Tables can be +installed directly by the host as if they had originally appeared in the +XSDT/RSDT. Installed tables can be SSDTs or other ACPI data tables +(anything except the DSDT and FACS). Adds a new file, tbdata.c, along +with additional internal restructuring and cleanup. See the ACPICA +Reference for interface details. Lv Zheng. + +Added validation of the checksum for all incoming dynamically loaded +tables (via external interfaces or via AML Load/LoadTable operators). Lv +Zheng. + +Updated the use of the AcpiOsWaitEventsComplete interface during Notify +and GPE handler removal. Restructured calls to eliminate possible race +conditions. Lv Zheng. + +Added a warning for the use/execution of the ASL/AML Unload (table) +operator. This will help detect and identify machines that use this +operator if and when it is ever used. This operator has never been seen +in the field and the usage model and possible side-effects of the drastic +runtime action of a full table removal are unknown. + +Reverted the use of #pragma push/pop which was introduced in the 20140214 +release. It appears that push and pop are not implemented by enough +compilers to make the use of this feature feasible for ACPICA at this +time. However, these operators may be deployed in a future ACPICA +release. + +Added the missing EXPORT_SYMBOL macros for the install and remove SCI +handler interfaces. + +Source code generation: +1) Disabled the use of the "strchr" macro for the gcc-specific +generation. For some versions of gcc, this macro can periodically expose +a compiler bug which in turn causes compile-time error(s). +2) Added support for PPC64 compilation. Colin Ian King. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and +has a much larger code and data size. + + Current Release: + Non-Debug Version: 97.0K Code, 27.2K Data, 124.2K Total + Debug Version: 189.7K Code, 79.5K Data, 269.2K Total + Previous Release: + Non-Debug Version: 96.5K Code, 27.2K Data, 123.7K Total + Debug Version: 188.6K Code, 79.0K Data, 267.6K Total + + +2) iASL Compiler/Disassembler and Tools: + +Disassembler: Added several new features to improve the readability of +the resulting ASL code. Extra information is emitted within comment +fields in the ASL code: +1) Known _HID/_CID values are decoded to descriptive text. +2) Standard values for the Notify() operator are decoded to descriptive +text. +3) Target operands are expanded to full pathnames (in a comment) when +possible. + +Disassembler: Miscellaneous updates for extern() handling: +1) Abort compiler if file specified by -fe option does not exist. +2) Silence unnecessary warnings about argument count mismatches. +3) Update warning messages concerning unresolved method externals. +4) Emit "UnknownObj" keyword for externals whose type cannot be +determined. + +AcpiHelp utility: +1) Added the -a option to display both the ASL syntax and the AML +encoding for an input ASL operator. This effectively displays all known +information about an ASL operator with one AcpiHelp invocation. +2) Added substring match support (similar to a wildcard) for the -i +(_HID/PNP IDs) option. + +iASL/Disassembler: Since this tool does not yet support execution on big- +endian machines, added detection of endianness and an error message if +execution is attempted on big-endian. Support for big-endian within iASL +is a feature that is on the ACPICA to-be-done list. + +AcpiBin utility: +1) Remove option to extract binary files from an acpidump; this function +is made obsolete by the AcpiXtract utility. +2) General cleanup of open files and allocated buffers. + +---------------------------------------- +14 February 2014. Summary of changes for version 20140214: + +1) ACPICA kernel-resident subsystem: + +Implemented a new mechanism to proactively prevent problems with ill- +behaved reentrant control methods that create named ACPI objects. This +behavior is illegal as per the ACPI specification, but is nonetheless +frequently seen in the field. Previously, this could lead to an +AE_ALREADY_EXISTS exception if the method was actually entered by more +than one thread. This new mechanism detects such methods at table load +time and marks them "serialized" to prevent reentrancy. A new global +option, AcpiGbl_AutoSerializeMethods, has been added to disable this +feature if desired. This mechanism and global option obsoletes and +supersedes the previous AcpiGbl_SerializeAllMethods option. + +Added the "Windows 2013" string to the _OSI support. ACPICA will now +respond TRUE to _OSI queries with this string. It is the stated policy of +ACPICA to add new strings to the _OSI support as soon as possible after +they are defined. See the full ACPICA _OSI policy which has been added to +the utilities/utosi.c file. + +Hardened/updated the _PRT return value auto-repair code: +1) Do not abort the repair on a single subpackage failure, continue to +check all subpackages. +2) Add check for the minimum subpackage length (4). +3) Properly handle extraneous NULL package elements. + +Added support to avoid the possibility of infinite loops when traversing +object linked lists. Never allow an infinite loop, even in the face of +corrupted object lists. + +ACPICA headers: Deployed the use of #pragma pack(push) and #pragma +pack(pop) directives to ensure that the ACPICA headers are independent of +compiler settings or other host headers. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and +has a much larger code and data size. + + Current Release: + Non-Debug Version: 96.5K Code, 27.2K Data, 123.7K Total + Debug Version: 188.6K Code, 79.0K Data, 267.6K Total + Previous Release: + Non-Debug Version: 96.2K Code, 27.0K Data, 123.2K Total + Debug Version: 187.5K Code, 78.3K Data, 265.8K Total + + +2) iASL Compiler/Disassembler and Tools: + +iASL/Table-compiler: Fixed a problem with support for the SPMI table. The +first reserved field was incorrectly forced to have a value of zero. This +change correctly forces the field to have a value of one. ACPICA BZ 1081. + +Debugger: Added missing support for the "Extra" and "Data" subobjects +when displaying object data. + +Debugger: Added support to display entire object linked lists when +displaying object data. + +iASL: Removed the obsolete -g option to obtain ACPI tables from the +Windows registry. This feature has been superseded by the acpidump +utility. + +---------------------------------------- +14 January 2014. Summary of changes for version 20140114: + +1) ACPICA kernel-resident subsystem: + +Updated all ACPICA copyrights and signons to 2014. Added the 2014 +copyright to all module headers and signons, including the standard Linux +header. This affects virtually every file in the ACPICA core subsystem, +iASL compiler, all ACPICA utilities, and the test suites. + +Improved parameter validation for AcpiInstallGpeBlock. Added the +following checks: +1) The incoming device handle refers to type ACPI_TYPE_DEVICE. +2) There is not already a GPE block attached to the device. +Likewise, with AcpiRemoveGpeBlock, ensure that the incoming object is a +device. + +Correctly support "references" in the ACPI_OBJECT. This change fixes the +support to allow references (namespace nodes) to be passed as arguments +to control methods via the evaluate object interface. This is probably +most useful for testing purposes, however. + +Improved support for 32/64 bit physical addresses in printf()-like +output. This change improves the support for physical addresses in printf +debug statements and other output on both 32-bit and 64-bit hosts. It +consistently outputs the appropriate number of bytes for each host. The +%p specifier is unsatisfactory since it does not emit uniform output on +all hosts/clib implementations (on some, leading zeros are not supported, +leading to difficult-to-read output). + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and +has a much larger code and data size. + + Current Release: + Non-Debug Version: 96.2K Code, 27.0K Data, 123.2K Total + Debug Version: 187.5K Code, 78.3K Data, 265.8K Total + Previous Release: + Non-Debug Version: 96.1K Code, 27.0K Data, 123.1K Total + Debug Version: 185.6K Code, 77.3K Data, 262.9K Total + + +2) iASL Compiler/Disassembler and Tools: + +iASL: Fix a possible fault when using the Connection() operator. Fixes a +problem if the parent Field definition for the Connection operator refers +to an operation region that does not exist. ACPICA BZ 1064. + +AcpiExec: Load of local test tables is now optional. The utility has the +capability to load some various tables to test features of ACPICA. +However, there are enough of them that the output of the utility became +confusing. With this change, only the required local tables are displayed +(RSDP, XSDT, etc.) along with the actual tables loaded via the command +line specification. This makes the default output simler and easier to +understand. The -el command line option restores the original behavior +for testing purposes. + +AcpiExec: Added support for overlapping operation regions. This change +expands the simulation of operation regions by supporting regions that +overlap within the given address space. Supports SystemMemory and +SystemIO. ASLTS test suite updated also. David Box. ACPICA BZ 1031. + +AcpiExec: Added region handler support for PCI_Config and EC spaces. This +allows AcpiExec to simulate these address spaces, similar to the current +support for SystemMemory and SystemIO. + +Debugger: Added new command to read/write/compare all namespace objects. +The command "test objects" will exercise the entire namespace by writing +new values to each data object, and ensuring that the write was +successful. The original value is then restored and verified. + +Debugger: Added the "test predefined" command. This change makes this +test public and puts it under the new "test" command. The test executes +each and every predefined name within the current namespace. + +---------------------------------------- +18 December 2013. Summary of changes for version 20131218: + +Global note: The ACPI 5.0A specification was released this month. There +are no changes needed for ACPICA since this release of ACPI is an +errata/clarification release. The specification is available at +acpi.info. + + +1) ACPICA kernel-resident subsystem: + +Added validation of the XSDT root table if it is present. Some older +platforms contain an XSDT that is ill-formed or otherwise invalid (such +as containing some or all entries that are NULL pointers). This change +adds a new function to validate the XSDT before actually using it. If the +XSDT is found to be invalid, ACPICA will now automatically fall back to +using the RSDT instead. Original implementation by Zhao Yakui. Ported to +ACPICA and enhanced by Lv Zheng and Bob Moore. + +Added a runtime option to ignore the XSDT and force the use of the RSDT. +This change adds a runtime option that will force ACPICA to use the RSDT +instead of the XSDT (AcpiGbl_DoNotUseXsdt). Although the ACPI spec +requires that an XSDT be used instead of the RSDT, the XSDT has been +found to be corrupt or ill-formed on some machines. Lv Zheng. + +Added a runtime option to favor 32-bit FADT register addresses over the +64-bit addresses. This change adds an option to favor 32-bit FADT +addresses when there is a conflict between the 32-bit and 64-bit versions +of the same register. The default behavior is to use the 64-bit version +in accordance with the ACPI specification. This can now be overridden via +the AcpiGbl_Use32BitFadtAddresses flag. ACPICA BZ 885. Lv Zheng. + +During the change above, the internal "Convert FADT" and "Verify FADT" +functions have been merged to simplify the code, making it easier to +understand and maintain. ACPICA BZ 933. + +Improve exception reporting and handling for GPE block installation. +Return an actual status from AcpiEvGetGpeXruptBlock and don't clobber the +status when exiting AcpiEvInstallGpeBlock. ACPICA BZ 1019. + +Added helper macros to extract bus/segment numbers from the HEST table. +This change adds two macros to extract the encoded bus and segment +numbers from the HEST Bus field - ACPI_HEST_BUS and ACPI_HEST_SEGMENT. +Betty Dall + +Removed the unused ACPI_FREE_BUFFER macro. This macro is no longer used +by ACPICA. It is not a public macro, so it should have no effect on +existing OSV code. Lv Zheng. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and +has a much larger code and data size. + + Current Release: + Non-Debug Version: 96.1K Code, 27.0K Data, 123.1K Total + Debug Version: 185.6K Code, 77.3K Data, 262.9K Total + Previous Release: + Non-Debug Version: 95.9K Code, 27.0K Data, 122.9K Total + Debug Version: 185.1K Code, 77.2K Data, 262.3K Total + + +2) iASL Compiler/Disassembler and Tools: + +Disassembler: Improved pathname support for emitted External() +statements. This change adds full pathname support for external names +that have been resolved internally by the inclusion of additional ACPI +tables (via the iASL -e option). Without this change, the disassembler +can emit multiple externals for the same object, or it become confused +when the Scope() operator is used on an external object. Overall, greatly +improves the ability to actually recompile the emitted ASL code when +objects a referenced across multiple ACPI tables. Reported by Michael +Tsirkin (mst@redhat.com). + +Tests/ASLTS: Updated functional control suite to execute with no errors. +David Box. Fixed several errors related to the testing of the interpreter +slack mode. Lv Zheng. + +iASL: Added support to detect names that are declared within a control +method, but are unused (these are temporary names that are only valid +during the time the method is executing). A remark is issued for these +cases. ACPICA BZ 1022. + +iASL: Added full support for the DBG2 table. Adds full disassembler, +table compiler, and template generator support for the DBG2 table (Debug +Port 2 table). + +iASL: Added full support for the PCCT table, update the table definition. +Updates the PCCT table definition in the actbl3.h header and adds table +compiler and template generator support. + +iASL: Added an option to emit only error messages (no warnings/remarks). +The -ve option will enable only error messages, warnings and remarks are +suppressed. This can simplify debugging when only the errors are +important, such as when an ACPI table is disassembled and there are many +warnings and remarks -- but only the actual errors are of real interest. + +Example ACPICA code (source/tools/examples): Updated the example code so +that it builds to an actual working program, not just example code. Added +ACPI tables and execution of an example control method in the DSDT. Added +makefile support for Unix generation. + +---------------------------------------- +15 November 2013. Summary of changes for version 20131115: + +This release is available at https://acpica.org/downloads + + +1) ACPICA kernel-resident subsystem: + +Resource Manager: Fixed loop termination for the "get AML length" +function. The loop previously had an error termination on a NULL resource +pointer, which can never happen since the loop simply increments a valid +resource pointer. This fix changes the loop to terminate with an error on +an invalid end-of-buffer condition. The problem can be seen as an +infinite loop by callers to AcpiSetCurrentResources with an invalid or +corrupted resource descriptor, or a resource descriptor that is missing +an END_TAG descriptor. Reported by Dan Carpenter +. Lv Zheng, Bob Moore. + +Table unload and ACPICA termination: Delete all attached data objects +during namespace node deletion. This fix updates namespace node deletion +to delete the entire list of attached objects (attached via +AcpiAttachObject) instead of just one of the attached items. ACPICA BZ +1024. Tomasz Nowicki (tomasz.nowicki@linaro.org). + +ACPICA termination: Added support to delete all objects attached to the +root namespace node. This fix deletes any and all objects that have been +attached to the root node via AcpiAttachData. Previously, none of these +objects were deleted. Reported by Tomasz Nowicki. ACPICA BZ 1026. + +Debug output: Do not emit the function nesting level for the in-kernel +build. The nesting level is really only useful during a single-thread +execution. Therefore, only enable this output for the AcpiExec utility. +Also, only emit the thread ID when executing under AcpiExec (Context +switches are still always detected and a message is emitted). ACPICA BZ +972. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and +has a much larger code and data size. + + Current Release: + Non-Debug Version: 95.9K Code, 27.0K Data, 122.9K Total + Debug Version: 185.1K Code, 77.2K Data, 262.3K Total + Previous Release: + Non-Debug Version: 95.8K Code, 27.0K Data, 122.8K Total + Debug Version: 185.2K Code, 77.2K Data, 262.4K Total + + +2) iASL Compiler/Disassembler and Tools: + +AcpiExec/Unix-OSL: Use instead of . This is the +correct portable POSIX header for terminal control functions. + +Disassembler: Fixed control method invocation issues related to the use +of the CondRefOf() operator. The problem is seen in the disassembly where +control method invocations may not be disassembled properly if the +control method name has been used previously as an argument to CondRefOf. +The solution is to not attempt to emit an external declaration for the +CondRefOf target (it is not necessary in the first place). This prevents +disassembler object type confusion. ACPICA BZ 988. + +Unix Makefiles: Added an option to disable compiler optimizations and the +_FORTIFY_SOURCE flag. Some older compilers have problems compiling ACPICA +with optimizations (reportedly, gcc 4.4 for example). This change adds a +command line option for make (NOOPT) that disables all compiler +optimizations and the _FORTIFY_SOURCE compiler flag. The default +optimization is -O2 with the _FORTIFY_SOURCE flag specified. ACPICA BZ +1034. Lv Zheng, Bob Moore. + +Tests/ASLTS: Added options to specify individual test cases and modes. +This allows testers running aslts.sh to optionally specify individual +test modes and test cases. Also added an option to disable the forced +generation of the ACPICA tools from source if desired. Lv Zheng. + +---------------------------------------- +27 September 2013. Summary of changes for version 20130927: + +This release is available at https://acpica.org/downloads + + +1) ACPICA kernel-resident subsystem: + +Fixed a problem with store operations to reference objects. This change +fixes a problem where a Store operation to an ArgX object that contained +a +reference to a field object did not complete the automatic dereference +and +then write to the actual field object. Instead, the object type of the +field object was inadvertently changed to match the type of the source +operand. The new behavior will actually write to the field object (buffer +field or field unit), thus matching the correct ACPI-defined behavior. + +Implemented support to allow the host to redefine individual OSL +prototypes. This change enables the host to redefine OSL prototypes found +in the acpiosxf.h file. This allows the host to implement OSL interfaces +with a macro or inlined function. Further, it allows the host to add any +additional required modifiers such as __iomem, __init, __exit, etc., as +necessary on a per-interface basis. Enables maximum flexibility for the +OSL interfaces. Lv Zheng. + +Hardcoded the access width for the FADT-defined reset register. The ACPI +specification requires the reset register width to be 8 bits. ACPICA now +hardcodes the width to 8 and ignores the FADT width value. This provides +compatibility with other ACPI implementations that have allowed BIOS code +with bad register width values to go unnoticed. Matthew Garett, Bob +Moore, +Lv Zheng. + +Changed the position/use of the ACPI_PRINTF_LIKE macro. This macro is +used +in the OSL header (acpiosxf). The change modifies the position of this +macro in each instance where it is used (AcpiDebugPrint, etc.) to avoid +build issues if the OSL defines the implementation of the interface to be +an inline stub function. Lv Zheng. + +Deployed a new macro ACPI_EXPORT_SYMBOL_INIT for the main ACPICA +initialization interfaces. This change adds a new macro for the main init +and terminate external interfaces in order to support hosts that require +additional or different processing for these functions. Changed from +ACPI_EXPORT_SYMBOL to ACPI_EXPORT_SYMBOL_INIT for these functions. Lv +Zheng, Bob Moore. + +Cleaned up the memory allocation macros for configurability. In the +common +case, the ACPI_ALLOCATE and related macros now resolve directly to their +respective AcpiOs* OSL interfaces. Two options: +1) The ACPI_ALLOCATE_ZEROED macro uses a simple local implementation by +default, unless overridden by the USE_NATIVE_ALLOCATE_ZEROED define. +2) For AcpiExec (and for debugging), the macros can optionally be +resolved +to the local ACPICA interfaces that track each allocation (local tracking +is used to immediately detect memory leaks). +Lv Zheng. + +Simplified the configuration for ACPI_REDUCED_HARDWARE. Allows the kernel +to predefine this macro to either TRUE or FALSE during the system build. + +Replaced __FUNCTION_ with __func__ in the gcc-specific header. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and +has a much larger code and data size. + + Current Release: + Non-Debug Version: 95.8K Code, 27.0K Data, 122.8K Total + Debug Version: 185.2K Code, 77.2K Data, 262.4K Total + Previous Release: + Non-Debug Version: 96.7K Code, 27.1K Data, 123.9K Total + Debug Version: 184.4K Code, 76.8K Data, 261.2K Total + + +2) iASL Compiler/Disassembler and Tools: + +iASL: Implemented wildcard support for the -e option. This simplifies use +when there are many SSDTs that must be included to resolve external +method +declarations. ACPICA BZ 1041. Example: + iasl -e ssdt*.dat -d dsdt.dat + +AcpiExec: Add history/line-editing for Unix/Linux systems. This change +adds a portable module that implements full history and limited line +editing for Unix and Linux systems. It does not use readline() due to +portability issues. Instead it uses the POSIX termio interface to put the +terminal in raw input mode so that the various special keys can be +trapped +(such as up/down-arrow for history support and left/right-arrow for line +editing). Uses the existing debugger history mechanism. ACPICA BZ 1036. + +AcpiXtract: Add support to handle (ignore) "empty" lines containing only +one or more spaces. This provides compatible with early or different +versions of the AcpiDump utility. ACPICA BZ 1044. + +AcpiDump: Do not ignore tables that contain only an ACPI table header. +Apparently, some BIOSs create SSDTs that contain an ACPI table header but +no other data. This change adds support to dump these tables. Any tables +shorter than the length of an ACPI table header remain in error (an error +message is emitted). Reported by Yi Li. + +Debugger: Echo actual command along with the "unknown command" message. + +---------------------------------------- 23 August 2013. Summary of changes for version 20130823: 1) ACPICA kernel-resident subsystem: Copied and modified: head/sys/contrib/dev/acpica/common/acgetline.c (from r256655, vendor-sys/acpica/dist/source/common/acgetline.c) ============================================================================== --- vendor-sys/acpica/dist/source/common/acgetline.c Thu Oct 17 00:06:42 2013 (r256655, copy source) +++ head/sys/contrib/dev/acpica/common/acgetline.c Thu Oct 2 19:11:18 2014 (r272444) @@ -5,7 +5,7 @@ *****************************************************************************/ /* *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 19:35:28 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1B347E30; Thu, 2 Oct 2014 19:35:28 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E9E99751; Thu, 2 Oct 2014 19:35:27 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 818C2B9D5; Thu, 2 Oct 2014 15:35:26 -0400 (EDT) From: John Baldwin To: Rui Paulo Subject: Re: svn commit: r272442 - head/sys/modules/ncr Date: Thu, 2 Oct 2014 15:07:23 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20140415; KDE/4.5.5; amd64; ; ) References: <201410021845.s92Ij1ZW037196@svn.freebsd.org> In-Reply-To: <201410021845.s92Ij1ZW037196@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201410021507.23770.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 02 Oct 2014 15:35:26 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 19:35:28 -0000 On Thursday, October 02, 2014 2:45:01 pm Rui Paulo wrote: > Author: rpaulo > Date: Thu Oct 2 18:45:00 2014 > New Revision: 272442 > URL: https://svnweb.freebsd.org/changeset/base/272442 > > Log: > Remove the extra CFLAGS now that the driver has been fixed by jhb. Oops, sorry I missed that. Thanks for fixing it. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 19:53:40 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 41D5D56B; Thu, 2 Oct 2014 19:53:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 27BFF946; Thu, 2 Oct 2014 19:53:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92Jref8070848; Thu, 2 Oct 2014 19:53:40 GMT (envelope-from brd@FreeBSD.org) Received: (from brd@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92Jrc7i070838; Thu, 2 Oct 2014 19:53:38 GMT (envelope-from brd@FreeBSD.org) Message-Id: <201410021953.s92Jrc7i070838@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brd set sender to brd@FreeBSD.org using -f From: Brad Davis Date: Thu, 2 Oct 2014 19:53:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272445 - in head: etc/mtree usr.sbin/pw usr.sbin/pw/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 19:53:40 -0000 Author: brd (doc committer) Date: Thu Oct 2 19:53:37 2014 New Revision: 272445 URL: https://svnweb.freebsd.org/changeset/base/272445 Log: - Add a test for bug 191427 where pw(8) will go into an infinite loop Reviewed by: will MFC after: 1 month Added: head/usr.sbin/pw/tests/ head/usr.sbin/pw/tests/Makefile (contents, props changed) head/usr.sbin/pw/tests/group (contents, props changed) head/usr.sbin/pw/tests/helper_functions.shin (contents, props changed) head/usr.sbin/pw/tests/master.passwd (contents, props changed) head/usr.sbin/pw/tests/pw_delete.sh (contents, props changed) Modified: head/etc/mtree/BSD.tests.dist head/usr.sbin/pw/Makefile Modified: head/etc/mtree/BSD.tests.dist ============================================================================== --- head/etc/mtree/BSD.tests.dist Thu Oct 2 19:11:18 2014 (r272444) +++ head/etc/mtree/BSD.tests.dist Thu Oct 2 19:53:37 2014 (r272445) @@ -287,6 +287,8 @@ .. newsyslog .. + pw + .. sa .. .. Modified: head/usr.sbin/pw/Makefile ============================================================================== --- head/usr.sbin/pw/Makefile Thu Oct 2 19:11:18 2014 (r272444) +++ head/usr.sbin/pw/Makefile Thu Oct 2 19:53:37 2014 (r272445) @@ -11,4 +11,10 @@ WARNS?= 2 DPADD= ${LIBCRYPT} ${LIBUTIL} LDADD= -lcrypt -lutil +.include + +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include Added: head/usr.sbin/pw/tests/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/pw/tests/Makefile Thu Oct 2 19:53:37 2014 (r272445) @@ -0,0 +1,10 @@ +# $FreeBSD$ + +TESTSDIR= ${TESTSBASE}/usr.sbin/pw + +ATF_TESTS_SH= pw_delete + +FILES= group helper_functions.shin master.passwd +FILESDIR= ${TESTSDIR} + +.include Added: head/usr.sbin/pw/tests/group ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/pw/tests/group Thu Oct 2 19:53:37 2014 (r272445) @@ -0,0 +1,3 @@ +# $FreeBSD$ +# +wheel:*:0:root Added: head/usr.sbin/pw/tests/helper_functions.shin ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/pw/tests/helper_functions.shin Thu Oct 2 19:53:37 2014 (r272445) @@ -0,0 +1,15 @@ +# $FreeBSD$ + +# Workdir to run tests in +TESTDIR=$(atf_get_srcdir) + +# Populate the files pw needs to use into $HOME/etc +populate_etc_skel() { + cp ${TESTDIR}/master.passwd ${HOME} || \ + atf_fail "Populating master.passwd in ${HOME}" + cp ${TESTDIR}/group ${HOME} || atf_fail "Populating group in ${HOME}" + + # Generate the passwd file + pwd_mkdb -p -d ${HOME} ${HOME}/master.passwd || \ + atf_fail "generate passwd from master.passwd" +} Added: head/usr.sbin/pw/tests/master.passwd ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/pw/tests/master.passwd Thu Oct 2 19:53:37 2014 (r272445) @@ -0,0 +1,4 @@ +# $FreeBSD$ +# +root:*:0:0::0:0:Charlie &:/root:/bin/csh +toor:*:0:0::0:0:Bourne-again Superuser:/root: Added: head/usr.sbin/pw/tests/pw_delete.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/pw/tests/pw_delete.sh Thu Oct 2 19:53:37 2014 (r272445) @@ -0,0 +1,24 @@ +# $FreeBSD$ + +# Import helper functions +. $(atf_get_srcdir)/helper_functions.shin + +# Test that a user can be deleted when another user is part of this +# user's default group and does not go into an infinate loop. +# PR: 191427 +atf_test_case rmuser_seperate_group cleanup +rmuser_seperate_group_head() { + atf_set "timeout" "30" +} +rmuser_seperate_group_body() { + populate_etc_skel + pw -V ${HOME} useradd test || atf_fail "Creating test user" + pw -V ${HOME} groupmod test -M 'test,root' || \ + atf_fail "Modifying the group" + pw -V ${HOME} userdel test || atf_fail "delete the user" +} + + +atf_init_test_cases() { + atf_add_test_case rmuser_seperate_group +} From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 20:01:15 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 60620AC3; Thu, 2 Oct 2014 20:01:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BDA4A1E; Thu, 2 Oct 2014 20:01:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92K1FVC074955; Thu, 2 Oct 2014 20:01:15 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92K1EJo074951; Thu, 2 Oct 2014 20:01:14 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201410022001.s92K1EJo074951@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Thu, 2 Oct 2014 20:01:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272446 - in head: sbin/ifconfig 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 20:01:15 -0000 Author: hrs Date: Thu Oct 2 20:01:13 2014 New Revision: 272446 URL: https://svnweb.freebsd.org/changeset/base/272446 Log: Separate option handling from SIOC[SG]LAGG to SIOC[SG]LAGGOPTS for backward compatibility with old ifconfig(8). Modified: head/sbin/ifconfig/iflagg.c head/sys/net/if_lagg.c head/sys/net/if_lagg.h Modified: head/sbin/ifconfig/iflagg.c ============================================================================== --- head/sbin/ifconfig/iflagg.c Thu Oct 2 19:53:37 2014 (r272445) +++ head/sbin/ifconfig/iflagg.c Thu Oct 2 20:01:13 2014 (r272446) @@ -85,27 +85,27 @@ setlaggproto(const char *val, int d, int static void setlaggflowidshift(const char *val, int d, int s, const struct afswtch *afp) { - struct lagg_reqall ra; + struct lagg_reqopts ro; - bzero(&ra, sizeof(ra)); - ra.ra_opts = LAGG_OPT_FLOWIDSHIFT; - strlcpy(ra.ra_ifname, name, sizeof(ra.ra_ifname)); - ra.ra_flowid_shift = (int)strtol(val, NULL, 10); - if (ra.ra_flowid_shift & ~LAGG_OPT_FLOWIDSHIFT_MASK) + bzero(&ro, sizeof(ro)); + ro.ro_opts = LAGG_OPT_FLOWIDSHIFT; + strlcpy(ro.ro_ifname, name, sizeof(ro.ro_ifname)); + ro.ro_flowid_shift = (int)strtol(val, NULL, 10); + if (ro.ro_flowid_shift & ~LAGG_OPT_FLOWIDSHIFT_MASK) errx(1, "Invalid flowid_shift option: %s", val); - if (ioctl(s, SIOCSLAGG, &ra) != 0) - err(1, "SIOCSLAGG"); + if (ioctl(s, SIOCSLAGGOPTS, &ro) != 0) + err(1, "SIOCSLAGGOPTS"); } static void setlaggsetopt(const char *val, int d, int s, const struct afswtch *afp) { - struct lagg_reqall ra; + struct lagg_reqopts ro; - bzero(&ra, sizeof(ra)); - ra.ra_opts = d; - switch (ra.ra_opts) { + bzero(&ro, sizeof(ro)); + ro.ro_opts = d; + switch (ro.ro_opts) { case LAGG_OPT_USE_FLOWID: case -LAGG_OPT_USE_FLOWID: case LAGG_OPT_LACP_STRICT: @@ -118,10 +118,10 @@ setlaggsetopt(const char *val, int d, in default: err(1, "Invalid lagg option"); } - strlcpy(ra.ra_ifname, name, sizeof(ra.ra_ifname)); + strlcpy(ro.ro_ifname, name, sizeof(ro.ro_ifname)); - if (ioctl(s, SIOCSLAGG, &ra) != 0) - err(1, "SIOCSLAGG"); + if (ioctl(s, SIOCSLAGGOPTS, &ro) != 0) + err(1, "SIOCSLAGGOPTS"); } static void @@ -186,6 +186,7 @@ lagg_status(int s) struct lagg_protos lpr[] = LAGG_PROTOS; struct lagg_reqport rp, rpbuf[LAGG_MAX_PORTS]; struct lagg_reqall ra; + struct lagg_reqopts ro; struct lagg_reqflags rf; struct lacp_opreq *lp; const char *proto = ""; @@ -193,6 +194,7 @@ lagg_status(int s) bzero(&rp, sizeof(rp)); bzero(&ra, sizeof(ra)); + bzero(&ro, sizeof(ro)); strlcpy(rp.rp_ifname, name, sizeof(rp.rp_ifname)); strlcpy(rp.rp_portname, name, sizeof(rp.rp_portname)); @@ -204,6 +206,9 @@ lagg_status(int s) ra.ra_size = sizeof(rpbuf); ra.ra_port = rpbuf; + strlcpy(ro.ro_ifname, name, sizeof(ro.ro_ifname)); + ioctl(s, SIOCGLAGGOPTS, &ro); + strlcpy(rf.rf_ifname, name, sizeof(rf.rf_ifname)); if (ioctl(s, SIOCGLAGGFLAGS, &rf) != 0) rf.rf_flags = 0; @@ -242,20 +247,20 @@ lagg_status(int s) if (verbose) { printf("\tlagg options:\n"); printf("\t\tuse_flowid: %d\n", - (ra.ra_opts & LAGG_OPT_USE_FLOWID) ? 1 : 0); - printf("\t\tflowid_shift: %d\n", ra.ra_flowid_shift); + (ro.ro_opts & LAGG_OPT_USE_FLOWID) ? 1 : 0); + printf("\t\tflowid_shift: %d\n", ro.ro_flowid_shift); switch (ra.ra_proto) { case LAGG_PROTO_LACP: printf("\t\tlacp_strict: %d\n", - (ra.ra_opts & LAGG_OPT_LACP_STRICT) ? 1 : 0); + (ro.ro_opts & LAGG_OPT_LACP_STRICT) ? 1 : 0); printf("\t\tlacp_rxtest: %d\n", - (ra.ra_opts & LAGG_OPT_LACP_RXTEST) ? 1 : 0); + (ro.ro_opts & LAGG_OPT_LACP_RXTEST) ? 1 : 0); printf("\t\tlacp_txtest: %d\n", - (ra.ra_opts & LAGG_OPT_LACP_TXTEST) ? 1 : 0); + (ro.ro_opts & LAGG_OPT_LACP_TXTEST) ? 1 : 0); } printf("\tlagg statistics:\n"); - printf("\t\tactive ports: %d\n", ra.ra_active); - printf("\t\tflapping: %u\n", ra.ra_flapping); + printf("\t\tactive ports: %d\n", ro.ro_active); + printf("\t\tflapping: %u\n", ro.ro_flapping); if (ra.ra_proto == LAGG_PROTO_LACP) { printf("\tlag id: %s\n", lacp_format_peer(lp, "\n\t\t ")); Modified: head/sys/net/if_lagg.c ============================================================================== --- head/sys/net/if_lagg.c Thu Oct 2 19:53:37 2014 (r272445) +++ head/sys/net/if_lagg.c Thu Oct 2 20:01:13 2014 (r272446) @@ -1189,6 +1189,7 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd { struct lagg_softc *sc = (struct lagg_softc *)ifp->if_softc; struct lagg_reqall *ra = (struct lagg_reqall *)data; + struct lagg_reqopts *ro = (struct lagg_reqopts *)data; struct lagg_reqport *rp = (struct lagg_reqport *)data, rpbuf; struct lagg_reqflags *rf = (struct lagg_reqflags *)data; struct ifreq *ifr = (struct ifreq *)data; @@ -1215,31 +1216,6 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd LAGG_RLOCK(sc, &tracker); ra->ra_proto = sc->sc_proto; lagg_proto_request(sc, &ra->ra_psc); - ra->ra_opts = sc->sc_opts; - if (sc->sc_proto == LAGG_PROTO_LACP) { - struct lacp_softc *lsc; - - lsc = (struct lacp_softc *)sc->sc_psc; - if (lsc->lsc_debug.lsc_tx_test != 0) - ra->ra_opts |= LAGG_OPT_LACP_TXTEST; - if (lsc->lsc_debug.lsc_rx_test != 0) - ra->ra_opts |= LAGG_OPT_LACP_RXTEST; - if (lsc->lsc_strict_mode != 0) - ra->ra_opts |= LAGG_OPT_LACP_STRICT; - - ra->ra_active = sc->sc_active; - } else { - /* - * LACP tracks active links automatically, - * the others do not. - */ - ra->ra_active = 0; - SLIST_FOREACH(lp, &sc->sc_ports, lp_entries) - ra->ra_active += LAGG_PORTACTIVE(lp); - } - ra->ra_flapping = sc->sc_flapping; - ra->ra_flowid_shift = sc->flowid_shift; - count = 0; buf = outbuf; len = min(ra->ra_size, buflen); @@ -1260,96 +1236,118 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd free(outbuf, M_TEMP); break; case SIOCSLAGG: - /* - * Set options or protocol depending on - * ra->ra_opts and ra->ra_proto. - */ error = priv_check(td, PRIV_NET_LAGG); if (error) break; - if (ra->ra_opts != 0) { - /* - * Set options. LACP options are stored in sc->sc_psc, - * not in sc_opts. - */ - int valid, lacp; + if (ra->ra_proto < 1 || ra->ra_proto >= LAGG_PROTO_MAX) { + error = EPROTONOSUPPORT; + break; + } - switch (ra->ra_opts) { - case LAGG_OPT_USE_FLOWID: - case -LAGG_OPT_USE_FLOWID: - case LAGG_OPT_FLOWIDSHIFT: - valid = 1; - lacp = 0; - break; + LAGG_WLOCK(sc); + lagg_proto_detach(sc); + lagg_proto_attach(sc, ra->ra_proto); + break; + case SIOCGLAGGOPTS: + ro->ro_opts = sc->sc_opts; + if (sc->sc_proto == LAGG_PROTO_LACP) { + struct lacp_softc *lsc; + + lsc = (struct lacp_softc *)sc->sc_psc; + if (lsc->lsc_debug.lsc_tx_test != 0) + ro->ro_opts |= LAGG_OPT_LACP_TXTEST; + if (lsc->lsc_debug.lsc_rx_test != 0) + ro->ro_opts |= LAGG_OPT_LACP_RXTEST; + if (lsc->lsc_strict_mode != 0) + ro->ro_opts |= LAGG_OPT_LACP_STRICT; + + ro->ro_active = sc->sc_active; + } else { + ro->ro_active = 0; + SLIST_FOREACH(lp, &sc->sc_ports, lp_entries) + ro->ro_active += LAGG_PORTACTIVE(lp); + } + ro->ro_flapping = sc->sc_flapping; + ro->ro_flowid_shift = sc->flowid_shift; + break; + case SIOCSLAGGOPTS: + error = priv_check(td, PRIV_NET_LAGG); + if (error) + break; + if (ro->ro_opts == 0) + break; + /* + * Set options. LACP options are stored in sc->sc_psc, + * not in sc_opts. + */ + int valid, lacp; + + switch (ro->ro_opts) { + case LAGG_OPT_USE_FLOWID: + case -LAGG_OPT_USE_FLOWID: + case LAGG_OPT_FLOWIDSHIFT: + valid = 1; + lacp = 0; + break; + case LAGG_OPT_LACP_TXTEST: + case -LAGG_OPT_LACP_TXTEST: + case LAGG_OPT_LACP_RXTEST: + case -LAGG_OPT_LACP_RXTEST: + case LAGG_OPT_LACP_STRICT: + case -LAGG_OPT_LACP_STRICT: + valid = lacp = 1; + break; + default: + valid = lacp = 0; + break; + } + + LAGG_WLOCK(sc); + if (valid == 0 || + (lacp == 1 && sc->sc_proto != LAGG_PROTO_LACP)) { + /* Invalid combination of options specified. */ + error = EINVAL; + LAGG_WUNLOCK(sc); + break; /* Return from SIOCSLAGGOPTS. */ + } + /* + * Store new options into sc->sc_opts except for + * FLOWIDSHIFT and LACP options. + */ + if (lacp == 0) { + if (ro->ro_opts == LAGG_OPT_FLOWIDSHIFT) + sc->flowid_shift = ro->ro_flowid_shift; + else if (ro->ro_opts > 0) + sc->sc_opts |= ro->ro_opts; + else + sc->sc_opts &= ~ro->ro_opts; + } else { + struct lacp_softc *lsc; + + lsc = (struct lacp_softc *)sc->sc_psc; + + switch (ro->ro_opts) { case LAGG_OPT_LACP_TXTEST: + lsc->lsc_debug.lsc_tx_test = 1; + break; case -LAGG_OPT_LACP_TXTEST: + lsc->lsc_debug.lsc_tx_test = 0; + break; case LAGG_OPT_LACP_RXTEST: + lsc->lsc_debug.lsc_rx_test = 1; + break; case -LAGG_OPT_LACP_RXTEST: + lsc->lsc_debug.lsc_rx_test = 0; + break; case LAGG_OPT_LACP_STRICT: - case -LAGG_OPT_LACP_STRICT: - valid = lacp = 1; + lsc->lsc_strict_mode = 1; break; - default: - valid = lacp = 0; + case -LAGG_OPT_LACP_STRICT: + lsc->lsc_strict_mode = 0; break; } - - LAGG_WLOCK(sc); - if (valid == 0 || - (lacp == 1 && sc->sc_proto != LAGG_PROTO_LACP)) { - /* Invalid combination of options specified. */ - error = EINVAL; - LAGG_WUNLOCK(sc); - break; /* Return from SIOCSLAGG. */ - } - /* - * Store new options into sc->sc_opts except for - * FLOWIDSHIFT and LACP options. - */ - if (lacp == 0) { - if (ra->ra_opts == LAGG_OPT_FLOWIDSHIFT) - sc->flowid_shift = ra->ra_flowid_shift; - else if (ra->ra_opts > 0) - sc->sc_opts |= ra->ra_opts; - else - sc->sc_opts &= ~ra->ra_opts; - } else { - struct lacp_softc *lsc; - - lsc = (struct lacp_softc *)sc->sc_psc; - - switch (ra->ra_opts) { - case LAGG_OPT_LACP_TXTEST: - lsc->lsc_debug.lsc_tx_test = 1; - break; - case -LAGG_OPT_LACP_TXTEST: - lsc->lsc_debug.lsc_tx_test = 0; - break; - case LAGG_OPT_LACP_RXTEST: - lsc->lsc_debug.lsc_rx_test = 1; - break; - case -LAGG_OPT_LACP_RXTEST: - lsc->lsc_debug.lsc_rx_test = 0; - break; - case LAGG_OPT_LACP_STRICT: - lsc->lsc_strict_mode = 1; - break; - case -LAGG_OPT_LACP_STRICT: - lsc->lsc_strict_mode = 0; - break; - } - } - LAGG_WUNLOCK(sc); - break; /* Return from SIOCSLAGG. */ - } - if (ra->ra_proto < 1 || ra->ra_proto >= LAGG_PROTO_MAX) { - error = EPROTONOSUPPORT; - break; } - - LAGG_WLOCK(sc); - lagg_proto_detach(sc); - lagg_proto_attach(sc, ra->ra_proto); + LAGG_WUNLOCK(sc); break; case SIOCGLAGGFLAGS: rf->rf_flags = sc->sc_flags; Modified: head/sys/net/if_lagg.h ============================================================================== --- head/sys/net/if_lagg.h Thu Oct 2 19:53:37 2014 (r272445) +++ head/sys/net/if_lagg.h Thu Oct 2 20:01:13 2014 (r272446) @@ -125,19 +125,6 @@ struct lagg_reqall { struct lacp_opreq rpsc_lacp; } ra_psc; #define ra_lacpreq ra_psc.rpsc_lacp - int ra_opts; /* Option bitmap */ -#define LAGG_OPT_NONE 0x00 -#define LAGG_OPT_USE_FLOWID 0x01 /* use M_FLOWID */ -/* Pseudo flags which are used in ra_opts but not stored into sc_opts. */ -#define LAGG_OPT_FLOWIDSHIFT 0x02 /* Set flowid */ -#define LAGG_OPT_FLOWIDSHIFT_MASK 0x1f /* flowid is uint32_t */ -#define LAGG_OPT_LACP_STRICT 0x10 /* LACP strict mode */ -#define LAGG_OPT_LACP_TXTEST 0x20 /* LACP debug: txtest */ -#define LAGG_OPT_LACP_RXTEST 0x40 /* LACP debug: rxtest */ - u_int ra_count; /* number of ports */ - u_int ra_active; /* active port count */ - u_int ra_flapping; /* number of flapping */ - int ra_flowid_shift; /* shift the flowid */ }; #define SIOCGLAGG _IOWR('i', 143, struct lagg_reqall) @@ -151,6 +138,27 @@ struct lagg_reqflags { #define SIOCGLAGGFLAGS _IOWR('i', 145, struct lagg_reqflags) #define SIOCSLAGGHASH _IOW('i', 146, struct lagg_reqflags) +struct lagg_reqopts { + char ro_ifname[IFNAMSIZ]; /* name of the lagg */ + + int ro_opts; /* Option bitmap */ +#define LAGG_OPT_NONE 0x00 +#define LAGG_OPT_USE_FLOWID 0x01 /* use M_FLOWID */ +/* Pseudo flags which are used in ro_opts but not stored into sc_opts. */ +#define LAGG_OPT_FLOWIDSHIFT 0x02 /* Set flowid */ +#define LAGG_OPT_FLOWIDSHIFT_MASK 0x1f /* flowid is uint32_t */ +#define LAGG_OPT_LACP_STRICT 0x10 /* LACP strict mode */ +#define LAGG_OPT_LACP_TXTEST 0x20 /* LACP debug: txtest */ +#define LAGG_OPT_LACP_RXTEST 0x40 /* LACP debug: rxtest */ + u_int ro_count; /* number of ports */ + u_int ro_active; /* active port count */ + u_int ro_flapping; /* number of flapping */ + int ro_flowid_shift; /* shift the flowid */ +}; + +#define SIOCGLAGGOPTS _IOWR('i', 152, struct lagg_reqopts) +#define SIOCSLAGGOPTS _IOW('i', 153, struct lagg_reqopts) + #ifdef _KERNEL /* From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 20:06:26 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9B7D9D8F; Thu, 2 Oct 2014 20:06:26 +0000 (UTC) Received: from mail.allbsd.org (gatekeeper.allbsd.org [IPv6:2001:2f0:104:e001::32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.allbsd.org", Issuer "RapidSSL CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 98939AB0; Thu, 2 Oct 2014 20:06:25 +0000 (UTC) Received: from alph.d.allbsd.org ([IPv6:2001:2f0:104:e010:862b:2bff:febc:8956]) (authenticated bits=56) by mail.allbsd.org (8.14.9/8.14.8) with ESMTP id s92K5xZC049848 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 3 Oct 2014 05:06:10 +0900 (JST) (envelope-from hrs@FreeBSD.org) Received: from localhost (localhost [IPv6:::1]) (authenticated bits=0) by alph.d.allbsd.org (8.14.8/8.14.8) with ESMTP id s92K5wcg023009; Fri, 3 Oct 2014 05:05:59 +0900 (JST) (envelope-from hrs@FreeBSD.org) Date: Fri, 03 Oct 2014 05:05:52 +0900 (JST) Message-Id: <20141003.050552.130574284942561369.hrs@allbsd.org> To: dumbbell@FreeBSD.org Subject: Re: svn commit: r272386 - in head: sbin/ifconfig share/man/man4 sys/net From: Hiroki Sato In-Reply-To: <542D9AED.6060805@FreeBSD.org> References: <201410012137.s91LbXL4025967@svn.freebsd.org> <542D9AED.6060805@FreeBSD.org> X-PGPkey-fingerprint: BDB3 443F A5DD B3D0 A530 FFD7 4F2C D3D8 2793 CF2D X-Mailer: Mew version 6.6 on Emacs 24.3 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Multipart/Signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="--Security_Multipart(Fri_Oct__3_05_05_52_2014_877)--" Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.97.4 at gatekeeper.allbsd.org X-Virus-Status: Clean X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (mail.allbsd.org [IPv6:2001:2f0:104:e001::32]); Fri, 03 Oct 2014 05:06:13 +0900 (JST) X-Spam-Status: No, score=-97.3 required=13.0 tests=CONTENT_TYPE_PRESENT, MIMEQENC,QENCPTR1,QENCPTR2,RDNS_NONE,SPF_SOFTFAIL,USER_IN_WHITELIST autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on gatekeeper.allbsd.org Cc: svn-src-all@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 20:06:26 -0000 ----Security_Multipart(Fri_Oct__3_05_05_52_2014_877)-- Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Jean-S=E9bastien P=E9dron wrote in <542D9AED.6060805@FreeBSD.org>: du> > Author: hrs du> > Date: Wed Oct 1 21:37:32 2014 du> > New Revision: 272386 du> > URL: https://svnweb.freebsd.org/changeset/base/272386 du> > = du> > Log: du> > Virtualize lagg(4) cloner. This change fixes a panic when tear= ing down du> > if_lagg(4) interfaces which were cloned in a vnet jail. du> = du> Hi! du> = du> I believe this change needs at least an entry in UPDATING, because = an du> ifconfig(8) binary built before this commit fails to change laggpro= to on du> a kernel including this commit. du> = du> The error is the following: du> # ifconfig lagg0 laggproto failover du> ifconfig: SIOCSLAGG: Invalid argument du> = du> By quickly looking at the code, I would say that the culprit is the= du> change in size of the "struct lag_reqall". The new "ra_opts" field = in du> "struct lagg_reqall" isn't initialized in the incompatible ifconfig= (8) du> binary. This could be considered invalid options, leading to "error= =3D du> EINVAL" in if_lagg.c:1301. du> = du> Another non-critical regression is that this ifconfig(8) binary doe= sn't du> display the laggproto and laggport lines. I mean those lines: du> # ifconfig lagg0 du> lagg0: flags=3D8843 (..= .) du> (...) du> laggproto failover lagghash l2,l3,l4 du> laggport: wlan0 flags=3D0<> du> laggport: re0 flags=3D5 du> = du> Beside an UPDATING entry, how about a previously released world wit= h du> this new kernel? Isn't this configuration supposed to work? Ah, yes, I was lazy and did not keep the compatibility. On or after r272446 an old ifconfig works with the new kernel. -- Hiroki ----Security_Multipart(Fri_Oct__3_05_05_52_2014_877)-- Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEABECAAYFAlQtsCAACgkQTyzT2CeTzy2zLACeP1+8fSGbBvGQX19z/7cYX1pV OU0An2VXcxOGpxjqPTCoZ7nUYxnAQeae =VZyS -----END PGP SIGNATURE----- ----Security_Multipart(Fri_Oct__3_05_05_52_2014_877)---- From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 20:13:53 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 11BEA1A8; Thu, 2 Oct 2014 20:13:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D8A69BAD; Thu, 2 Oct 2014 20:13:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92KDqN3081489; Thu, 2 Oct 2014 20:13:52 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92KDq2T081488; Thu, 2 Oct 2014 20:13:52 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201410022013.s92KDq2T081488@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 2 Oct 2014 20:13:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272447 - head/sys/modules/acpi/acpi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 20:13:53 -0000 Author: jkim Date: Thu Oct 2 20:13:52 2014 New Revision: 272447 URL: https://svnweb.freebsd.org/changeset/base/272447 Log: Remove obsolete Makefile for acpi.ko. Deleted: head/sys/modules/acpi/acpi/ From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 20:17:17 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8BE08394; Thu, 2 Oct 2014 20:17:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 78EBFBD9; Thu, 2 Oct 2014 20:17:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92KHHbH082116; Thu, 2 Oct 2014 20:17:17 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92KHHnn082115; Thu, 2 Oct 2014 20:17:17 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201410022017.s92KHHnn082115@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Thu, 2 Oct 2014 20:17:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272448 - head/sbin/ifconfig X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 20:17:17 -0000 Author: hrs Date: Thu Oct 2 20:17:16 2014 New Revision: 272448 URL: https://svnweb.freebsd.org/changeset/base/272448 Log: Revert r272390. Pointed out by: glebius Modified: head/sbin/ifconfig/ifconfig.c Modified: head/sbin/ifconfig/ifconfig.c ============================================================================== --- head/sbin/ifconfig/ifconfig.c Thu Oct 2 20:13:52 2014 (r272447) +++ head/sbin/ifconfig/ifconfig.c Thu Oct 2 20:17:16 2014 (r272448) @@ -903,7 +903,7 @@ unsetifdescr(const char *val, int value, "\020\1RXCSUM\2TXCSUM\3NETCONS\4VLAN_MTU\5VLAN_HWTAGGING\6JUMBO_MTU\7POLLING" \ "\10VLAN_HWCSUM\11TSO4\12TSO6\13LRO\14WOL_UCAST\15WOL_MCAST\16WOL_MAGIC" \ "\17TOE4\20TOE6\21VLAN_HWFILTER\23VLAN_HWTSO\24LINKSTATE\25NETMAP" \ -"\26RXCSUM_IPV6\27TXCSUM_IPV6\30HWSTATS" +"\26RXCSUM_IPV6\27TXCSUM_IPV6" /* * Print the status of the interface. If an address family was From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 20:19:52 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 94FD75C0; Thu, 2 Oct 2014 20:19:52 +0000 (UTC) Received: from mail.allbsd.org (gatekeeper.allbsd.org [IPv6:2001:2f0:104:e001::32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.allbsd.org", Issuer "RapidSSL CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 195FDBFA; Thu, 2 Oct 2014 20:19:51 +0000 (UTC) Received: from alph.d.allbsd.org ([IPv6:2001:2f0:104:e010:862b:2bff:febc:8956]) (authenticated bits=56) by mail.allbsd.org (8.14.9/8.14.8) with ESMTP id s92KJSIm050867 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 3 Oct 2014 05:19:38 +0900 (JST) (envelope-from hrs@FreeBSD.org) Received: from localhost (localhost [IPv6:::1]) (authenticated bits=0) by alph.d.allbsd.org (8.14.8/8.14.8) with ESMTP id s92KJSiP023539; Fri, 3 Oct 2014 05:19:28 +0900 (JST) (envelope-from hrs@FreeBSD.org) Date: Fri, 03 Oct 2014 05:19:22 +0900 (JST) Message-Id: <20141003.051922.1556521429831098306.hrs@allbsd.org> To: glebius@FreeBSD.org Subject: Re: svn commit: r272390 - head/sbin/ifconfig From: Hiroki Sato In-Reply-To: <20141002103043.GF73266@FreeBSD.org> References: <201410020019.s920JPp5004430@svn.freebsd.org> <20141002103043.GF73266@FreeBSD.org> X-PGPkey-fingerprint: BDB3 443F A5DD B3D0 A530 FFD7 4F2C D3D8 2793 CF2D X-Mailer: Mew version 6.6 on Emacs 24.3 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Multipart/Signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="--Security_Multipart(Fri_Oct__3_05_19_22_2014_795)--" Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.97.4 at gatekeeper.allbsd.org X-Virus-Status: Clean X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (mail.allbsd.org [IPv6:2001:2f0:104:e001::32]); Fri, 03 Oct 2014 05:19:46 +0900 (JST) X-Spam-Status: No, score=-97.9 required=13.0 tests=CONTENT_TYPE_PRESENT, RDNS_NONE,SPF_SOFTFAIL,USER_IN_WHITELIST autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on gatekeeper.allbsd.org Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 20:19:52 -0000 ----Security_Multipart(Fri_Oct__3_05_19_22_2014_795)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Gleb Smirnoff wrote in <20141002103043.GF73266@FreeBSD.org>: gl> On Thu, Oct 02, 2014 at 12:19:25AM +0000, Hiroki Sato wrote: gl> H> Author: hrs gl> H> Date: Thu Oct 2 00:19:24 2014 gl> H> New Revision: 272390 gl> H> URL: https://svnweb.freebsd.org/changeset/base/272390 gl> H> gl> H> Log: gl> H> Add IFCAP_HWSTATS. gl> gl> Actually this flag was a temporary workaround, which I hope to gl> remove soon. There is no reason to display it to userland. Ok, reverted. I misunderstood it as one used for some non-temporary purpose. -- Hiroki ----Security_Multipart(Fri_Oct__3_05_19_22_2014_795)-- Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEABECAAYFAlQts0oACgkQTyzT2CeTzy0dowCgyksS0Lll0yjPit/mbLuewUtI GKAAnAmk0KvVjtyUF+BRAsZjs8mHu32g =bivz -----END PGP SIGNATURE----- ----Security_Multipart(Fri_Oct__3_05_19_22_2014_795)---- From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 21:18:17 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5D1BBB11; Thu, 2 Oct 2014 21:18:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49F4C286; Thu, 2 Oct 2014 21:18:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92LIHj8010945; Thu, 2 Oct 2014 21:18:17 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92LIHrn010944; Thu, 2 Oct 2014 21:18:17 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201410022118.s92LIHrn010944@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 2 Oct 2014 21:18:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272449 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 21:18:17 -0000 Author: jhb Date: Thu Oct 2 21:18:16 2014 New Revision: 272449 URL: https://svnweb.freebsd.org/changeset/base/272449 Log: Require p_cansched() for changing a process' protection status via procctl() rather than p_cansee(). Submitted by: rwatson MFC after: 3 days Modified: head/sys/kern/sys_process.c Modified: head/sys/kern/sys_process.c ============================================================================== --- head/sys/kern/sys_process.c Thu Oct 2 20:17:16 2014 (r272448) +++ head/sys/kern/sys_process.c Thu Oct 2 21:18:16 2014 (r272449) @@ -1240,7 +1240,7 @@ protect_setchild(struct thread *td, stru { PROC_LOCK_ASSERT(p, MA_OWNED); - if (p->p_flag & P_SYSTEM || p_cansee(td, p) != 0) + if (p->p_flag & P_SYSTEM || p_cansched(td, p) != 0) return (0); if (flags & PPROT_SET) { p->p_flag |= P_PROTECTED; From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 21:19:14 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B064AD2D; Thu, 2 Oct 2014 21:19:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8277C295; Thu, 2 Oct 2014 21:19:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92LJEf7011209; Thu, 2 Oct 2014 21:19:14 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92LJDJo011206; Thu, 2 Oct 2014 21:19:13 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201410022119.s92LJDJo011206@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Thu, 2 Oct 2014 21:19:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272450 - in stable/10/sys: kern sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 21:19:14 -0000 Author: sbruno Date: Thu Oct 2 21:19:13 2014 New Revision: 272450 URL: https://svnweb.freebsd.org/changeset/base/272450 Log: MFC r271141: Allow multiple image activators to run on the same execution by changing imgp->interpreted to a bitmask instead of, functionally, a bool. Approved by: re (gjb) Modified: stable/10/sys/kern/imgact_binmisc.c stable/10/sys/kern/imgact_shell.c stable/10/sys/sys/imgact.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/imgact_binmisc.c ============================================================================== --- stable/10/sys/kern/imgact_binmisc.c Thu Oct 2 21:18:16 2014 (r272449) +++ stable/10/sys/kern/imgact_binmisc.c Thu Oct 2 21:19:13 2014 (r272450) @@ -600,12 +600,12 @@ imgact_binmisc_exec(struct image_params } /* No interpreter nesting allowed. */ - if (imgp->interpreted) { + if (imgp->interpreted & IMGACT_BINMISC) { mtx_unlock(&interp_list_mtx); return (ENOEXEC); } - imgp->interpreted = 1; + imgp->interpreted |= IMGACT_BINMISC; if (imgp->args->fname != NULL) { fname = imgp->args->fname; Modified: stable/10/sys/kern/imgact_shell.c ============================================================================== --- stable/10/sys/kern/imgact_shell.c Thu Oct 2 21:18:16 2014 (r272449) +++ stable/10/sys/kern/imgact_shell.c Thu Oct 2 21:19:13 2014 (r272450) @@ -115,10 +115,10 @@ exec_shell_imgact(imgp) * Don't allow a shell script to be the shell for a shell * script. :-) */ - if (imgp->interpreted) + if (imgp->interpreted & IMGACT_SHELL) return (ENOEXEC); - imgp->interpreted = 1; + imgp->interpreted |= IMGACT_SHELL; /* * At this point we have the first page of the file mapped. Modified: stable/10/sys/sys/imgact.h ============================================================================== --- stable/10/sys/sys/imgact.h Thu Oct 2 21:18:16 2014 (r272449) +++ stable/10/sys/sys/imgact.h Thu Oct 2 21:19:13 2014 (r272450) @@ -61,7 +61,9 @@ struct image_params { unsigned long entry_addr; /* entry address of target executable */ unsigned long reloc_base; /* load address of image */ char vmspace_destroyed; /* flag - we've blown away original vm space */ - char interpreted; /* flag - this executable is interpreted */ +#define IMGACT_SHELL 0x1 +#define IMGACT_BINMISC 0x2 + unsigned char interpreted; /* mask of interpreters that have run */ char opened; /* flag - we have opened executable vnode */ char *interpreter_name; /* name of the interpreter */ void *auxargs; /* ELF Auxinfo structure pointer */ From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 21:21:38 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B96BB171; Thu, 2 Oct 2014 21:21:38 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8301B35D; Thu, 2 Oct 2014 21:21:38 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 55131B977; Thu, 2 Oct 2014 17:21:37 -0400 (EDT) From: John Baldwin To: Glen Barber Subject: Re: svn commit: r272372 - stable/10/bin/rm Date: Thu, 2 Oct 2014 17:13:57 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20140415; KDE/4.5.5; amd64; ; ) References: <201410011618.s91GIfR5071251@svn.freebsd.org> <20141002141656.Y1807@besplex.bde.org> <20141002061628.GO1275@hub.FreeBSD.org> In-Reply-To: <20141002061628.GO1275@hub.FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201410021713.57943.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 02 Oct 2014 17:21:37 -0400 (EDT) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org, Bruce Evans X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 21:21:38 -0000 On Thursday, October 02, 2014 2:16:28 am Glen Barber wrote: > On Thu, Oct 02, 2014 at 02:56:05PM +1000, Bruce Evans wrote: > > On Wed, 1 Oct 2014, Glen Barber wrote: > > > > >Log: > > > MFC r268376 (imp): > > > > > > rm -rf can fail sometimes with an error from fts_read. Make it > > > honor fflag to ignore fts_read errors, but stop deleting from > > > that directory because no further progress can be made. > > > > I asked for this to be backed out in -current. It is not suitable for MFC. > > > > It fixes an immediate issue that prevents high-concurrent make(1) jobs > from stomping over each other. > > If there is a more suitable solution, it needs to be introduced in head/ > first, pending MFC for 10.1-RELEASE. > > In the meantime, we lack any alternate fix, and this resolves the > immediate issue at hand. > > > See old mail for more details. > > > > I saw the original email. I do not see a proposed patch. I think the proposed patch is to revert this and fix the broken Makefiles instead. The problem with changing rm to workaround a bug in FreeBSD's Makefiles is we are breaking rm(1) for everyone else in the world to cater to a bug in our build system. Are you happy that we are invoking the same commands in parallel for a make target? In some cases it may be ok, but there are many others where it is not (e.g. if two jobs are both compiling the same .o file, the second one might replace an object file out from under a subsequent link that starts after the first one finishes). Instead of breaking rm, you should be harassing whoever broke make (or added the SUBDIR_PARALLEL logic). Presumably you can build without -j as a workaround. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 21:34:53 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 52674570; Thu, 2 Oct 2014 21:34:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3EEBA679; Thu, 2 Oct 2014 21:34:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92LYrIq020095; Thu, 2 Oct 2014 21:34:53 GMT (envelope-from luigi@FreeBSD.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92LYruR020094; Thu, 2 Oct 2014 21:34:53 GMT (envelope-from luigi@FreeBSD.org) Message-Id: <201410022134.s92LYruR020094@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: luigi set sender to luigi@FreeBSD.org using -f From: Luigi Rizzo Date: Thu, 2 Oct 2014 21:34:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272451 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 21:34:53 -0000 Author: luigi Date: Thu Oct 2 21:34:52 2014 New Revision: 272451 URL: https://svnweb.freebsd.org/changeset/base/272451 Log: add CAP_EVENT for the libpcap device so we will be able to use pcap--netmap which does poll() on the file descriptor MFC after: 2 weeks Modified: head/contrib/tcpdump/tcpdump.c Modified: head/contrib/tcpdump/tcpdump.c ============================================================================== --- head/contrib/tcpdump/tcpdump.c Thu Oct 2 21:19:13 2014 (r272450) +++ head/contrib/tcpdump/tcpdump.c Thu Oct 2 21:34:52 2014 (r272451) @@ -1533,7 +1533,12 @@ main(int argc, char **argv) if (RFileName == NULL && VFileName == NULL) { static const unsigned long cmds[] = { BIOCGSTATS }; - cap_rights_init(&rights, CAP_IOCTL, CAP_READ); + /* + * the various libpcap devices use a combination of + * read (bpf), ioctl (bpf, netmap), poll (netmap) + * so we add the relevant access rights. + */ + cap_rights_init(&rights, CAP_IOCTL, CAP_READ, CAP_EVENT); if (cap_rights_limit(pcap_fileno(pd), &rights) < 0 && errno != ENOSYS) { error("unable to limit pcap descriptor"); From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 22:05:48 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E67A4A70; Thu, 2 Oct 2014 22:05:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D2A4697A; Thu, 2 Oct 2014 22:05:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92M5mCL034286; Thu, 2 Oct 2014 22:05:48 GMT (envelope-from gnn@FreeBSD.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92M5mI9034285; Thu, 2 Oct 2014 22:05:48 GMT (envelope-from gnn@FreeBSD.org) Message-Id: <201410022205.s92M5mI9034285@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gnn set sender to gnn@FreeBSD.org using -f From: "George V. Neville-Neil" Date: Thu, 2 Oct 2014 22:05:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272452 - head/sys/dev/sfxge X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 22:05:49 -0000 Author: gnn Date: Thu Oct 2 22:05:48 2014 New Revision: 272452 URL: https://svnweb.freebsd.org/changeset/base/272452 Log: Fixup the setting of the baud rate. Modified: head/sys/dev/sfxge/sfxge_port.c Modified: head/sys/dev/sfxge/sfxge_port.c ============================================================================== --- head/sys/dev/sfxge/sfxge_port.c Thu Oct 2 21:34:52 2014 (r272451) +++ head/sys/dev/sfxge/sfxge_port.c Thu Oct 2 22:05:48 2014 (r272452) @@ -220,14 +220,14 @@ sfxge_port_link_fc_handler(SYSCTL_HANDLE #endif /* SFXGE_HAVE_PAUSE_MEDIAOPTS */ -static const u_long sfxge_link_baudrate[EFX_LINK_NMODES] = { +static const uint64_t sfxge_link_baudrate[EFX_LINK_NMODES] = { [EFX_LINK_10HDX] = IF_Mbps(10), [EFX_LINK_10FDX] = IF_Mbps(10), [EFX_LINK_100HDX] = IF_Mbps(100), [EFX_LINK_100FDX] = IF_Mbps(100), [EFX_LINK_1000HDX] = IF_Gbps(1), [EFX_LINK_1000FDX] = IF_Gbps(1), - [EFX_LINK_10000FDX] = MIN(IF_Gbps(10ULL), ULONG_MAX), + [EFX_LINK_10000FDX] = IF_Gbps(10), }; void From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 22:16:01 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 73D3DEEE; Thu, 2 Oct 2014 22:16:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 44EB8AC2; Thu, 2 Oct 2014 22:16:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92MG1Gq039117; Thu, 2 Oct 2014 22:16:01 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92MG10Y039116; Thu, 2 Oct 2014 22:16:01 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201410022216.s92MG10Y039116@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 2 Oct 2014 22:16:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272453 - stable/10/cddl/contrib/opensolaris/lib/libzfs/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 22:16:01 -0000 Author: delphij Date: Thu Oct 2 22:16:00 2014 New Revision: 272453 URL: https://svnweb.freebsd.org/changeset/base/272453 Log: MFC r271527: MFV r271511: Use fnvlist_* to make code more readable. Illumos issue: 5135 zpool_find_import_cached() can use fnvlist_* Approved by: re (gjb) Modified: stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c Thu Oct 2 22:05:48 2014 (r272452) +++ stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c Thu Oct 2 22:16:00 2014 (r272453) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright (c) 2013 by Delphix. All rights reserved. * Copyright 2014 Nexenta Systems, Inc. All rights reserved. */ @@ -1426,21 +1426,15 @@ zpool_find_import_cached(libzfs_handle_t elem = NULL; while ((elem = nvlist_next_nvpair(raw, elem)) != NULL) { - verify(nvpair_value_nvlist(elem, &src) == 0); + src = fnvpair_value_nvlist(elem); - verify(nvlist_lookup_string(src, ZPOOL_CONFIG_POOL_NAME, - &name) == 0); + name = fnvlist_lookup_string(src, ZPOOL_CONFIG_POOL_NAME); if (poolname != NULL && strcmp(poolname, name) != 0) continue; - verify(nvlist_lookup_uint64(src, ZPOOL_CONFIG_POOL_GUID, - &this_guid) == 0); - if (guid != 0) { - verify(nvlist_lookup_uint64(src, ZPOOL_CONFIG_POOL_GUID, - &this_guid) == 0); - if (guid != this_guid) - continue; - } + this_guid = fnvlist_lookup_uint64(src, ZPOOL_CONFIG_POOL_GUID); + if (guid != 0 && guid != this_guid) + continue; if (pool_active(hdl, name, this_guid, &active) != 0) { nvlist_free(raw); From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 22:22:35 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 800F9E5; Thu, 2 Oct 2014 22:22:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6BA7FB89; Thu, 2 Oct 2014 22:22:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92MMZ4m043379; Thu, 2 Oct 2014 22:22:35 GMT (envelope-from gavin@FreeBSD.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92MMZXe043378; Thu, 2 Oct 2014 22:22:35 GMT (envelope-from gavin@FreeBSD.org) Message-Id: <201410022222.s92MMZXe043378@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gavin set sender to gavin@FreeBSD.org using -f From: Gavin Atkinson Date: Thu, 2 Oct 2014 22:22:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272454 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 22:22:35 -0000 Author: gavin Date: Thu Oct 2 22:22:34 2014 New Revision: 272454 URL: https://svnweb.freebsd.org/changeset/base/272454 Log: Add HARDWARE section of urnis(4) driver to try to gain more visibility. MFC after: 3 days Modified: head/share/man/man4/urndis.4 Modified: head/share/man/man4/urndis.4 ============================================================================== --- head/share/man/man4/urndis.4 Thu Oct 2 22:16:00 2014 (r272453) +++ head/share/man/man4/urndis.4 Thu Oct 2 22:22:34 2014 (r272454) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 25, 2014 +.Dd October 2, 2014 .Dt URNDIS 4 .Os .Sh NAME @@ -68,6 +68,12 @@ such as those commonly found on Android It does not support different media types or options. For more information on configuring this device, see .Xr ifconfig 8 . +.Sh HARDWARE +The +.Nm +driver supports the +.Qq tethering +functionality of many Android devices. .Sh SEE ALSO .Xr arp 4 , .Xr cdce 4 , From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 22:33:36 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 114F33CC; Thu, 2 Oct 2014 22:33:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E5E28C66; Thu, 2 Oct 2014 22:33:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92MXZvU048149; Thu, 2 Oct 2014 22:33:35 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92MXZHB048148; Thu, 2 Oct 2014 22:33:35 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201410022233.s92MXZHB048148@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 2 Oct 2014 22:33:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272455 - head/cddl/contrib/opensolaris/cmd/dtrace X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 22:33:36 -0000 Author: markj Date: Thu Oct 2 22:33:35 2014 New Revision: 272455 URL: https://svnweb.freebsd.org/changeset/base/272455 Log: Have dtrace(1) handle SIGPIPE by cleaning up and exiting. Additionally, install signal handlers when running in list mode (-l), and acknowledge interrupts by cleaning up and exiting. This ensures that a command like $ dtrace -l -P 'pid$target' -p | less won't cause the ptrace(2)d target process to be killed if less(1) exits before all dtrace output is consumed. Reported by: Anton Yuzhaninov Differential Revision: https://reviews.freebsd.org/D880 Reviewed by: rpaulo MFC after: 1 month Sponsored by: EMC / Isilon Storage Division Modified: head/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c Modified: head/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c Thu Oct 2 22:22:34 2014 (r272454) +++ head/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c Thu Oct 2 22:33:35 2014 (r272455) @@ -710,6 +710,9 @@ list_probe(dtrace_hdl_t *dtp, const dtra if (g_verbose && dtrace_probe_info(dtp, pdp, &p) == 0) print_probe_info(&p); + if (g_intr != 0) + return (1); + return (0); } @@ -1220,11 +1223,34 @@ intr(int signo) g_impatient = 1; } +static void +installsighands(void) +{ + struct sigaction act, oact; + + (void) sigemptyset(&act.sa_mask); + act.sa_flags = 0; + act.sa_handler = intr; + + if (sigaction(SIGINT, NULL, &oact) == 0 && oact.sa_handler != SIG_IGN) + (void) sigaction(SIGINT, &act, NULL); + + if (sigaction(SIGTERM, NULL, &oact) == 0 && oact.sa_handler != SIG_IGN) + (void) sigaction(SIGTERM, &act, NULL); + +#if !defined(sun) + if (sigaction(SIGPIPE, NULL, &oact) == 0 && oact.sa_handler != SIG_IGN) + (void) sigaction(SIGPIPE, &act, NULL); + + if (sigaction(SIGUSR1, NULL, &oact) == 0 && oact.sa_handler != SIG_IGN) + (void) sigaction(SIGUSR1, &act, NULL); +#endif +} + int main(int argc, char *argv[]) { dtrace_bufdesc_t buf; - struct sigaction act, oact; dtrace_status_t status[2]; dtrace_optval_t opt; dtrace_cmd_t *dcp; @@ -1776,6 +1802,8 @@ main(int argc, char *argv[]) if (g_ofile != NULL && (g_ofp = fopen(g_ofile, "a")) == NULL) fatal("failed to open output file '%s'", g_ofile); + installsighands(); + oprintf("%5s %10s %17s %33s %s\n", "ID", "PROVIDER", "MODULE", "FUNCTION", "NAME"); @@ -1861,20 +1889,7 @@ main(int argc, char *argv[]) if (opt != DTRACEOPT_UNSET) notice("allowing destructive actions\n"); - (void) sigemptyset(&act.sa_mask); - act.sa_flags = 0; - act.sa_handler = intr; - - if (sigaction(SIGINT, NULL, &oact) == 0 && oact.sa_handler != SIG_IGN) - (void) sigaction(SIGINT, &act, NULL); - - if (sigaction(SIGTERM, NULL, &oact) == 0 && oact.sa_handler != SIG_IGN) - (void) sigaction(SIGTERM, &act, NULL); - -#if !defined(sun) - if (sigaction(SIGUSR1, NULL, &oact) == 0 && oact.sa_handler != SIG_IGN) - (void) sigaction(SIGUSR1, &act, NULL); -#endif + installsighands(); /* * Now that tracing is active and we are ready to consume trace data, From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 22:52:05 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DE16D7E5; Thu, 2 Oct 2014 22:52:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C8ECDE1D; Thu, 2 Oct 2014 22:52:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92Mq5KA057329; Thu, 2 Oct 2014 22:52:05 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92Mq5sb057328; Thu, 2 Oct 2014 22:52:05 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201410022252.s92Mq5sb057328@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 2 Oct 2014 22:52:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272456 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 22:52:06 -0000 Author: delphij Date: Thu Oct 2 22:52:05 2014 New Revision: 272456 URL: https://svnweb.freebsd.org/changeset/base/272456 Log: MFC r271528: MFV r271512: Illumos issue: 5136 fix write throttle comment in dsl_pool.c Approved by: re (gjb) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c Thu Oct 2 22:33:35 2014 (r272455) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c Thu Oct 2 22:52:05 2014 (r272456) @@ -116,8 +116,8 @@ int zfs_delay_min_dirty_percent = 60; /* * This controls how quickly the delay approaches infinity. - * Larger values cause it to delay less for a given amount of dirty data. - * Therefore larger values will cause there to be more dirty data for a + * Larger values cause it to delay more for a given amount of dirty data. + * Therefore larger values will cause there to be less dirty data for a * given throughput. * * For the smoothest delay, this value should be about 1 billion divided @@ -130,11 +130,6 @@ int zfs_delay_min_dirty_percent = 60; uint64_t zfs_delay_scale = 1000 * 1000 * 1000 / 2000; -/* - * XXX someday maybe turn these into #defines, and you have to tune it on a - * per-pool basis using zfs.conf. - */ - #ifdef __FreeBSD__ extern int zfs_vdev_async_write_active_max_dirty_percent; From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 23:08:37 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 00D0EDF0; Thu, 2 Oct 2014 23:08:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D64EFF58; Thu, 2 Oct 2014 23:08:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92N8aNn062967; Thu, 2 Oct 2014 23:08:36 GMT (envelope-from kargl@FreeBSD.org) Received: (from kargl@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92N8aAB062966; Thu, 2 Oct 2014 23:08:36 GMT (envelope-from kargl@FreeBSD.org) Message-Id: <201410022308.s92N8aAB062966@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kargl set sender to kargl@FreeBSD.org using -f From: Steve Kargl Date: Thu, 2 Oct 2014 23:08:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272457 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 23:08:37 -0000 Author: kargl Date: Thu Oct 2 23:08:36 2014 New Revision: 272457 URL: https://svnweb.freebsd.org/changeset/base/272457 Log: Remove whitespace and 2 blank lines. Modified: head/lib/msun/src/e_lgamma_r.c Modified: head/lib/msun/src/e_lgamma_r.c ============================================================================== --- head/lib/msun/src/e_lgamma_r.c Thu Oct 2 22:52:05 2014 (r272456) +++ head/lib/msun/src/e_lgamma_r.c Thu Oct 2 23:08:36 2014 (r272457) @@ -14,12 +14,12 @@ __FBSDID("$FreeBSD$"); /* __ieee754_lgamma_r(x, signgamp) - * Reentrant version of the logarithm of the Gamma function - * with user provide pointer for the sign of Gamma(x). + * Reentrant version of the logarithm of the Gamma function + * with user provide pointer for the sign of Gamma(x). * * Method: * 1. Argument Reduction for 0 < x <= 8 - * Since gamma(1+s)=s*gamma(s), for x in [0,8], we may + * Since gamma(1+s)=s*gamma(s), for x in [0,8], we may * reduce x to a number in [1.5,2.5] by * lgamma(1+s) = log(s) + lgamma(s) * for example, @@ -57,20 +57,20 @@ __FBSDID("$FreeBSD$"); * by * 3 5 11 * w = w0 + w1*z + w2*z + w3*z + ... + w6*z - * where + * where * |w - f(z)| < 2**-58.74 - * + * * 4. For negative x, since (G is gamma function) * -x*G(-x)*G(x) = pi/sin(pi*x), * we have * G(x) = pi/(sin(pi*x)*(-x)*G(-x)) * since G(-x) is positive, sign(G(x)) = sign(sin(pi*x)) for x<0 - * Hence, for x<0, signgam = sign(sin(pi*x)) and + * Hence, for x<0, signgam = sign(sin(pi*x)) and * lgamma(x) = log(|Gamma(x)|) * = log(pi/(|x*sin(pi*x)|)) - lgamma(-x); - * Note: one should avoid compute pi*(-x) directly in the + * Note: one should avoid compute pi*(-x) directly in the * computation of sin(pi*(-x)). - * + * * 5. Special Cases * lgamma(2+s) ~ s*(1-Euler) for tiny s * lgamma(1) = lgamma(2) = 0 @@ -78,7 +78,6 @@ __FBSDID("$FreeBSD$"); * lgamma(0) = lgamma(neg.integer) = inf and raise divide-by-zero * lgamma(inf) = inf * lgamma(-inf) = inf (bug for bug compatible with C99!?) - * */ #include @@ -187,9 +186,9 @@ sin_pi(double x) switch (n) { case 0: y = __kernel_sin(pi*y,zero,0); break; - case 1: + case 1: case 2: y = __kernel_cos(pi*(0.5-y),zero); break; - case 3: + case 3: case 4: y = __kernel_sin(pi*(one-y),zero,0); break; case 5: case 6: y = -__kernel_cos(pi*(y-1.5),zero); break; @@ -263,7 +262,7 @@ __ieee754_lgamma_r(double x, int *signga p3 = t2+w*(t5+w*(t8+w*(t11+w*t14))); p = z*p1-(tt-w*(p2+y*p3)); r += (tf + p); break; - case 2: + case 2: p1 = y*(u0+y*(u1+y*(u2+y*(u3+y*(u4+y*u5))))); p2 = one+y*(v1+y*(v2+y*(v3+y*(v4+y*v5)))); r += (-0.5*y + p1/p2); @@ -291,7 +290,7 @@ __ieee754_lgamma_r(double x, int *signga y = z*z; w = w0+z*(w1+y*(w2+y*(w3+y*(w4+y*(w5+y*w6))))); r = (x-half)*(t-one)+w; - } else + } else /* 2**58 <= x <= inf */ r = x*(__ieee754_log(x)-one); if(hx<0) r = nadj - r; @@ -301,4 +300,3 @@ __ieee754_lgamma_r(double x, int *signga #if (LDBL_MANT_DIG == 53) __weak_reference(lgamma_r, lgammal_r); #endif - From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 23:26:50 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8F245155; Thu, 2 Oct 2014 23:26:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 789411A5; Thu, 2 Oct 2014 23:26:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92NQo6c072235; Thu, 2 Oct 2014 23:26:50 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92NQo3M072234; Thu, 2 Oct 2014 23:26:50 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201410022326.s92NQo3M072234@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Thu, 2 Oct 2014 23:26:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272458 - in head/contrib/netbsd-tests: . bin bin/cat bin/cp bin/dd bin/df bin/expr bin/pax bin/ps bin/sh bin/sh/dotcmd bin/sleep bin/tar crypto crypto/libcrypto crypto/libcrypto/bf cry... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 23:26:50 -0000 Author: ngie Date: Thu Oct 2 23:26:49 2014 New Revision: 272458 URL: https://svnweb.freebsd.org/changeset/base/272458 Log: Import the NetBSD test suite from ^/vendor/NetBSD/tests/09.30.2014_20.45 , minus the vendor Makefiles Provide directions for how to bootstrap the vendor sources in FREEBSD-upgrade MFC after 2 weeks Discussed with: rpaulo Sponsored by: EMC / Isilon Storage Division Added: head/contrib/netbsd-tests/ - copied from r272347, vendor/NetBSD/tests/09.30.2014_20.45/ head/contrib/netbsd-tests/FREEBSD-upgrade - copied, changed from r272269, head/contrib/pjdfstest/FREEBSD-upgrade Deleted: head/contrib/netbsd-tests/Makefile head/contrib/netbsd-tests/Makefile.inc head/contrib/netbsd-tests/README head/contrib/netbsd-tests/bin/Makefile head/contrib/netbsd-tests/bin/cat/Makefile head/contrib/netbsd-tests/bin/cp/Makefile head/contrib/netbsd-tests/bin/dd/Makefile head/contrib/netbsd-tests/bin/df/Makefile head/contrib/netbsd-tests/bin/expr/Makefile head/contrib/netbsd-tests/bin/pax/Makefile head/contrib/netbsd-tests/bin/ps/Makefile head/contrib/netbsd-tests/bin/sh/Makefile head/contrib/netbsd-tests/bin/sh/dotcmd/Makefile head/contrib/netbsd-tests/bin/sleep/Makefile head/contrib/netbsd-tests/bin/tar/Makefile head/contrib/netbsd-tests/crypto/Makefile head/contrib/netbsd-tests/crypto/Makefile.inc head/contrib/netbsd-tests/crypto/libcrypto/Makefile head/contrib/netbsd-tests/crypto/libcrypto/Makefile.inc head/contrib/netbsd-tests/crypto/libcrypto/bf/Makefile head/contrib/netbsd-tests/crypto/libcrypto/bn/Makefile head/contrib/netbsd-tests/crypto/libcrypto/bn/Makefile.inc head/contrib/netbsd-tests/crypto/libcrypto/bn/bn/Makefile head/contrib/netbsd-tests/crypto/libcrypto/bn/div/Makefile head/contrib/netbsd-tests/crypto/libcrypto/bn/exp/Makefile head/contrib/netbsd-tests/crypto/libcrypto/cast/Makefile head/contrib/netbsd-tests/crypto/libcrypto/conf/Makefile head/contrib/netbsd-tests/crypto/libcrypto/des/Makefile head/contrib/netbsd-tests/crypto/libcrypto/dh/Makefile head/contrib/netbsd-tests/crypto/libcrypto/dsa/Makefile head/contrib/netbsd-tests/crypto/libcrypto/ec/Makefile head/contrib/netbsd-tests/crypto/libcrypto/ecdh/Makefile head/contrib/netbsd-tests/crypto/libcrypto/ecdsa/Makefile head/contrib/netbsd-tests/crypto/libcrypto/engine/Makefile head/contrib/netbsd-tests/crypto/libcrypto/evp/Makefile head/contrib/netbsd-tests/crypto/libcrypto/hmac/Makefile head/contrib/netbsd-tests/crypto/libcrypto/idea/Makefile head/contrib/netbsd-tests/crypto/libcrypto/lhash/Makefile head/contrib/netbsd-tests/crypto/libcrypto/md2/Makefile head/contrib/netbsd-tests/crypto/libcrypto/md4/Makefile head/contrib/netbsd-tests/crypto/libcrypto/md5/Makefile head/contrib/netbsd-tests/crypto/libcrypto/mdc2/Makefile head/contrib/netbsd-tests/crypto/libcrypto/rand/Makefile head/contrib/netbsd-tests/crypto/libcrypto/rc2/Makefile head/contrib/netbsd-tests/crypto/libcrypto/rc4/Makefile head/contrib/netbsd-tests/crypto/libcrypto/rc5/Makefile head/contrib/netbsd-tests/crypto/libcrypto/ripemd/Makefile head/contrib/netbsd-tests/crypto/libcrypto/rsa/Makefile head/contrib/netbsd-tests/crypto/libcrypto/sha/Makefile head/contrib/netbsd-tests/crypto/libcrypto/sha1/Makefile head/contrib/netbsd-tests/crypto/libcrypto/srp/Makefile head/contrib/netbsd-tests/crypto/libcrypto/threads/Makefile head/contrib/netbsd-tests/crypto/libcrypto/x509v3/Makefile head/contrib/netbsd-tests/crypto/opencrypto/Makefile head/contrib/netbsd-tests/crypto/opencrypto/Makefile.inc head/contrib/netbsd-tests/dev/Makefile head/contrib/netbsd-tests/dev/Makefile.inc head/contrib/netbsd-tests/dev/audio/Makefile head/contrib/netbsd-tests/dev/cgd/Makefile head/contrib/netbsd-tests/dev/dm/Makefile head/contrib/netbsd-tests/dev/md/Makefile head/contrib/netbsd-tests/dev/raidframe/Makefile head/contrib/netbsd-tests/dev/scsipi/Makefile head/contrib/netbsd-tests/dev/scsipi/libscsitest/Makefile head/contrib/netbsd-tests/dev/sysmon/Makefile head/contrib/netbsd-tests/fs/Makefile head/contrib/netbsd-tests/fs/Makefile.inc head/contrib/netbsd-tests/fs/cd9660/Makefile head/contrib/netbsd-tests/fs/common/Makefile head/contrib/netbsd-tests/fs/ffs/Makefile head/contrib/netbsd-tests/fs/fifofs/Makefile head/contrib/netbsd-tests/fs/hfs/Makefile head/contrib/netbsd-tests/fs/kernfs/Makefile head/contrib/netbsd-tests/fs/lfs/Makefile head/contrib/netbsd-tests/fs/msdosfs/Makefile head/contrib/netbsd-tests/fs/nfs/Makefile head/contrib/netbsd-tests/fs/nfs/nfsservice/Makefile head/contrib/netbsd-tests/fs/nfs/nfsservice/rpcbind/Makefile.inc head/contrib/netbsd-tests/fs/nullfs/Makefile head/contrib/netbsd-tests/fs/psshfs/Makefile head/contrib/netbsd-tests/fs/ptyfs/Makefile head/contrib/netbsd-tests/fs/puffs/Makefile head/contrib/netbsd-tests/fs/puffs/h_dtfs/Makefile head/contrib/netbsd-tests/fs/tmpfs/Makefile head/contrib/netbsd-tests/fs/umapfs/Makefile head/contrib/netbsd-tests/fs/union/Makefile head/contrib/netbsd-tests/fs/vfs/Makefile head/contrib/netbsd-tests/fs/zfs/Makefile head/contrib/netbsd-tests/games/Makefile head/contrib/netbsd-tests/include/Makefile head/contrib/netbsd-tests/include/Makefile.inc head/contrib/netbsd-tests/include/machine/Makefile head/contrib/netbsd-tests/include/sys/Makefile head/contrib/netbsd-tests/ipf/Makefile head/contrib/netbsd-tests/ipf/expected/Makefile head/contrib/netbsd-tests/ipf/input/Makefile head/contrib/netbsd-tests/ipf/regress/Makefile head/contrib/netbsd-tests/kernel/Makefile head/contrib/netbsd-tests/kernel/Makefile.inc head/contrib/netbsd-tests/kernel/kqueue/Makefile head/contrib/netbsd-tests/kernel/kqueue/Makefile.inc head/contrib/netbsd-tests/kernel/kqueue/read/Makefile head/contrib/netbsd-tests/kernel/kqueue/write/Makefile head/contrib/netbsd-tests/kernel/tty/Makefile head/contrib/netbsd-tests/lib/Makefile head/contrib/netbsd-tests/lib/Makefile.inc head/contrib/netbsd-tests/lib/csu/Makefile head/contrib/netbsd-tests/lib/csu/Makefile.check_stack head/contrib/netbsd-tests/lib/csu/Makefile.inc head/contrib/netbsd-tests/lib/csu/dso/Makefile head/contrib/netbsd-tests/lib/libbluetooth/Makefile head/contrib/netbsd-tests/lib/libbpfjit/Makefile head/contrib/netbsd-tests/lib/libc/Makefile head/contrib/netbsd-tests/lib/libc/Makefile.inc head/contrib/netbsd-tests/lib/libc/arch/Makefile.exec_prot head/contrib/netbsd-tests/lib/libc/c063/Makefile head/contrib/netbsd-tests/lib/libc/db/Makefile head/contrib/netbsd-tests/lib/libc/gen/Makefile head/contrib/netbsd-tests/lib/libc/gen/execve/Makefile head/contrib/netbsd-tests/lib/libc/gen/posix_spawn/Makefile head/contrib/netbsd-tests/lib/libc/gen/posix_spawn/Makefile.inc head/contrib/netbsd-tests/lib/libc/hash/Makefile head/contrib/netbsd-tests/lib/libc/inet/Makefile head/contrib/netbsd-tests/lib/libc/locale/Makefile head/contrib/netbsd-tests/lib/libc/net/Makefile head/contrib/netbsd-tests/lib/libc/net/Makefile.inc head/contrib/netbsd-tests/lib/libc/net/getaddrinfo/Makefile head/contrib/netbsd-tests/lib/libc/regex/Makefile head/contrib/netbsd-tests/lib/libc/rpc/Makefile head/contrib/netbsd-tests/lib/libc/setjmp/Makefile head/contrib/netbsd-tests/lib/libc/ssp/Makefile head/contrib/netbsd-tests/lib/libc/stdio/Makefile head/contrib/netbsd-tests/lib/libc/stdlib/Makefile head/contrib/netbsd-tests/lib/libc/string/Makefile head/contrib/netbsd-tests/lib/libc/sync/Makefile head/contrib/netbsd-tests/lib/libc/sys/Makefile head/contrib/netbsd-tests/lib/libc/termios/Makefile head/contrib/netbsd-tests/lib/libc/time/Makefile head/contrib/netbsd-tests/lib/libc/tls/Makefile head/contrib/netbsd-tests/lib/libc/tls/Makefile.inc head/contrib/netbsd-tests/lib/libc/tls/dso/Makefile head/contrib/netbsd-tests/lib/libc/tls_dso/Makefile head/contrib/netbsd-tests/lib/libc/ttyio/Makefile head/contrib/netbsd-tests/lib/libcrypt/Makefile head/contrib/netbsd-tests/lib/libcurses/Makefile head/contrib/netbsd-tests/lib/libcurses/Makefile.inc head/contrib/netbsd-tests/lib/libcurses/check_files/Makefile head/contrib/netbsd-tests/lib/libcurses/director/Makefile head/contrib/netbsd-tests/lib/libcurses/slave/Makefile head/contrib/netbsd-tests/lib/libcurses/tests/Makefile head/contrib/netbsd-tests/lib/libdes/Makefile head/contrib/netbsd-tests/lib/libevent/Makefile head/contrib/netbsd-tests/lib/libexecinfo/Makefile head/contrib/netbsd-tests/lib/libm/Makefile head/contrib/netbsd-tests/lib/libobjc/Makefile head/contrib/netbsd-tests/lib/libposix/Makefile head/contrib/netbsd-tests/lib/libposix/Makefile.inc head/contrib/netbsd-tests/lib/libposix/bsd/Makefile head/contrib/netbsd-tests/lib/libposix/posix1/Makefile head/contrib/netbsd-tests/lib/libposix/posix2/Makefile head/contrib/netbsd-tests/lib/libppath/Makefile head/contrib/netbsd-tests/lib/libprop/Makefile head/contrib/netbsd-tests/lib/libpthread/Makefile head/contrib/netbsd-tests/lib/libpthread/dlopen/Makefile head/contrib/netbsd-tests/lib/libpthread/dlopen/dso/Makefile head/contrib/netbsd-tests/lib/librt/Makefile head/contrib/netbsd-tests/lib/librumpclient/Makefile head/contrib/netbsd-tests/lib/librumphijack/Makefile head/contrib/netbsd-tests/lib/libskey/Makefile head/contrib/netbsd-tests/lib/libsljit/Makefile head/contrib/netbsd-tests/lib/libtre/Makefile head/contrib/netbsd-tests/lib/libutil/Makefile head/contrib/netbsd-tests/lib/semaphore/Makefile head/contrib/netbsd-tests/lib/semaphore/Makefile.inc head/contrib/netbsd-tests/lib/semaphore/pthread/Makefile head/contrib/netbsd-tests/libexec/Makefile head/contrib/netbsd-tests/libexec/Makefile.inc head/contrib/netbsd-tests/libexec/ld.elf_so/Makefile head/contrib/netbsd-tests/libexec/ld.elf_so/Makefile.inc head/contrib/netbsd-tests/libexec/ld.elf_so/data/Makefile head/contrib/netbsd-tests/libexec/ld.elf_so/helper_dso1/Makefile head/contrib/netbsd-tests/libexec/ld.elf_so/helper_dso2/Makefile head/contrib/netbsd-tests/libexec/ld.elf_so/helper_ifunc_dso/Makefile head/contrib/netbsd-tests/libexec/ld.elf_so/helper_symver_dso0/Makefile head/contrib/netbsd-tests/libexec/ld.elf_so/helper_symver_dso1/Makefile head/contrib/netbsd-tests/libexec/ld.elf_so/helper_symver_dso2/Makefile head/contrib/netbsd-tests/modules/Makefile head/contrib/netbsd-tests/modules/Makefile.inc head/contrib/netbsd-tests/modules/k_helper/Makefile head/contrib/netbsd-tests/modules/k_helper2/Makefile head/contrib/netbsd-tests/modules/k_helper3/Makefile head/contrib/netbsd-tests/modules/k_uvm/Makefile head/contrib/netbsd-tests/net/Makefile head/contrib/netbsd-tests/net/Makefile.inc head/contrib/netbsd-tests/net/bpf/Makefile head/contrib/netbsd-tests/net/bpfilter/Makefile head/contrib/netbsd-tests/net/bpfjit/Makefile head/contrib/netbsd-tests/net/carp/Makefile head/contrib/netbsd-tests/net/fdpass/Makefile head/contrib/netbsd-tests/net/icmp/Makefile head/contrib/netbsd-tests/net/if/Makefile head/contrib/netbsd-tests/net/if_bridge/Makefile head/contrib/netbsd-tests/net/if_loop/Makefile head/contrib/netbsd-tests/net/mpls/Makefile head/contrib/netbsd-tests/net/net/Makefile head/contrib/netbsd-tests/net/npf/Makefile head/contrib/netbsd-tests/net/route/Makefile head/contrib/netbsd-tests/net/sys/Makefile head/contrib/netbsd-tests/rump/Makefile head/contrib/netbsd-tests/rump/Makefile.inc head/contrib/netbsd-tests/rump/kernspace/Makefile head/contrib/netbsd-tests/rump/modautoload/Makefile head/contrib/netbsd-tests/rump/rumpkern/Makefile head/contrib/netbsd-tests/rump/rumpkern/h_client/Makefile head/contrib/netbsd-tests/rump/rumpkern/h_server/Makefile head/contrib/netbsd-tests/rump/rumpnet/Makefile head/contrib/netbsd-tests/rump/rumpvfs/Makefile head/contrib/netbsd-tests/sbin/Makefile head/contrib/netbsd-tests/sbin/Makefile.inc head/contrib/netbsd-tests/sbin/fsck_ffs/Makefile head/contrib/netbsd-tests/sbin/ifconfig/Makefile head/contrib/netbsd-tests/sbin/newfs/Makefile head/contrib/netbsd-tests/sbin/newfs_msdos/Makefile head/contrib/netbsd-tests/sbin/resize_ffs/Makefile head/contrib/netbsd-tests/sbin/route/Makefile head/contrib/netbsd-tests/sbin/sysctl/Makefile head/contrib/netbsd-tests/share/Makefile head/contrib/netbsd-tests/share/examples/Makefile head/contrib/netbsd-tests/share/mk/Makefile head/contrib/netbsd-tests/sys/Makefile head/contrib/netbsd-tests/sys/rc/Makefile head/contrib/netbsd-tests/usr.bin/Makefile head/contrib/netbsd-tests/usr.bin/awk/Makefile head/contrib/netbsd-tests/usr.bin/basename/Makefile head/contrib/netbsd-tests/usr.bin/bzip2/Makefile head/contrib/netbsd-tests/usr.bin/cc/Makefile head/contrib/netbsd-tests/usr.bin/cmp/Makefile head/contrib/netbsd-tests/usr.bin/config/Makefile head/contrib/netbsd-tests/usr.bin/config/support/Makefile head/contrib/netbsd-tests/usr.bin/config/support/arch/Makefile head/contrib/netbsd-tests/usr.bin/config/support/arch/regress/Makefile head/contrib/netbsd-tests/usr.bin/config/support/arch/regress/conf/Makefile head/contrib/netbsd-tests/usr.bin/config/support/arch/regress/conf/Makefile.regress head/contrib/netbsd-tests/usr.bin/config/support/conf/Makefile head/contrib/netbsd-tests/usr.bin/cut/Makefile head/contrib/netbsd-tests/usr.bin/diff/Makefile head/contrib/netbsd-tests/usr.bin/dirname/Makefile head/contrib/netbsd-tests/usr.bin/find/Makefile head/contrib/netbsd-tests/usr.bin/grep/Makefile head/contrib/netbsd-tests/usr.bin/gzip/Makefile head/contrib/netbsd-tests/usr.bin/id/Makefile head/contrib/netbsd-tests/usr.bin/infocmp/Makefile head/contrib/netbsd-tests/usr.bin/jot/Makefile head/contrib/netbsd-tests/usr.bin/m4/Makefile head/contrib/netbsd-tests/usr.bin/make/Makefile head/contrib/netbsd-tests/usr.bin/mkdep/Makefile head/contrib/netbsd-tests/usr.bin/nbperf/Makefile head/contrib/netbsd-tests/usr.bin/netpgpverify/Makefile head/contrib/netbsd-tests/usr.bin/pr/Makefile head/contrib/netbsd-tests/usr.bin/rump_server/Makefile head/contrib/netbsd-tests/usr.bin/sdiff/Makefile head/contrib/netbsd-tests/usr.bin/sed/Makefile head/contrib/netbsd-tests/usr.bin/shmif_dumpbus/Makefile head/contrib/netbsd-tests/usr.bin/sort/Makefile head/contrib/netbsd-tests/usr.bin/tmux/Makefile head/contrib/netbsd-tests/usr.bin/tr/Makefile head/contrib/netbsd-tests/usr.bin/unifdef/Makefile head/contrib/netbsd-tests/usr.bin/vmstat/Makefile head/contrib/netbsd-tests/usr.bin/xlint/Makefile head/contrib/netbsd-tests/usr.bin/xlint/lint1/Makefile head/contrib/netbsd-tests/usr.sbin/Makefile head/contrib/netbsd-tests/usr.sbin/mtree/Makefile head/contrib/netbsd-tests/usr.sbin/tcpdump/Makefile head/contrib/netbsd-tests/usr.sbin/traceroute/Makefile head/contrib/netbsd-tests/usr.sbin/useradd/Makefile Copied and modified: head/contrib/netbsd-tests/FREEBSD-upgrade (from r272269, head/contrib/pjdfstest/FREEBSD-upgrade) ============================================================================== --- head/contrib/pjdfstest/FREEBSD-upgrade Sun Sep 28 20:06:02 2014 (r272269, copy source) +++ head/contrib/netbsd-tests/FREEBSD-upgrade Thu Oct 2 23:26:49 2014 (r272458) @@ -1,23 +1,36 @@ $FreeBSD$ This document contains a collection of notes specific to the import -of pjdfstest into head. These notes are built on the instructions in -the FreeBSD Subversion Primer that detail how to deal with vendor +of the NetBSD test suite into head. These notes are built on the instructions +in the FreeBSD Subversion Primer that detail how to deal with vendor branches and you are supposed to follow those: http://www.freebsd.org/doc/en/articles/committers-guide/subversion-primer.html -The pjdfstest source code is hosted on GitHub: +The NetBSD test source code was originally obtained via NetBSD anoncvs as +described in the NetBSD handbook: - https://github.com/pjd/pjdfstest + http://www.netbsd.org/docs/guide/en/chap-fetch.html#chap-fetch-cvs -and is imported into the pjdfstest vendor branch (see base/vendor/pjdfstest/). +and is imported into the NetBSD/tests vendor branch (see +base/vendor/NetBSD/tests/). + +The process used to bootstrap the vendor tree was similar to the following: + + /bin/sh + export CVSROOT="anoncvs@anoncvs.NetBSD.org:/cvsroot" + cvs -z9 co -D "09/30/2014 20:45" -P src/tests + mv src/tests/* tests/dist/. + +Please adjust the checkout date spec (the argument passed via -D) to match +the desired checkout time. To merge the vendor branch into head do something like this: - cd .../base/head/contrib/pjdfstest + cd .../base/head/contrib/netbsd-tests svn merge --accept=postpone \ - svn+ssh://svn.freebsd.org/base/vendor/pjdfstest/dist . + svn+ssh://svn.freebsd.org/base/vendor/NetBSD/tests/dist . + find . -name Makefile\* | xargs svn rm --force and resolve any conflicts that may arise at this point. From owner-svn-src-all@FreeBSD.ORG Thu Oct 2 23:35:07 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C0867346; Thu, 2 Oct 2014 23:35:07 +0000 (UTC) Received: from mail106.syd.optusnet.com.au (mail106.syd.optusnet.com.au [211.29.132.42]) by mx1.freebsd.org (Postfix) with ESMTP id 80C51273; Thu, 2 Oct 2014 23:35:07 +0000 (UTC) Received: from c122-106-147-133.carlnfd1.nsw.optusnet.com.au (c122-106-147-133.carlnfd1.nsw.optusnet.com.au [122.106.147.133]) by mail106.syd.optusnet.com.au (Postfix) with ESMTPS id 8EF813C6BCF; Fri, 3 Oct 2014 09:34:59 +1000 (EST) Date: Fri, 3 Oct 2014 09:34:58 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: John Baldwin Subject: Re: svn commit: r272372 - stable/10/bin/rm In-Reply-To: <201410021713.57943.jhb@freebsd.org> Message-ID: <20141003084842.T998@besplex.bde.org> References: <201410011618.s91GIfR5071251@svn.freebsd.org> <20141002141656.Y1807@besplex.bde.org> <20141002061628.GO1275@hub.FreeBSD.org> <201410021713.57943.jhb@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.1 cv=fvDlOjIf c=1 sm=1 tr=0 a=7NqvjVvQucbO2RlWB8PEog==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=zzPu0r9sZ4VNOpkXl7cA:9 a=CjuIK1q_8ugA:10 Cc: src-committers@freebsd.org, svn-src-stable-10@freebsd.org, svn-src-stable@freebsd.org, svn-src-all@freebsd.org, Glen Barber , Bruce Evans X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 23:35:07 -0000 On Thu, 2 Oct 2014, John Baldwin wrote: > On Thursday, October 02, 2014 2:16:28 am Glen Barber wrote: >> On Thu, Oct 02, 2014 at 02:56:05PM +1000, Bruce Evans wrote: >>> On Wed, 1 Oct 2014, Glen Barber wrote: >>> >>>> Log: >>>> MFC r268376 (imp): >>>> >>>> rm -rf can fail sometimes with an error from fts_read. Make it >>>> honor fflag to ignore fts_read errors, but stop deleting from >>>> that directory because no further progress can be made. >>> >>> I asked for this to be backed out in -current. It is not suitable for > MFC. >> >> It fixes an immediate issue that prevents high-concurrent make(1) jobs >> from stomping over each other. >> >> If there is a more suitable solution, it needs to be introduced in head/ >> first, pending MFC for 10.1-RELEASE. >> >> In the meantime, we lack any alternate fix, and this resolves the >> immediate issue at hand. >> >>> See old mail for more details. >> >> I saw the original email. I do not see a proposed patch. My mail gave hints for hundreds of patches. None of them are good enough to propose. You could at least limit the special case to the errno that fts_read() returns when it gets confused instead of ignoring all errors. > I think the proposed patch is to revert this and fix the broken Makefiles > instead. The problem with changing rm to workaround a bug in FreeBSD's > Makefiles is we are breaking rm(1) for everyone else in the world to cater to > a bug in our build system. There is still the larger problem with fts_read(). Applications like rm are specified to do a complete tree walk, with special handling for files that do not exist. If fts_read() is going to abort in the middle of a tree walk, then it is unusable for implementing applications like rm. > Are you happy that we are invoking the same commands in parallel for a make > target? In some cases it may be ok, but there are many others where it is not > (e.g. if two jobs are both compiling the same .o file, the second one might > replace an object file out from under a subsequent link that starts after the > first one finishes). Instead of breaking rm, you should be harassing whoever > broke make (or added the SUBDIR_PARALLEL logic). Presumably you can build > without -j as a workaround. Even multiple rm -f's for cleaning an otherwise static tree aren't safe unless rm -f works as specified. It's hard to think of a single safe example using standard utilities (except make itself, used more carefully). Bruce From owner-svn-src-all@FreeBSD.ORG Fri Oct 3 00:13:11 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6458E817; Fri, 3 Oct 2014 00:13:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46E0281B; Fri, 3 Oct 2014 00:13:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s930DABZ098257; Fri, 3 Oct 2014 00:13:10 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s930DAso098256; Fri, 3 Oct 2014 00:13:10 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201410030013.s930DAso098256@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 3 Oct 2014 00:13:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272459 - stable/10/sys/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Oct 2014 00:13:11 -0000 Author: gjb Date: Fri Oct 3 00:13:10 2014 New Revision: 272459 URL: https://svnweb.freebsd.org/changeset/base/272459 Log: Update stable/10 to -RC1 in preparation of branching releng/10.1 Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/conf/newvers.sh Modified: stable/10/sys/conf/newvers.sh ============================================================================== --- stable/10/sys/conf/newvers.sh Thu Oct 2 23:26:49 2014 (r272458) +++ stable/10/sys/conf/newvers.sh Fri Oct 3 00:13:10 2014 (r272459) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="10.1" -BRANCH="BETA3" +BRANCH="RC1" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-all@FreeBSD.ORG Fri Oct 3 00:26:34 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 35D399F0; Fri, 3 Oct 2014 00:26:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 225B5902; Fri, 3 Oct 2014 00:26:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s930QXds003483; Fri, 3 Oct 2014 00:26:33 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s930QX33003482; Fri, 3 Oct 2014 00:26:33 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201410030026.s930QX33003482@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 3 Oct 2014 00:26:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r272460 - svnadmin/conf X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Oct 2014 00:26:34 -0000 Author: gjb Date: Fri Oct 3 00:26:33 2014 New Revision: 272460 URL: https://svnweb.freebsd.org/changeset/base/272460 Log: Require explicit re approval for releng/10.1 Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: svnadmin/conf/approvers Modified: svnadmin/conf/approvers ============================================================================== --- svnadmin/conf/approvers Fri Oct 3 00:13:10 2014 (r272459) +++ svnadmin/conf/approvers Fri Oct 3 00:26:33 2014 (r272460) @@ -21,6 +21,7 @@ #^stable/9/ re #^stable/8/ re #^stable/7/ re +^releng/10.1/ re ^releng/10.0/ (security-officer|so) ^releng/9.[0-3]/ (security-officer|so) ^releng/8.[0-4]/ (security-officer|so) From owner-svn-src-all@FreeBSD.ORG Fri Oct 3 00:49:11 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E3833D95; Fri, 3 Oct 2014 00:49:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B66E1ADB; Fri, 3 Oct 2014 00:49:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s930nBXc013186; Fri, 3 Oct 2014 00:49:11 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s930nBMf013185; Fri, 3 Oct 2014 00:49:11 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201410030049.s930nBMf013185@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 3 Oct 2014 00:49:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r272461 - releng/10.1 X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Oct 2014 00:49:12 -0000 Author: gjb Date: Fri Oct 3 00:49:11 2014 New Revision: 272461 URL: https://svnweb.freebsd.org/changeset/base/272461 Log: Copy stable/10@r272459 to releng/10.1 as part of the 10.1-RELEASE process. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Added: releng/10.1/ - copied from r272459, stable/10/ From owner-svn-src-all@FreeBSD.ORG Fri Oct 3 00:52:21 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5993FFC8; Fri, 3 Oct 2014 00:52:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2CECDBA8; Fri, 3 Oct 2014 00:52:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s930qLVH016998; Fri, 3 Oct 2014 00:52:21 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s930qLSU016997; Fri, 3 Oct 2014 00:52:21 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201410030052.s930qLSU016997@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 3 Oct 2014 00:52:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r272462 - releng/10.1 X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Oct 2014 00:52:21 -0000 Author: gjb Date: Fri Oct 3 00:52:20 2014 New Revision: 272462 URL: https://svnweb.freebsd.org/changeset/base/272462 Log: Clean vestigial svn:mergeinfo from stable/10 -> releng/10.1 branch. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: Directory Properties: releng/10.1/ (props changed) From owner-svn-src-all@FreeBSD.ORG Fri Oct 3 00:58:35 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 20BA41CF; Fri, 3 Oct 2014 00:58:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0DAEABD7; Fri, 3 Oct 2014 00:58:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s930wYKN017798; Fri, 3 Oct 2014 00:58:34 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s930wYFY017797; Fri, 3 Oct 2014 00:58:34 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201410030058.s930wYFY017797@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 3 Oct 2014 00:58:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r272463 - releng/10.1/sys/sys X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Oct 2014 00:58:35 -0000 Author: gjb Date: Fri Oct 3 00:58:34 2014 New Revision: 272463 URL: https://svnweb.freebsd.org/changeset/base/272463 Log: Bump __FreeBSD_version after releng/10.1 branch. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/10.1/sys/sys/param.h Modified: releng/10.1/sys/sys/param.h ============================================================================== --- releng/10.1/sys/sys/param.h Fri Oct 3 00:52:20 2014 (r272462) +++ releng/10.1/sys/sys/param.h Fri Oct 3 00:58:34 2014 (r272463) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1000717 /* Master, propagated to newvers */ +#define __FreeBSD_version 1001000 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-all@FreeBSD.ORG Fri Oct 3 00:58:43 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A76452F8; Fri, 3 Oct 2014 00:58:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 93ACEBDA; Fri, 3 Oct 2014 00:58:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s930whC3017862; Fri, 3 Oct 2014 00:58:43 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s930whpS017861; Fri, 3 Oct 2014 00:58:43 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201410030058.s930whpS017861@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 3 Oct 2014 00:58:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272464 - stable/10/sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Oct 2014 00:58:43 -0000 Author: gjb Date: Fri Oct 3 00:58:42 2014 New Revision: 272464 URL: https://svnweb.freebsd.org/changeset/base/272464 Log: Bump __FreeBSD_version after releng/10.1 branch. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/sys/param.h Modified: stable/10/sys/sys/param.h ============================================================================== --- stable/10/sys/sys/param.h Fri Oct 3 00:58:34 2014 (r272463) +++ stable/10/sys/sys/param.h Fri Oct 3 00:58:42 2014 (r272464) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1000717 /* Master, propagated to newvers */ +#define __FreeBSD_version 1001500 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-all@FreeBSD.ORG Fri Oct 3 01:20:50 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 16AE979E; Fri, 3 Oct 2014 01:20:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 03515D9D; Fri, 3 Oct 2014 01:20:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s931Kn2O030671; Fri, 3 Oct 2014 01:20:49 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s931Knx0030670; Fri, 3 Oct 2014 01:20:49 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201410030120.s931Knx0030670@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Fri, 3 Oct 2014 01:20:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272465 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Oct 2014 01:20:50 -0000 Author: kevlo Date: Fri Oct 3 01:20:49 2014 New Revision: 272465 URL: https://svnweb.freebsd.org/changeset/base/272465 Log: Mention umoscom(4) and uslcom(4). Modified: head/share/man/man4/ucom.4 Modified: head/share/man/man4/ucom.4 ============================================================================== --- head/share/man/man4/ucom.4 Fri Oct 3 00:58:42 2014 (r272464) +++ head/share/man/man4/ucom.4 Fri Oct 3 01:20:49 2014 (r272465) @@ -81,8 +81,10 @@ multiple external ports. .Xr umcs 4 , .Xr umct 4 , .Xr umodem 4 , +.Xr umoscom 4 , .Xr uplcom 4 , .Xr usb 4 , +.Xr uslcom 4 , .Xr uvisor 4 , .Xr uvscom 4 .Sh HISTORY From owner-svn-src-all@FreeBSD.ORG Fri Oct 3 01:39:34 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4B615B55; Fri, 3 Oct 2014 01:39:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 383D6F22; Fri, 3 Oct 2014 01:39:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s931dY9A036974; Fri, 3 Oct 2014 01:39:34 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s931dYUP036973; Fri, 3 Oct 2014 01:39:34 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201410030139.s931dYUP036973@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Fri, 3 Oct 2014 01:39:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272466 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Oct 2014 01:39:34 -0000 Author: kevlo Date: Fri Oct 3 01:39:33 2014 New Revision: 272466 URL: https://svnweb.freebsd.org/changeset/base/272466 Log: bump .Dd Reported by: gjb Modified: head/share/man/man4/ucom.4 Modified: head/share/man/man4/ucom.4 ============================================================================== --- head/share/man/man4/ucom.4 Fri Oct 3 01:20:49 2014 (r272465) +++ head/share/man/man4/ucom.4 Fri Oct 3 01:39:33 2014 (r272466) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 1, 2008 +.Dd October 3, 2014 .Dt UCOM 4 .Os .Sh NAME From owner-svn-src-all@FreeBSD.ORG Fri Oct 3 02:24:43 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A5C9D3AC; Fri, 3 Oct 2014 02:24:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8757B3B0; Fri, 3 Oct 2014 02:24:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s932OhaG059973; Fri, 3 Oct 2014 02:24:43 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s932OfSw059966; Fri, 3 Oct 2014 02:24:41 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201410030224.s932OfSw059966@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Fri, 3 Oct 2014 02:24:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272467 - in head/sys: cddl/contrib/opensolaris/uts/common/fs/zfs fs/nfs fs/nfsserver X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Oct 2014 02:24:43 -0000 Author: araujo (ports committer) Date: Fri Oct 3 02:24:41 2014 New Revision: 272467 URL: https://svnweb.freebsd.org/changeset/base/272467 Log: Fix failures and warnings reported by newpynfs20090424 test tool. This fix addresses only issues with the pynfs reports, none of these issues are know to create problems for extant real clients. Submitted by: Bart Hsiao Reworked by: myself Reviewed by: rmacklem Approved by: rmacklem Sponsored by: QNAP Systems Inc. Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c head/sys/fs/nfs/nfs_commonsubs.c head/sys/fs/nfs/nfs_var.h head/sys/fs/nfs/nfsproto.h head/sys/fs/nfsserver/nfs_nfsdport.c head/sys/fs/nfsserver/nfs_nfsdserv.c head/sys/fs/nfsserver/nfs_nfsdstate.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 Fri Oct 3 01:39:33 2014 (r272466) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Fri Oct 3 02:24:41 2014 (r272467) @@ -2837,6 +2837,7 @@ zfs_getattr(vnode_t *vp, vattr_t *vap, i #endif vap->va_seq = zp->z_seq; vap->va_flags = 0; /* FreeBSD: Reset chflags(2) flags. */ + vap->va_filerev = zp->z_seq; /* * Add in any requested optional attributes and the create time. Modified: head/sys/fs/nfs/nfs_commonsubs.c ============================================================================== --- head/sys/fs/nfs/nfs_commonsubs.c Fri Oct 3 01:39:33 2014 (r272466) +++ head/sys/fs/nfs/nfs_commonsubs.c Fri Oct 3 02:24:41 2014 (r272467) @@ -820,7 +820,6 @@ nfsv4_loadattr(struct nfsrv_descript *nd struct dqblk dqb; uid_t savuid; #endif - if (compare) { retnotsup = 0; error = nfsrv_getattrbits(nd, &attrbits, NULL, &retnotsup); @@ -902,6 +901,12 @@ nfsv4_loadattr(struct nfsrv_descript *nd goto nfsmout; if (compare && !(*retcmpp)) { NFSSETSUPP_ATTRBIT(&checkattrbits); + + /* Some filesystem do not support NFSv4ACL */ + if (nfsrv_useacl == 0 || nfs_supportsnfsv4acls(vp) == 0) { + NFSCLRBIT_ATTRBIT(&checkattrbits, NFSATTRBIT_ACL); + NFSCLRBIT_ATTRBIT(&checkattrbits, NFSATTRBIT_ACLSUPPORT); + } if (!NFSEQUAL_ATTRBIT(&retattrbits, &checkattrbits) || retnotsup) *retcmpp = NFSERR_NOTSAME; @@ -1052,7 +1057,7 @@ nfsv4_loadattr(struct nfsrv_descript *nd case NFSATTRBIT_ACL: if (compare) { if (!(*retcmpp)) { - if (nfsrv_useacl) { + if (nfsrv_useacl && nfs_supportsnfsv4acls(vp)) { NFSACL_T *naclp; naclp = acl_alloc(M_WAITOK); @@ -1073,21 +1078,22 @@ nfsv4_loadattr(struct nfsrv_descript *nd } } } else { - if (vp != NULL && aclp != NULL) - error = nfsrv_dissectacl(nd, aclp, &aceerr, - &cnt, p); - else - error = nfsrv_dissectacl(nd, NULL, &aceerr, - &cnt, p); - if (error) - goto nfsmout; + if (vp != NULL && aclp != NULL) + error = nfsrv_dissectacl(nd, aclp, &aceerr, + &cnt, p); + else + error = nfsrv_dissectacl(nd, NULL, &aceerr, + &cnt, p); + if (error) + goto nfsmout; } + attrsum += cnt; break; case NFSATTRBIT_ACLSUPPORT: NFSM_DISSECT(tl, u_int32_t *, NFSX_UNSIGNED); if (compare && !(*retcmpp)) { - if (nfsrv_useacl) { + if (nfsrv_useacl && nfs_supportsnfsv4acls(vp)) { if (fxdr_unsigned(u_int32_t, *tl) != NFSV4ACE_SUPTYPES) *retcmpp = NFSERR_NOTSAME; @@ -2090,6 +2096,7 @@ nfsv4_fillattr(struct nfsrv_descript *nd } } } + /* * Put out the attribute bitmap for the ones being filled in * and get the field for the number of attributes returned. Modified: head/sys/fs/nfs/nfs_var.h ============================================================================== --- head/sys/fs/nfs/nfs_var.h Fri Oct 3 01:39:33 2014 (r272466) +++ head/sys/fs/nfs/nfs_var.h Fri Oct 3 02:24:41 2014 (r272467) @@ -644,9 +644,9 @@ int nfsvno_updfilerev(vnode_t, struct nf int nfsvno_fillattr(struct nfsrv_descript *, struct mount *, vnode_t, struct nfsvattr *, fhandle_t *, int, nfsattrbit_t *, struct ucred *, NFSPROC_T *, int, int, int, int, uint64_t); -int nfsrv_sattr(struct nfsrv_descript *, struct nfsvattr *, nfsattrbit_t *, +int nfsrv_sattr(struct nfsrv_descript *, vnode_t, struct nfsvattr *, nfsattrbit_t *, NFSACL_T *, NFSPROC_T *); -int nfsv4_sattr(struct nfsrv_descript *, struct nfsvattr *, nfsattrbit_t *, +int nfsv4_sattr(struct nfsrv_descript *, vnode_t, struct nfsvattr *, nfsattrbit_t *, NFSACL_T *, NFSPROC_T *); int nfsvno_checkexp(mount_t, NFSSOCKADDR_T, struct nfsexstuff *, struct ucred **); Modified: head/sys/fs/nfs/nfsproto.h ============================================================================== --- head/sys/fs/nfs/nfsproto.h Fri Oct 3 01:39:33 2014 (r272466) +++ head/sys/fs/nfs/nfsproto.h Fri Oct 3 02:24:41 2014 (r272467) @@ -996,7 +996,11 @@ struct nfsv3_sattr { NFSATTRBM_TIMEDELTA | \ NFSATTRBM_TIMEMETADATA | \ NFSATTRBM_TIMEMODIFY | \ - NFSATTRBM_MOUNTEDONFILEID) + NFSATTRBM_MOUNTEDONFILEID | \ + NFSATTRBM_QUOTAHARD | \ + NFSATTRBM_QUOTASOFT | \ + NFSATTRBM_QUOTAUSED) + #ifdef QUOTA /* Modified: head/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdport.c Fri Oct 3 01:39:33 2014 (r272466) +++ head/sys/fs/nfsserver/nfs_nfsdport.c Fri Oct 3 02:24:41 2014 (r272467) @@ -1008,7 +1008,7 @@ nfsvno_getsymlink(struct nfsrv_descript *pathcpp = NULL; *lenp = 0; if ((nd->nd_flag & ND_NFSV3) && - (error = nfsrv_sattr(nd, nvap, NULL, NULL, p))) + (error = nfsrv_sattr(nd, NULL, nvap, NULL, NULL, p))) goto nfsmout; NFSM_DISSECT(tl, u_int32_t *, NFSX_UNSIGNED); len = fxdr_unsigned(int, *tl); @@ -2298,7 +2298,7 @@ nfsmout: * (Return 0 or EBADRPC) */ int -nfsrv_sattr(struct nfsrv_descript *nd, struct nfsvattr *nvap, +nfsrv_sattr(struct nfsrv_descript *nd, vnode_t vp, struct nfsvattr *nvap, nfsattrbit_t *attrbitp, NFSACL_T *aclp, struct thread *p) { u_int32_t *tl; @@ -2380,7 +2380,7 @@ nfsrv_sattr(struct nfsrv_descript *nd, s }; break; case ND_NFSV4: - error = nfsv4_sattr(nd, nvap, attrbitp, aclp, p); + error = nfsv4_sattr(nd, vp, nvap, attrbitp, aclp, p); }; nfsmout: NFSEXITCODE2(error, nd); @@ -2392,7 +2392,7 @@ nfsmout: * Returns NFSERR_BADXDR if it can't be parsed, 0 otherwise. */ int -nfsv4_sattr(struct nfsrv_descript *nd, struct nfsvattr *nvap, +nfsv4_sattr(struct nfsrv_descript *nd, vnode_t vp, struct nfsvattr *nvap, nfsattrbit_t *attrbitp, NFSACL_T *aclp, struct thread *p) { u_int32_t *tl; @@ -2429,6 +2429,11 @@ nfsv4_sattr(struct nfsrv_descript *nd, s switch (bitpos) { case NFSATTRBIT_SIZE: NFSM_DISSECT(tl, u_int32_t *, NFSX_HYPER); + if (vp != NULL && vp->v_type != VREG) { + error = (vp->v_type == VDIR) ? NFSERR_ISDIR : + NFSERR_INVAL; + goto nfsmout; + } nvap->na_size = fxdr_hyper(tl); attrsum += NFSX_HYPER; break; Modified: head/sys/fs/nfsserver/nfs_nfsdserv.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdserv.c Fri Oct 3 01:39:33 2014 (r272466) +++ head/sys/fs/nfsserver/nfs_nfsdserv.c Fri Oct 3 02:24:41 2014 (r272467) @@ -210,6 +210,17 @@ nfsrvd_getattr(struct nfsrv_descript *nd if (nd->nd_repstat == 0) { accmode = 0; NFSSET_ATTRBIT(&tmpbits, &attrbits); + + /* + * GETATTR with write-only attr time_access_set and time_modify_set + * should return NFS4ERR_INVAL. + */ + if (NFSISSET_ATTRBIT(&tmpbits, NFSATTRBIT_TIMEACCESSSET) || + NFSISSET_ATTRBIT(&tmpbits, NFSATTRBIT_TIMEMODIFYSET)){ + error = NFSERR_INVAL; + vput(vp); + goto out; + } if (NFSISSET_ATTRBIT(&tmpbits, NFSATTRBIT_ACL)) { NFSCLRBIT_ATTRBIT(&tmpbits, NFSATTRBIT_ACL); accmode |= VREAD_ACL; @@ -315,7 +326,7 @@ nfsrvd_setattr(struct nfsrv_descript *nd stateid.seqid = fxdr_unsigned(u_int32_t, *tl++); NFSBCOPY((caddr_t)tl,(caddr_t)stateid.other,NFSX_STATEIDOTHER); } - error = nfsrv_sattr(nd, &nva, &attrbits, aclp, p); + error = nfsrv_sattr(nd, vp, &nva, &attrbits, aclp, p); if (error) goto nfsmout; preat_ret = nfsvno_getattr(vp, &nva2, nd->nd_cred, p, 1); @@ -1019,7 +1030,7 @@ nfsrvd_create(struct nfsrv_descript *nd, switch (how) { case NFSCREATE_GUARDED: case NFSCREATE_UNCHECKED: - error = nfsrv_sattr(nd, &nva, NULL, NULL, p); + error = nfsrv_sattr(nd, NULL, &nva, NULL, NULL, p); if (error) goto nfsmout; break; @@ -1204,7 +1215,7 @@ nfsrvd_mknod(struct nfsrv_descript *nd, NFSM_DISSECT(tl, u_int32_t *, NFSX_UNSIGNED); vtyp = nfsv34tov_type(*tl); } - error = nfsrv_sattr(nd, &nva, &attrbits, aclp, p); + error = nfsrv_sattr(nd, NULL, &nva, &attrbits, aclp, p); if (error) goto nfsmout; nva.na_type = vtyp; @@ -1850,7 +1861,7 @@ nfsrvd_mkdir(struct nfsrv_descript *nd, if (!nd->nd_repstat) { NFSVNO_ATTRINIT(&nva); if (nd->nd_flag & ND_NFSV3) { - error = nfsrv_sattr(nd, &nva, NULL, NULL, p); + error = nfsrv_sattr(nd, NULL, &nva, NULL, NULL, p); if (error) goto nfsmout; } else { @@ -1967,11 +1978,21 @@ nfsrvd_commit(struct nfsrv_descript *nd, int error = 0, for_ret = 1, aft_ret = 1, cnt; u_int64_t off; - if (nd->nd_repstat) { + if (nd->nd_repstat) { nfsrv_wcc(nd, for_ret, &bfor, aft_ret, &aft); goto out; } + + /* Return NFSERR_ISDIR in NFSv4 when commit on a directory. */ + if (vp->v_type != VREG) { + if (nd->nd_flag & ND_NFSV3) + error = NFSERR_NOTSUPP; + else + error = (vp->v_type == VDIR) ? NFSERR_ISDIR : NFSERR_INVAL; + goto nfsmout; + } NFSM_DISSECT(tl, u_int32_t *, 3 * NFSX_UNSIGNED); + /* * XXX At this time VOP_FSYNC() does not accept offset and byte * count parameters, so these arguments are useless (someday maybe). @@ -2683,7 +2704,7 @@ nfsrvd_open(struct nfsrv_descript *nd, _ switch (how) { case NFSCREATE_UNCHECKED: case NFSCREATE_GUARDED: - error = nfsv4_sattr(nd, &nva, &attrbits, aclp, p); + error = nfsv4_sattr(nd, NULL, &nva, &attrbits, aclp, p); if (error) goto nfsmout; /* @@ -2707,7 +2728,7 @@ nfsrvd_open(struct nfsrv_descript *nd, _ NFSM_DISSECT(tl, u_int32_t *, NFSX_VERF); cverf[0] = *tl++; cverf[1] = *tl; - error = nfsv4_sattr(nd, &nva, &attrbits, aclp, p); + error = nfsv4_sattr(nd, vp, &nva, &attrbits, aclp, p); if (error != 0) goto nfsmout; if (NFSISSET_ATTRBIT(&attrbits, @@ -2858,7 +2879,7 @@ nfsrvd_open(struct nfsrv_descript *nd, _ * The IETF working group decided that this is the correct * error return for all non-regular files. */ - nd->nd_repstat = NFSERR_SYMLINK; + nd->nd_repstat = (vp->v_type == VDIR) ? NFSERR_ISDIR : NFSERR_SYMLINK; } if (!nd->nd_repstat && (stp->ls_flags & NFSLCK_WRITEACCESS)) nd->nd_repstat = nfsvno_accchk(vp, VWRITE, nd->nd_cred, @@ -3197,6 +3218,11 @@ nfsrvd_opendowngrade(struct nfsrv_descri nfsv4stateid_t stateid; nfsquad_t clientid; + /* opendowngrade can only work on a file object.*/ + if (vp->v_type != VREG) { + error = NFSERR_INVAL; + goto nfsmout; + } NFSM_DISSECT(tl, u_int32_t *, NFSX_STATEID + 3 * NFSX_UNSIGNED); stp->ls_ownerlen = 0; stp->ls_op = nd->nd_rp; Modified: head/sys/fs/nfsserver/nfs_nfsdstate.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdstate.c Fri Oct 3 01:39:33 2014 (r272466) +++ head/sys/fs/nfsserver/nfs_nfsdstate.c Fri Oct 3 02:24:41 2014 (r272467) @@ -1628,9 +1628,17 @@ tryagain: */ if (error == 0 && (stp->ls_flags & NFSLCK_OPEN) && ((stp->ls_openowner->ls_flags & NFSLCK_NEEDSCONFIRM) || - (getlckret == 0 && stp->ls_lfp != lfp))) - error = NFSERR_BADSTATEID; - if (error == 0 && + (getlckret == 0 && stp->ls_lfp != lfp))){ + /* + * NFSLCK_SETATTR should return OK rather than NFSERR_BADSTATEID + * The only exception is using SETATTR with SIZE. + * */ + if ((new_stp->ls_flags & + (NFSLCK_SETATTR | NFSLCK_CHECK)) != NFSLCK_SETATTR) + error = NFSERR_BADSTATEID; + } + + if (error == 0 && (stp->ls_flags & (NFSLCK_DELEGREAD | NFSLCK_DELEGWRITE)) && getlckret == 0 && stp->ls_lfp != lfp) error = NFSERR_BADSTATEID; @@ -4909,12 +4917,17 @@ tryagain: * Now, look for a conflicting open share. */ if (remove) { - LIST_FOREACH(stp, &lfp->lf_open, ls_file) { - if (stp->ls_flags & NFSLCK_WRITEDENY) { - error = NFSERR_FILEOPEN; - break; + /* + * If the entry in the directory was the last reference to the + * corresponding filesystem object, the object can be destroyed + * */ + if(lfp->lf_usecount>1) + LIST_FOREACH(stp, &lfp->lf_open, ls_file) { + if (stp->ls_flags & NFSLCK_WRITEDENY) { + error = NFSERR_FILEOPEN; + break; + } } - } } NFSUNLOCKSTATE(); From owner-svn-src-all@FreeBSD.ORG Fri Oct 3 04:13:25 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E4C1FED9; Fri, 3 Oct 2014 04:13:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D2526F74; Fri, 3 Oct 2014 04:13:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s934DPwc012128; Fri, 3 Oct 2014 04:13:25 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s934DPR2012127; Fri, 3 Oct 2014 04:13:25 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201410030413.s934DPR2012127@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Fri, 3 Oct 2014 04:13:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272468 - head/sys/geom X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Oct 2014 04:13:26 -0000 Author: hrs Date: Fri Oct 3 04:13:25 2014 New Revision: 272468 URL: https://svnweb.freebsd.org/changeset/base/272468 Log: Fix a bug in r272297 which prevented dumpdev from setting. !u is not equivalent to (u != 0). Modified: head/sys/geom/geom_dev.c Modified: head/sys/geom/geom_dev.c ============================================================================== --- head/sys/geom/geom_dev.c Fri Oct 3 02:24:41 2014 (r272467) +++ head/sys/geom/geom_dev.c Fri Oct 3 04:13:25 2014 (r272468) @@ -395,7 +395,7 @@ g_dev_ioctl(struct cdev *dev, u_long cmd error = g_io_getattr("GEOM::frontstuff", cp, &i, data); break; case DIOCSKERNELDUMP: - if (*(u_int *)data != 0) { + if (*(u_int *)data == 0) { error = set_dumper(NULL, NULL); break; } From owner-svn-src-all@FreeBSD.ORG Fri Oct 3 08:09:22 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7A48B886; Fri, 3 Oct 2014 08:09:22 +0000 (UTC) Received: from mail-la0-x233.google.com (mail-la0-x233.google.com [IPv6:2a00:1450:4010:c03::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 327F078B; Fri, 3 Oct 2014 08:09:21 +0000 (UTC) Received: by mail-la0-f51.google.com with SMTP id ge10so600725lab.10 for ; Fri, 03 Oct 2014 01:09:19 -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:mail-followup-to :references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=JLPO7V+nYbESt0Tzu1Cxumh//71/1TrAFqXe3Bc9vFY=; b=IKWr/ZfY0VArtYCXDqFOSaxwXsNywgSEwu7jL7kL2R0TOt6k4zipS32UUlh5vgWJJW qWulUe0M/5bH9iAGJogtnzvozE5qXehU2EHVN0H3lQRwR/Bk4JNO3RBTxXcIAhqrqZEz d/OYiFEMgDn62mg4brNKe35r64CbXLXuPj79YmMRE9maoIfM+R/yQfXBdrCFXh5gfvc1 xjGIPCsmp5QGDF36+WqNnttVcPMr8dEoLKU/EwuUAerd0kfgrGLehdZmYX+UJK09LpWE KR+ai+THzCTo7edOUMbl8loMcxemtt8tmw80rEgmEiFW5rJlQlhHUongphIxHhdoWKh2 BUGw== X-Received: by 10.152.4.165 with SMTP id l5mr3950796lal.49.1412323758908; Fri, 03 Oct 2014 01:09:18 -0700 (PDT) Received: from brick.home (adcv67.neoplus.adsl.tpnet.pl. [79.184.47.67]) by mx.google.com with ESMTPSA id b1sm2421676lah.34.2014.10.03.01.09.17 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Oct 2014 01:09:18 -0700 (PDT) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Date: Fri, 3 Oct 2014 10:09:15 +0200 From: Edward Tomasz Napierala To: Gleb Smirnoff Subject: Re: svn commit: r272403 - head/sys/fs/autofs Message-ID: <20141003080915.GA93114@brick.home> Mail-Followup-To: Gleb Smirnoff , kib@FreeBSD.org, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201410021031.s92AVW0d096515@svn.freebsd.org> <20141002103556.GH73266@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20141002103556.GH73266@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, kib@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Oct 2014 08:09:22 -0000 On 1002T1435, Gleb Smirnoff wrote: > On Thu, Oct 02, 2014 at 10:31:32AM +0000, Edward Tomasz Napierala wrote: > E> Author: trasz > E> Date: Thu Oct 2 10:31:32 2014 > E> New Revision: 272403 > E> URL: https://svnweb.freebsd.org/changeset/base/272403 > E> > E> Log: > E> Make autofs timeout handling use timeout task instead of callout; > E> that's because the handler can sleep on sx lock. > > How long can it sleep? AFAIU, the taskqueue_thread is used by other > subsystems. For the duration of M_WAITOK allocation. From owner-svn-src-all@FreeBSD.ORG Fri Oct 3 08:27:45 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0CC77118; Fri, 3 Oct 2014 08:27:45 +0000 (UTC) Received: from mail.made4.biz (mail.made4.biz [IPv6:2001:41d0:2:c018::1:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C2C0A995; Fri, 3 Oct 2014 08:27:44 +0000 (UTC) Received: from 2a02-8428-011b-e000-0290-f5ff-fe9d-b78c.rev.sfr.net ([2a02:8428:11b:e000:290:f5ff:fe9d:b78c] helo=magellan.dumbbell.fr) by mail.made4.biz with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.84 (FreeBSD)) (envelope-from ) id 1XZyDG-000IFN-NS; Fri, 03 Oct 2014 10:27:42 +0200 Message-ID: <542E5DF9.9010701@FreeBSD.org> Date: Fri, 03 Oct 2014 10:27:37 +0200 From: =?windows-1252?Q?Jean-S=E9bastien_P=E9dron?= User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 MIME-Version: 1.0 To: Hiroki Sato Subject: Re: svn commit: r272386 - in head: sbin/ifconfig share/man/man4 sys/net References: <201410012137.s91LbXL4025967@svn.freebsd.org> <542D9AED.6060805@FreeBSD.org> <20141003.050552.130574284942561369.hrs@allbsd.org> In-Reply-To: <20141003.050552.130574284942561369.hrs@allbsd.org> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="VEI3C1K59viRTGhrNtkfIdk15trP20pAC" Cc: svn-src-all@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Oct 2014 08:27:45 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --VEI3C1K59viRTGhrNtkfIdk15trP20pAC Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 02.10.2014 22:05, Hiroki Sato wrote: > Ah, yes, I was lazy and did not keep the compatibility. On or after > r272446 an old ifconfig works with the new kernel. I confirm it's fixed, thank you! I see the following three LORs when the lagg0 interface is configured: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D194109 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D194110 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D194111 --=20 Jean-S=E9bastien P=E9dron --VEI3C1K59viRTGhrNtkfIdk15trP20pAC 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 iQJ8BAEBCgBmBQJULl3+XxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2NzA4N0ZEMUFFQUUwRTEyREJDNkE2RjAz OUU5OTc2MUE1RkQ5NENDAAoJEDnpl2Gl/ZTMs3sP/Ru5YjdIqS1UdT37PjfkRYTo uWMJnPoeBpCcqn63/oEYC0pnnC500DrfhmA2oCZJrA1fn7gw27ZWcq1wh0Ld0Qbc xEKfi7a4/4Mohs48nkX0O9v0ExjhMUSsxANbQthfW0d76VohBHgbxESkz6Tu1Jvt Gr/2cxdeh3P5eaJZoBfe5Z2aFviMro8u9fG/opR/nPtRY61VoBDdtIl6uwUQceua iBXQKbTIiEt5s7RzTAmUOVHIIuq4yqyDJjm8LKYz+piPukmWMinNK2Cr4xyg+/8x lyu9+fREktzGvN9EPGI0Oq+oyEIdql+B9+7Reu83dWR/qe8HISj9c6T7BwVuSHnJ ml97bi3/aLG3JIAlf2GfHdC+jC6xD0eia5RZ+zCqoSahSUOEA0waRgAodTbAQrZk UE/zarpMYvIgzusUZDRl4TAf9TQQxZ0jxkyhF2kCEFGJPP3q4DrLhAmRzx30BSiF CyzmhhCm18q5N8LFYkQ4+w9kxinVIi5dtklOLPpyhWYNL2OlFAgjhjMeqkBhGQ3D qLIXOaKD4uxCpSGOhE6HbBpQ5d1d+AMdCZuJO9YWcynmWpjlzXCkUW9Fmo6e9HfS iaE39HRH1b5H1owLqeSpcdSaevJbWutKAPCeYSBtJRQh69okRfD2vKWYiqs86CDF kiYiwDKfBSEwgIWhm++r =I/wS -----END PGP SIGNATURE----- --VEI3C1K59viRTGhrNtkfIdk15trP20pAC-- From owner-svn-src-all@FreeBSD.ORG Fri Oct 3 08:46:50 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C134694C; Fri, 3 Oct 2014 08:46:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ADAD1BB4; Fri, 3 Oct 2014 08:46:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s938ko4J037453; Fri, 3 Oct 2014 08:46:50 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s938koJ6037452; Fri, 3 Oct 2014 08:46:50 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201410030846.s938koJ6037452@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Fri, 3 Oct 2014 08:46:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272469 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Oct 2014 08:46:50 -0000 Author: tuexen Date: Fri Oct 3 08:46:49 2014 New Revision: 272469 URL: https://svnweb.freebsd.org/changeset/base/272469 Log: UPD and UDPLite require a checksum. So check for it. MFC after: 3 days Modified: head/sys/netinet6/udp6_usrreq.c Modified: head/sys/netinet6/udp6_usrreq.c ============================================================================== --- head/sys/netinet6/udp6_usrreq.c Fri Oct 3 04:13:25 2014 (r272468) +++ head/sys/netinet6/udp6_usrreq.c Fri Oct 3 08:46:49 2014 (r272469) @@ -237,11 +237,19 @@ udp6_input(struct mbuf **mp, int *offp, /* XXX: What is the right UDPLite MIB counter? */ goto badunlocked; } + if (uh->uh_sum == 0) { + /* XXX: What is the right UDPLite MIB counter? */ + goto badunlocked; + } } else { if ((ulen < sizeof(struct udphdr)) || (plen != ulen)) { UDPSTAT_INC(udps_badlen); goto badunlocked; } + if (uh->uh_sum == 0) { + UDPSTAT_INC(udps_nosum); + goto badunlocked; + } } if ((m->m_pkthdr.csum_flags & CSUM_DATA_VALID_IPV6) && From owner-svn-src-all@FreeBSD.ORG Fri Oct 3 09:58:07 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9E1212A3; Fri, 3 Oct 2014 09:58:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7E4A5348; Fri, 3 Oct 2014 09:58:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s939w7qp070194; Fri, 3 Oct 2014 09:58:07 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s939w6D8070190; Fri, 3 Oct 2014 09:58:06 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201410030958.s939w6D8070190@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Fri, 3 Oct 2014 09:58:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272470 - head/sys/fs/autofs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Oct 2014 09:58:07 -0000 Author: trasz Date: Fri Oct 3 09:58:05 2014 New Revision: 272470 URL: https://svnweb.freebsd.org/changeset/base/272470 Log: Make autofs(4) use shared lock for lookups, instead of exclusive one. MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/sys/fs/autofs/autofs.c head/sys/fs/autofs/autofs.h head/sys/fs/autofs/autofs_vfsops.c head/sys/fs/autofs/autofs_vnops.c Modified: head/sys/fs/autofs/autofs.c ============================================================================== --- head/sys/fs/autofs/autofs.c Fri Oct 3 08:46:49 2014 (r272469) +++ head/sys/fs/autofs/autofs.c Fri Oct 3 09:58:05 2014 (r272470) @@ -297,9 +297,9 @@ autofs_cached(struct autofs_node *anp, c * is necessary for wildcard indirect map keys to work. */ if (anp->an_parent == NULL && componentlen != 0) { - AUTOFS_LOCK(amp); + AUTOFS_SLOCK(amp); error = autofs_node_find(anp, component, componentlen, NULL); - AUTOFS_UNLOCK(amp); + AUTOFS_SUNLOCK(amp); if (error != 0) return (false); } Modified: head/sys/fs/autofs/autofs.h ============================================================================== --- head/sys/fs/autofs/autofs.h Fri Oct 3 08:46:49 2014 (r272469) +++ head/sys/fs/autofs/autofs.h Fri Oct 3 09:58:05 2014 (r272470) @@ -53,9 +53,12 @@ extern int autofs_mount_on_stat; __func__, ## __VA_ARGS__); \ } while (0) -#define AUTOFS_LOCK(X) sx_xlock(&X->am_lock) -#define AUTOFS_UNLOCK(X) sx_xunlock(&X->am_lock) -#define AUTOFS_ASSERT_LOCKED(X) sx_assert(&X->am_lock, SA_XLOCKED) +#define AUTOFS_SLOCK(X) sx_slock(&X->am_lock) +#define AUTOFS_XLOCK(X) sx_xlock(&X->am_lock) +#define AUTOFS_SUNLOCK(X) sx_sunlock(&X->am_lock) +#define AUTOFS_XUNLOCK(X) sx_xunlock(&X->am_lock) +#define AUTOFS_ASSERT_LOCKED(X) sx_assert(&X->am_lock, SA_LOCKED) +#define AUTOFS_ASSERT_XLOCKED(X) sx_assert(&X->am_lock, SA_XLOCKED) #define AUTOFS_ASSERT_UNLOCKED(X) sx_assert(&X->am_lock, SA_UNLOCKED) struct autofs_node { Modified: head/sys/fs/autofs/autofs_vfsops.c ============================================================================== --- head/sys/fs/autofs/autofs_vfsops.c Fri Oct 3 08:46:49 2014 (r272469) +++ head/sys/fs/autofs/autofs_vfsops.c Fri Oct 3 09:58:05 2014 (r272470) @@ -88,14 +88,14 @@ autofs_mount(struct mount *mp) vfs_getnewfsid(mp); - AUTOFS_LOCK(amp); + AUTOFS_XLOCK(amp); error = autofs_node_new(NULL, amp, ".", -1, &->am_root); if (error != 0) { - AUTOFS_UNLOCK(amp); + AUTOFS_XUNLOCK(amp); free(amp, M_AUTOFS); return (error); } - AUTOFS_UNLOCK(amp); + AUTOFS_XUNLOCK(amp); vfs_mountedfrom(mp, from); @@ -146,7 +146,7 @@ autofs_unmount(struct mount *mp, int mnt pause("autofs_umount", 1); } - AUTOFS_LOCK(amp); + AUTOFS_XLOCK(amp); /* * Not terribly efficient, but at least not recursive. @@ -160,7 +160,7 @@ autofs_unmount(struct mount *mp, int mnt autofs_node_delete(amp->am_root); mp->mnt_data = NULL; - AUTOFS_UNLOCK(amp); + AUTOFS_XUNLOCK(amp); sx_destroy(&->am_lock); Modified: head/sys/fs/autofs/autofs_vnops.c ============================================================================== --- head/sys/fs/autofs/autofs_vnops.c Fri Oct 3 08:46:49 2014 (r272469) +++ head/sys/fs/autofs/autofs_vnops.c Fri Oct 3 09:58:05 2014 (r272470) @@ -277,22 +277,22 @@ autofs_lookup(struct vop_lookup_args *ap } } - AUTOFS_LOCK(amp); + AUTOFS_SLOCK(amp); error = autofs_node_find(anp, cnp->cn_nameptr, cnp->cn_namelen, &child); if (error != 0) { if ((cnp->cn_flags & ISLASTCN) && cnp->cn_nameiop == CREATE) { - AUTOFS_UNLOCK(amp); + AUTOFS_SUNLOCK(amp); return (EJUSTRETURN); } - AUTOFS_UNLOCK(amp); + AUTOFS_SUNLOCK(amp); return (ENOENT); } /* * XXX: Dropping the node here is ok, because we never remove nodes. */ - AUTOFS_UNLOCK(amp); + AUTOFS_SUNLOCK(amp); error = autofs_node_vn(child, mp, vpp); if (error != 0) { @@ -325,14 +325,14 @@ autofs_mkdir(struct vop_mkdir_args *ap) if (autofs_ignore_thread(curthread) == false) return (EPERM); - AUTOFS_LOCK(amp); + AUTOFS_XLOCK(amp); error = autofs_node_new(anp, amp, ap->a_cnp->cn_nameptr, ap->a_cnp->cn_namelen, &child); if (error != 0) { - AUTOFS_UNLOCK(amp); + AUTOFS_XUNLOCK(amp); return (error); } - AUTOFS_UNLOCK(amp); + AUTOFS_XUNLOCK(amp); error = autofs_node_vn(child, vp->v_mount, ap->a_vpp); @@ -427,7 +427,7 @@ autofs_readdir(struct vop_readdir_args * } i = 2; /* Account for "." and "..". */ - AUTOFS_LOCK(amp); + AUTOFS_SLOCK(amp); TAILQ_FOREACH(child, &anp->an_children, an_next) { if (resid < AUTOFS_DELEN) { if (ap->a_eofflag != NULL) @@ -445,14 +445,14 @@ autofs_readdir(struct vop_readdir_args * error = autofs_readdir_one(uio, child->an_name, child->an_fileno); if (error != 0) { - AUTOFS_UNLOCK(amp); + AUTOFS_SUNLOCK(amp); return (error); } offset += AUTOFS_DELEN; resid -= AUTOFS_DELEN; } - AUTOFS_UNLOCK(amp); + AUTOFS_SUNLOCK(amp); return (0); } @@ -505,7 +505,7 @@ autofs_node_new(struct autofs_node *pare struct autofs_node *anp; if (parent != NULL) - AUTOFS_ASSERT_LOCKED(parent->an_mount); + AUTOFS_ASSERT_XLOCKED(parent->an_mount); anp = uma_zalloc(autofs_node_zone, M_WAITOK | M_ZERO); if (namelen >= 0) @@ -567,7 +567,7 @@ autofs_node_delete(struct autofs_node *a { struct autofs_node *parent; - AUTOFS_ASSERT_LOCKED(anp->an_mount); + AUTOFS_ASSERT_XLOCKED(anp->an_mount); KASSERT(TAILQ_EMPTY(&anp->an_children), ("have children")); callout_drain(&anp->an_callout); From owner-svn-src-all@FreeBSD.ORG Fri Oct 3 09:58:38 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5C0523EC; Fri, 3 Oct 2014 09:58:38 +0000 (UTC) Received: from mail.ipfw.ru (mail.ipfw.ru [IPv6:2a01:4f8:120:6141::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1CF5E354; Fri, 3 Oct 2014 09:58:38 +0000 (UTC) Received: from [2a02:6b8:0:401:222:4dff:fe50:cd2f] (helo=ptichko.yndx.net) by mail.ipfw.ru with esmtpsa (TLSv1:DHE-RSA-AES128-SHA:128) (Exim 4.82 (FreeBSD)) (envelope-from ) id 1XZvdv-0004fU-Cc; Fri, 03 Oct 2014 09:43:03 +0400 Message-ID: <542E7309.8080602@FreeBSD.org> Date: Fri, 03 Oct 2014 13:57:29 +0400 From: "Alexander V. Chernikov" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 MIME-Version: 1.0 To: Gleb Smirnoff Subject: Re: svn commit: r272391 - in head/sys: netinet netinet6 References: <201410020025.s920PvEW008958@svn.freebsd.org> <542D09CF.5000803@FreeBSD.org> <20141002103222.GG73266@FreeBSD.org> In-Reply-To: <20141002103222.GG73266@FreeBSD.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Hiroki Sato , src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Oct 2014 09:58:38 -0000 On 02.10.2014 14:32, Gleb Smirnoff wrote: > On Thu, Oct 02, 2014 at 12:16:15PM +0400, Alexander V. Chernikov wrote: > A> On 02.10.2014 04:25, Hiroki Sato wrote: > A> > Author: hrs > A> > Date: Thu Oct 2 00:25:57 2014 > A> > New Revision: 272391 > A> > URL: https://svnweb.freebsd.org/changeset/base/272391 > A> > > A> > Log: > A> > Add an additional routing table lookup when m->m_pkthdr.fibnum is changed > A> > at a PFIL hook in ip{,6}_output(). IPFW setfib rule did not perform > A> > a routing table lookup when the destination address was not changed. > A> > > A> > CR: D805 > A> > > A> > Modified: > A> > head/sys/netinet/ip_output.c > A> > head/sys/netinet6/ip6_output.c > A> I'm not very happy with this. > A> We already have large conditional for checking if dst has changed, how > A> you have added another conditional for fib.. > A> This idea is quite weird: why should we try to check all this stuff for > A> every packet instead of asking pfil consumers > A> to provide information they already know? > A> > A> We'd better discuss something like M_DSTCHANGED flag instead of doing > A> these hacks. > > And here you suggest to abuse mbuf flags to merely carry return value of > a pfil hook :) Why not? We have some M_PROTOX flags for exactly the same: store some state inside particular subsystem being set internally and cleared on return. We can use alternative approach like making last PFIL argument being pointer to some unsigned value representing flags and check it on return. The problem here is that we will make PFIL batching implementation harder.. > From owner-svn-src-all@FreeBSD.ORG Fri Oct 3 10:18:23 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6E651870; Fri, 3 Oct 2014 10:18:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 59FFC766; Fri, 3 Oct 2014 10:18:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s93AINAv079637; Fri, 3 Oct 2014 10:18:23 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s93AIN1A079636; Fri, 3 Oct 2014 10:18:23 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201410031018.s93AIN1A079636@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Fri, 3 Oct 2014 10:18:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272471 - head/sys/fs/autofs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Oct 2014 10:18:23 -0000 Author: trasz Date: Fri Oct 3 10:18:22 2014 New Revision: 272471 URL: https://svnweb.freebsd.org/changeset/base/272471 Log: Fix autofs debug macros. MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/sys/fs/autofs/autofs.h Modified: head/sys/fs/autofs/autofs.h ============================================================================== --- head/sys/fs/autofs/autofs.h Fri Oct 3 09:58:05 2014 (r272470) +++ head/sys/fs/autofs/autofs.h Fri Oct 3 10:18:22 2014 (r272471) @@ -42,15 +42,18 @@ extern uma_zone_t autofs_node_zone; extern int autofs_debug; extern int autofs_mount_on_stat; -#define AUTOFS_DEBUG(X, ...) \ - if (autofs_debug > 1) { \ - printf("%s: " X "\n", __func__, ## __VA_ARGS__);\ +#define AUTOFS_DEBUG(X, ...) \ + do { \ + if (autofs_debug > 1) \ + printf("%s: " X "\n", __func__, ## __VA_ARGS__);\ } while (0) -#define AUTOFS_WARN(X, ...) \ - if (autofs_debug > 0) { \ - printf("WARNING: %s: " X "\n", \ - __func__, ## __VA_ARGS__); \ +#define AUTOFS_WARN(X, ...) \ + do { \ + if (autofs_debug > 0) { \ + printf("WARNING: %s: " X "\n", \ + __func__, ## __VA_ARGS__); \ + } \ } while (0) #define AUTOFS_SLOCK(X) sx_slock(&X->am_lock) From owner-svn-src-all@FreeBSD.ORG Fri Oct 3 12:14:20 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 63F9B3F4; Fri, 3 Oct 2014 12:14:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 501DB341; Fri, 3 Oct 2014 12:14:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s93CEKc0036095; Fri, 3 Oct 2014 12:14:20 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s93CEKOI036094; Fri, 3 Oct 2014 12:14:20 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201410031214.s93CEKOI036094@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 3 Oct 2014 12:14:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272472 - head/contrib/binutils/gas/config X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Oct 2014 12:14:20 -0000 Author: andrew Date: Fri Oct 3 12:14:19 2014 New Revision: 272472 URL: https://svnweb.freebsd.org/changeset/base/272472 Log: Allow the optional limitation on dmb instructions as is already the case with dsb instructions. Modified: head/contrib/binutils/gas/config/tc-arm.c Modified: head/contrib/binutils/gas/config/tc-arm.c ============================================================================== --- head/contrib/binutils/gas/config/tc-arm.c Fri Oct 3 10:18:22 2014 (r272471) +++ head/contrib/binutils/gas/config/tc-arm.c Fri Oct 3 12:14:19 2014 (r272472) @@ -6571,6 +6571,7 @@ do_barrier (void) if (inst.operands[0].present) { constraint ((inst.instruction & 0xf0) != 0x40 + && (inst.instruction & 0xf0) != 0x50 && inst.operands[0].imm != 0xf, "bad barrier type"); inst.instruction |= inst.operands[0].imm; From owner-svn-src-all@FreeBSD.ORG Fri Oct 3 12:20:38 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A80F35A2; Fri, 3 Oct 2014 12:20:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9419C370; Fri, 3 Oct 2014 12:20:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s93CKc4k039267; Fri, 3 Oct 2014 12:20:38 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s93CKcEq039266; Fri, 3 Oct 2014 12:20:38 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201410031220.s93CKcEq039266@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 3 Oct 2014 12:20:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272473 - head/contrib/binutils/gas/config X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Oct 2014 12:20:38 -0000 Author: andrew Date: Fri Oct 3 12:20:37 2014 New Revision: 272473 URL: https://svnweb.freebsd.org/changeset/base/272473 Log: Add all the dmb/dsb optional limitations, including the alternative values. These are needed for some code llvm generates when targeting ARMv7. Modified: head/contrib/binutils/gas/config/tc-arm.c Modified: head/contrib/binutils/gas/config/tc-arm.c ============================================================================== --- head/contrib/binutils/gas/config/tc-arm.c Fri Oct 3 12:14:19 2014 (r272472) +++ head/contrib/binutils/gas/config/tc-arm.c Fri Oct 3 12:20:37 2014 (r272473) @@ -14695,10 +14695,18 @@ static const struct asm_cond conds[] = static struct asm_barrier_opt barrier_opt_names[] = { - { "sy", 0xf }, - { "un", 0x7 }, - { "st", 0xe }, - { "unst", 0x6 } + { "sy", 0xf }, + { "un", 0x7 }, + { "st", 0xe }, + { "unst", 0x6 }, + { "ish", 0xb }, + { "sh", 0xb }, + { "ishst", 0xa }, + { "shst", 0xa }, + { "nsh", 0x7 }, + { "nshst", 0x6 }, + { "osh", 0x3 }, + { "oshst", 0x2 } }; /* Table of ARM-format instructions. */ From owner-svn-src-all@FreeBSD.ORG Fri Oct 3 14:49:50 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 87C3C9E8; Fri, 3 Oct 2014 14:49:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7316F7E1; Fri, 3 Oct 2014 14:49:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s93EnohU009121; Fri, 3 Oct 2014 14:49:50 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s93EnnR9009098; Fri, 3 Oct 2014 14:49:49 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201410031449.s93EnnR9009098@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Fri, 3 Oct 2014 14:49:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272474 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Oct 2014 14:49:50 -0000 Author: smh Date: Fri Oct 3 14:49:48 2014 New Revision: 272474 URL: https://svnweb.freebsd.org/changeset/base/272474 Log: Fix various issues with zvols When performing snapshot renames we could deadlock due to the locking in zvol_rename_minors. In order to avoid this use the same workaround as zvol_open in zvol_rename_minors. Add missing zvol_rename_minors to dsl_dataset_promote_sync. Protect against invalid index into zv_name in zvol_remove_minors. Replace zvol_remove_minor calls with zvol_remove_minors to ensure any potential children are also renamed. Don't fail zvol_create_minors if zvol_create_minor returns EEXIST. Restore the valid pool check in zfs_ioc_destroy_snaps to ensure we don't call zvol_remove_minors when zfs_unmount_snap fails. PR: 193803 MFC after: 1 week Sponsored by: Multiplay Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Fri Oct 3 12:20:37 2014 (r272473) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Fri Oct 3 14:49:48 2014 (r272474) @@ -2257,6 +2257,9 @@ dsl_dataset_promote_sync(void *arg, dmu_ dsl_dir_t *odd = NULL; uint64_t oldnext_obj; int64_t delta; +#if defined(__FreeBSD__) && defined(_KERNEL) + char *oldname, *newname; +#endif VERIFY0(promote_hold(ddpa, dp, FTAG)); hds = ddpa->ddpa_clone; @@ -2322,6 +2325,14 @@ dsl_dataset_promote_sync(void *arg, dmu_ dd->dd_phys->dd_clones, origin_head->ds_object, tx)); } +#if defined(__FreeBSD__) && defined(_KERNEL) + /* Take the spa_namespace_lock early so zvol renames don't deadlock. */ + mutex_enter(&spa_namespace_lock); + + oldname = kmem_alloc(MAXPATHLEN, KM_SLEEP); + newname = kmem_alloc(MAXPATHLEN, KM_SLEEP); +#endif + /* move snapshots to this dir */ for (snap = list_head(&ddpa->shared_snaps); snap; snap = list_next(&ddpa->shared_snaps, snap)) { @@ -2356,6 +2367,12 @@ dsl_dataset_promote_sync(void *arg, dmu_ VERIFY0(dsl_dir_hold_obj(dp, dd->dd_object, NULL, ds, &ds->ds_dir)); +#if defined(__FreeBSD__) && defined(_KERNEL) + dsl_dataset_name(ds, newname); + zfsvfs_update_fromname(oldname, newname); + zvol_rename_minors(oldname, newname); +#endif + /* move any clone references */ if (ds->ds_phys->ds_next_clones_obj && spa_version(dp->dp_spa) >= SPA_VERSION_DIR_CLONES) { @@ -2393,6 +2410,12 @@ dsl_dataset_promote_sync(void *arg, dmu_ ASSERT(!dsl_prop_hascb(ds)); } +#if defined(__FreeBSD__) && defined(_KERNEL) + mutex_exit(&spa_namespace_lock); + + kmem_free(newname, MAXPATHLEN); + kmem_free(oldname, MAXPATHLEN); +#endif /* * Change space accounting. * Note, pa->*usedsnap and dd_used_breakdown[SNAP] will either Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Fri Oct 3 12:20:37 2014 (r272473) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Fri Oct 3 14:49:48 2014 (r272474) @@ -3540,6 +3540,7 @@ zfs_destroy_unmount_origin(const char *f static int zfs_ioc_destroy_snaps(const char *poolname, nvlist_t *innvl, nvlist_t *outnvl) { + int error, poollen; nvlist_t *snaps; nvpair_t *pair; boolean_t defer; @@ -3548,13 +3549,24 @@ zfs_ioc_destroy_snaps(const char *poolna return (SET_ERROR(EINVAL)); defer = nvlist_exists(innvl, "defer"); + poollen = strlen(poolname); for (pair = nvlist_next_nvpair(snaps, NULL); pair != NULL; pair = nvlist_next_nvpair(snaps, pair)) { const char *name = nvpair_name(pair); - (void) zfs_unmount_snap(name); + /* + * The snap must be in the specified pool to prevent the + * invalid removal of zvol minors below. + */ + if (strncmp(name, poolname, poollen) != 0 || + (name[poollen] != '/' && name[poollen] != '@')) + return (SET_ERROR(EXDEV)); + + error = zfs_unmount_snap(name); + if (error != 0) + return (error); #if defined(__FreeBSD__) - (void) zvol_remove_minor(name); + zvol_remove_minors(name); #endif } @@ -3679,7 +3691,11 @@ zfs_ioc_destroy(zfs_cmd_t *zc) else err = dsl_destroy_head(zc->zc_name); if (zc->zc_objset_type == DMU_OST_ZVOL && err == 0) +#ifdef __FreeBSD__ + zvol_remove_minors(zc->zc_name); +#else (void) zvol_remove_minor(zc->zc_name); +#endif return (err); } Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Fri Oct 3 12:20:37 2014 (r272473) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Fri Oct 3 14:49:48 2014 (r272474) @@ -882,7 +882,8 @@ zvol_remove_minors(const char *name) LIST_FOREACH_SAFE(zv, &all_zvols, zv_links, tzv) { if (strcmp(zv->zv_name, name) == 0 || (strncmp(zv->zv_name, name, namelen) == 0 && - zv->zv_name[namelen] == '/')) { + strlen(zv->zv_name) > namelen && (zv->zv_name[namelen] == '/' || + zv->zv_name[namelen] == '@'))) { (void) zvol_remove_zv(zv); } } @@ -2570,9 +2571,10 @@ zvol_create_minors(const char *name) if (dmu_objset_type(os) == DMU_OST_ZVOL) { dsl_dataset_long_hold(os->os_dsl_dataset, FTAG); dsl_pool_rele(dmu_objset_pool(os), FTAG); - if ((error = zvol_create_minor(name)) == 0) + error = zvol_create_minor(name); + if (error == 0 || error == EEXIST) { error = zvol_create_snapshots(os, name); - else { + } else { printf("ZFS WARNING: Unable to create ZVOL %s (error=%d).\n", name, error); } @@ -2673,12 +2675,17 @@ zvol_rename_minors(const char *oldname, size_t oldnamelen, newnamelen; zvol_state_t *zv; char *namebuf; + boolean_t locked = B_FALSE; oldnamelen = strlen(oldname); newnamelen = strlen(newname); DROP_GIANT(); - mutex_enter(&spa_namespace_lock); + /* See comment in zvol_open(). */ + if (!MUTEX_HELD(&spa_namespace_lock)) { + mutex_enter(&spa_namespace_lock); + locked = B_TRUE; + } LIST_FOREACH(zv, &all_zvols, zv_links) { if (strcmp(zv->zv_name, oldname) == 0) { @@ -2693,7 +2700,8 @@ zvol_rename_minors(const char *oldname, } } - mutex_exit(&spa_namespace_lock); + if (locked) + mutex_exit(&spa_namespace_lock); PICKUP_GIANT(); } From owner-svn-src-all@FreeBSD.ORG Fri Oct 3 15:00:02 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 32E57EB9; Fri, 3 Oct 2014 15:00:02 +0000 (UTC) Received: from mail-ig0-x22f.google.com (mail-ig0-x22f.google.com [IPv6:2607:f8b0:4001:c05::22f]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E34C78FA; Fri, 3 Oct 2014 15:00:01 +0000 (UTC) Received: by mail-ig0-f175.google.com with SMTP id uq10so194569igb.8 for ; Fri, 03 Oct 2014 08:00:01 -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:from:date:message-id :subject:to:content-type; bh=sDfB37LYFqcFgD0lN4uLDCShbpw0LrhkG9FFQvNTrNs=; b=RKLbRA+89FoOA5CDeBx4ntoCcxkN+YkLM/l+oOmweUQ+YgSgIf8x6Eyv2AAM2+O8bt 8ZtVnS90+iLOaI+Bb2yEwlt0RfcRMcD+Xft+qAMqOXiZJRA7xU91i2cUIpgCiz70bpq7 fh1TMpwP0YLQuNl0Ms58KN6XAlaSlb/hc4DY7qFma3gG87SRA0OjcFtuEqYG8Tr1b2h7 ziIZInNN1erZTuCb+kKZlpR8q7HVehgx0i1Z9FXIkr8WUpie5Hzbew7CgXgm9R4CzjP1 X+2i8KkAD3Hnn0BLB6stmfqw99q3wf0e9xX7HeTgfNzineivBT7aNJuURQuhrxN7SFdt NZdA== X-Received: by 10.43.59.80 with SMTP id wn16mr13786037icb.6.1412348401313; Fri, 03 Oct 2014 08:00:01 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.9.221 with HTTP; Fri, 3 Oct 2014 07:59:41 -0700 (PDT) In-Reply-To: References: <201410012103.s91L3HR0010906@svn.freebsd.org> From: Ed Maste Date: Fri, 3 Oct 2014 10:59:41 -0400 X-Google-Sender-Auth: 3ern_Nup925-hQbC_wU1pmTSQQY Message-ID: Subject: Re: svn commit: r272384 - head/usr.bin/mkimg To: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Oct 2014 15:00:02 -0000 On 2 October 2014 10:43, Ed Maste wrote: > > I've been using brooks' NO_ROOT support along with makefs / mkimg to > build and test changes by creating an image to boot in QEMU. This > change provides a noticeable improvement in the cycle time. I've had a couple of inquiries about the workflow I've been using, so I've added a brief set of steps to my Wiki page at https://wiki.freebsd.org/EdMaste/BuildVM . With -DNO_ROOT for the install targets an mtree file named METALOG file is created at the top of DESTDIR. Files are installed owned by the user, without special flags. Makefs reads the METALOG file and applies the desired ownership, permissions and flags in the generated file system. Then mkimg creates an image with a GPT partition table, the UFS filesystem created by makefs, and the various boot loader bits for legacy and UEFI boot. From owner-svn-src-all@FreeBSD.ORG Fri Oct 3 15:03:45 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 23065115; Fri, 3 Oct 2014 15:03:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0F5979B3; Fri, 3 Oct 2014 15:03:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s93F3ijh017695; Fri, 3 Oct 2014 15:03:44 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s93F3i8V017694; Fri, 3 Oct 2014 15:03:44 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <201410031503.s93F3i8V017694@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Fri, 3 Oct 2014 15:03:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272475 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Oct 2014 15:03:45 -0000 Author: lwhsu (ports committer) Date: Fri Oct 3 15:03:44 2014 New Revision: 272475 URL: https://svnweb.freebsd.org/changeset/base/272475 Log: Bump .Dd Approved by: kevlo Modified: head/share/man/man9/sleepqueue.9 Modified: head/share/man/man9/sleepqueue.9 ============================================================================== --- head/share/man/man9/sleepqueue.9 Fri Oct 3 14:49:48 2014 (r272474) +++ head/share/man/man9/sleepqueue.9 Fri Oct 3 15:03:44 2014 (r272475) @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 19, 2013 +.Dd September 22, 2014 .Dt SLEEPQUEUE 9 .Os .Sh NAME From owner-svn-src-all@FreeBSD.ORG Fri Oct 3 15:07:44 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ABF9B483; Fri, 3 Oct 2014 15:07:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 97A3F9F7; Fri, 3 Oct 2014 15:07:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s93F7iOl018369; Fri, 3 Oct 2014 15:07:44 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s93F7iT4018368; Fri, 3 Oct 2014 15:07:44 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201410031507.s93F7iT4018368@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 3 Oct 2014 15:07:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272476 - head/contrib/binutils/gas/config X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Oct 2014 15:07:44 -0000 Author: andrew Date: Fri Oct 3 15:07:43 2014 New Revision: 272476 URL: https://svnweb.freebsd.org/changeset/base/272476 Log: Allow vld and vst instructions to use the canonical form from ARM ARM when including an alignment. Previously binutils would only allow instructions in the form "vld1.64 {d0, d1}, [r0, :128]" where the final comma should not be there, instead the above instruction should be "vld1.64 {d0, d1}, [r0:128]". This change duplicates the alignment code from within the function to handle this case. Modified: head/contrib/binutils/gas/config/tc-arm.c Modified: head/contrib/binutils/gas/config/tc-arm.c ============================================================================== --- head/contrib/binutils/gas/config/tc-arm.c Fri Oct 3 15:03:44 2014 (r272475) +++ head/contrib/binutils/gas/config/tc-arm.c Fri Oct 3 15:07:43 2014 (r272476) @@ -4688,6 +4688,23 @@ parse_address_main (char **str, int i, i return PARSE_OPERAND_FAIL; } } + else if (skip_past_char (&p, ':') == SUCCESS) + { + /* FIXME: '@' should be used here, but it's filtered out by generic + code before we get to see it here. This may be subject to + change. */ + expressionS exp; + my_get_expression (&exp, &p, GE_NO_PREFIX); + if (exp.X_op != O_constant) + { + inst.error = _("alignment must be constant"); + return PARSE_OPERAND_FAIL; + } + inst.operands[i].imm = exp.X_add_number << 8; + inst.operands[i].immisalign = 1; + /* Alignments are not pre-indexes. */ + inst.operands[i].preind = 0; + } if (skip_past_char (&p, ']') == FAIL) { From owner-svn-src-all@FreeBSD.ORG Fri Oct 3 15:58:05 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7D6DFC40; Fri, 3 Oct 2014 15:58:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 69905F93; Fri, 3 Oct 2014 15:58:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s93Fw5CS042216; Fri, 3 Oct 2014 15:58:05 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s93Fw5fa042215; Fri, 3 Oct 2014 15:58:05 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201410031558.s93Fw5fa042215@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 3 Oct 2014 15:58:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272479 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Oct 2014 15:58:05 -0000 Author: hselasky Date: Fri Oct 3 15:58:04 2014 New Revision: 272479 URL: https://svnweb.freebsd.org/changeset/base/272479 Log: Fix XHCI driver for devices which have more than 15 physical root HUB ports. The current bitmap array was too small to hold more than 16 bits and would at some point toggle the context size, which then would trigger an enumeration fault and cause a fallback to the EHCI companion controller, if any. MFC after: 3 days Modified: head/sys/dev/usb/controller/xhci.h Modified: head/sys/dev/usb/controller/xhci.h ============================================================================== --- head/sys/dev/usb/controller/xhci.h Fri Oct 3 15:54:51 2014 (r272478) +++ head/sys/dev/usb/controller/xhci.h Fri Oct 3 15:58:04 2014 (r272479) @@ -493,7 +493,8 @@ struct xhci_softc { uint8_t sc_noscratch; /* root HUB device configuration */ uint8_t sc_conf; - uint8_t sc_hub_idata[2]; + /* root HUB port event bitmap, max 256 ports */ + uint8_t sc_hub_idata[32]; /* size of context */ uint8_t sc_ctx_is_64_byte; From owner-svn-src-all@FreeBSD.ORG Fri Oct 3 16:09:47 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 52906F5B; Fri, 3 Oct 2014 16:09:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3E8F0118; Fri, 3 Oct 2014 16:09:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s93G9lkP047262; Fri, 3 Oct 2014 16:09:47 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s93G9lNI047261; Fri, 3 Oct 2014 16:09:47 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201410031609.s93G9lNI047261@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 3 Oct 2014 16:09:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272480 - head/sys/dev/usb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Oct 2014 16:09:47 -0000 Author: hselasky Date: Fri Oct 3 16:09:46 2014 New Revision: 272480 URL: https://svnweb.freebsd.org/changeset/base/272480 Log: When we fail to get a USB reference we should just return, because there are no more references held. MFC after: 3 days Modified: head/sys/dev/usb/usb_dev.c Modified: head/sys/dev/usb/usb_dev.c ============================================================================== --- head/sys/dev/usb/usb_dev.c Fri Oct 3 15:58:04 2014 (r272479) +++ head/sys/dev/usb/usb_dev.c Fri Oct 3 16:09:46 2014 (r272480) @@ -298,6 +298,10 @@ error: } mtx_unlock(&usb_ref_lock); DPRINTFN(2, "fail\n"); + + /* clear all refs */ + memset(crd, 0, sizeof(*crd)); + return (USB_ERR_INVAL); } @@ -1093,8 +1097,8 @@ usb_ioctl(struct cdev *dev, u_long cmd, goto done; if (usb_usb_ref_device(cpd, &refs)) { - err = ENXIO; - goto done; + /* we lost the reference */ + return (ENXIO); } err = (f->methods->f_ioctl_post) (f, cmd, addr, fflags); @@ -1117,9 +1121,8 @@ usb_ioctl(struct cdev *dev, u_long cmd, while (usb_ref_device(cpd, &refs, 1 /* need uref */)) { if (usb_ref_device(cpd, &refs, 0)) { - /* device no longer exits */ - err = ENXIO; - goto done; + /* device no longer exists */ + return (ENXIO); } usb_unref_device(cpd, &refs); usb_pause_mtx(NULL, hz / 128); @@ -1411,9 +1414,9 @@ usb_read(struct cdev *dev, struct uio *u return (err); err = usb_ref_device(cpd, &refs, 0 /* no uref */ ); - if (err) { + if (err) return (ENXIO); - } + fflags = cpd->fflags; f = refs.rxfifo; @@ -1537,9 +1540,9 @@ usb_write(struct cdev *dev, struct uio * return (err); err = usb_ref_device(cpd, &refs, 0 /* no uref */ ); - if (err) { + if (err) return (ENXIO); - } + fflags = cpd->fflags; f = refs.txfifo; From owner-svn-src-all@FreeBSD.ORG Fri Oct 3 17:12:46 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 26D3FFDA for ; Fri, 3 Oct 2014 17:12:46 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E26C4A7E for ; Fri, 3 Oct 2014 17:12:45 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.9/8.14.9) with ESMTP id s93HCjQS085320 for ; Fri, 3 Oct 2014 17:12:45 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.9/8.14.9/Submit) id s93HCj1D085314 for svn-src-all@freebsd.org; Fri, 3 Oct 2014 17:12:45 GMT (envelope-from bdrewery) Received: (qmail 13300 invoked from network); 3 Oct 2014 12:12:44 -0500 Received: from unknown (HELO ?10.10.0.24?) (freebsd@shatow.net@10.10.0.24) by sweb.xzibition.com with ESMTPA; 3 Oct 2014 12:12:44 -0500 Message-ID: <542ED903.30808@FreeBSD.org> Date: Fri, 03 Oct 2014 12:12:35 -0500 From: Bryan Drewery Organization: FreeBSD User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 MIME-Version: 1.0 To: Marcelo Araujo , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r272467 - in head/sys: cddl/contrib/opensolaris/uts/common/fs/zfs fs/nfs fs/nfsserver References: <201410030224.s932OfSw059966@svn.freebsd.org> In-Reply-To: <201410030224.s932OfSw059966@svn.freebsd.org> OpenPGP: id=6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="2BuID1jo3Xnnqej1HLRUnOGbVDsL5uf3G" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Oct 2014 17:12:46 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --2BuID1jo3Xnnqej1HLRUnOGbVDsL5uf3G Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 10/2/2014 9:24 PM, Marcelo Araujo wrote: > Author: araujo (ports committer) > Date: Fri Oct 3 02:24:41 2014 > New Revision: 272467 > URL: https://svnweb.freebsd.org/changeset/base/272467 >=20 > Log: > Fix failures and warnings reported by newpynfs20090424 test tool. > This fix addresses only issues with the pynfs reports, none of these > issues are know to create problems for extant real clients. Do you have more details than "fix bugs"? :) Even which failures were fixed would be helpful to document. > =20 > Submitted by: Bart Hsiao > Reworked by: myself > Reviewed by: rmacklem > Approved by: rmacklem > Sponsored by: QNAP Systems Inc. >=20 --=20 Regards, Bryan Drewery --2BuID1jo3Xnnqej1HLRUnOGbVDsL5uf3G Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) iQEcBAEBAgAGBQJULtkDAAoJEDXXcbtuRpfP+LMH/jcvDJGroTsfBqtqeQ6QRJMQ nyEOSQ1pZFOqQoRKtVkaHHb1x8iTgLsMh2PKqaFZSDOFnPI/K/cZVENgGvHXum7d Mr4f6Mgwl4GTe20cFkzE8CwW1nud3GCEmzD9tyGNQC0Uqq89gPvgPxPmrHLeeCgy Y6eyWyxP9QFvWyl3IPw+BPlFB+9HE4k6G34fK6w7YtrR1hVLF4tJsJMw6ZYLgh5z BhIZhL+/34hQvg1D1y4KU4NhDBksfYvuADQ3rUuLmXxtc965SJIUEbQ2T8YPie16 mUcrZ4cXlpn+Gg2cA81Ct4TDr0JkxNNk6rd9FG6FqOy7ZNu721/iMJWXFr6ImXg= =UX6r -----END PGP SIGNATURE----- --2BuID1jo3Xnnqej1HLRUnOGbVDsL5uf3G-- From owner-svn-src-all@FreeBSD.ORG Fri Oct 3 17:17:20 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2DF27229; Fri, 3 Oct 2014 17:17:20 +0000 (UTC) Received: from mail-wg0-x22d.google.com (mail-wg0-x22d.google.com [IPv6:2a00:1450:400c:c00::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2981CAB4; Fri, 3 Oct 2014 17:17:19 +0000 (UTC) Received: by mail-wg0-f45.google.com with SMTP id m15so2071050wgh.16 for ; Fri, 03 Oct 2014 10:17:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=NcOBy7nZWo49ANbYwczU+sBG9LKZDBbfbRCoDdTOCzo=; b=epHoIRz3GB7oQd8RKgWg1Rpfh5F1Bt9LnjvPaFqPmDhgIXqdjRSIB3N/sfKL0fZ9X3 A8L94soaubQiNonnbo+Ad+DJDdx2+SsSKUmG77COyF7Jmi58fMNdauPepjKZks0Ceikf GPFoed5YEgfrS1uANYXR57res9GnPLSZ6Pl9HmGDe1SAZ8iJcHPhnkJxrinSvEP0Jo4x 3Alspf72fUqMiGckhMUwEOzlD2X6UKXLaWQqYoPqNjudJkOhnMJUxfBkEsYyDHYQs25T Ii5HTq9EVYVW9mgmOCjcTLrRPzB795PBcEQPceJraQlSJnaMC7IEUbTFjWvOSU+SDEh6 hnDA== MIME-Version: 1.0 X-Received: by 10.180.102.7 with SMTP id fk7mr14114611wib.77.1412356637370; Fri, 03 Oct 2014 10:17:17 -0700 (PDT) Received: by 10.216.159.193 with HTTP; Fri, 3 Oct 2014 10:17:17 -0700 (PDT) Received: by 10.216.159.193 with HTTP; Fri, 3 Oct 2014 10:17:17 -0700 (PDT) Reply-To: araujo@FreeBSD.org In-Reply-To: <542ED903.30808@FreeBSD.org> References: <201410030224.s932OfSw059966@svn.freebsd.org> <542ED903.30808@FreeBSD.org> Date: Sat, 4 Oct 2014 01:17:17 +0800 Message-ID: Subject: Re: svn commit: r272467 - in head/sys: cddl/contrib/opensolaris/uts/common/fs/zfs fs/nfs fs/nfsserver From: Marcelo Araujo To: Bryan Drewery Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Marcelo Araujo X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Oct 2014 17:17:20 -0000 Hey, Yes I have, you could check here: https://reviews.freebsd.org/D798 I should added the phabric on the commit log. My bad! Best Regards, On Oct 4, 2014 1:12 AM, "Bryan Drewery" wrote: > On 10/2/2014 9:24 PM, Marcelo Araujo wrote: > > Author: araujo (ports committer) > > Date: Fri Oct 3 02:24:41 2014 > > New Revision: 272467 > > URL: https://svnweb.freebsd.org/changeset/base/272467 > > > > Log: > > Fix failures and warnings reported by newpynfs20090424 test tool. > > This fix addresses only issues with the pynfs reports, none of these > > issues are know to create problems for extant real clients. > > Do you have more details than "fix bugs"? :) > > Even which failures were fixed would be helpful to document. > > > > > Submitted by: Bart Hsiao > > Reworked by: myself > > Reviewed by: rmacklem > > Approved by: rmacklem > > Sponsored by: QNAP Systems Inc. > > > > > -- > Regards, > Bryan Drewery > > From owner-svn-src-all@FreeBSD.ORG Fri Oct 3 17:20:57 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A67A94EA for ; Fri, 3 Oct 2014 17:20:57 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8655FB74 for ; Fri, 3 Oct 2014 17:20:57 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.9/8.14.9) with ESMTP id s93HKvUL086474 for ; Fri, 3 Oct 2014 17:20:57 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.9/8.14.9/Submit) id s93HKvRS086469 for svn-src-all@freebsd.org; Fri, 3 Oct 2014 17:20:57 GMT (envelope-from bdrewery) Received: (qmail 21726 invoked from network); 3 Oct 2014 12:20:55 -0500 Received: from unknown (HELO ?10.10.0.24?) (freebsd@shatow.net@10.10.0.24) by sweb.xzibition.com with ESMTPA; 3 Oct 2014 12:20:55 -0500 Message-ID: <542EDAEE.2060003@FreeBSD.org> Date: Fri, 03 Oct 2014 12:20:46 -0500 From: Bryan Drewery Organization: FreeBSD User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 MIME-Version: 1.0 To: araujo@FreeBSD.org Subject: Re: svn commit: r272467 - in head/sys: cddl/contrib/opensolaris/uts/common/fs/zfs fs/nfs fs/nfsserver References: <201410030224.s932OfSw059966@svn.freebsd.org> <542ED903.30808@FreeBSD.org> In-Reply-To: OpenPGP: id=6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="VCpKNxXU1lcKkmxGcoaB6dAmBEAFstiGH" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Oct 2014 17:20:57 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --VCpKNxXU1lcKkmxGcoaB6dAmBEAFstiGH Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 10/3/2014 12:17 PM, Marcelo Araujo wrote: > Hey, >=20 > Yes I have, you could check here: https://reviews.freebsd.org/D798 >=20 > I should added the phabric on the commit log. My bad! >=20 > Best Regards, >=20 Thanks! --=20 Regards, Bryan Drewery --VCpKNxXU1lcKkmxGcoaB6dAmBEAFstiGH Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) iQEcBAEBAgAGBQJULtruAAoJEDXXcbtuRpfPBhIH/0csnoP+9zEJioBA/SBOrMDT RwfS88qdo3Nd9F5dLPHd6BolxD+lwzv7MDeblGNeni7J6HymB/25MV6bM2B0VUM7 QUfzzOhukB0YKrR1uruNMQtVsFgfqklHkoukeiV5GN3nfLCr7S5tcsc7fY0lI83K 4+HAAxmVeacYazF1u0LNRwd2yIWxUKZ2bApa42B/kCUPrKSJG6CG8nlFujubcoth Zobfb1aqBsjsTmFreC1/y5k3HXxynbPLI9Vp+DWjRl0yvfkRAHwsCL0NhcmaLPoD MlFT+NJVH3lvylv7FA3+14ysqmqLBEL306zj237RKUpygef0UhijgUSJ1cXkxXo= =BhmL -----END PGP SIGNATURE----- --VCpKNxXU1lcKkmxGcoaB6dAmBEAFstiGH-- From owner-svn-src-all@FreeBSD.ORG Fri Oct 3 17:23:28 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0855F66C; Fri, 3 Oct 2014 17:23:28 +0000 (UTC) Received: from mho-01-ewr.mailhop.org (mho-03-ewr.mailhop.org [204.13.248.66]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CC749B95; Fri, 3 Oct 2014 17:23:27 +0000 (UTC) Received: from [73.34.117.227] (helo=ilsoft.org) by mho-01-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1Xa6Zh-0003Oo-N7; Fri, 03 Oct 2014 17:23:25 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id s93HNO9S021807; Fri, 3 Oct 2014 11:23:24 -0600 (MDT) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1+F3brBIs7wIAZw0/t7q6tM X-Authentication-Warning: paranoia.hippie.lan: Host revolution.hippie.lan [172.22.42.240] claimed to be [172.22.42.240] Subject: Re: svn commit: r272467 - in head/sys: cddl/contrib/opensolaris/uts/common/fs/zfs fs/nfs fs/nfsserver From: Ian Lepore To: araujo@FreeBSD.org In-Reply-To: References: <201410030224.s932OfSw059966@svn.freebsd.org> <542ED903.30808@FreeBSD.org> Content-Type: text/plain; charset="us-ascii" Date: Fri, 03 Oct 2014 11:23:24 -0600 Message-ID: <1412357004.12052.86.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Bryan Drewery X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Oct 2014 17:23:28 -0000 On Sat, 2014-10-04 at 01:17 +0800, Marcelo Araujo wrote: > Hey, > > Yes I have, you could check here: https://reviews.freebsd.org/D798 > > I should added the phabric on the commit log. My bad! > IMO, no amount of verbiage in phabricator linked to from a commit message is a substitute for a proper detailed commit message. -- Ian > Best Regards, > On Oct 4, 2014 1:12 AM, "Bryan Drewery" wrote: > > > On 10/2/2014 9:24 PM, Marcelo Araujo wrote: > > > Author: araujo (ports committer) > > > Date: Fri Oct 3 02:24:41 2014 > > > New Revision: 272467 > > > URL: https://svnweb.freebsd.org/changeset/base/272467 > > > > > > Log: > > > Fix failures and warnings reported by newpynfs20090424 test tool. > > > This fix addresses only issues with the pynfs reports, none of these > > > issues are know to create problems for extant real clients. > > > > Do you have more details than "fix bugs"? :) > > > > Even which failures were fixed would be helpful to document. > > > > > > > > Submitted by: Bart Hsiao > > > Reworked by: myself > > > Reviewed by: rmacklem > > > Approved by: rmacklem > > > Sponsored by: QNAP Systems Inc. > > > > > > > > > -- > > Regards, > > Bryan Drewery > > > > From owner-svn-src-all@FreeBSD.ORG Fri Oct 3 17:27:31 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4D172834; Fri, 3 Oct 2014 17:27:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 38F33BCA; Fri, 3 Oct 2014 17:27:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s93HRVFW084593; Fri, 3 Oct 2014 17:27:31 GMT (envelope-from grehan@FreeBSD.org) Received: (from grehan@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s93HRVnH084592; Fri, 3 Oct 2014 17:27:31 GMT (envelope-from grehan@FreeBSD.org) Message-Id: <201410031727.s93HRVnH084592@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: grehan set sender to grehan@FreeBSD.org using -f From: Peter Grehan Date: Fri, 3 Oct 2014 17:27:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272481 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Oct 2014 17:27:31 -0000 Author: grehan Date: Fri Oct 3 17:27:30 2014 New Revision: 272481 URL: https://svnweb.freebsd.org/changeset/base/272481 Log: Add new fields in the FADT, required by IASL 20140926-64. The new IASL from the recent acpi-ca import will error out if it doesn't see these new fields, which were previously reserved. Reported by: lme Reviewed by: neel Modified: head/usr.sbin/bhyve/acpi.c Modified: head/usr.sbin/bhyve/acpi.c ============================================================================== --- head/usr.sbin/bhyve/acpi.c Fri Oct 3 16:09:46 2014 (r272480) +++ head/usr.sbin/bhyve/acpi.c Fri Oct 3 17:27:30 2014 (r272481) @@ -430,7 +430,10 @@ basl_fwrite_fadt(FILE *fp) EFPRINTF(fp, "\n"); EFPRINTF(fp, "[0001]\t\tValue to cause reset : 06\n"); - EFPRINTF(fp, "[0003]\t\tReserved : 000000\n"); + EFPRINTF(fp, "[0002]\t\tARM Flags (decoded below): 0000\n"); + EFPRINTF(fp, "\t\t\tPSCI Compliant : 0\n"); + EFPRINTF(fp, "\t\t\tMust use HVC for PSCI : 0\n"); + EFPRINTF(fp, "[0001]\t\tFADT Minor Revision : 01\n"); EFPRINTF(fp, "[0008]\t\tFACS Address : 00000000%08X\n", basl_acpi_base + FACS_OFFSET); EFPRINTF(fp, "[0008]\t\tDSDT Address : 00000000%08X\n", From owner-svn-src-all@FreeBSD.ORG Fri Oct 3 17:29:19 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D0A8C9E1; Fri, 3 Oct 2014 17:29:19 +0000 (UTC) Received: from mail-wi0-x22e.google.com (mail-wi0-x22e.google.com [IPv6:2a00:1450:400c:c05::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A8BEBBE0; Fri, 3 Oct 2014 17:29:18 +0000 (UTC) Received: by mail-wi0-f174.google.com with SMTP id cc10so7893294wib.13 for ; Fri, 03 Oct 2014 10:29:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=4IgHtERnFJru8S22fuElpAwubPjIGqhteDt46hhFtA4=; b=vSsGofW7ZJ3+ey6KTcMwzKqNNvXDAI1ILOgqA2TCe+LLvNwOoKO2HAdvCleSaJEqMI sJfgLxsR2h3Zpo1+B6i2TrLeYvjRZkLhfxIemPFmqKalyF2JugwACdkH1bTv+gq2sJWC Fw0ibDbsFfDsnBjpHLFTLEhutTSrF4qG6VWneetj8qjqt64K3aUi4jylR7ts/qxjEFT8 5F/QHucW8HQYBh478H+/JP5FG8Cbhuw9ZxoiP8lp7jRDhUf4lyLQJdeX/Jc2FXa2hMbD mVowz/EWeLkoXxjkEN1QbdT9FP21aKK+jKl0uGApIAe1HmzNfyzfecPIl0Ez77/GThs8 8Kwg== MIME-Version: 1.0 X-Received: by 10.180.189.84 with SMTP id gg20mr13850232wic.37.1412357356820; Fri, 03 Oct 2014 10:29:16 -0700 (PDT) Received: by 10.216.159.193 with HTTP; Fri, 3 Oct 2014 10:29:16 -0700 (PDT) Received: by 10.216.159.193 with HTTP; Fri, 3 Oct 2014 10:29:16 -0700 (PDT) Reply-To: araujo@FreeBSD.org In-Reply-To: <1412357004.12052.86.camel@revolution.hippie.lan> References: <201410030224.s932OfSw059966@svn.freebsd.org> <542ED903.30808@FreeBSD.org> <1412357004.12052.86.camel@revolution.hippie.lan> Date: Sat, 4 Oct 2014 01:29:16 +0800 Message-ID: Subject: Re: svn commit: r272467 - in head/sys: cddl/contrib/opensolaris/uts/common/fs/zfs fs/nfs fs/nfsserver From: Marcelo Araujo To: Ian Lepore Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, araujo@freebsd.org, Bryan Drewery X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Oct 2014 17:29:19 -0000 Sure, noted! Thanks. On Oct 4, 2014 1:23 AM, "Ian Lepore" wrote: > On Sat, 2014-10-04 at 01:17 +0800, Marcelo Araujo wrote: > > Hey, > > > > Yes I have, you could check here: https://reviews.freebsd.org/D798 > > > > I should added the phabric on the commit log. My bad! > > > > IMO, no amount of verbiage in phabricator linked to from a commit > message is a substitute for a proper detailed commit message. > > -- Ian > > > Best Regards, > > On Oct 4, 2014 1:12 AM, "Bryan Drewery" wrote: > > > > > On 10/2/2014 9:24 PM, Marcelo Araujo wrote: > > > > Author: araujo (ports committer) > > > > Date: Fri Oct 3 02:24:41 2014 > > > > New Revision: 272467 > > > > URL: https://svnweb.freebsd.org/changeset/base/272467 > > > > > > > > Log: > > > > Fix failures and warnings reported by newpynfs20090424 test tool. > > > > This fix addresses only issues with the pynfs reports, none of > these > > > > issues are know to create problems for extant real clients. > > > > > > Do you have more details than "fix bugs"? :) > > > > > > Even which failures were fixed would be helpful to document. > > > > > > > > > > > Submitted by: Bart Hsiao > > > > Reworked by: myself > > > > Reviewed by: rmacklem > > > > Approved by: rmacklem > > > > Sponsored by: QNAP Systems Inc. > > > > > > > > > > > > > -- > > > Regards, > > > Bryan Drewery > > > > > > > > > From owner-svn-src-all@FreeBSD.ORG Fri Oct 3 20:24:58 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2F3D279B; Fri, 3 Oct 2014 20:24:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 01C6EF9; Fri, 3 Oct 2014 20:24:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s93KOvvZ070725; Fri, 3 Oct 2014 20:24:57 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s93KOveM070721; Fri, 3 Oct 2014 20:24:57 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201410032024.s93KOveM070721@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Fri, 3 Oct 2014 20:24:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272482 - in head/bin/sh: . tests/builtins X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Oct 2014 20:24:58 -0000 Author: jilles Date: Fri Oct 3 20:24:56 2014 New Revision: 272482 URL: https://svnweb.freebsd.org/changeset/base/272482 Log: sh: Fix LINENO and prompt after $'\0 and newline. Added: head/bin/sh/tests/builtins/lineno3.0 (contents, props changed) head/bin/sh/tests/builtins/lineno3.0.stdout (contents, props changed) Modified: head/bin/sh/parser.c head/bin/sh/tests/builtins/Makefile Modified: head/bin/sh/parser.c ============================================================================== --- head/bin/sh/parser.c Fri Oct 3 17:27:30 2014 (r272481) +++ head/bin/sh/parser.c Fri Oct 3 20:24:56 2014 (r272482) @@ -1279,6 +1279,13 @@ readcstyleesc(char *out) c = pgetc(); if (c == PEOF) synerror("Unterminated quoted string"); + if (c == '\n') { + plinno++; + if (doprompt) + setprompt(2); + else + setprompt(0); + } } pungetc(); return out; Modified: head/bin/sh/tests/builtins/Makefile ============================================================================== --- head/bin/sh/tests/builtins/Makefile Fri Oct 3 17:27:30 2014 (r272481) +++ head/bin/sh/tests/builtins/Makefile Fri Oct 3 20:24:56 2014 (r272482) @@ -100,6 +100,7 @@ FILES+= jobid2.0 FILES+= kill1.0 kill2.0 FILES+= lineno.0 lineno.0.stdout FILES+= lineno2.0 +FILES+= lineno3.0 lineno3.0.stdout FILES+= local1.0 FILES+= local2.0 FILES+= local3.0 Added: head/bin/sh/tests/builtins/lineno3.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/sh/tests/builtins/lineno3.0 Fri Oct 3 20:24:56 2014 (r272482) @@ -0,0 +1,6 @@ +# $FreeBSD$ + +echo before: $LINENO +dummy=$'a\0 +' +echo after: $LINENO Added: head/bin/sh/tests/builtins/lineno3.0.stdout ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/sh/tests/builtins/lineno3.0.stdout Fri Oct 3 20:24:56 2014 (r272482) @@ -0,0 +1,2 @@ +before: 3 +after: 6 From owner-svn-src-all@FreeBSD.ORG Fri Oct 3 20:34:57 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2DF71B1F; Fri, 3 Oct 2014 20:34:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F30581F9; Fri, 3 Oct 2014 20:34:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s93KYuTr075584; Fri, 3 Oct 2014 20:34:56 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s93KYuUD075578; Fri, 3 Oct 2014 20:34:56 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201410032034.s93KYuUD075578@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Fri, 3 Oct 2014 20:34:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272483 - in head/sys: cddl/compat/opensolaris/kern cddl/compat/opensolaris/sys cddl/contrib/opensolaris/uts/common/fs/zfs vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Oct 2014 20:34:57 -0000 Author: smh Date: Fri Oct 3 20:34:55 2014 New Revision: 272483 URL: https://svnweb.freebsd.org/changeset/base/272483 Log: Refactor ZFS ARC reclaim checks and limits Remove previously added kmem methods in favour of defines which allow diff minimisation between upstream code base. Rebalance ARC free target to be vm_pageout_wakeup_thresh by default which eliminates issue where ARC gets minimised instead of balancing with VM pageout. The restores the target point prior to r270759. Bring in missing upstream only changes which move unused code to further eliminate code differences. Add additional DTRACE probe to aid monitoring of ARC behaviour. Enable upstream i386 code paths on platforms which don't define UMA_MD_SMALL_ALLOC. Fix mixture of byte an page values in arc_memory_throttle i386 code path value assignment of available_memory. PR: 187594 Review: D702 Reviewed by: avg MFC after: 1 week X-MFC-With: r270759 & r270861 Sponsored by: Multiplay Modified: head/sys/cddl/compat/opensolaris/kern/opensolaris_kmem.c head/sys/cddl/compat/opensolaris/sys/kmem.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c head/sys/vm/vm_pageout.c Modified: head/sys/cddl/compat/opensolaris/kern/opensolaris_kmem.c ============================================================================== --- head/sys/cddl/compat/opensolaris/kern/opensolaris_kmem.c Fri Oct 3 20:24:56 2014 (r272482) +++ head/sys/cddl/compat/opensolaris/kern/opensolaris_kmem.c Fri Oct 3 20:34:55 2014 (r272483) @@ -126,42 +126,6 @@ kmem_size_init(void *unused __unused) } SYSINIT(kmem_size_init, SI_SUB_KMEM, SI_ORDER_ANY, kmem_size_init, NULL); -/* - * The return values from kmem_free_* are only valid once the pagedaemon - * has been initialised, before then they return 0. - * - * To ensure the returns are valid the caller can use a SYSINIT with - * subsystem set to SI_SUB_KTHREAD_PAGE and an order of at least - * SI_ORDER_SECOND. - */ -u_int -kmem_free_target(void) -{ - - return (vm_cnt.v_free_target); -} - -u_int -kmem_free_min(void) -{ - - return (vm_cnt.v_free_min); -} - -u_int -kmem_free_count(void) -{ - - return (vm_cnt.v_free_count + vm_cnt.v_cache_count); -} - -u_int -kmem_page_count(void) -{ - - return (vm_cnt.v_page_count); -} - uint64_t kmem_size(void) { @@ -169,13 +133,6 @@ kmem_size(void) return (kmem_size_val); } -uint64_t -kmem_used(void) -{ - - return (vmem_size(kmem_arena, VMEM_ALLOC)); -} - static int kmem_std_constructor(void *mem, int size __unused, void *private, int flags) { Modified: head/sys/cddl/compat/opensolaris/sys/kmem.h ============================================================================== --- head/sys/cddl/compat/opensolaris/sys/kmem.h Fri Oct 3 20:24:56 2014 (r272482) +++ head/sys/cddl/compat/opensolaris/sys/kmem.h Fri Oct 3 20:34:55 2014 (r272483) @@ -66,17 +66,6 @@ typedef struct kmem_cache { void *zfs_kmem_alloc(size_t size, int kmflags); void zfs_kmem_free(void *buf, size_t size); uint64_t kmem_size(void); -uint64_t kmem_used(void); -u_int kmem_page_count(void); - -/* - * The return values from kmem_free_* are only valid once the pagedaemon - * has been initialised, before then they return 0. - */ -u_int kmem_free_count(void); -u_int kmem_free_target(void); -u_int kmem_free_min(void); - kmem_cache_t *kmem_cache_create(char *name, size_t bufsize, size_t align, int (*constructor)(void *, void *, int), void (*destructor)(void *, void *), void (*reclaim)(void *) __unused, void *private, vmem_t *vmp, int cflags); @@ -88,6 +77,9 @@ void kmem_reap(void); int kmem_debugging(void); void *calloc(size_t n, size_t s); +#define freemem (vm_cnt.v_free_count + vm_cnt.v_cache_count) +#define minfree vm_cnt.v_free_min +#define heap_arena kmem_arena #define kmem_alloc(size, kmflags) zfs_kmem_alloc((size), (kmflags)) #define kmem_zalloc(size, kmflags) zfs_kmem_alloc((size), (kmflags) | M_ZERO) #define kmem_free(buf, size) zfs_kmem_free((buf), (size)) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Fri Oct 3 20:24:56 2014 (r272482) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Fri Oct 3 20:34:55 2014 (r272483) @@ -138,6 +138,7 @@ #include #include +#include #ifdef illumos #ifndef _KERNEL @@ -201,7 +202,7 @@ int zfs_arc_shrink_shift = 0; int zfs_arc_p_min_shift = 0; int zfs_disable_dup_eviction = 0; uint64_t zfs_arc_average_blocksize = 8 * 1024; /* 8KB */ -u_int zfs_arc_free_target = (1 << 19); /* default before pagedaemon init only */ +u_int zfs_arc_free_target = 0; static int sysctl_vfs_zfs_arc_free_target(SYSCTL_HANDLER_ARGS); @@ -210,11 +211,10 @@ static void arc_free_target_init(void *unused __unused) { - zfs_arc_free_target = kmem_free_target(); + zfs_arc_free_target = vm_pageout_wakeup_thresh; } SYSINIT(arc_free_target_init, SI_SUB_KTHREAD_PAGE, SI_ORDER_ANY, arc_free_target_init, NULL); -#endif TUNABLE_QUAD("vfs.zfs.arc_meta_limit", &zfs_arc_meta_limit); SYSCTL_DECL(_vfs_zfs); @@ -245,15 +245,16 @@ sysctl_vfs_zfs_arc_free_target(SYSCTL_HA if (err != 0 || req->newptr == NULL) return (err); - if (val < kmem_free_min()) + if (val < minfree) return (EINVAL); - if (val > kmem_page_count()) + if (val > vm_cnt.v_page_count) return (EINVAL); zfs_arc_free_target = val; return (0); } +#endif /* * Note that buffers can be in one of 6 states: @@ -2445,8 +2446,8 @@ arc_shrink(void) if (arc_c > arc_c_min) { uint64_t to_free; - DTRACE_PROBE2(arc__shrink, uint64_t, arc_c, uint64_t, - arc_c_min); + DTRACE_PROBE4(arc__shrink, uint64_t, arc_c, uint64_t, + arc_c_min, uint64_t, arc_p, uint64_t, to_free); #ifdef _KERNEL to_free = arc_c >> arc_shrink_shift; #else @@ -2462,6 +2463,10 @@ arc_shrink(void) arc_c = MAX(arc_size, arc_c_min); if (arc_p > arc_c) arc_p = (arc_c >> 1); + + DTRACE_PROBE2(arc__shrunk, uint64_t, arc_c, uint64_t, + arc_p); + ASSERT(arc_c >= arc_c_min); ASSERT((int64_t)arc_p >= 0); } @@ -2486,18 +2491,13 @@ arc_reclaim_needed(void) return (1); } - if (kmem_free_count() < zfs_arc_free_target) { - DTRACE_PROBE2(arc__reclaim_freetarget, uint64_t, - kmem_free_count(), uint64_t, zfs_arc_free_target); - return (1); - } - /* * Cooperate with pagedaemon when it's time for it to scan * and reclaim some pages. */ - if (vm_paging_needed()) { - DTRACE_PROBE(arc__reclaim_paging); + if (freemem < zfs_arc_free_target) { + DTRACE_PROBE2(arc__reclaim_freemem, uint64_t, + freemem, uint64_t, zfs_arc_free_target); return (1); } @@ -2527,7 +2527,18 @@ arc_reclaim_needed(void) if (availrmem < swapfs_minfree + swapfs_reserve + extra) return (1); -#if defined(__i386) + /* + * Check that we have enough availrmem that memory locking (e.g., via + * mlock(3C) or memcntl(2)) can still succeed. (pages_pp_maximum + * stores the number of pages that cannot be locked; when availrmem + * drops below pages_pp_maximum, page locking mechanisms such as + * page_pp_lock() will fail.) + */ + if (availrmem <= pages_pp_maximum) + return (1); + +#endif /* sun */ +#if defined(__i386) || !defined(UMA_MD_SMALL_ALLOC) /* * If we're on an i386 platform, it's possible that we'll exhaust the * kernel heap space before we ever run out of available physical @@ -2539,25 +2550,33 @@ arc_reclaim_needed(void) * heap is allocated. (Or, in the calculation, if less than 1/4th is * free) */ - if (btop(vmem_size(heap_arena, VMEM_FREE)) < - (btop(vmem_size(heap_arena, VMEM_FREE | VMEM_ALLOC)) >> 2)) - return (1); -#endif -#else /* sun */ -#ifdef __i386__ - /* i386 has KVA limits that the raw page counts above don't consider */ - if (kmem_used() > (kmem_size() * 3) / 4) { + if (vmem_size(heap_arena, VMEM_FREE) < + (vmem_size(heap_arena, VMEM_FREE | VMEM_ALLOC) >> 2)) { DTRACE_PROBE2(arc__reclaim_used, uint64_t, - kmem_used(), uint64_t, (kmem_size() * 3) / 4); + vmem_size(heap_arena, VMEM_FREE), uint64_t, + (vmem_size(heap_arena, VMEM_FREE | VMEM_ALLOC)) >> 2); return (1); } #endif +#ifdef sun + /* + * If zio data pages are being allocated out of a separate heap segment, + * then enforce that the size of available vmem for this arena remains + * above about 1/16th free. + * + * Note: The 1/16th arena free requirement was put in place + * to aggressively evict memory from the arc in order to avoid + * memory fragmentation issues. + */ + if (zio_arena != NULL && + vmem_size(zio_arena, VMEM_FREE) < + (vmem_size(zio_arena, VMEM_ALLOC) >> 4)) + return (1); #endif /* sun */ - -#else +#else /* _KERNEL */ if (spa_get_random(100) == 0) return (1); -#endif +#endif /* _KERNEL */ DTRACE_PROBE(arc__reclaim_no); return (0); @@ -2566,13 +2585,14 @@ arc_reclaim_needed(void) extern kmem_cache_t *zio_buf_cache[]; extern kmem_cache_t *zio_data_buf_cache[]; -static void +static void __noinline arc_kmem_reap_now(arc_reclaim_strategy_t strat) { size_t i; kmem_cache_t *prev_cache = NULL; kmem_cache_t *prev_data_cache = NULL; + DTRACE_PROBE(arc__kmem_reap_start); #ifdef _KERNEL if (arc_meta_used >= arc_meta_limit) { /* @@ -2608,6 +2628,16 @@ arc_kmem_reap_now(arc_reclaim_strategy_t } kmem_cache_reap_now(buf_cache); kmem_cache_reap_now(hdr_cache); + +#ifdef sun + /* + * Ask the vmem arena to reclaim unused memory from its + * quantum caches. + */ + if (zio_arena != NULL && strat == ARC_RECLAIM_AGGR) + vmem_qcache_reap(zio_arena); +#endif + DTRACE_PROBE(arc__kmem_reap_end); } static void @@ -2625,6 +2655,7 @@ arc_reclaim_thread(void *dummy __unused) if (arc_no_grow) { if (last_reclaim == ARC_RECLAIM_CONS) { + DTRACE_PROBE(arc__reclaim_aggr_no_grow); last_reclaim = ARC_RECLAIM_AGGR; } else { last_reclaim = ARC_RECLAIM_CONS; @@ -2632,6 +2663,7 @@ arc_reclaim_thread(void *dummy __unused) } else { arc_no_grow = TRUE; last_reclaim = ARC_RECLAIM_AGGR; + DTRACE_PROBE(arc__reclaim_aggr); membar_producer(); } @@ -2736,6 +2768,7 @@ arc_adapt(int bytes, arc_state_t *state) * cache size, increment the target cache size */ if (arc_size > arc_c - (2ULL << SPA_MAXBLOCKSHIFT)) { + DTRACE_PROBE1(arc__inc_adapt, int, bytes); atomic_add_64(&arc_c, (int64_t)bytes); if (arc_c > arc_c_max) arc_c = arc_c_max; @@ -2757,20 +2790,6 @@ arc_evict_needed(arc_buf_contents_t type if (type == ARC_BUFC_METADATA && arc_meta_used >= arc_meta_limit) return (1); -#ifdef sun -#ifdef _KERNEL - /* - * If zio data pages are being allocated out of a separate heap segment, - * then enforce that the size of available vmem for this area remains - * above about 1/32nd free. - */ - if (type == ARC_BUFC_DATA && zio_arena != NULL && - vmem_size(zio_arena, VMEM_FREE) < - (vmem_size(zio_arena, VMEM_ALLOC) >> 5)) - return (1); -#endif -#endif /* sun */ - if (arc_reclaim_needed()) return (1); @@ -3929,20 +3948,16 @@ static int arc_memory_throttle(uint64_t reserve, uint64_t txg) { #ifdef _KERNEL - uint64_t available_memory = - ptoa((uintmax_t)vm_cnt.v_free_count + vm_cnt.v_cache_count); + uint64_t available_memory = ptob(freemem); static uint64_t page_load = 0; static uint64_t last_txg = 0; -#ifdef sun -#if defined(__i386) +#if defined(__i386) || !defined(UMA_MD_SMALL_ALLOC) available_memory = - MIN(available_memory, vmem_size(heap_arena, VMEM_FREE)); + MIN(available_memory, ptob(vmem_size(heap_arena, VMEM_FREE))); #endif -#endif /* sun */ - if (vm_cnt.v_free_count + vm_cnt.v_cache_count > - (uint64_t)physmem * arc_lotsfree_percent / 100) + if (freemem > (uint64_t)physmem * arc_lotsfree_percent / 100) return (0); if (txg > last_txg) { @@ -3955,7 +3970,7 @@ arc_memory_throttle(uint64_t reserve, ui * continue to let page writes occur as quickly as possible. */ if (curproc == pageproc) { - if (page_load > available_memory / 4) + if (page_load > MAX(ptob(minfree), available_memory) / 4) return (SET_ERROR(ERESTART)); /* Note: reserve is inflated, so we deflate */ page_load += reserve / 8; @@ -3983,8 +3998,10 @@ arc_tempreserve_space(uint64_t reserve, int error; uint64_t anon_size; - if (reserve > arc_c/4 && !arc_no_grow) + if (reserve > arc_c/4 && !arc_no_grow) { arc_c = MIN(arc_c_max, reserve * 4); + DTRACE_PROBE1(arc__set_reserve, uint64_t, arc_c); + } if (reserve > arc_c) return (SET_ERROR(ENOMEM)); @@ -4038,6 +4055,7 @@ arc_lowmem(void *arg __unused, int howto mutex_enter(&arc_lowmem_lock); mutex_enter(&arc_reclaim_thr_lock); needfree = 1; + DTRACE_PROBE(arc__needfree); cv_signal(&arc_reclaim_thr_cv); /* Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Fri Oct 3 20:24:56 2014 (r272482) +++ head/sys/vm/vm_pageout.c Fri Oct 3 20:34:55 2014 (r272483) @@ -76,6 +76,7 @@ __FBSDID("$FreeBSD$"); #include "opt_vm.h" +#include "opt_kdtrace.h" #include #include #include @@ -89,6 +90,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -133,6 +135,10 @@ static struct kproc_desc page_kp = { SYSINIT(pagedaemon, SI_SUB_KTHREAD_PAGE, SI_ORDER_SECOND, kproc_start, &page_kp); +SDT_PROVIDER_DEFINE(vm); +SDT_PROBE_DEFINE(vm, , , vm__lowmem_cache); +SDT_PROBE_DEFINE(vm, , , vm__lowmem_scan); + #if !defined(NO_SWAPPING) /* the kernel process "vm_daemon"*/ static void vm_daemon(void); @@ -667,6 +673,7 @@ vm_pageout_grow_cache(int tries, vm_padd * may acquire locks and/or sleep, so they can only be invoked * when "tries" is greater than zero. */ + SDT_PROBE0(vm, , , vm__lowmem_cache); EVENTHANDLER_INVOKE(vm_lowmem, 0); /* @@ -920,6 +927,7 @@ vm_pageout_scan(struct vm_domain *vmd, i /* * Decrease registered cache sizes. */ + SDT_PROBE0(vm, , , vm__lowmem_scan); EVENTHANDLER_INVOKE(vm_lowmem, 0); /* * We do this explicitly after the caches have been From owner-svn-src-all@FreeBSD.ORG Fri Oct 3 20:36:11 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E7DCECA0; Fri, 3 Oct 2014 20:36:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C96AA222; Fri, 3 Oct 2014 20:36:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s93KaADZ075850; Fri, 3 Oct 2014 20:36:10 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s93KaAjb075845; Fri, 3 Oct 2014 20:36:10 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201410032036.s93KaAjb075845@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 3 Oct 2014 20:36:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272484 - in head: . cddl/lib/libzfs cddl/lib/libzpool X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Oct 2014 20:36:11 -0000 Author: delphij Date: Fri Oct 3 20:36:09 2014 New Revision: 272484 URL: https://svnweb.freebsd.org/changeset/base/272484 Log: Add dependencies to various libraries to libzfs and libzpool. Submitted by: sef Modified: head/Makefile.inc1 head/cddl/lib/libzfs/Makefile head/cddl/lib/libzpool/Makefile Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Fri Oct 3 20:34:55 2014 (r272483) +++ head/Makefile.inc1 Fri Oct 3 20:36:09 2014 (r272484) @@ -1531,7 +1531,9 @@ _prebuild_libs= ${_kerberos5_lib_libasn1 lib/ncurses/ncurses lib/ncurses/ncursesw \ lib/libopie lib/libpam ${_lib_libthr} \ lib/libradius lib/libsbuf lib/libtacplus \ + lib/libgeom \ ${_cddl_lib_libumem} ${_cddl_lib_libnvpair} \ + ${_cddl_lib_libuutil} \ ${_cddl_lib_libavl} \ ${_cddl_lib_libzfs_core} \ lib/libutil lib/libpjdlog ${_lib_libypclnt} lib/libz lib/msun \ @@ -1543,6 +1545,8 @@ gnu/lib/libstdc++__L: lib/msun__L gnu/lib/libsupc++__L: gnu/lib/libstdc++__L .endif +lib/libgeom__L: lib/libexpat__L + .if defined(WITH_ATF) || ${MK_TESTS} != "no" .if !defined(WITH_ATF) # Ensure that the ATF libraries will be built during make libraries, even @@ -1580,9 +1584,11 @@ lib/libopie__L lib/libtacplus__L: lib/li _cddl_lib_libumem= cddl/lib/libumem _cddl_lib_libnvpair= cddl/lib/libnvpair _cddl_lib_libavl= cddl/lib/libavl +_cddl_lib_libuutil= cddl/lib/libuutil _cddl_lib_libzfs_core= cddl/lib/libzfs_core _cddl_lib= cddl/lib cddl/lib/libzfs_core__L: cddl/lib/libnvpair__L +cddl/lib/libzfs__L: lib/libgeom__L .endif .if ${MK_CRYPT} != "no" Modified: head/cddl/lib/libzfs/Makefile ============================================================================== --- head/cddl/lib/libzfs/Makefile Fri Oct 3 20:34:55 2014 (r272483) +++ head/cddl/lib/libzfs/Makefile Fri Oct 3 20:36:09 2014 (r272484) @@ -7,8 +7,11 @@ LIB= zfs DPADD= ${LIBMD} ${LIBPTHREAD} ${LIBUMEM} ${LIBUTIL} ${LIBM} ${LIBNVPAIR} \ - ${LIBAVL} ${LIBZFS_CORE} -LDADD= -lmd -lpthread -lumem -lutil -lm -lnvpair -lavl -lzfs_core + ${LIBAVL} ${LIBZFS_CORE} ${LIBUUTIL} ${LIBBSDXML} ${LIBGEOM} \ + ${LIBNVPAIR} + +LDADD= -lmd -lpthread -lumem -lutil -luutil -lm -lnvpair -lavl \ + -lbsdxml -lgeom -lnvpair -lzfs_core SRCS= deviceid.c \ fsshare.c \ Modified: head/cddl/lib/libzpool/Makefile ============================================================================== --- head/cddl/lib/libzpool/Makefile Fri Oct 3 20:34:55 2014 (r272483) +++ head/cddl/lib/libzpool/Makefile Fri Oct 3 20:36:09 2014 (r272484) @@ -56,8 +56,9 @@ CFLAGS+= -I${.CURDIR}/../../../lib/libpt CFLAGS+= -I${.CURDIR}/../../../lib/libpthread/sys CFLAGS+= -I${.CURDIR}/../../../lib/libthr/arch/${MACHINE_CPUARCH}/include -DPADD= ${LIBMD} ${LIBPTHREAD} ${LIBZ} -LDADD= -lmd -lpthread -lz +DPADD= ${LIBMD} ${LIBPTHREAD} ${LIBZ} ${LIBNVPAIR} \ + ${LIBAVL} ${LIBUMEM} +LDADD= -lmd -lpthread -lz -lnvpair -lavl -lumem # atomic.S doesn't like profiling. MK_PROFILE= no From owner-svn-src-all@FreeBSD.ORG Fri Oct 3 20:48:13 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7A50FFAF; Fri, 3 Oct 2014 20:48:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5B80033C; Fri, 3 Oct 2014 20:48:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s93KmDmj080758; Fri, 3 Oct 2014 20:48:13 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s93KmBue080752; Fri, 3 Oct 2014 20:48:11 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201410032048.s93KmBue080752@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Fri, 3 Oct 2014 20:48:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272485 - head/usr.bin/mkimg X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Oct 2014 20:48:13 -0000 Author: marcel Date: Fri Oct 3 20:48:11 2014 New Revision: 272485 URL: https://svnweb.freebsd.org/changeset/base/272485 Log: Add mkimg_chs() for those schemes that need the LBA broken down into cylinder, head and track numbers. Return ~0U for these values when mkimg wasn't given both -T and -H (i.e. no geometry) or the cylinder would be larger than the provided maximum. Use mkimgs_chs() for the EBR, MBR and PC98 schemes to fill in the appropriate fields. Make sure to use a "rounded" size so that the partition is always a multiple of the track size. We reserved the room for it in the metadata callback so that's a valid thing to do. Bump the mkimg version number. While doing that again: have mkimg.o depend on the Makefile so that a version change triggers a rebuild as needed. Modified: head/usr.bin/mkimg/Makefile head/usr.bin/mkimg/ebr.c head/usr.bin/mkimg/mbr.c head/usr.bin/mkimg/mkimg.c head/usr.bin/mkimg/mkimg.h head/usr.bin/mkimg/pc98.c Modified: head/usr.bin/mkimg/Makefile ============================================================================== --- head/usr.bin/mkimg/Makefile Fri Oct 3 20:36:09 2014 (r272484) +++ head/usr.bin/mkimg/Makefile Fri Oct 3 20:48:11 2014 (r272485) @@ -6,7 +6,9 @@ PROG= mkimg SRCS= format.c image.c mkimg.c scheme.c MAN= mkimg.1 -MKIMG_VERSION=20141001 +MKIMG_VERSION=20141003 +mkimg.o: Makefile + CFLAGS+=-DMKIMG_VERSION=${MKIMG_VERSION} CFLAGS+=-DSPARSE_WRITE Modified: head/usr.bin/mkimg/ebr.c ============================================================================== --- head/usr.bin/mkimg/ebr.c Fri Oct 3 20:36:09 2014 (r272484) +++ head/usr.bin/mkimg/ebr.c Fri Oct 3 20:48:11 2014 (r272485) @@ -58,12 +58,14 @@ ebr_metadata(u_int where, lba_t blk) } static void -ebr_chs(u_char *cyl, u_char *hd, u_char *sec, uint32_t lba __unused) +ebr_chs(u_char *cylp, u_char *hdp, u_char *secp, lba_t lba) { + u_int cyl, hd, sec; - *cyl = 0xff; /* XXX */ - *hd = 0xff; /* XXX */ - *sec = 0xff; /* XXX */ + mkimg_chs(lba, 1023, &cyl, &hd, &sec); + *cylp = cyl; + *hdp = hd; + *secp = (sec & 0x3f) | ((cyl >> 2) & 0xc0); } static int @@ -72,7 +74,7 @@ ebr_write(lba_t imgsz __unused, void *bo u_char *ebr; struct dos_partition *dp; struct part *part, *next; - lba_t block; + lba_t block, size; int error; ebr = malloc(secsz); @@ -84,24 +86,26 @@ ebr_write(lba_t imgsz __unused, void *bo error = 0; STAILQ_FOREACH_SAFE(part, &partlist, link, next) { block = part->block - nsecs; + size = round_track(part->size); dp = (void *)(ebr + DOSPARTOFF); ebr_chs(&dp->dp_scyl, &dp->dp_shd, &dp->dp_ssect, nsecs); dp->dp_typ = ALIAS_TYPE2INT(part->type); ebr_chs(&dp->dp_ecyl, &dp->dp_ehd, &dp->dp_esect, - part->block + part->size - 1); + part->block + size - 1); le32enc(&dp->dp_start, nsecs); - le32enc(&dp->dp_size, part->size); + le32enc(&dp->dp_size, size); /* Add link entry */ if (next != NULL) { + size = round_track(next->size); dp++; ebr_chs(&dp->dp_scyl, &dp->dp_shd, &dp->dp_ssect, next->block - nsecs); dp->dp_typ = DOSPTYP_EXT; ebr_chs(&dp->dp_ecyl, &dp->dp_ehd, &dp->dp_esect, - next->block + next->size - 1); + next->block + size - 1); le32enc(&dp->dp_start, next->block - nsecs); - le32enc(&dp->dp_size, next->size + nsecs); + le32enc(&dp->dp_size, size + nsecs); } error = image_write(block, ebr, 1); Modified: head/usr.bin/mkimg/mbr.c ============================================================================== --- head/usr.bin/mkimg/mbr.c Fri Oct 3 20:36:09 2014 (r272484) +++ head/usr.bin/mkimg/mbr.c Fri Oct 3 20:48:11 2014 (r272485) @@ -59,12 +59,14 @@ mbr_metadata(u_int where, lba_t blk) } static void -mbr_chs(u_char *cyl, u_char *hd, u_char *sec, uint32_t lba __unused) +mbr_chs(u_char *cylp, u_char *hdp, u_char *secp, lba_t lba) { + u_int cyl, hd, sec; - *cyl = 0xff; /* XXX */ - *hd = 0xff; /* XXX */ - *sec = 0xff; /* XXX */ + mkimg_chs(lba, 1023, &cyl, &hd, &sec); + *cylp = cyl; + *hdp = hd; + *secp = (sec & 0x3f) | ((cyl >> 2) & 0xc0); } static int @@ -73,6 +75,7 @@ mbr_write(lba_t imgsz __unused, void *bo u_char *mbr; struct dos_partition *dpbase, *dp; struct part *part; + lba_t size; int error; mbr = malloc(secsz); @@ -86,15 +89,16 @@ mbr_write(lba_t imgsz __unused, void *bo le16enc(mbr + DOSMAGICOFFSET, DOSMAGIC); dpbase = (void *)(mbr + DOSPARTOFF); STAILQ_FOREACH(part, &partlist, link) { + size = round_track(part->size); dp = dpbase + part->index; dp->dp_flag = (part->index == 0 && bootcode != NULL) ? 0x80 : 0; mbr_chs(&dp->dp_scyl, &dp->dp_shd, &dp->dp_ssect, part->block); dp->dp_typ = ALIAS_TYPE2INT(part->type); mbr_chs(&dp->dp_ecyl, &dp->dp_ehd, &dp->dp_esect, - part->block + part->size - 1); + part->block + size - 1); le32enc(&dp->dp_start, part->block); - le32enc(&dp->dp_size, part->size); + le32enc(&dp->dp_size, size); } error = image_write(0, mbr, 1); free(mbr); Modified: head/usr.bin/mkimg/mkimg.c ============================================================================== --- head/usr.bin/mkimg/mkimg.c Fri Oct 3 20:36:09 2014 (r272484) +++ head/usr.bin/mkimg/mkimg.c Fri Oct 3 20:48:11 2014 (r272485) @@ -340,6 +340,27 @@ sparse_write(int fd, const void *ptr, si #endif /* SPARSE_WRITE */ void +mkimg_chs(lba_t lba, u_int maxcyl, u_int *cylp, u_int *hdp, u_int *secp) +{ + u_int hd, sec; + + *cylp = *hdp = *secp = ~0U; + if (nsecs == 1 || nheads == 1) + return; + + sec = lba % nsecs + 1; + lba /= nsecs; + hd = lba % nheads; + lba /= nheads; + if (lba > maxcyl) + return; + + *cylp = lba; + *hdp = hd; + *secp = sec; +} + +void mkimg_uuid(struct uuid *uuid) { static uint8_t gen[sizeof(struct uuid)]; Modified: head/usr.bin/mkimg/mkimg.h ============================================================================== --- head/usr.bin/mkimg/mkimg.h Fri Oct 3 20:36:09 2014 (r272484) +++ head/usr.bin/mkimg/mkimg.h Fri Oct 3 20:48:11 2014 (r272485) @@ -87,6 +87,8 @@ round_track(lba_t n) ssize_t sparse_write(int, const void *, size_t); #endif +void mkimg_chs(lba_t, u_int, u_int *, u_int *, u_int *); + struct uuid; void mkimg_uuid(struct uuid *); Modified: head/usr.bin/mkimg/pc98.c ============================================================================== --- head/usr.bin/mkimg/pc98.c Fri Oct 3 20:36:09 2014 (r272484) +++ head/usr.bin/mkimg/pc98.c Fri Oct 3 20:48:11 2014 (r272485) @@ -68,12 +68,14 @@ pc98_metadata(u_int where, lba_t blk) } static void -pc98_chs(u_short *cyl, u_char *hd, u_char *sec, uint32_t lba __unused) +pc98_chs(u_short *cylp, u_char *hdp, u_char *secp, lba_t lba) { + u_int cyl, hd, sec; - *cyl = 0xffff; /* XXX */ - *hd = 0xff; /* XXX */ - *sec = 0xff; /* XXX */ + mkimg_chs(lba, 0xffff, &cyl, &hd, &sec); + le16enc(cylp, cyl); + *hdp = hd; + *secp = sec; } static int @@ -82,6 +84,7 @@ pc98_write(lba_t imgsz __unused, void *b struct part *part; struct pc98_partition *dpbase, *dp; u_char *buf; + lba_t size; int error, ptyp; buf = malloc(PC98_BOOTCODESZ); @@ -95,6 +98,7 @@ pc98_write(lba_t imgsz __unused, void *b le16enc(buf + PC98_MAGICOFS, PC98_MAGIC); dpbase = (void *)(buf + secsz); STAILQ_FOREACH(part, &partlist, link) { + size = round_track(part->size); dp = dpbase + part->index; ptyp = ALIAS_TYPE2INT(part->type); dp->dp_mid = ptyp; @@ -102,7 +106,7 @@ pc98_write(lba_t imgsz __unused, void *b pc98_chs(&dp->dp_scyl, &dp->dp_shd, &dp->dp_ssect, part->block); pc98_chs(&dp->dp_scyl, &dp->dp_shd, &dp->dp_ssect, - part->block + part->size - 1); + part->block + size - 1); if (part->label != NULL) memcpy(dp->dp_name, part->label, strlen(part->label)); } From owner-svn-src-all@FreeBSD.ORG Fri Oct 3 20:52:55 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5EBBE31B; Fri, 3 Oct 2014 20:52:55 +0000 (UTC) Received: from mail-pa0-x229.google.com (mail-pa0-x229.google.com [IPv6:2607:f8b0:400e:c03::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 23C475FB; Fri, 3 Oct 2014 20:52:55 +0000 (UTC) Received: by mail-pa0-f41.google.com with SMTP id eu11so2101734pac.14 for ; Fri, 03 Oct 2014 13:52:54 -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:from:subject:date:to; bh=JOhWY9vhmMZrSvqHRRwWcUNVpgMiWLMiX+uncEbEocA=; b=TbNONUvjTW55rCvHuF+QKZn3hSoCCSRyJxqUMJAf5zFzIHptG3VTPXIo9JCbobgzXt 6BfmKvO4d+cfB1OzfgZONn9uyaRXlxpIgTp3NFznMExnnVcHvFzh7oHRdrjM9ScGSFYM NysNL6s/pHCa1YTj7zLk+RfMkKRZSFmgOnchXmn7vQqssW2FlIlFsR3TIqYYIgSMRMHd 39Wdz+ZDF6Uc0W2+QUWg1KKQePxDcorvb3ntPjdutab1rN5xButfAFhIY2Sm1Z/71iht 4qwYNErKdD36fvgz8SXQ9TB46gbYeiFfyKU4M9f6ZdZPtQ4Nmhby3Z37u2oMULCZaKgf JFHA== X-Received: by 10.70.65.7 with SMTP id t7mr2992046pds.133.1412369574713; Fri, 03 Oct 2014 13:52:54 -0700 (PDT) Received: from [10.57.40.208] (mobile-166-137-212-089.mycingular.net. [166.137.212.89]) by mx.google.com with ESMTPSA id gi14sm7189192pbd.10.2014.10.03.13.52.53 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 03 Oct 2014 13:52:54 -0700 (PDT) References: <201410032036.s93KaAjb075845@svn.freebsd.org> Mime-Version: 1.0 (1.0) In-Reply-To: <201410032036.s93KaAjb075845@svn.freebsd.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Message-Id: X-Mailer: iPhone Mail (11D257) From: Garrett Cooper Subject: Re: svn commit: r272484 - in head: . cddl/lib/libzfs cddl/lib/libzpool Date: Fri, 3 Oct 2014 13:52:49 -0700 To: Xin LI Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Oct 2014 20:52:55 -0000 > On Oct 3, 2014, at 13:36, Xin LI wrote: >=20 > Author: delphij > Date: Fri Oct 3 20:36:09 2014 > New Revision: 272484 > URL: https://svnweb.freebsd.org/changeset/base/272484 >=20 > Log: > Add dependencies to various libraries to libzfs and libzpool. >=20 > Submitted by: sef >=20 > Modified: > head/Makefile.inc1 > head/cddl/lib/libzfs/Makefile > head/cddl/lib/libzpool/Makefile >=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 Fri Oct 3 20:34:55 2014 (r272483) > +++ head/Makefile.inc1 Fri Oct 3 20:36:09 2014 (r272484) > @@ -1531,7 +1531,9 @@ _prebuild_libs=3D ${_kerberos5_lib_libasn1 > lib/ncurses/ncurses lib/ncurses/ncursesw \ > lib/libopie lib/libpam ${_lib_libthr} \ > lib/libradius lib/libsbuf lib/libtacplus \ > + lib/libgeom \ > ${_cddl_lib_libumem} ${_cddl_lib_libnvpair} \ > + ${_cddl_lib_libuutil} \ > ${_cddl_lib_libavl} \ > ${_cddl_lib_libzfs_core} \ > lib/libutil lib/libpjdlog ${_lib_libypclnt} lib/libz lib/msun \ > @@ -1543,6 +1545,8 @@ gnu/lib/libstdc++__L: lib/msun__L > gnu/lib/libsupc++__L: gnu/lib/libstdc++__L > .endif >=20 > +lib/libgeom__L: lib/libexpat__L > + > .if defined(WITH_ATF) || ${MK_TESTS} !=3D "no" > .if !defined(WITH_ATF) > # Ensure that the ATF libraries will be built during make libraries, even > @@ -1580,9 +1584,11 @@ lib/libopie__L lib/libtacplus__L: lib/li > _cddl_lib_libumem=3D cddl/lib/libumem > _cddl_lib_libnvpair=3D cddl/lib/libnvpair > _cddl_lib_libavl=3D cddl/lib/libavl > +_cddl_lib_libuutil=3D cddl/lib/libuutil > _cddl_lib_libzfs_core=3D cddl/lib/libzfs_core > _cddl_lib=3D cddl/lib > cddl/lib/libzfs_core__L: cddl/lib/libnvpair__L > +cddl/lib/libzfs__L: lib/libgeom__L > .endif >=20 > .if ${MK_CRYPT} !=3D "no" Hi Xin! The changes to Makefile.inc1 are only required if MK_ZFS =3D=3D no. Coul= d you please adjust the code to account for that? Thanks! -Garrett= From owner-svn-src-all@FreeBSD.ORG Fri Oct 3 20:54:39 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2B0E4478; Fri, 3 Oct 2014 20:54:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 15740611; Fri, 3 Oct 2014 20:54:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s93KsdF0085065; Fri, 3 Oct 2014 20:54:39 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s93KsZPi085044; Fri, 3 Oct 2014 20:54:35 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201410032054.s93KsZPi085044@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Fri, 3 Oct 2014 20:54:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272486 - head/usr.bin/mkimg/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Oct 2014 20:54:39 -0000 Author: marcel Date: Fri Oct 3 20:54:35 2014 New Revision: 272486 URL: https://svnweb.freebsd.org/changeset/base/272486 Log: Update baseline files for EBR, MBR and PC98 now that mkimg fills in the CHS fields appropriately when -T and -H are given on the command line. Modified: head/usr.bin/mkimg/tests/img-63x255-4096-ebr.qcow.gz.uu head/usr.bin/mkimg/tests/img-63x255-4096-ebr.qcow2.gz.uu head/usr.bin/mkimg/tests/img-63x255-4096-ebr.raw.gz.uu head/usr.bin/mkimg/tests/img-63x255-4096-ebr.vhd.gz.uu head/usr.bin/mkimg/tests/img-63x255-4096-ebr.vhdf.gz.uu head/usr.bin/mkimg/tests/img-63x255-4096-ebr.vmdk.gz.uu head/usr.bin/mkimg/tests/img-63x255-4096-mbr.qcow.gz.uu head/usr.bin/mkimg/tests/img-63x255-4096-mbr.qcow2.gz.uu head/usr.bin/mkimg/tests/img-63x255-4096-mbr.raw.gz.uu head/usr.bin/mkimg/tests/img-63x255-4096-mbr.vhd.gz.uu head/usr.bin/mkimg/tests/img-63x255-4096-mbr.vhdf.gz.uu head/usr.bin/mkimg/tests/img-63x255-4096-mbr.vmdk.gz.uu head/usr.bin/mkimg/tests/img-63x255-4096-pc98.qcow.gz.uu head/usr.bin/mkimg/tests/img-63x255-4096-pc98.qcow2.gz.uu head/usr.bin/mkimg/tests/img-63x255-4096-pc98.raw.gz.uu head/usr.bin/mkimg/tests/img-63x255-4096-pc98.vhd.gz.uu head/usr.bin/mkimg/tests/img-63x255-4096-pc98.vhdf.gz.uu head/usr.bin/mkimg/tests/img-63x255-4096-pc98.vmdk.gz.uu head/usr.bin/mkimg/tests/img-63x255-512-ebr.qcow.gz.uu head/usr.bin/mkimg/tests/img-63x255-512-ebr.qcow2.gz.uu head/usr.bin/mkimg/tests/img-63x255-512-ebr.raw.gz.uu head/usr.bin/mkimg/tests/img-63x255-512-ebr.vhd.gz.uu head/usr.bin/mkimg/tests/img-63x255-512-ebr.vhdf.gz.uu head/usr.bin/mkimg/tests/img-63x255-512-ebr.vmdk.gz.uu head/usr.bin/mkimg/tests/img-63x255-512-mbr.qcow.gz.uu head/usr.bin/mkimg/tests/img-63x255-512-mbr.qcow2.gz.uu head/usr.bin/mkimg/tests/img-63x255-512-mbr.raw.gz.uu head/usr.bin/mkimg/tests/img-63x255-512-mbr.vhd.gz.uu head/usr.bin/mkimg/tests/img-63x255-512-mbr.vhdf.gz.uu head/usr.bin/mkimg/tests/img-63x255-512-mbr.vmdk.gz.uu head/usr.bin/mkimg/tests/img-63x255-512-pc98.qcow.gz.uu head/usr.bin/mkimg/tests/img-63x255-512-pc98.qcow2.gz.uu head/usr.bin/mkimg/tests/img-63x255-512-pc98.raw.gz.uu head/usr.bin/mkimg/tests/img-63x255-512-pc98.vhd.gz.uu head/usr.bin/mkimg/tests/img-63x255-512-pc98.vhdf.gz.uu head/usr.bin/mkimg/tests/img-63x255-512-pc98.vmdk.gz.uu Modified: head/usr.bin/mkimg/tests/img-63x255-4096-ebr.qcow.gz.uu ============================================================================== --- head/usr.bin/mkimg/tests/img-63x255-4096-ebr.qcow.gz.uu Fri Oct 3 20:48:11 2014 (r272485) +++ head/usr.bin/mkimg/tests/img-63x255-4096-ebr.qcow.gz.uu Fri Oct 3 20:54:35 2014 (r272486) @@ -1,128 +1,128 @@ # $FreeBSD$ begin 644 img-63x255-4096-ebr.qcow.gz -M'XL(",4S(E0``VEM9RTV,W@R-34M-#`Y-BUE8G(N<6-O=RYO=70`K9W);AS9 -M$47W^HK2+%%3142.&BC"@`UX9R]L;SO'=7V`X&\W);Z!C+Q7H7:WFFA04.=% -MU>/A4=M]\'0^W_TXG5HY-=VI&4_[?+K]>?J0T[V?//PX??OGW_[^_OZ/;X_N -MQN3\DZ?FSW.73VZ>[/X -M.66#]F#PE.;.Z?4).;WFUU[?C7N["C*R, -M.XVX$^0[9=QIQ)T@WRGC3B/N!/E.&7<:<2?(=\JXTX@[0;Y3QIV&W"'?*>/. -M0NZ0[XQQ9R%WR'?&N+.0.^0[8]Q9R!WRG3'N+.0.^0.^6Y@ -MW.7_>Y[/(=^-C+LQY`[Y;F3*N0[Y;&'=+Q%V'?+$W"'?+8R[->0.^6YEW*TA=\AW*^-N#;E# -MOEL9=VO('?+=RKA;0^Z0[U;&W1IRAWRW,N[6D#ODNY5QMT;<]?@IPAT)A.[- -M(=]MC+LMXJY'OML8=UO$78]\MS'NMHB['OEN8]QM$7<]\MW&N-LB[GKDNXUQ -MMT7<]`[.1/NY!QQ-P#? -MR9EP)^>(NP'X3E@?*+Z_.W`W`-\)Z^\D[.\&X#MA_9V$_=T`?">LOY.POQN` -M[X3U=Q+V=P/PG;#^3L+^;@"^$];?2=C?#LOY.POQN`[X3U=Q+V=R-^BG`7]G]8?R=A?SOO).SO1N0[UM])V-^-R'>LOY.POQN1[UA_)V%_ -M-R+?L?Y.POYN1+YC_9V$_=V(?,?Z.PG[NPD_1;@+^[L)^8[U=Q+V=Q/R'>OO -M).SO)N0[UM])V-]-R'>LOY.POYN0[UA_)V%_-R'?L?Y.POYN0KYC_9V$_=V$ -M?,?Z.PG[NPGYCO5W$O9W$_(=Z^\D[.\FY#O6WTG8WTW(=ZR_D["_FY#O6'\G -M87\W(=^Q_D["_FY"OF/]G83]W8R?(MR%_=V,?,?Z.PG[NQGYCO5W$O9W,_(= -MZ^\D[.]FY#O6WTG8W\W(=ZR_D["_FY'O6'\G87\W(]^Q_D["_FY&OF/]G83] -MW8Q\Q_H["?N[&?F.]7<2]G]8 -M?R=A?S["_FY!OF/]G83]W8)\Q_H["?N[!?F.]7<2]G<+ -M\AWK[R3L[Q;D.];?2=C?+OO).SO%N0[UM])V-\MR'>LOY.POUN0 -M[UA_)V%_M^*G"'=A?[OO).SO5N0[UM])V-^MR'>LOY.POUN1[UA_)V%_MR+?L?Y.POYN1;YC -M_9V$_=V*?,?Z.PG[NQ7YCO5W$O9W*_(=Z^\D[.]6Y#O6WTG8WZW(=ZR_D["_ -MV_!3A+NPO]N0[UA_)V%_MR'?L?Y.POYN0[YC_9V$_=V&?,?Z.PG[NPWYCO5W -M$O9W&_(=Z^\D[.\VY#O6WTG8WVW(=ZR_D["_VY#O6'\G87^W(=^Q_D["_FY# -MOF/]G83]W89\Q_H["?N[#?F.]7<2]G<;\AWK[R3L[S;D.];?2=C?[?@IPEW8 -MW^W(=ZR_D["_VY'O6'\G87^W(]^Q_D["_FY'OF/]G83]W8Y\Q_H["?N['?F. -M]7<2]G<[\AWK[R3L[W;D.];?2=C?[]8?R=A?[^8_V=A/W=CGS'^CL)^[L=^8[U=Q+V=SOR'>OO).KO[(R?PMQI_L3-G>H< -M\-WM4Y@[=?U=ON_O="ISP'?*^CMU_=TI<7>Z*7/`=\KZ.W7]W2EQ=_JMS`'? -M*>OOU/5WI\OA[(#OE/5WZOJ[OO\MSC.@=\IZR_4]??/LOU/7WY6SJW/`=\KZ.W7]'9@#OE/6WZGK[XYS -MZ/X[9?V=NOXNSSVI<\AWK+]3U]\]R7.%.W3_G;+^3EU_]R1Q]Z1PA^Z_4];? -MJ>OOGB3NGA3NT/UWROH[=?W=D\OA[)#O6'^GKK\K9U?GD.]8?Z>NOP-SR'>L -MOU/7WX$YY#O6WZGK[_+OOGEX.9X=\Q_H[=?U=.;LZAWS'^CMU_1V80[YC -M_9VZ_NXXA^Z_4];?J>OO\MRS.H=\Q_H[=?W=LSQ7N$/WWRGK[]3U=\\2=\\* -M=^C^.V7]G;K^[EGB[EGA#MU_IZR_4]??/;LLOU/7WSW/0[UM^IZ^^.<^C^.V7]G;K^+L^]J'/(=ZR_4]??OB<(?NOU/6WZGK[UXD[EX4[M#]=\KZ.W7]W8O+X>R0[UA_IZZ_*V=7 -MYY#O6'^GKK\#<\AWK+]3U]^!.>0[UM^IZ^_RW,LZAWS'^CMU_=W+/%>Y0[YC -M_9VZ_NYEXNYEY0[YCO5WZOJ[EXF[EY4[Y#O6WZGK[UY>#F>'?,?Z.W7]73F[ -M.H=\Q_H[=?T=F$.^8_V=NO[N.(?NOU/6WZGK[_+O$G>O"G?H_CME_9VZ_NY5XNY5X0[=?Z>LOU/7W[VZ',X.^8[U -M=^KZNW)V=0[YCO5WZOH[,(=\Q_H[=?T=F$.^8_V=NOXNS[VN<\AWK+]3U]^] -MSG.5.^0[UM^IZ^]>)^Y>5^Z0[UA_IZZ_>YVX>UVY0[YC_9VZ_N[UY7!VR'>L -MOU/7WY6SJW/(=ZR_4]??@3GD.];?J>OOCG/H_CME_9VZ_B[/7=4YY#O6WZGK -M[Z[R7.$.W7^GK+]3U]]=)>ZN"G?H_CME_9VZ_NXJ<7=5N$/WWRGK[]3U=U>7 -MP]DAW['^3EU_5\ZNSB'?L?Y.77\'YI#O6'^GKK\#<\AWK+]3U]_EN3=U#OF. -M]7?J^KLW>:YRAWS'^CMU_=V;Q-V;RAWR'>OOU/5W;Q)W;RIWR'>LOU/7W[VY -M',X.^8[U=^KZNW)V=0[YCO5WZOH[,(=\Q_H[=?W=<0[=?Z>LOU/7W^6YMW4. -M^8[U=^KZN[=YKG"'[K]3UM^IZ^_>)N[>%N[0_7?*^CMU_=W;Q-W;PAVZ_TY9 -M?Z>NOWM[.9P=\AWK[]3U=^7LZASR'>OOU/5W8`[YCO5WZOH[,(=\Q_H[=?U= -MGGM7YY#O6'^GKK][E^NORMG5^>0[UA_IZZ_`W/(=ZR_4]??'>?0_7?*^CMU -M_5V>>U_GD.]8?Z=1?V?H_CME_9U&_9VA^^^4]7<:]7>&[K]3UM]IU-\9NO]. -M67^G47]GZ/X[9?V=1OV=H?OOE/5W&O5WANZ_4];?*>GO/M0YY#O6WZGK[S[D -MNOORMG5.>0[UM^IZ^_`'/(=Z^_4]7?'.73_G;+^SO(G;NYN7"'[K\SUM^9Z^_.B;MSX0[=?V>LOS/7WYTO -MA[,#OC/6WYGK[\K9U3G@.V/]G;G^#LP!WQGK[\SU=V`.^,Y8?V>NO\MS4N>` -M[XSU=^;Z.\ESE3O@.V/]G;G^3M++D\H=\)VQ_LY).ZG<`=\9Z^_,]7=R -M.9P=\)VQ_LYNOSO.H?OOC/5WYOJ[/*=U -M#OF.]7?F^CO-$.W7]GK+\S -MU]_IY7!VR'>LOS/7WY6SJW/(=ZR_,]??@3GD.];?F>OOP!SR'>OOS/5W><[J -M'/(=Z^_,]7>6YRIWR'>LOS/7WUGBSBIWR'>LOS/7WUGBSBIWR'>LOS/7W]GE -M<';(=ZR_,]??E;.K<\AWK+\SU]^!.>0[UM^9Z^^.<^C^.V/]G;G^+L\U=0[Y -MCO5WYOJ[)L\5[M#]=\;Z.W/]79.X:PIWZ/X[8_V=N?ZN2=PUA3MT_YVQ_LY< -M?]=<#F>'?,?Z.W/]73F[.H=\Q_H[<_T=F$.^8_V=N?X.S"'?L?[.7'^7Y]HZ -MAWS'^CMS_5V;YRIWR'>LOS/7W[6)N[9RAWS'^CMS_5V;N&LK=\AWK+\SU]^U -ME\/9(=^Q_LYOOS/5W?9ZKW"'?L?[.7'_7)^[ZRAWR'>OOS/5W?>*NK]PAW['^SEQ_ -MUU\.9X=\Q_H[<_U=.;LZAWS'^CMS_1V80[YC_9VY_NXXA^Z_,];?F>OO\MQ0 -MYY#O6']GKK\;\ESA#MU_9ZR_,]??#8F[H7"'[K\SUM^9Z^^&Q-U0N$/WWQGK -M[\SU=\/E<';(=ZR_,]??E;.K<\AWK+\SU]^!.>0[UM^9Z^_`'/(=Z^_,]7=Y -M;JQSR'>LOS/7WXUYKG*'?,?Z.W/]W9BX&RMWR'>LOS/7WXV)N[%RAWS'^CMS -M_=UX.9P=\AWK[\SU=^7LZASR'>OOS/5W8`[YCO5WYOJ[XQRZ_\Y8?V>NO\MS -M'^L<\AWK[\SU=Q_S7.$.W7]GK+\SU]]]3-Q]+-RA^^^,]7?F^KN/B;N/A3MT -M_YVQ_LYOOP!SR'>OOS/5W8`[YCO5W -MYOJ[//>ISB'?L?[.7'_W*<]5[I#O6']GKK_[E+C[5+E#OF/]G;G^[E/B[E/E -M#OF.]7?F^KM/E\/9(=^Q_LY?+X>S0[YC_9VY_JZ<79U#OF/]G;G^#LPAW['^SEQ_ -M!^:0[UA_9ZZ_RW-?ZASR'>OOS/5W7_)X0_??&>OOS/5WUXF[Z\(=NO_. -M6']GKK^[3MQ=%^[0_7?&^CMS_=WUY7!VR'>LOS/7WY6SJW/(=ZR_,]??@3GD -M.];?F>OOP!SR'>OOS/5W>>YKG4.^8_V=N?[N:YZKW"'?L?[.7'_W-7'WM7*' -M?,?Z.W/]W=?$W=?*'?(=Z^_,]7=?+X>S0[YC_9VY_JZ<79U#OF/]G;G^#LPA -MW['^SEQ_=YAKSO@IS%V3/W%S-W4.^*YA_5WC^KN;/')NYO?RASP77P]FA/V^[G#C]A6_OW8]O -MCZY^#+;H&J)@<-_AX-W<]V^SVW_@]F-JTR>W'W#;7N:IL/@O_+K0S<'_9'7U_WXGU*-GLX3^#O_A6]_>?_P -MKSS8__C>;?M3TY[:[C3HK[["__SUW^#KVZ/OW?_O#=_-@>_=AW/Y!9??S@YS -M7^_-V1U]=47N/76?N_N?WYN[?G_O]]L>?>_6N>^^VM`OT#?[)W_O]H?[(>]_ -MG7]Y>TO+U/=77AWK\!V_W)Z_O='R[/_Y]H'_XS\N].0W>[NGA -MW`]1W?MZ/O@2!J=W?7QUZ,^C_R-?C,,MA[_XG?M]Y.%W[MV<_KDB&'Z8Y?OO -C8A/X._^%;_]X__"ON\$F#?YI)]C?HNIWL_>?C]]/6??_O[^_O?OCZZ +M&Y/S3YYR/^^W,O=@Z[]U3K\_M9S.XR_,??LN:.[>J[/?\>KNO=GCW-6CNS>+ +MGU,V:`\&3VGNG%Z?D--K?NWUW;JW*W>G]^>]725OM_VUP7^XUZ>_"Y9?>GV_ +M\^O;P<'?RNMKX%,]FQL>S%T.;[>%3XUL;OHIS'KNX%,SFUN"N1X^M;*Y+9@; +MX%,[GI.??&WOYD;XE+`YA7.G,C?!IXS--0_FSFGNMLS-\"GRN1#'7?Y<5.X6 +M^!3A3D+N5O@4X4Y"[C;X%.%.0NYV^!3A3B+N!#]%N-.(.T&*4L:=1MP),K(R +M[C3B3I#OE'&G$7>"?*>,.XVX$^0[9=QIQ)T@WRGC3B/N!/E.&7<:XLY`[Y +MSAAW%G&G^"G"71-QI\AW#>.NB;A3Y+N&<==$W"GR7<.X:R+N%/FN8=PU$7>* +M?-.NB[@SY+N.<==%W!GR7<>XZR+N#/FN8]QU$7>&?-L9='W*'?-\FQMT4<=ZFB+L6^6YBW$T1=RWRW<2XFR+N6N2[B7$WA=PAWTV,N_R?2?D<\MW, +MN)M#[I#O9L;=''*'?#&W"'?K8R[->0. +M^6YEW*TA=\AW*^-N#;E#OEL9=VO('?+=RKA;0^Z0[U;&W1IQU^.G"'ZVB+L>^6YCW&T1=SWRW<:XVR+N>N2[C7&W1=SUR'<;XVZ+N.N1[S;& +MW19QUR/?;8R[+>0.^6YCW.TA=\AW.^-N#[E#OML9=WO('?+=SKC;0^Z0[W;& +MW1YRAWRW,^[VD#ODNYUQMX?<(=_MC+L]XF[`3V'N)/^`SP'?R9EP)^>(NP'X +M3LZ$.SE'W`W`=\+Z0/']W8&[`?A.6'\G87\W`-\)Z^\D[.\&X#MA_9V$_=T` +M?">LOY.POQN`[X3U=Q+V=P/PG;#^3L+^;@"^$];?2=C?#LOY.POQOQ4X2[L+\;D>]8?R=A +M?SOO).SO1N0[ +MUM])V-^-R'>LOY.POQN1[UA_)V%_-R+?L?Y.POYN1+YC_9V$_=V(?,?Z.PG[ +MNQ'YCO5W$O9W(_(=Z^\D[.]&Y#O6WTG8WTWX*<)=V-]-R'>LOY.POYN0[UA_ +M)V%_-R'?L?Y.POYN0KYC_9V$_=V$?,?Z.PG[NPGYCO5W$O9W$_(=Z^\D[.\F +MY#O6WTG8WTW(=ZR_D["_FY#O6'\G87\W(=^Q_D["_FY"OF/]G83]W81\Q_H[ +M"?N["?F.]7<2]G<3\AWK[R3L[V;\%.$N[.]FY#O6WTG8W\W(=ZR_D["_FY'O +M6'\G87\W(]^Q_D["_FY&OF/]G83]W8Q\Q_H["?N[&?F.]7<2]G]8?R=A?SOO +M).SO%N0[UM])V-\MR'>LOY.POUN0[UA_)V%_MR#?L?Y.POYN0;YC_9V$_=V" +M?,?Z.PG[NQ4_1;@+^[L5^8[U=Q+V=ROR'>OO).SO5N0[UM])V-^MR'>LOY.P +MOUN1[UA_)V%_MR+?L?Y.POYN1;YC_9V$_=V*?,?Z.PG[NQ7YCO5W$O9W*_(= +MZ^\D[.]6Y#O6WTG8WZW(=ZR_D["_6Y'O6'\G87^W(M^Q_D["_FY%OF/]G83] +MW8:?(MR%_=V&?,?Z.PG[NPWYCO5W$O9W&_(=Z^\D[.\VY#O6WTG8WVW(=ZR_ +MD["_VY#O6'\G87^W(=^Q_D["_FY#OF/]G83]W89\Q_H["?N[#?F.]7<2]G<; +M\AWK[R3L[S;D.];?2=C?;[" +M_FY'OF/]G83]W8Y\Q_H["?N['?F.]7<2]G<[\AWK[R3L[W;D.];?2=C?[]8?R=A?[^8_V=A/W=CGS'^CL)^[L=^8[U=Q+V +M=SOR'>OO).SO=N0[UM])V-_MR'>LOY.PO]N1[UA_)U%_9V?\%.9.\P_PISIZZ_R_?]G4YE#OA.67^GKK\[)>Y.MV4.^$Y9?Z>NOSLE[DZ_E3G@ +M.V7]G;K^[G0YG!WPG;+^3EU_5\ZNS@'?*>OOU/5W8`[X3EE_IZZ_`W/`=\KZ +M.W7]79Y[7.>`[Y3U=^KZN\=YKG('?*>LOU/7WSU.W#VNW`'?*>OOU/5WCQ-W +MCRMWP'?*^CMU_=WCR^'L@.^4]7?J^KMR=G4.^$Y9?Z>NOP-SP'?*^CMU_=UQ +M#MU_IZR_4]??Y;DG=0[YCO5WZOJ[)WFN<(?NOU/6WZGK[YXD[IX4[M#]=\KZ +M.W7]W9/$W9/"';K_3EE_IZZ_>W(YG!WR'>OOU/5WY>SJ'/(=Z^_4]7=@#OF. +M]7?J^CLPAWS'^CMU_5V>>UKGD.]8?Z>NOWN:YRIWR'>LOU/7WSU-W#VMW"'? +ML?Y.77_W-''WM'*'?,?Z.W7]W=/+X>R0[UA_IZZ_*V=7YY#O6'^GKK\#<\AW +MK+]3U]\=Y]#]=\KZ.W7]79Y[5N>0[UA_IZZ_>Y;G"G?H_CME_9VZ_NY9XNY9 +MX0[=?Z>LOU/7WSU+W#TKW*'[[Y3U=^KZNV>7P]DAW['^3EU_5\ZNSB'?L?Y. +M77\'YI#O6'^GKK\#<\AWK+]3U]_EN>=U#OF.]7?J^KOG>:YRAWS'^CMU_=WS +MQ-WSRAWR'>OOU/5WSQ-WSRMWR'>LOU/7WSV_',X.^8[U=^KZNW)V=0[YCO5W +MZOH[,(=\Q_H[=?W=<0[=?Z>LOU/7W^6Y%W4.^8[U=^KZNQ=YKG"'[K]3UM^I +MZ^]>).Y>%.[0_7?*^CMU_=V+Q-V+PAVZ_TY9?Z>NOWMQ.9P=\AWK[]3U=^7L +MZASR'>OOU/5W8`[YCO5WZOH[,(=\Q_H[=?U=GGM9YY#O6'^GKK][F>NORMG +M5^>0[UA_IZZ_`W/(=ZR_4]??'>?0_7?*^CMU_5V>>U7GD.]8?Z>NOWN5YPIW +MZ/X[9?V=NO[N5>+N5>$.W7^GK+]3U]^]2MR]*MRA^^^4]7?J^KM7E\/9(=^Q +M_DY=?U?.KLXAW['^3EU_!^:0[UA_IZZ_`W/(=ZR_4]??Y;G7=0[YCO5WZOJ[ +MUWFN$.W7^GK+]3U]]=)>ZN"G?H_CME_9VZ_N[J +MOOP!SR'>OOU/5W8`[YCO5WZOJ[//>FSB'? +ML?Y.77_W)L]5[I#O6'^GKK][D[A[4[E#OF/]G;K^[DWB[DWE#OF.]7?J^KLW +ME\/9(=^Q_DY=?U?.KLXAW['^3EU_!^:0[UA_IZZ_.\ZA^^^4]7?J^KL\][;. +M(=^Q_DY=?_S0[YC_9VZ_JZ<79U#OF/]G;K^#LPAW['^3EU_!^:0[UA_IZZ_ +MRW/OZASR'>OOU/5W[_)OO-.KO#-U_IZR_TZB_,W3_G;+^3J/^SM#]=\KZ.R7]W8Y0[YC_9VZ_NY#XNY#Y0[YCO5WZOJ[#XF[#Y4[Y#O6WZGK[SY<#F>'?,?Z +M.W7]73F[.H=\Q_H[=?T=F$.^8_V=NO[N.(?NOU/6WUG^@9L[USG@.V/]W;=? +M>,!=]M.Y<(?NOS/6WYGK[\YI[URX0_??&>OOS/5WY\3=N7"'[K\SUM^9Z^_. +ME\/9`=\9Z^_,]7?E[.H<\)VQ_LYOO]'(X.^0[UM^9Z^_*V=4YY#O6WYGK[\`<\AWK[\SU=V`.^8[U=^;ZNSQG +M=0[YCO5WYOH[RW.5.^0[UM^9Z^\L<6>5.^0[UM^9Z^\L<6>5.^0[UM^9Z^_L +MOOP!SR'>OOS/5WQSET_YVQ_LYS0[YC_9VY_JZ<79U#OF/]G;G^#LPAW['^SEQ_!^:0[UA_9ZZ_RW-M +MG4.^8_V=N?ZNS7.5.^0[UM^9Z^_:Q%U;N4.^8_V=N?ZN3=RUE3OD.];?F>OO +MVLOA[)#O6']GKK\K9U?GD.]8?V>NOP-SR'>LOS/7WQWGT/UWQOH[<_U=GNOJ +M'/(=Z^_,]7==GBO[0_7?&^CMS_5V7N.L*=^C^.V/] +MG;G^KKLZ0[UA_9ZZ_ZQ-W?>4.^8[U=^;ZNSYQUU?ND.]8?V>N +MO^LOA[-#OF/]G;G^KIQ=G4.^8_V=N?X.S"'?L?[.7']WG$/WWQGK[\SU=WEN +MJ'/(=ZR_,]??#7FN<(?NOS/6WYGK[X;$W5"X0_??&>OOS/5W0^)N*-RA^^^, +M]7?F^KOAOOP!SR'>OOS/5W8`[YCO5WYOJ[ +M/#?6.>0[UM^9Z^_&/%>Y0[YC_9VY_FY,W(V5.^0[UM^9Z^_&Q-U8N4.^8_V= +MN?YNO!S.#OF.]7?F^KMR=G4.^8[U=^;Z.S"'?,?Z.W/]W7$.W7]GK+\SU]_E +MN8]U#OF.]7?F^KN/>:YPA^Z_,];?F>OO/B;N/A;NT/UWQOH[<_W=Q\3=Q\(= +MNO_.6']GKK_[>#F<'?(=Z^_,]7?E[.H<\AWK[\SU=V`.^8[U=^;Z.S"'?,?Z +M.W/]79[[5.>0[UA_9ZZ_^Y3G*G?(=ZR_,]???4KI +MNOP-SR'>LOS/7WQWGT/UW +MQOH[<_U=GOMN +MOP-SR'>LOS/7W^6Y+W4.^8[U=^;ZNR]YKG*'?,?Z.W/]W9?$W9?*'?(=Z^_, +M]7=?$G=?*G?(=ZR_,]???;D0[UA_9ZZ_N\ESE3OD.];?F>OO;A)W-Y4[ +MY#O6WYGK[VX2=S>5.^0[UM^9Z^]N+H>S0[YC_9VY_JZ<79U#OF/]G;G^#LPA +MW['^SEQ_=YAKSO@IS%V3?^#F;NL<\%W#^KO&]7>W>>Y4YH#OOCV%N6M; +MN+N]+7/`=PWK[QK7W]TF[FY_*W/`=PWK[QK7W]U>#F>'_KSM0)_Y[_P]2_O'_Z5 +M!_L?G]VV/S7MJ>U.@_[J*_S/7_\-OKX]^NS^?V_X;@Y\=A_.Y1=[N__C>W/7[>[_?]NBS6^>^^VI#OT#?[)_\V>T/]T/> +M_SK_N$+93N?\GU/[D]>W^GX=G_\^T#_\)^7>W,:O-W3 +MP[FYF`5\"8/3NSZ^.O3GT?^1+\;AEL-?_.1^'WGXR;V;TS]7!,,/LWS_76P" +A?^>_\/4?[Q_^=3?8I,$_[02;;_2=SX_^!PM'3SM0J``` ` end Modified: head/usr.bin/mkimg/tests/img-63x255-4096-ebr.qcow2.gz.uu ============================================================================== --- head/usr.bin/mkimg/tests/img-63x255-4096-ebr.qcow2.gz.uu Fri Oct 3 20:48:11 2014 (r272485) +++ head/usr.bin/mkimg/tests/img-63x255-4096-ebr.qcow2.gz.uu Fri Oct 3 20:54:35 2014 (r272486) @@ -1,22 +1,22 @@ # $FreeBSD$ begin 644 img-63x255-4096-ebr.qcow2.gz -M'XL("+P[(U0``VEM9RTV,W@R-34M-#`Y-BUE8G(N<6-O=S(N;W5T`*V8R9+3 -M0`Q`[_F*9E@&!@ANJ;VQ)#`P5'&#`W!V%G]%BF_'3LMN6Y;`2X6H6L'9B"H-+A.BK(:#*"X7HE##N2BN$*(T[VS\J -M(4KSSL:]VPE1FGB-*\LW'O#D*4YATHWIF`.PI1FG?`O'M"N)N`JX4H -MS3M@WCTEW+,>9Z4HS3M@WCTGW(N`$_H=:-X!\^Z6<"\#3NAWH'D'S+M7A+L+ -M.*'?@>8=,.]>$^Y-P`G]#C3O@'GW=N*=%?H=:-XA\^X=L9*`$_H=:MXA\\X2 -M#@).Z'>H>8?,.R2<"SBAWZ'F'3+O4L)E`2?T.]2\0^9=3K@BX(1^AYIWR+PK -M"?<^X(1^AYIWR+S[0+B/`2?T.]2\0^;=)\)M`D[H=ZAYYYAW6\)]#CBAWSG- -M.\>\^T*X^X`3^IW3O'/,NZ^$^];C0(KJO4L2>2//R_/)C.]Q6927L]8'3_7K\[8"%?SN0MT669J:` -MQV;X]^&/L+[%<@]\'J>_':"!+N&^(TYPVP$.O7V!,BBKD7?#WP/<9ATZZ?=/A!U%UMVI]ROKPGY";T%1M.=R<], -MI]M>Q/N';;8>+0XBTS5CW+E1#=9SM(21L[>99K=?>#$LKXQ'5FX+&5>NQ\&R -FC:`\=Y;&P.:HZ5X?./UZ`BXV!ET67OM7?T'9%>AF-(4```` +M'XL("%[N+50``VEM9RTV,W@R-34M-#`Y-BUE8G(N<6-O=S(N;W5T`*V8VY+3 +M,`R&[_[@`KA.3T_1X=FI:R5V%"G>=M)V,NVX_S=R +M_%E-6A3A84QIC:N,:\QA8TZ?Z04F^3!\F>.O[S\6Z>-X$V"V4%+"P'+?XP:L +M?Q$'&JZPXP$KXY+J4,!!EQJ#-4)*\\[FO6N% +ME.:=S7NW$5*:=S;OW59(:=[9O'<[(:5Y!XIW)N+V0DKS#IAWCPCW..(.0DKS +M#IAW3PCWM,=9*:5Y!\R[9X1['G%"OP/-.V#>O2#@>0?,N]>$>Q-Q0K\#S3M@WKT=>6>%?@>:=\B\>T>L(N*$?H>:=\B\LX2# +MB!/Z'6K>(?,.">^0>;Q]Q0K]#S3MDWGT@W,>($_H=:MXA\^X3X581)_0[U+QSS+LUX3Y'G-#OG.:= +M8]Y](=Q=Q`G]SFG>.>;=5\)]ZW$@I7KOBD)^$>Y^M&=AWNM/%Z^/K7#4!R:` +M]27`J0H#KIEUPF78&Q<"Y0D'G-\;83)MV9ELR6?*;VW<%6E]ZV#S*L7MYI[N +MX3)@69JV'0%_=_7!9!F7U[?<^V&_*UOAJ`\<[Q;#9P>LP[\#2[_)RLK4\-`* +M_][_$=:WGN^&+^#T?P=HH"NX[X@CW#K!^0N,0_+-=%L-O$O?)[C5(G;F$V[R +MWP%_R[.7!M3)EO/*4O>]I;UOB+H?6W:EW*^OB?4)O04&TYVHSXRG +MZW_$^YMMMAX>!YGIFB%NTW<680DS9V\UKFX[\V)8OC,>N',]9+AS`P[F;03- +DN;.<##Q]:WS4!XX_%\-G`#H"SG8&7>5_>V_^`UMI__/2%``` ` end Modified: head/usr.bin/mkimg/tests/img-63x255-4096-ebr.raw.gz.uu ============================================================================== --- head/usr.bin/mkimg/tests/img-63x255-4096-ebr.raw.gz.uu Fri Oct 3 20:48:11 2014 (r272485) +++ head/usr.bin/mkimg/tests/img-63x255-4096-ebr.raw.gz.uu Fri Oct 3 20:54:35 2014 (r272486) @@ -1,12 +1,12 @@ # $FreeBSD$ begin 644 img-63x255-4096-ebr.raw.gz -M'XL("`'&'50``VEM9RTV,W@R-34M-#`Y-BUE8G(N,35MA'R;P%9+"+__24B%\`\`9'I+=PLV&=0#-<07.&S[TN1Y!;-.[HGN-K/&5>NJ<.7$%W,L.BL3ILL!CN_ -M1^,,L@-9@#"337'@)[[PU7<*92CF[HH^"-VU#E?Q\Y+@U(:[P'%CH2+Q9"'< -M>+TZ5-V`Y`9.]H*M\ -+0F1O]"SVO.4&```` +M'XL("%[N+50``VEM9RTV,W@R-34M-#`Y-BUE8G(NC:,F="V`Z,*X[^GOJV@140\'(`G()\@I*'%7X>;P#^56,QPK8 +MX,0>;A)L*BB$JRQZ:MK(B>#+V_&P9M+$/?F&IR(^Q#.ZHW^FKAE@/@*CG2"] +,?(PE/\L2J-?E!@`` ` end Modified: head/usr.bin/mkimg/tests/img-63x255-4096-ebr.vhd.gz.uu ============================================================================== --- head/usr.bin/mkimg/tests/img-63x255-4096-ebr.vhd.gz.uu Fri Oct 3 20:48:11 2014 (r272485) +++ head/usr.bin/mkimg/tests/img-63x255-4096-ebr.vhd.gz.uu Fri Oct 3 20:54:35 2014 (r272486) @@ -1,18 +1,18 @@ # $FreeBSD$ begin 644 img-63x255-4096-ebr.vhd.gz -M'XL("`'&'50``VEM9RTV,W@R-34M-#`Y-BUE8G(N=FAD+F]U=`"ME\%NG#`0 -MAN_[%"/UE@,R@VW(92-%3<^1HK1G+X$HAS91MX<<>/AXL+W8@-EL,\`BK\;S -M^1_/V,A"N`M`5Z![T!UH1>U:@KZ&N@&P1O_@^"[]7QC:US]=^^_EO?#7L'.P -M4L1>J3OY8P72#E(#&AI$/U$;AH`IOMT]7[W\?@XX]+@PL-0@$92%R,4XC3BI -M(]*/VX?OZCZJ$<5JRN*FQ@GK9?M3X^&7HXRPY/\20PQ+E&G -MQ,PKDKDVJ5&P:SB]Y74)[FKG<^%*Q19&;=\"=`DU4MN639B'Q6-+Y?WX9OX> -MNYD^S)2*CI(QM\E\N.A+!4-GKT"2P*UP8:0K]VQ*J;E7? -MN&SW,>Z).]S^,J!28,P"^!CTML,/A.5P0'._V*>XFPE6N^B9*M#DE=1>W(]S>_0). -M;JFC/:%;,V2#5L6M7/>R'FCWDX!^_C(%D\%>:EI@@K&$> +MWH$!"R'<#T`7H#O0+6A%[5*"OH.R`K!&7W"H<_\*??/G=]O\>S]F_M=O'"P7 +MW"MV)W\L0-I!2D!#@^A7:D,?,-G-_NWV_==;P*''A8&E!HF@+$1.QJG$21V1 +M?MP_/HS5%5-U9R\W3M=!T;$>!5>793N.D];+]J>BH9.#S%"BE\C`<9$Z)49> +M3.;L:W.W&KX5+%9L8I:T%Z!Q*I+9-FS`/DV)3Y7CX:SX.[4@? +M+J2*9HLQMLGE<-&G"H;.7H$D@6OAPD`YC'$SJ?*MV=.QG_0-.PE"!0,.X<>S +M=T8!UZ=SL3+GRXNQJ,^LQO6%@.OZ>N#*[J@;OSL$&$4U[=+<[U7OW]CW=D;? +MSFW;+<>]I@ZWNPZH%!@S`3X%?4WBY:@J,MNS4YB9>MG0WV?Q9KBM^P>< +M7%-'9T([9U@,5B5.%E.-_/@Z0]Y"7H"HO`UCX&E]X:SO;BH#HW!7],$T7$.X +M,NZ?,QQ>"!=B7'TZ66:6\,+L;:?JFL2+48]WQB=W+D'BG>MPF/8@,,/)8C/0 +M]IK6RX;^9Q8_#HC^4Y3LVX;^,$VF4'I@,H46V"96:-)^/[17F.BB0+B$%P7" +D);PH$"[A18%P"2\*A$MX42!=*5=O9=7"4H>W2H8-_?,$8FS,XCPJ#$=;!YWMQ -M$.(>`/,F^[*@V\R>;K5>]33Z<3>P;9-`AVO,+K/`]%H,$].+-L`U%`J=U&]G -MARK$'7.;V]X'%`+J.@*^>OU8YG"4VHHY`U(GQF5!M]_@YH&J3QA1`A<@)"AV -MJX;OA[=$?!6AN0QV.'8-YQ5V&93"[0)[U.'Y).^,) -MHE."16-%WF11IN%]89R!:J`%$#7(&`:.\85)OVVL!D/F7M`/8G-KBROQ>AK@ -MV!5S`>/Z0A7$$X7PBO>J6+LF'(M!)]%P6 -M=,\;W!R0#\!L'E3#W28+D"U(#5+8>9PO5?['7%JG"P/AD;D*F_NT?WF< -M:U?$3E+(>W2Z.$?#D?=V(8Z/QFK=ET`Z=?2!!,E297&"S';]-[8.)S.GBKEW -*5W]/U6F<$`D````` +M'XL("%_N+50``VEM9RTV,W@R-34M-#`Y-BUE8G(N=FAD9BYO=70`K94[;\,@ +M$(#W_(J3NF6(``,F2R)%3>=*5=O9<7&4H>W2H8-_?#EC',[&>508C$`'G^_% +MF3'_`+@WV><%[6KTM(OEHJ/QP_U`G@1Z7(VG.&ZK%(Y%@TLNX8+"/H-2N&V$*YRPB7;Z3.Q/Q7D7SR/YNI=G7F8/#QS;CQYB*$WER/$WD+P;JK+"X#W:[I +M."]HGU>T>:#L@=D\:/I_FRY`-Z`M:(7S4H)>0VEBH*"9U-;?7[;^.?W&$48< +M]\4@V?&\*/"VZ!)$A1_1'SB/]'O8'Y>GSV/`A5(5/BPU.ETYB)R8:ZBY3[N7 +MQ[%VQ=1)AGB/HYYQV7.&$^]M8YPIS.G +.BOOO+OX`/$*Q[A`)```` ` end Modified: head/usr.bin/mkimg/tests/img-63x255-4096-ebr.vmdk.gz.uu ============================================================================== --- head/usr.bin/mkimg/tests/img-63x255-4096-ebr.vmdk.gz.uu Fri Oct 3 20:48:11 2014 (r272485) +++ head/usr.bin/mkimg/tests/img-63x255-4096-ebr.vmdk.gz.uu Fri Oct 3 20:54:35 2014 (r272486) @@ -1,6 +1,6 @@ # $FreeBSD$ begin 644 img-63x255-4096-ebr.vmdk.gz -M'XL("`+&'50``VEM9RTV,W@R-34M-#`Y-BUE8G(N=FUD:RYO=70`K5S1;N3& +M'XL("%_N+50``VEM9RTV,W@R-34M-#`Y-BUE8G(N=FUD:RYO=70`K5S1;N3& M$7SW5PSDMSPL6,LEN7PX.W'.`8(@@!$[]FO(Y3`68M\==$*0`_3QX9!3HR)% M'FFK=:L#^]A=V]U#M735!679].'3D]?3&`(41*"3.'$F+W/TVGQ0;CSYZ)F-X;7>1$-Y5#PIO*(>%-Y9#P MIG)(>%,Y)+RI'!+>5`X);RJ'A#>50\*;RB'A3>60\*9R2/199BB'1&\JAT1O M*H=$;RJ'1&\JAT1O*H=$;RJ'1&\JAT1O*H=$;RJ'1&\JAT1O*H=$;RJ'1&\J -MAT1O*H=$;RJ'/&=99BB'/&>F7S7^ -M[V+Z5;(O_]Z^\?3-:?Z'@-?Q<2ZJ\%MQB])=ST=[I..%6O\F[:OV741I^<< -MODT$]H[_*3O/`=/YNN?\ZI=IG&?E?B8_][+<\"U2?]>LGL=LJFZ4Z^9PXZ"2 -M\YP=X4[WOGJ9WF-_X?(^F'DO<+?!]BOY?3W\&3Z^4KC.NMS^MP$6A6N:%X#_9'[GSZ;QV_.K +MQO]=3+]*]N7?VS>>OCG-_Q#P.C[.115^*VY1NNOY:(8_??OC(L,)SDSN.L'M +M/LZ)M.RWX+X6N/#MNQ?/V2_NUN=.KP7NJ^F3<)?/9:?[I&/%&O^F[6MV7<3I +M.8=O$X&]XW_*SG/`=+[N.;_Z91KG6;F?R<^]+#=\B]3?-:OG,9NJ&^6Z.5R; +M)LO*$>YT[ZN7V=V,#P/+KXR#7[D!9/Z5.\&=;0=!/4Z62:3Q\N_M&T_?G>9_ +7)L!+!#3KX"7\'I'LB_\#:C6@$!Y@```` ` end Modified: head/usr.bin/mkimg/tests/img-63x255-4096-mbr.qcow.gz.uu ============================================================================== --- head/usr.bin/mkimg/tests/img-63x255-4096-mbr.qcow.gz.uu Fri Oct 3 20:48:11 2014 (r272485) +++ head/usr.bin/mkimg/tests/img-63x255-4096-mbr.qcow.gz.uu Fri Oct 3 20:54:35 2014 (r272486) @@ -1,128 +1,128 @@ # $FreeBSD$ begin 644 img-63x255-4096-mbr.qcow.gz -M'XL(",@S(E0``VEM9RTV,W@R-34M-#`Y-BUM8G(N<6-O=RYO=70`K9W);EQ7 -MLD7G_HI4+U%=1L1MU9!$`:^`FM4;O*JI;SO.#Q#JVXL63T/&W5LA/TLF#`KT -MW<@\7%HR[(6C\_G^Q^G4RJGI3LUXVN?3W<_3AYP>_.3QQ^G;__[]'Q\>_OCV -MV_V8G'_PE/MYOY6Y1UO_J7/ZQU/+Z3S^Q-S=AZ"Y!Z_._L2K>_!FCW-7O]V_ -M6?R#1W.;S=%CXULKGIAS#KN8-/S6QN">9Z^-3*YK9@ -M;H!/[7A.?O"]O9\;X5/"YA3.G5 -MNP4^1;B3D+L5/D6XDY"[#3Y%N).0NQT^1;B3B#O!3Q'N-.).D**4<:<1=X*, -MK(P[C;@3Y#MEW&G$G2#?*>-.(^X$^4X9=QIQ)\AWRKC3B#M!OE/&G8;<(=\I -MX\Y"[I#OC'%G(7?(=\:XLY`[Y#MCW%G('?*=,>XLY`[YSAAW%G*'?&>,.PNY -M0[XSQIU%W"E^BG#71-PI\EW#N&LB[A3YKF'<-1%WBGS7,.Z:B#M%OFL8=TW$ -MG2+?-8R[)N).D>\:QET3<:?(=PWCK@FY0[YK&'=MR!WR7&W"'?M8R[-N0.^:YEW+4A=\AW+>.NC;@S_!3AKHNX -M,^2[CG'71=P9\EW'N.LB[@SYKF/<=1%WAGS7,>ZZB#M#ONL8=UW$G2'?=8R[ -M+N+.D.\ZQET7<=>'W"'?]8R[/N0.^:YGW/4A=\AW/>.N -M#[E#ONL9=WW('?)=S[CK0^Z0[WK&71]QU^"G"'=#Q%V#?#0[T;&W1ARAWPW,N[&D#ODNY%Q-X;<(=^-C+LQY`[Y;F3*N1;Z;&'=3Q%V+?#& -MW"'?K8R[->0.^6YEW*TA=\AW*^-N#;E#OEL9=VO('?+=RKA;(^YZ_!3AC@1" -M#^:0[S;&W19QUR/?;8R[+>*N1[[;&'=;Q%V/?+%W"'?;8R[/>0.^6YGW.TA=\AW.^-N#[E#OML9=WO('?+= -MSKC;0^Z0[W;&W1YRAWRW,^[VD#ODNYUQMT?<#?@IS)WD3_@<\)V<"7=RCK@; -M@._D3+B3<\3=`'PGK`\4W]\=N!N`[X3U=Q+V=P/PG;#^3L+^;@"^$];?2=C? -M#LOY.POQN` -M[X3U=Q+V=P/PG;#^3L+^;@"^$];?2=C?#]8?R=A?SOO).SO)N0[UM])V-]-R'>L -MOY.POYN0[UA_)V%_-R'?L?Y.POYNQD\1[L+^;D:^8_V=A/W=C'S'^CL)^[L9 -M^8[U=Q+V=S/R'>OO).SO9N0[UM])V-_-R'>LOY.POYN1[UA_)V%_-R/?L?Y. -MPOYN1KYC_9V$_=V,?,?Z.PG[NQGYCO5W$O9W,_(=Z^\D[.]FY#O6WTG8W\W( -M=ZR_D["_FY'O6'\G87^WX*<(=V%_MR#?L?Y.POYN0;YC_9V$_=V"?,?Z.PG[ -MNP7YCO5W$O9W"_(=Z^\D[.\6Y#O6WTG8WRW(=ZR_D["_6Y#O6'\G87^W(-^Q -M_D["_FY!OF/]G83]W8)\Q_H["?N[!?F.]7<2]G<+\AWK[R3L[Q;D.];?2=C? -M+]8?R=A?[OO).SO5N0[UM]) -MV-]M^"G"7=C?;OO).SO-N0[UM])V-]MR'>LOY.PO]N0[UA_)V%_ -MMR'?L?Y.POYN0[YC_9V$_=V&?,?Z.PG[NPWYCO5W$O9W&_(=Z^\D[.]V_!3A -M+NSO=N0[UM])V-_MR'>LOY.PO]N1[UA_)V%_MR/?L?Y.POYN1[YC_9V$_=V. -M?,?Z.PG[NQWYCO5W$O9W._(=Z^\D[.]VY#O6WTG8W^W(=ZR_D["_VY'O6'\G -M87^W(]^Q_D["_FY'OF/]G83]W8Y\Q_H["?N['?F.]7<2]7=VQD]A[C1_XN9. -M=0[X[NXIS)VZ_B[?]W`[9?V=NO[NE+@[_5[F -M@.^4]7?J^KO3Y7!VP'?*^CMU_5TYNSH'?*>LOU/7WX$YX#ME_9VZ_@[,`=\I -MZ^_4]7=Y[DF=`[Y3UM^IZ^^>Y+G*'?"=LOY.77_W)''WI'('?*>LOU/7WSU) -MW#VIW`'?*>OOU/5W3RZ'LP.^4];?J>OORMG5.>`[9?V=NOX.S`'?*>OOU/5W -MQSET_YVR_DY=?Y?GGM8YY#O6WZGK[Y[FN<(=NO].67^GKK][FKA[6KA#]]\I -MZ^_4]7=/$W=/"W?H_CME_9VZ_N[IY7!VR'>LOU/7WY6SJW/(=ZR_4]??@3GD -M.];?J>OOP!SR'>OOU/5W>>Y9G4.^8_V=NO[N69ZKW"'?L?Y.77_W+''WK'*' -M?,?Z.W7]W;/$W;/*'?(=Z^_4]7?/+H>S0[YC_9VZ_JZ<79U#OF/]G;K^#LPA -MW['^3EU_=YQ#]]\IZ^_4]7=Y[GF=0[YC_9VZ_NYYGBO7PYGAWS'^CMU_5TYNSJ'?,?Z -M.W7]'9A#OF/]G;K^#LPAW['^3EU_E^=>U#GD.];?J>OO7N2YRAWR'>OOU/5W -M+Q)W+RIWR'>LOU/7W[U(W+VHW"'?L?Y.77_WXG(X.^0[UM^IZ^_*V=4YY#O6 -MWZGK[\`<\AWK[]3U=\0[UM^IZ^]>YKG"';K_3EE_ -MIZZ_>YFX>UFX0_??*>OOU/5W+Q-W+PMWZ/X[9?V=NO[NY>5P=LAWK+]3U]^5 -MLZMSR'>LOU/7WX$YY#O6WZGK[\`<\AWK[]3U=WGN59U#OF/]G;K^[E6>J]PA -MW['^3EU_]RIQ]ZIRAWS'^CMU_=VKQ-VKRAWR'>OOU/5WKRZ'LT.^8_V=NOZN -MG%V=0[YC_9VZ_@[,(=^Q_DY=?W><0_??*>OOU/5W>>YUG4.^8_V=NO[N=9XK -MW*'[[Y3U=^KZN]>)N]>%.W3_G;+^3EU_]SIQ][IPA^Z_4];?J>OO7E\.9X=\ -MQ_H[=?U=.;LZAWS'^CMU_1V80[YC_9VZ_@[,(=^Q_DY=?Y?GWM0YY#O6WZGK -M[][DNOORMG5.>0[UM^IZ^_`'/(=Z^_4]7?'.73_G;+^3EU_E^>NZASR'>OO -MU/5W5WFN<(?NOU/6WZGK[ZX2=U>%.W3_G;+^3EU_=Y6XNRKNOP-SR'>LOU/7WX$YY#O6WZGK[_+OO -MWEX.9X=\Q_H[=?U=.;LZAWS'^CMU_1V80[YC_9VZ_NXXA^Z_4];?J>OO\MR[ -M.H=\Q_H[=?W=NSQ7N$/WWRGK[]3U=^\2=^\*=^C^.V7]G;K^[EWB[EWA#MU_ -MIZR_4]??O;LLOU/7W[W/0[UM^IZ^^.<^C^.V7] -MG;K^+L]]J'/(=ZR_TZB_,W3_G;+^3J/^SM#]=\KZ.XWZ.T/WWRGK[S3J[PS= -M?Z>LO].HOS-T_YVR_DZC_L[0_7?*^CN-^CM#]]\IZ^^4]'OOU/5W -M'_-#F<'?(= -MZ^_4]7?E[.H<\AWK[]3U=V`.^8[U=^KZN^,OOS/5W -MY\OA[(#OC/5WYOJ[OO\IS4 -M.>`[8_V=N?Y.\ESE#OC.6']GKK^3]/*D<@=\9ZR_,]??2>).*G?`=\;Z.W/] -MG5P.9P=\9ZR_,]??E;.K<\!WQOH[<_T=F`.^,];?F>OOCG/H_CMC_9VY_B[/ -M:9U#OF/]G;G^3O-LOS/7WVGB3@MWZ/X[8_V=N?Y.$W=:N$/WWQGK -M[\SU=WHYG!WR'>OOS/5WY>SJ'/(=Z^_,]7=@#OF.]7?F^CLPAWS'^CMS_5V> -MLSJ'?,?Z.W/]G>6YRAWR'>OOS/5WEKBSRAWR'>OOS/5WEKBSRAWR'>OOS/5W -M=CF<'?(=Z^_,]7?E[.H<\AWK[\SU=V`.^8[U=^;ZN^,NOVL2=TWA#MU_9ZR_ -M,]??-9?#V2'?L?[.7']7SJ[.(=^Q_LYNOP-SR'>LOS/7W^6Y -MMLXAW['^SEQ_U^:YRAWR'>OOS/5W;>*NK=PAW['^SEQ_UR;NVLH=\AWK[\SU -M=^WE<';(=ZR_,]??E;.K<\AWK+\SU]^!.>0[UM^9Z^^.<^C^.V/]G;G^+L]U -M=0[YCO5WYOJ[+L\5[M#]=\;Z.W/]79>XZPIWZ/X[8_V=N?ZN2]QUA3MT_YVQ -M_LY'?,?Z.W/]73F[.H=\Q_H[<_T=F$.^8_V=N?X.S"'?L?[.7'^7 -MY_HZAWS'^CMS_5V?YRIWR'>LOS/7W_6)N[YRAWS'^CMS_5V?N.LK=\AWK+\S -MU]_UE\/9(=^Q_LYOOS/5W8YZKW"'?L?[.7'\W)N[&RAWR'>OOS/5W8^)NK-PAW['^ -MSEQ_-UX.9X=\Q_H[<_U=.;LZAWS'^CMS_1V80[YC_9VY_NXXA^Z_,];?F>OO -M\MRG.H=\Q_H[<_W=ISQ7N$/WWQGK[\SU=Y\2=Y\*=^C^.V/]G;G^[E/B[E/A -M#MU_9ZR_,]???;HLOS/7WWW.0[UM^9Z^^.<^C^ -M.V/]G;G^+L]]J7/(=ZR_,]???E<(?NOS/6WYGK -M[[XD[KX4[M#]=\;Z.W/]W9?+X>R0[UA_9ZZ_*V=7YY#O6']GKK\#<\AWK+\S -MU]^!.>0[UM^9Z^_RW-Y0[YC_9VY_NYKXNYKY0[YCO5W -MYOJ[KXF[KY4[Y#O6WYGK[[Y>#F>'?,?Z.W/]73F[.H=\Q_H[<_T=F$.^8_V= -MN?[N.(?NOS/6WYGK[_+<=9U#OF/]G;G^[CK/%>[0_7?&^CMS_=UUXNZZ<(?N -MOS/6WYGK[ZX3=]>%.W3_G;'^SEQ_=WTYG!WR'>OOS/5WY>SJ'/(=Z^_,]7=@ -M#OF.]7?F^CLPAWS'^CMS_5V>NZESR'>LOS/7W]WDN)NYO* -M'?(=Z^_,]7OOS/5W-Y?#V2'?L?[.7']7SJ[.(=^Q_LYNOSO,-6?\%.:NR9^XN=LZ!WS7L/ZN-Z^]N -M$W>WMV4.^*YA_5WC^KO;Q-WM[V4.^*YA_5WC^KO;R^'LT)^W74Z]W=+;6Z3^+OOX#=\4\^4Y].=&_Y7S0U<1_6BP;4_3=!C\O_SZ -MT%5$?^7U==LO_O[VWX%I^U/3GMKN-.C/OL)__\^_W"N\GP,R^/^]X?LY((/' -M<_D%E]\?#W,W#^;LGKZZ(@^>>LC=P\\?S%U_>/`;>(]D4.?^$."&OD#?["^6 -M07^XW^_U?,/K'_[P\ -MF-/@[9X>SWW_%XP'W\]'W\+@]*Z/KP[]`?=_Y9MQN#;Q)W_E_C'R^%?N_9S^ -K6A$,W\WRQV^+$_@[_\*W?WYX_-?]8),&?]D)-G?TG<^__1>$>8]XH:@````` +M'XL("&'N+50``VEM9RTV,W@R-34M-#`Y-BUM8G(N<6-O=RYO=70`K9W)CE79 +M$47G]16/'I+N1<1M:3)3EFS),WM@>UJW';\/0/YV`WF:S+A[$Y0+0*5$67?K +MO9.+1:E8.IS/=]].IU9.37=JQM,^G[[^//V0T[V?//QQ^O+/O_W]W?UO7WZ[ +M&Y/S#YYR/^^W,O=@Z[]U3K\]M9S.XT_,??TA:.[>J[,_\.KNO=GCW-5O=V\6 +M/Z=LT!X,GM+<.;T^(:?7_-SKNW5O5^Y.[]>]725OM_VYP7^XUZ=_"):?>GU_ +M\.O;P<'?R^MKX%,]FQL>S%T.;[>%3XUL;OHAS'KNX%,SFUN"N1X^M;*Y+9@; +MX%,[GI,??&WOYD;XE+`YA7.G,C?!IXS--0_FSFGNMLS-\"GRZT(<=_G71>5N +M@4\1[B3D;H5/$>XDY&Z#3Q'N).1NAT\1[B3B3O!3A#N-N!.D*&7<:<2=(",K +MXTXC[@3Y3AEW&G$GR'?*N-.(.T&^4\:=1MP)\ITR[C3B3I#OE'&G(7?(=\JX +MLY`[Y#MCW%G('?*=,>XLY`[YSAAW%G*'?&>,.PNY0[XSQIV%W"'?&>/.0NZ0 +M[XQQ9Q%WBI\BW#41=XI\US#NFH@[1;YK&'=-Q)TBWS6,NR;B3I'O&L9=$W&G +MR'<-XZZ)N%/DNX9QUT3<*?)=P[AK0NZ0[QK&71MRAWS7,N[:D#ODNY9QUX;< +M(=^UC+LVY`[YKF7L9='W*'?-*N0;X;&'=# +MQ%V#?#2[D7$WAMPAWXV,NS'D#OEN9-R-(7?(=R/C;@RY0[X;&7=CR!WR +MWZFB+L6^6YBW$T1=RWRW<2XFR+N +M6N2[B7$W1=RUR'<3XVZ*N&N1[R;&W11QUR+?38R[*>0.^6YBW.4_)N5SR'Z6B+L.^6YAW"T1=QWRW<*X6R+N.N2[A7&W1-QUR'<+XVZ)N.N0 +M[Q;&W1)QUR'?+8R[)>*N0[Y;&'=+R!WRW<*X6T/ND.]6QMT:&W"'?K8R[->0.^6YEW*TA=\AW*^-N#;E#OEL9=VO$78^?(MR10.C> +M'/+=QKC;(NYZY+N-<;=%W/7(=QOC;HNXZY'O-L;=%G'7(]]MC+LMXJY'OML8 +M=UO$78]\MS'NMI`[Y+N-<;>'W"'?[8R[/>0.^6YGW.TA=\AW.^-N#[E#OML9 +M=WO('?+=SKC;0^Z0[W;&W1YRAWRW,^[VB+L!/X6YD_P!GP.^DS/A3LX1=P/P +MG9P)=W*.N!N`[X3U@>+[NP-W`_"=L/Y.POYN`+X3UM])V-\-P'?"^CL)^[L! +M^$Y8?R=A?S<`WPGK[R3L[P;@.V']G83]W0!\)ZR_D["_&X#OA/5W$O9W`_"= +ML/Y.POYN`+X3UM])V-\-P'?"^CL)^[L!^$Y8?R=A?S?BIPAW87\W(M^Q_D[" +M_FY$OF/]G83]W8A\Q_H["?N[$?F.]7<2]G]8?R=A?SOO).SO1N0[UM])V-^-R'>LOY.POYOP4X2[L+^;D.]8?R=A?SOO).SO)N0[UM])V-]- +MR'>LOY.POYN0[UA_)V%_-R'?L?Y.POYN0KYC_9V$_=V$?,?Z.PG[NPGYCO5W +M$O9W$_(=Z^\D[.\FY#O6WTG8W\WX*<)=V-_-R'>LOY.POYN1[UA_)V%_-R/? +ML?Y.POYN1KYC_9V$_=V,?,?Z.PG[NQGYCO5W$O9W,_(=Z^\D[.]FY#O6WTG8 +MW\W(=ZR_D["_FY'O6'\G87\W(]^Q_D["_FY&OF/]G83]W8Q\Q_H["?N[&?F. +M]7<2]G]8?R=A +M?[OO).SO5N0[ +MUM])V-^MR'>LOY.POUN1[UA_)V%_MR+?L?Y.POYN1;YC_9V$_=V*?,?Z.PG[ +MNPT_1;@+^[L-^8[U=Q+V=QOR'>OO).SO-N0[UM])V-]MR'>LOY.PO]N0[UA_ +M)V%_MR'?L?Y.POYN0[YC_9V$_=V&?,?Z.PG[NPWYCO5W$O9W&_(=Z^\D[.\V +MY#O6WTG8WVW(=ZR_D["_VY#O6'\G87^W(=^Q_D["_FY#OF/]G83]W8Z?(MR% +M_=V.?,?Z.PG[NQWYCO5W$O9W._(=Z^\D[.]VY#O6WTG8W^W(=ZR_D["_VY'O +M6'\G87^W(]^Q_D["_FY'OF/]G83]W8Y\Q_H["?N['?F.]7<2]G<[\AWK[R3L +M[W;D.];?2=C?[]8?R=A?[Y.MV4.^$Y9?Z>NOSLE[DZ_ESG@ +M.V7]G;K^[G0YG!WPG;+^3EU_5\ZNS@'?*>OOU/5W8`[X3EE_IZZ_`W/`=\KZ +M.W7]79Y[5.>`[Y3U=^KZNT=YKG('?*>LOU/7WSU*W#VJW`'?*>OOU/5WCQ)W +MCRIWP'?*^CMU_=VCR^'L@.^4]7?J^KMR=G4.^$Y9?Z>NOP-SP'?*^CMU_=UQ +M#MU_IZR_4]??Y;G'=0[YCO5WZOJ[QWFN<(?NOU/6WZGK[QXG[AX7[M#]=\KZ +M.W7]W>/$W>/"';K_3EE_IZZ_>WPYG!WR'>OOU/5WY>SJ'/(=Z^_4]7=@#OF. +M]7?J^CLPAWS'^CMU_5V>>U+GD.]8?Z>NOWN2YRIWR'>LOU/7WSU)W#VIW"'? +ML?Y.77_W)''WI'*'?,?Z.W7]W9/+X>R0[UA_IZZ_*V=7YY#O6'^GKK\#<\AW +MK+]3U]\=Y]#]=\KZ.W7]79Y[6N>0[UA_IZZ_>YKG"G?H_CME_9VZ_NYIXNYI +MX0[=?Z>LOU/7WSU-W#TMW*'[[Y3U=^KZNZ>7P]DAW['^3EU_5\ZNSB'?L?Y. +M77\'YI#O6'^GKK\#<\AWK+]3U]_EN6=U#OF.]7?J^KMG>:YRAWS'^CMU_=VS +MQ-VSRAWR'>OOU/5WSQ)WSRIWR'>LOU/7WSV[',X.^8[U=^KZNW)V=0[YCO5W +MZOH[,(=\Q_H[=?W=<0[=?Z>LOU/7W^6YYW4.^8[U=^KZN^=YKG"'[K]3UM^I +MZ^^>)^Z>%^[0_7?*^CMU_=WSQ-WSPAVZ_TY9?Z>NOWM^.9P=\AWK[]3U=^7L +MZASR'>OOU/5W8`[YCO5WZOH[,(=\Q_H[=?U=GGM1YY#O6'^GKK][D>NORMG +M5^>0[UA_IZZ_`W/(=ZR_4]??'>?0_7?*^CMU_5V>>UGGD.]8?Z>NOWN9YPIW +MZ/X[9?V=NO[N9>+N9>$.W7^GK+]3U]^]3-R]+-RA^^^4]7?J^KN7E\/9(=^Q +M_DY=?U?.KLXAW['^3EU_!^:0[UA_IZZ_`W/(=ZR_4]??Y;E7=0[YCO5WZOJ[ +M5WFN$.W7^GK+]3U]]=)>ZN"G?H_CME_9VZ_N[J +MOOP!SR'>OOU/5W8`[YCO5WZOJ[//>ZSB'? +ML?Y.77_W.L]5[I#O6'^GKK][G;A[7;E#OF/]G;K^[G7B[G7E#OF.]7?J^KO7 +ME\/9(=^Q_DY=?U?.KLXAW['^3EU_!^:0[UA_IZZ_.\ZA^^^4]7?J^KL\]Z;. +M(=^Q_DY=?_S0[YC_9VZ_JZ<79U#OF/]G;K^#LPAW['^3EU_!^:0[UA_IZZ_ +MRW-OZQSR'>OOU/5W;_-SF<'?(=Z^_4]7?E[.H<\AWK[]3U=V`.^8[U=^KZN^,OO-.KO#-U_IZR_TZB_,W3_G;+^3J/^SM#]=\KZ.R7]W?LZAWS'^CMU_=W[ +M/%>Y0[YC_9VZ_NY]XNY]Y0[YCO5WZOJ[]XF[]Y4[Y#O6WZGK[]Y?#F>'?,?Z +M.W7]73F[.H=\Q_H[=?T=F$.^8_V=NO[N.(?NOU/6WUG^P,V=ZQSPG;'^[NLG +M'G"7_70NW*'[[XSU=^;ZNW/:.Q?NT/UWQOH[<_W=.7%W+MRA^^^,]7?F^KOS +MY7!VP'?&^CMS_5TYNSH'?&>LOS/7WX$YX#MC_9VY_@[,`=\9Z^_,]7=Y3NH< +M\)VQ_LYLOS/7WTEZ>5*Y`[XSUM^9Z^\D<2>5.^`[8_V=N?Y. +M+H>S`[XSUM^9Z^_*V=4YX#MC_9VY_@[,`=\9Z^_,]7?'.73_G;'^SEQ_E^>T +MSB'?L?[.7'^G>:YPA^Z_,];?F>OO-'&GA3MT_YVQ_LY).RWLOS/7W^6YILXA +MW['^SEQ_U^2YPAVZ_\Y8?V>NOVL2=TWA#MU_9ZR_,]??-8F[IG"'[K\SUM^9 +MZ^^:R^'LD.]8?V>NORMG5^>0[UA_9ZZ_`W/(=ZR_,]??@3GD.];?F>OO\EQ; +MYY#O6']GKK]K\USE#OF.]7?F^KLV<==6[I#O6']GKK]K$W=MY0[YCO5WYOJ[ +M]G(X.^0[UM^9Z^_*V=4YY#O6WYGK[\`<\AWK[\SU=\NO\MS +M?9U#OF/]G;G^KL]SE3OD.];?F>OO^L1=7[E#OF/]G;G^KD_<]94[Y#O6WYGK +M[_K+X>R0[UA_9ZZ_*V=7YY#O6']GKK\#<\AWK+\SU]\=Y]#]=\;Z.W/]79X; +MZASR'>OOS/5W0YXKW*'[[XSU=^;ZNR%Q-Q3NT/UWQOH[<_W=D+@;"G?H_CMC +M_9VY_FZX',X.^8[U=^;ZNW)V=0[YCO5WYOH[,(=\Q_H[<_T=F$.^8_V=N?XN +MSXUU#OF.]7?F^KLQSU7ND.]8?V>NOQL3=V/E#OF.]7?F^KLQ<3=6[I#O6']G +MKK\;+X>S0[YC_9VY_JZ<79U#OF/]G;G^#LPAW['^SEQ_=YQ#]]\9Z^_,]7=Y +M[D.=0[YC_9VY_NY#GBOOO/N:YRAWR'>OOS/5W'Q-W'RMWR'>LOS/7WWU,W'VL +MW"'?L?[.7'_W\7(X.^0[UM^9Z^_*V=4YY#O6WYGK[\`<\AWK[\SU=\0[UM^9Z^\^Y;G"';K_SEA_9ZZ_^Y2X^U2X0_??&>OOS/5W +MGQ)WGPIWZ/X[8_V=N?[NT^5P=LAWK+\SU]^5LZMSR'>LOS/7WX$YY#O6WYGK +M[\`<\AWK[\SU=WGNJ]PAW['^SEQ_]SEQ][ERAWS'^CMS +M_=WGQ-WGRAWR'>OOS/5WGR^'LT.^8_V=N?ZNG%V=0[YC_9VY_@[,(=^Q_LY< +M?W><0_??&>OOS/5W>>ZZSB'?L?[.7']WG><*=^C^.V/]G;G^[CIQ=UVX0_?? +M&>OOS/5WUXF[Z\(=NO_.6']GKK^[OAS.#OF.]7?F^KMR=G4.^8[U=^;Z.S"' +M?,?Z.W/]'9A#OF/]G;G^+L_=U#GD.];?F>OO;O)4. +M^8[U=^;ZNYO$W4WE#OF.]7?F^KN;R^'LD.]8?V>NORMG5^>0[UA_9ZZ_`W/( +M=ZR_,]??'>::,WX*<]?D#]S<;9T#OFM8?]>X_NXVSYW*'/#=UZW90[XKF']7>/ZN]O$W>WO90[XKF']7>/ZN]O+X>S0W[==3IQ^XLL[]^W+ +M;U??!]OO7]M&3^<)_)-_XLM?WCW\7@:_WVOT!P:_O6$Y#.8WW-[=:_2]K9O: +M!-[7G][9+;V]1>KOLO??\,T=?-?O[LVAOS?ZSYP?NHKH1X-M>YJFP^"_\NM# +M5Q']F=?7;;_XZ]M_!Z;M3TU[:KO3H#_["O_SUW^[5W@W!V3P_[WANSD@@X=S +M^067WQ\/ZNM#@?^#M_N#UW?K\;;-+@+SO!YBM]Y_-O_P.[1]$3H:@````` ` end Modified: head/usr.bin/mkimg/tests/img-63x255-4096-mbr.qcow2.gz.uu ============================================================================== --- head/usr.bin/mkimg/tests/img-63x255-4096-mbr.qcow2.gz.uu Fri Oct 3 20:48:11 2014 (r272485) +++ head/usr.bin/mkimg/tests/img-63x255-4096-mbr.qcow2.gz.uu Fri Oct 3 20:54:35 2014 (r272486) @@ -1,23 +1,22 @@ # $FreeBSD$ begin 644 img-63x255-4096-mbr.qcow2.gz -M'XL(",`[(U0``VEM9RTV,W@R-34M-#`Y-BUM8G(N<6-O=S(N;W5T`*V8VY+3 -M,`Q`W_=M)F,NVX.B/; -M1VJ2+(LOYW+O0N%"Y0X;UWRG`USOR_!PQU_??RSZK^--A/G,B%(&EOL.-V#] -M8QQ8N,R/![R.ZV6'"@[.46-0"A?,[*8&%-SMS6GI3IM1B@B\!AAQYF9[90HRSLPO'.,VRM1EG<@O'M$N,>,.RA1 -MEG<@O'M"N*<=SFM1EG<@O'M&N.>,4_H=6-Z!\.X%X5XR3NEW8'D'PKM7A+ME -MG-+OP/(.A'>O"?>&<4J_`\L[$-Z]'7GGE7X'EG.4?H>6=RB\0\(%QBG]#BWO4'B7$ZY@G-+OT/(.A7=+PI6,4_H=6MZA\*XB -MW'O&*?T.+>]0>/>!_T9^/K8*V=[8`)8 -M7@*.-XMAN\.>"JV"X#-^AP.(R!-.(_%UOR@.>J< -M/C1'+!":WM9SF0TGO*928]QNYO4[U<<%P#QW=3T"_C[G!Y-I7)[?XV2HXXNS'#31P3KAKL2/G4Z\*[_ -MN8=;+;C5-[C)QPWM/=1>&S`GF\\K2]DUJ\[6WCZWE^[M'=;YWUM<>G?[ZS@_ -MI5G!8+H3^;GQ=-NK@N[N7>Q'BX/$=-T0US:J_GX.MC"Q>JMQ=MN9-\/+RGA@ -MY;:08>5&',S;"*I39VD,;'XU/ML#QY^+X3L"`P%G6\%0M/]M-_\!8,LR/2,5 -"```` +M'XL("&+N+50``VEM9RTV,W@R-34M-#`Y-BUM8G(N<6-O=S(N;W5T`*V8VY+3 +M,`Q`W_[80HS3N;]FXO1&G>@>*=";B#$*5Y!\R[1X1[''!'(4KS +M#IAW3PCW=,!9*4KS#IAWSPCW/."$?@>:=\"\>T&XEP$G]#O0O`/FW2O"W0:< +MT.]`\PZ8=Z\)]R;@A'X'FG?`O'L[\Q]P0K]#S3MDWGT@W,>`$_H=:MXA\^X3X=8!)_0[U+QSS+L-X3X'G-#OG.:= +M8]Y](=Q=P`G]SFG>.>;=5\)]&W`@10W>99E\$.Y^4K.P[/6G"]?'5CCK`S/` +MZA+@7(8>5R\ZX=Q/N-.@$<[ZP.EN-7X/P'.Q70"L:`7'.)IP[HO-KTZ3]Z5A +MJ4!H>CL;RBR>\,:7QWH5X?8+K]^Y/BX`YKEIF@GP=Y\?S*9Q>7[E8>']K?SC +MAK*KVKPP%3PTP[_W?Z9"M[C%*MCC],<---`G/+38"6X3X;HKEF/TR[A.1][% +MGR/<>A5:?8N;?=S0W4,=I`%ULOFRLE1#LQILC?:YNW3O[K#Z?V]VZ3WLKPGY +M">IK=;N'-L+PR'EBY +M'61<."$AHZ))*E6Z_I>W,Y9*GR,/7Q*0Q)1^-!!B$9/CI;VR0DAI`I4&Z -MA7G=,=Q$W(?B5(PT]7<,:"7T?0(4""19\VO'@C$U5`;, -M&:S^5N'SY_&AD'`J5\"$TWNX23!5T!+NRG`E5=],4>P4KSN^9KB&QH2KMM3A -M34PIW;:U)U;>9DJ,^7\>7+]9#XY1).Y_T(+N//@A6(N])Y -9W3'\BK@3L`K`;#?H?SXIBQ>7_'@>Y08````` +M'XL("&+N+50``VEM9RTV,W@R-34M-#`Y-BUM8G(N][(S9\;5I_#AMUAURN#'F$"18`J__$L+B-P`*@/H +M5\9MQ_"E8AN*CV*DZ<,P8&AM_3?37/N +M,!!!70;=@2X!W>0S,7#)+SSU75(9)@IW1Q^DX?J` +MJ^/U6N#,0;@0XQ[+R[*2PH/3:U)U;>9DZ->;\>;-#9#XYC+.Y'T(+N/+0A5( +L6M'/>RVVNPA!__X,@9L\%>:+;9C$<$\ -MO,,,8\&8O0!D`;(%V8`4U"XYR%LH%8#I=`_V[]S]A:Y^_]/4_][.F;NZG87E -M++2*S"^!FDA)0TR3RE=K0>4SVXW"\>?M]]#AT.#\QE\`1A('PV3R*#>J( -M].O^\>=473%7-UK9>=H6BC88483JLNPNQ'%C9<;3(Z'EO4S_1'^BCA`7J1-L -M8A7(7%K4P-DEG-RRN@9WLW.QL*EB$J,T;P8RAQ*I;=+&K\/L,:ER/GWHOZ=F -MH@]74D4&P9CV\75WT:4*^L%.`2>!6^Y"3SE-<0NI\JW5D[$==PVS"$SX#NS= -MCU=O1$&H3^9L8\W7@[&J3Y,^L[>87GBO=W3W67P/P*JZ#JB851CC!H>K>G!8 -MB]$CNU?=^M4Y%,UB0/IMNP_6KWI-'-^JO0XH!&@]`SYY??6FC.OU*94XOJI/ -M&%%2.1<2%'Y5X6'_*KU2#OZO^BF-EW!><%CM8]Q=@"ML]HV4H#A%>1>V -M`]S>_CR.;ZFCFM`L=:PZ*Q(GBU83NS#.D#>0%\"4Z\,8.,071GVWZ[ZT=&(;RP>ONYNCIQ,*KISOCBSB5(O',M#M,6 -M`MU7%I.!9M3\O=[1/63Q;8'H/D7)OFWHBFDRA=P!DRDTP":Q0IWV^R&=PD0' -J!<(E/"@0+N%!@7`)#PJ$2WA0(%S"@P+ADAX4I#D",K;[!%1JM8A=#@`` +M'XL("&+N+50``VEM9RTV,W@R-34M-#`Y-BUM8G(N=FAD+F]U=`"METMOW"`0 +MQ^_[*4;J+0<+CP&3RZX4-3U7JMJ>L6-'.?2A;@\Y^,.7,>`%OS;;S)I%6,"/ +M/\S#0@C_`]`5Z!YT!UI1NY:@[Z$V`*XS%!SK,KS"T/[ZV;5_7UZ+\!L.'E:* +M=%8^G>9C!=(M4@-:6D0_41N&B"D^/#[?O?QXCC@,N+BPU"`1E(/(Q3I&3.J( +M].GAR\>YNFJI[C++K]/W4/7)B"I55Q2G%"?=+#>>BH9>CC)CR5ZRCA27J5-B +M-BN1N7:HR6;7<'IOUBVXNT.PA7<5YQBUJP7H$FJDMG.;>`Z+XESE]?S;_CEW +M,WVXX2HZ,<:\3VYO%X.K8!P<%$@2N+==&"GG.6[%5=YU>CJ?)T/#'8)0L0/' +M[>>G=T%!JD^78N?,MXVQJ<^2/A=;PJ[4VQW#0Y$_$[!I;@,:X:,CQTT;;MH0 +M'0*LHIJBM`RQ&LZO=>_=BD%./FR/R?DU3\SV;?K;@$J!M0O@UZBOW95QNSYC +MF.UK1H=1-:5SI<'@6Q5^?_RV$K_&;J2#_\M^QN(U7!2<9OL<=TIPE0^W"R5) +M3IG?I>T$=_3_B)-[ZB@G=&L=FYM5S,YBS6Q>:FV"SFNF3++B@FOG-YQJ:YE-D8SCXPW1BY!\LCU +M..1-!';,+,X#W:AEO=TQ?"[RQP,Q?(K8OFT8DBF;0AF`;`H=L&-6:'F_'SHH +L9+HH$([QHD`XQHL"X1@O"H1CO"@0CO&B0#C6BX)V5T`A#O\`HP_9YET.```` ` end Modified: head/usr.bin/mkimg/tests/img-63x255-4096-mbr.vhdf.gz.uu ============================================================================== --- head/usr.bin/mkimg/tests/img-63x255-4096-mbr.vhdf.gz.uu Fri Oct 3 20:48:11 2014 (r272485) +++ head/usr.bin/mkimg/tests/img-63x255-4096-mbr.vhdf.gz.uu Fri Oct 3 20:54:35 2014 (r272486) @@ -1,15 +1,15 @@ # $FreeBSD$ begin 644 img-63x255-4096-mbr.vhdf.gz -M'XL("`3&'50``VEM9RTV,W@R-34M-#`Y-BUM8G(N=FAD9BYO=70`K96[;L,@ -M%(;W/,61NF6PN)LLB10UG2M5;6?7P5&&MDN'#G[X@O&%8WQ)*NQC"POX_)\+ -M0(B_``0#4DR\YSOJ8X;O>K/=-#3Z<1]0$ZBJ")A9H,>5%F<'6"MDV[#&*W#" -M[6.MI,!-V_8&==97 -MF\3YU4W!R!R$!*E`LUL5OI_>1@H]CJ9RV./8&JX3["MH"G<(<-Q7WT"AP:RP -M[L)V@-O[I\.))74V$L1,=;XJ`J4`:4=.U<@-I!KD,@PY54 -ME]]?IORY_H89=CC:'T6QN?F,N]6B=*5=O9<7"4(>W2H8-_?.^,[8"Q\U%A",(Z>/(> +M=YP9T&RSL#6+Y:*E\?UC0,.`\0B8(=#A*L3A`I19*AKSFEYI +M)`.C7N&[[>:N0X.$;(,-GW7FX0[#KKC/&UJ<_USWWBJHS' +M]14V<7Q-FS"J`*E`:3#B7H6?NX^10H?CJ1QV.'$+UPMV&32%VWBX'(VUM])E +M8K?+SSM_[N'6[M?CY#5U>!+,3AEFG55ID\5@"_?Y<09N@>?`3&<3(7"(+UST +MK6(9(G#WBCZ(W2T)5X3KN8<3-]R%$+:>OJ?=<7DZ'WM<7ZKZ +M/Y::#ETA1$;NFM#=E^W;\UA='A^2"4Z/DTZ_[*'CP>EM?)P3D]?3&`(41*"3.'$F+W/TVGQ0;CSYZ)F-X;7>1%,Y)+RI'!+>5`X);RJ'A#>50\*;RB'A3>60\*9R2/199BB'1&\JAT1O M*H=$;RJ'1&\JAT1O*H=$;RJ'1&\JAT1O*H=$;RJ'1&\JAT1O*H=$;RJ'1&\J MAT1O*H=$;RJ'/&=99BB'/&>F/KF -M-/^3`-'^-L#A0>C[%X`L^(+P*`\.PZLIXL7PRGLI^`:7^]6"OPY_?742N,ZX -M?^A_&V!1N*9Y`?A/YG?^;!J_/;_*&Y_O=7Q@BBK\FMVB=-?ST0Q_^O;'1883 -MG)E^=H+;_?I(+&B_!?>UP.73T_>,HK\)7)\[O1:XKZ9/PET^EYTNJ(X5:_RK -MNZ_9=1&GYQR^[P0ZD/_+.\\!T_FZY_SJEVF<9^5^)C_WLMSP/5=_>:V>QVQ, -M;Y3KYG!A4.EYSHYPIWM?O;]]X^NXT_S,!7B*@6039%_\'RJ'TQAO8``` +M-/^3`-'^-L!)$+<$9,$7C(_RR'XUX_\)\SZ8>2\%WP;;KQ3\]?!G^/CJ)'"= +MFNYZ,9_O3MCXL, +M)S@S_>P$M_OUD5C0?@ON:X$+/P_TXCG[3>#ZW.FUP'TU?1+N\KGL=$%UK%CC +M7]U]S:Z+.#WG\'TGT('\7]YY#IC.USWG5[],XSPK]S/YN9?EAN^Y^LMK]3QF +M8WJC7#>':]-D63G"G>Y]]3*[F_%A8/F5O7WCZ;O3_,\$>(F`9AV\A%],DGWQ?Q6YC7-O8``` ` end Modified: head/usr.bin/mkimg/tests/img-63x255-4096-pc98.qcow.gz.uu ============================================================================== --- head/usr.bin/mkimg/tests/img-63x255-4096-pc98.qcow.gz.uu Fri Oct 3 20:48:11 2014 (r272485) +++ head/usr.bin/mkimg/tests/img-63x255-4096-pc98.qcow.gz.uu Fri Oct 3 20:54:35 2014 (r272486) @@ -1,126 +1,126 @@ # $FreeBSD$ begin 644 img-63x255-4096-pc98.qcow.gz -M'XL(",HS(E0``VEM9RTV,W@R-34M-#`Y-BUP8SDX+G%C;W6Y,FI$BA`H -M9,=%IM>I(Z)UX-QN?_S8;$;;#+O-L&PNA\VW?VX_;7/K'^[^W'S]SW_^Z_7M -M'U]_^S%FVS]Y*OWS=%[G[FS];Y_S/YXZ;K;+3\Q]^VDT=^O=Q5]X=[<^[/7< -M\]]^?%A^SM5@W!GW\F3F_XN??W.7U<^W%ZO^[CNOBXHQK<6?D.U?<><6=D>]<<><5=T:^<\6=5]P9^]"<1]" -M<1+.R7># -MXFZHN'/RW:"X&RKNG'PW*.Z&BCLGWPV*NZ'DCGPW*N[&DCORW:BX&TONR'>C -MXFXLN2/?C8J[L>2.?#)N5W$7Y+N=XFY7<1?DNYWB;E=Q%^2[G>)N5W$7Y+N=XFY7<1?D -MNYWB;E=Q%^2[G>)N5W)'OIL4=U/)'?EN4MQ-)7?DNTEQ-Y7\FQ=U4^ -MFQ1W4\D=^6Y2W$TE=^2[27$WE=R1[R;%W51Q-]!3L^)NKK@;R'>SXFZNN!O( -M=[/B;JZX&\AWL^)NKK@;R'>SXFZNN!O(=[/B;JZX&\AWL^)NKK@;R'>SXFXN -MN2/?W?R_\/!"Q1WY;E'<+25WY+M%<;>4W)'O%L7=4G)'OEL4=TO)'?EN4=PM -M)7?DNT5QMY3\6Q=U2<3?24WO%W;[B;B3?[15W^XJ[D7RW5]SM*^Y&\MU> -M<;>ON!O)=WO%W;[B;B3?[15W^XJ[D7RW5]SM*^Y&\MU><;^.BKMCQ=V.?'=4W!TK[G;DNZ/B[EAQMR/? -M'15WQXJ['?GNJ+@[5MSMR'='Q=VQXFY'OCLJ[HXE=^2[D^+N5')'OCLI[DXE -M=^2[D^+N5')'OCLI[DXE=^2[D^+N5')'OCLI[DXE=^2[D^+N5')'OCLI[DX5 -M=Q,]M79`UR\4W$WDN[/B[EQQ-Y'OSHJ[<\7=1+X[*^[.%7<3^>ZLN#M7W$WD -MN[/B[EQQ-Y'OSHJ[<\7=1+X[*^[.)7?DNXOB[E)R1[Z[*.XN)7?DNXOB[E)R -M1[Z[*.XN)7?DNXOB[E)R1[Z[*.XN)7?DNXOB[E)R1[Z[*.XN%7#[TSU=U;V=S/XSE1_9V5_ -M-X/O3/5W5O9W,_C.5']G97\W@^],]7=6]G#[TSU=U;V=PL] -MI?H[*_N[A7RG^CLK^[N%?*?Z.RO[NX5\I_H[*_N[A7RG^CLK^[N%?*?Z.RO[ -MNX5\I_H[*_N[A7RG^CLK^[N%?*?Z.RO[NX5\I_H[*_N[A7RG^CLK^[N%?*?Z -M.RO[NX5\I_H[*_N[A7RG^CLK^[N%?*?Z.RO[NX5\I_H[*_N[/3VE^CLK^[L] -M^4[U=U;V=WORG>KOK.SO]N0[U=]9V=_MR7>JO[.RO]N3[U1_9V5_MR??J?[. -MROYN3[Y3_9V5_=V>?*?Z.RO[NSWY3O5W5O9W>_*=ZN^L[._VY#O5WUG9W^W) -M=ZJ_L[*_VY/O5']G97^W)]^I_L[*_FY/OE/]G97]W8&>4OV=E?W=@7RG^CLK -M^[L#^4[U=U;V=P?RG>KOK.SO#N0[U=]9V=\=R'>JO[.ROSN0[U1_9V5_=R#? -MJ?[.RO[N0+Y3_9V5_=V!?*?Z.RO[NP/Y3O5W5O9W!_*=ZN^L[.\.Y#O5WUG9 -MWQW(=ZJ_L[*_.Y#O5']G97]W(-^I_L[*_NY(3ZG^SLK^[DB^4_V=E?W=D7RG -M^CLK^[LC^4[U=U;V=T?RG>KOK.SOCN0[U=]9V=\=R7>JO[.ROSN2[U1_9V5_ -M=R3?J?[.RO[N2+Y3_9V5_=V1?*?Z.RO[NR/Y3O5W5O9W1_*=ZN^L[.^.Y#O5 -MWUG9WQW)=ZJ_L[*_.Y+O5']G97]WHJ=4?V=E?WKOK.SO3N0[U=]9V=^=R'>JO[.ROSN1[U1_ -M9V5_=R+?J?[.RO[N1+Y3_9V5_=V)?*?Z.RO[NQ/Y3O5W5O9W)_*=ZN^L[.]. -MY#O5WUG9WYW(=ZJ_L[*_.]-3JK^SLK\[D^]4?V=E?WKOK.SOSN0[U=]9V=^=R7>JO[.ROSN3 -M[U1_9V5_=R;?J?[.RO[N3+Y3_9V5_=V9?*?Z.RO[NS/Y3O5W5O9W9_*=ZN^L -M[._.Y#O5WUG9WUWH*=7?6=G?7KOK.SO+N0[U=]9V=]=R'>JO[.R -MO[N0[U1_9V5_=R'?J?[.RO[N0KY3_9V5_=V%?*?Z.RO[NPOY3O5W5O9W%_*= -MZN^LZN]B"T_YS2_@A3O; -M+^L<^,Y5?^>IO]LT[C:_KW/@.U?]G:?^#LX.?.>JO_/4W\$<^,Y5?^>IOX,Y -M\)VK_LY3?P=SX#M7_9VG_NY>F[O7Y\!WKOH[3_W=O?;V[G7NP'>N^CM/_=V] -MQMV]SAWXSE5_YZF_N]>XN]>Y`]^YZN\\]7=P=N`[5_V=I_X.YL!WKOH[3_T= -MS('O7/5WGOJ[ZSFZ_\Y5?^>IO[O?YN[W.?*=ZN\\]7?W&W?W5^[H_CM7_9VG -M_NY^X^[^RAW=?^>JO_/4W]UOW-U?N:/[[USU=Y[Z.S@[\IWJ[SSU=S!'OE/] -MG:?^#N;(=ZJ_\]3?P1SY3O5WGOJ[!VWN09\CWZG^SE-_]Z!Q]Z!S1[Y3_9VG -M_NY!X^Y!YXY\I_H[3_W=@\;=@\X=^4[U=Y[Z.S@[\IWJ[SSU=S!'OE/]G:?^ -M#N;(=ZJ_\]3?7<_1_7>N^CM/_=W#-O>PSY'O5'_GJ;][V+A[N')']]^YZN\\ -M]7JO_/4W\'9D>]4?^>IOX,Y\IWJ -M[SSU=S!'OE/]G:?^#N;(=ZJ_\]3?/6ISC_H<^4[U=Y[ZNT>-NT>=._*=ZN\\ -M]7>/&G>/.G?D.]7?>>KO'C7N'G7NR'>JO_/4W\'9D>]4?^>IOX,Y\IWJ[SSU -M=S!'OE/]G:?^[GJ.[K]SU=]YZN\>M[G'?8Y\I_H[3_W=X\;=XY4[NO_.57_G -MJ;][W+A[O')']]^YZN\\]7>/&W>/5^[H_CM7_9VG_@[.CGRG^CM/_1W,D>]4 -M?^>IOX,Y\IWJ[SSU=S!'OE/]G:?^[DF;>]+GR'>JO_/4WSUIW#WIW)'O5'_G -MJ;][TKA[TKDCWZG^SE-_]Z1Q]Z1S1[Y3_9VG_@[.CGRG^CM/_1W,D>]4?^>I -MOX,Y\IWJ[SSU=]=S=/^=J_[.4W_WM,T][7/D.]7?>>KOGC;NGJ[]4?^>IOX,Y\IWJ[SSU=\_:W+,^1[Y3_9VG_NY9X^Y9YXY\I_H[ -M3_W=L\;=L\X=^4[U=Y[ZNV>-NV>=._*=ZN\\]7=P=N0[U=]YZN]@CGRG^CM/ -M_1W,D>]4?^>IO[N>H_OO7/5WGOJ[YVWN>9\CWZG^SE-_][QQ]WSECNZ_<]7? -M>>KOGC?NGJ_]4?^>IOWO1YE[T.?*=ZN\\]7>KO7C3N7G3NR'>JO_/4W[UHW+WHW)'O5'_GJ;^#LR/?J?[.4W\'<^0[U=]Y -MZN]@CGRG^CM/_=WU'-U_YZJ_\]3?O6QS+_L<^4[U=Y[ZNY>-NY>KO7C;N7J[JSY'O5'_GJ;][U;A[U;DCWZG^ -MSE-_]ZIQ]ZIS1[Y3_9VG_NY5X^Y5YXY\I_H[3_T=G!WY3O5WGOH[F"/?J?[. -M4W\'<^0[U=]YZN^NY^C^.U?]G5?]7=#]=Z[Z.Z_ZNZ#[[USU=U[U=T'WW[GJ -M[[SJ[X+NOW/5WWG5WP7=?^>JO_.JOPNZ_\Y5?^=5?Q=T_YVK_LZK_B[H_CM7 -M_9VG_NY-VWK3Y\AWJK_SU-^]:=R]Z=R1[U1_YZF_>].X>].Y(]^I_LY3?_>F -MF^4_V=I_X.SHY\I_H[3_T=S)'O5'_GJ;^#.?*=ZN\\]7?71 -M^KMMXVZ[A^KM(_1W,@>]"]7>1^CN8 -M`]^%ZN\B]7?6YJS/@>]"]7>1^CMKW%GG#GP7JK^+U-]9X\XZ=^"[4/U=I/[. -M&G?6N0/?A>KO(O5W<';@NU#]7:3^#N;`=Z'ZNTC]'KOO''G*W=T_UVH_BY2?^>- -M.U^YH_OO0O5WD?H[.#ORG>KO(O5W,$>^4_U=I/X.YLAWJK^+U-_!'/E.]7>1 -M^KMH<]'GR'>JOXO4WT7C+CIWY#O5WT7J[Z)Q%YT[\IWJ[R+U=]&XB\X=^4[U -M=Y'Z.S@[\IWJ[R+U=S!'OE/]7:3^#N;(=ZJ_B]3?7<_1_7>A^KM(_=W0YH8^ -M1[Y3_5VD_FYHW`TK=W3_7:C^+E)_-S3NAI4[NO\N5'\7J;\;&G?#RAW=?Q>J -MOXO4W\'9D>]4?Q>IOX,Y\IWJ[R+U=S!'OE/]7:3^#N;(=ZJ_B]3?C6UN['/D -M.]7?1>KOQL;=V+DCWZG^+E)_-S;NQLX=^4[U=Y'ZN[%Q-W;NR'>JOXO4W\'9 -MD>]4?Q>IOX,Y\IWJ[R+U=S!'OE/]7:3^[GJ.[K\+U=]%ZN]V;6[7Y\AWJK^+ -MU-_M&G>[E3NZ_RY4?Q>IO]LU[G8K=W3_7:C^+E)_MVO<[5;NZ/Z[4/U=I/X. -MSHY\I_J[2/T=S)'O5'\7J;^#.?*=ZN\B]71^KNI<3=U[LAWJK^+U-]-C;NI^4_U=I/X.SHY\I_J[ -M2/T=S)'O5'\7J;^#.?*=ZN\B]7?7YN<^1[U1_%ZF_FQMW -M\\H=W7\7JK^+U-_-C;MYY8[NOPO5WT7J[^;&W;QR1_??A>KO(O5W<';D.]7? -M1>KO8(Y\I_J[2/T=S)'O5'\7J;^#.?*=ZN\B]7=+FUOZ'/E.]7>1^KNE<;=T -M[LAWJK^+U-\MC;NE^4_U=I/YN:=PMG3ORG>KO(O5W<';D.]7?1>KO8(Y\ -MI_J[2/T=S)'O5'\7J;^[GJ/[[T+U=Y'ZN[=M[FV?(]^I_BY2?_>VKO8(Y\I_J[2/T=S)'O5'\7J;][U^;>]3GRG>KO(O5W[QIW[SIW -MY#O5WT7J[]XU[MYU[LAWJK^+U-^]:]R]Z]R1[U1_%ZF_@[,CWZG^+E)_!W/D -M.]7?1>KO8(Y\I_J[2/W=]1S=?Q>JOXO4W[UO<^_['/E.]7>1^KOWC;OW*W=T -M_UVH_BY2?_>^KO8(Y\I_J[2/W=AS;WH<^1[U1_%ZF_^]"X^]"Y -M(]^I_BY2?_>AA^4_U=I/[N0^/N0^>.?*?ZNTC]'9P=^4[U=Y'Z.Y@C -MWZG^+E)_!W/D.]7?1>KOKN?H_KM0_5VD_NYCF_O8Y\AWJK^+U-]];-Q]7+FC -M^^]"]7>1^KN/C;N/*W=T_UVH_BY2?_>QJOXO4 -MW\$<^4[U=Y'Z.Y@CWZG^+E)_!W/D.]7?1>KO/K6Y3WV.?*?ZNTC]W:?&W:?. -M'?E.]7>1^KM/C;M/G3ORG>KO(O5WGQIWGSIWY#O5WT7J[^#LR'>JOXO4W\$< -M^4[U=Y'Z.Y@CWZG^+E)_=S4W;.&IX>87\,(=[FZ"WL]]#GPWJ/[NVPMWN/O< -MN/N\7>?`=X/J[X;4WWUN;^_SEW4.?#>H_FY(_=WGQMWGW]W_UK'?Q^-\]?&!S' -MS?YZ\+_:!QZ_W\VS#)OC0)_K__CI_ -MO\LY-MN;_W3C=P?7K^^FOS]*_.]\W#]Y?YOKC_O]MQC3W?^]W9KSXN-N[LY] -M_RW&K:_GG2]A<7H?K]\=_1'W?^>+<75QXD]^Y_XQ<_UH1+-_-\L>_ -C3O?P=_W"UR^O[_[U8W!H@[_L!(=ON&RWO_T?@O'+%J.H```` +M'XL("&/N+50``VEM9RTV,W@R-34M-#`Y-BUP8SDX+G%C;W#T/@/SLAF9W[NZH]4TP&A@T +M`A7Y*2MK]0+-+&W6ZY_?5JO15L-F-?MNZWN_>3A]]6W__J/_WQW +M_]NW/WZ.V?HOKDH_WYZ6N0=;_]?G_,=5A]5Z_H6Y[]^-YN[=7?R-N[OW9B_G +MKO[X^6;Y.E>#\6!PU>;6[?Y,/+WAU^[O2WJ[]O/I_;ZWZ^+MCFIP\V#P:YO[ +M5[L__UNP_-+]_)7X0K,[PM,7VM=E;H]7;=3< +M0^[^=<'=`:\2W%G)W1&O$MQ9R=T)KQ+<6NN/.*.R/?N>+.*^Z,?.>*.Z^X,_*=*^Z\ +MY(Y\%XJ[*+DCWX7B+DKNR'>AN(N2._)=*.ZBY(Y\%XJ[*+DCWX7B+DKNR'>A +MN(N2._)=*.ZBXL[IJD%Q-U3<.?EN4-P-%7=.OAL4=T/%G9/O!L7=4''GY+M! +M<3=4W#GY;E#<#15W3KX;%'=#Q9V3[P;%W5!R1[X;%7=CR1WY;E36W)'O1L7=6')'OAL5=V/)'?EN5-R-)7?DNU%Q-Y;]&Q=U8<1=TU49Q +MMZFX"_+=1G&WJ;@+\MU&<;>IN`ORW49QMZFX"_+=1G&WJ;@+\MU&<;>IN`OR +MW49QMZFX"_+=1G&W*;DCWVT5=]N2._+=5G&W+;DCWVT5=]N2._+=5G&W+;DC +MWVT5=]N2._+=5G&W+;DCWVT5=]N2._+=5G&WK;@;Z*I)<3=5W`WDNTEQ-U7< +M#>2[27$W5=P-Y+M)<3=5W`WDNTEQ-U7<#>2[27$W5=P-Y+M)<3=5W`WDNTEQ +M-Y7_N_BL\O%!Q1[Z;%7=SR1WY;E;7W)'O9L7=7')'OIL5 +M=W/)'?EN5MS-)7?DNUEQ-U?ZHN#N6W)'OCHJ[ +M8\D=^>ZHN#N6W)'OCHJ[8\D=^>ZHN#N6W)'OCHJ[8\D=^>ZHN#N6W)'OCHJ[ +M8\7=EJY:.J#+%PKNMN2[D^+N5'&W)=^=%'>GBKLM^>ZDN#M5W&W)=R?%W:GB +M;DN^.RGN3A5W6_+=27%WJKC;DN].BKM3R1WY[JRX.Y?_.BKMSR1WY[JRX +M.Y?_.BKMSR1WY[JRX.Y?_.BKMSR1WY[JRX.Y?_.BKMSQ=T$5]G= +M#^"%@KL)?&`[ +M4_V=E?W=!+XSU=]9V=]-X#M3_9V5_=T$OC/5WUG9WTW@.U/]G97]W02^,]7? +M6=G?3>`[4_V=E?W=!+XSU=]9V=]-X#M3_9V5_=T$OC/5WUG9WTW@.U/]G97] +MW4Q7J?[.ROYN)M^I_L[*_FXFWZG^SLK^;B;?J?[.ROYN)M^I_L[*_FXFWZG^ +MSLK^;B;?J?[.ROYN)M^I_L[*_FXFWZG^SLK^;B;?J?[.ROYN)M^I_L[*_FXF +MWZG^SLK^;B;?J?[.ROYN)M^I_L[*_FXFWZG^SLK^;B;?J?[.ROYN1U>I_L[* +M_FY'OE/]G97]W8Y\I_H[*_N['?E.]7=6]G<[\IWJ[ZSL[W;D.]7?6=G?[]4?V=E?[^4_V=E?W=CGRG^CLK^[L=^4[U=U;V +M=SORG>KOK.SO=N0[U=]9V=_MR'>JO[.RO]N1[U1_9V5_MZ>K5']G97^W)]^I +M_L[*_FY/OE/]G97]W9Y\I_H[*_N[/?E.]7=6]G=[\IWJ[ZSL[_;D.]7?6=G? +M[KOK.SO]N0[U=]9V=_MR7>JO[.ROSO05:J_L[*_.Y#O5']G97]W +M(-^I_L[*_NY`OE/]G97]W8%\I_H[*_N[`_E.]7=6]G<'\IWJ[ZSL[P[D.]7? +M6=G?'KOK.SO#N0[U=]9V=\=Z2K5WUG9WQW)=ZJ_L[*_.Y+O5']G +M97]W)-^I_L[*_NY(OE/]G97]W9%\I_H[*_N[(_E.]7=6]G='\IWJ[ZSL[X[D +M.]7?6=G?' Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E7B62B50; Fri, 3 Oct 2014 21:46:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D486BB66; Fri, 3 Oct 2014 21:46:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s93Lk7je008860; Fri, 3 Oct 2014 21:46:07 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s93Lk7gx008859; Fri, 3 Oct 2014 21:46:07 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201410032146.s93Lk7gx008859@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Fri, 3 Oct 2014 21:46:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272487 - head/sys/boot/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Oct 2014 21:46:08 -0000 Author: ae Date: Fri Oct 3 21:46:07 2014 New Revision: 272487 URL: https://svnweb.freebsd.org/changeset/base/272487 Log: Add GUID of FreeBSD slice to GPT scheme. MFC after: 1 week Modified: head/sys/boot/common/part.c Modified: head/sys/boot/common/part.c ============================================================================== --- head/sys/boot/common/part.c Fri Oct 3 20:54:35 2014 (r272486) +++ head/sys/boot/common/part.c Fri Oct 3 21:46:07 2014 (r272487) @@ -53,6 +53,7 @@ static const uuid_t gpt_uuid_unused = GP static const uuid_t gpt_uuid_ms_basic_data = GPT_ENT_TYPE_MS_BASIC_DATA; static const uuid_t gpt_uuid_freebsd_ufs = GPT_ENT_TYPE_FREEBSD_UFS; static const uuid_t gpt_uuid_efi = GPT_ENT_TYPE_EFI; +static const uuid_t gpt_uuid_freebsd = GPT_ENT_TYPE_FREEBSD; static const uuid_t gpt_uuid_freebsd_boot = GPT_ENT_TYPE_FREEBSD_BOOT; static const uuid_t gpt_uuid_freebsd_nandfs = GPT_ENT_TYPE_FREEBSD_NANDFS; static const uuid_t gpt_uuid_freebsd_swap = GPT_ENT_TYPE_FREEBSD_SWAP; @@ -139,6 +140,8 @@ gpt_parttype(uuid_t type) return (PART_FREEBSD_VINUM); else if (uuid_equal(&type, &gpt_uuid_freebsd_nandfs, NULL)) return (PART_FREEBSD_NANDFS); + else if (uuid_equal(&type, &gpt_uuid_freebsd, NULL)) + return (PART_FREEBSD); return (PART_UNKNOWN); } From owner-svn-src-all@FreeBSD.ORG Fri Oct 3 23:20:41 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 10AA1492; Fri, 3 Oct 2014 23:20:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E5625AD6; Fri, 3 Oct 2014 23:20:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s93NKeJH052325; Fri, 3 Oct 2014 23:20:40 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s93NKcBQ052316; Fri, 3 Oct 2014 23:20:38 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201410032320.s93NKcBQ052316@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 3 Oct 2014 23:20:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272488 - in head: . cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/uctf cddl/contrib/opensolaris/lib/libdtrace/common cddl/lib/libdtrace lib/libproc lib/libproc/tests lib/librtld_db X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Oct 2014 23:20:41 -0000 Author: markj Date: Fri Oct 3 23:20:37 2014 New Revision: 272488 URL: https://svnweb.freebsd.org/changeset/base/272488 Log: Hook up support for userland CTF support in DTrace. This required some modifications to libproc to support fetching the CTF info for a given file. With this change, dtrace(1) is able to resolve type info for function and USDT probe arguments, and function return values. In particular, the args[n] syntax should now work for referencing arguments of userland probes, provided that the requisite CTF info is available. The uctf tests pass if the test programs are compiled with CTF info. The current infrastructure around the DTrace test suite doesn't support this yet. Differential Revision: https://reviews.freebsd.org/D891 MFC after: 1 month Relnotes: yes Sponsored by: EMC / Isilon Storage Division Modified: head/ObsoleteFiles.inc head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/uctf/tst.userlandkey.ksh head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_pid.c head/cddl/lib/libdtrace/libproc_compat.h head/lib/libproc/Makefile head/lib/libproc/libproc.h head/lib/libproc/proc_sym.c head/lib/libproc/tests/proc_test.c head/lib/librtld_db/rtld_db.c Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Fri Oct 3 21:46:07 2014 (r272487) +++ head/ObsoleteFiles.inc Fri Oct 3 23:20:37 2014 (r272488) @@ -1496,6 +1496,7 @@ OLD_LIBS+=usr/lib/libpanel.so.4 OLD_LIBS+=usr/lib/libpanelw.so.4 OLD_LIBS+=usr/lib/libpmc.so.4 OLD_LIBS+=usr/lib/libproc.so.1 +OLD_LIBS+=usr/lib/libproc.so.2 OLD_LIBS+=usr/lib/libradius.so.3 OLD_LIBS+=usr/lib/librpcsvc.so.4 OLD_LIBS+=usr/lib/libsdp.so.3 Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/uctf/tst.userlandkey.ksh ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/uctf/tst.userlandkey.ksh Fri Oct 3 21:46:07 2014 (r272487) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/uctf/tst.userlandkey.ksh Fri Oct 3 23:20:37 2014 (r272488) @@ -38,7 +38,7 @@ fi ./$exe & pid=$! -$dtrace -32 -qs /dev/stdin <dtpd_mod; } -#else - obj = pdp->dtpd_mod; -#endif if ((pmp = Plmid_to_map(P, lmid, obj)) == NULL) return (NULL); -#if defined(sun) (void) Pobjname(P, pmp->pr_vaddr, m, sizeof (m)); if ((obj = strrchr(m, '/')) == NULL) obj = &m[0]; else obj++; +#if defined(sun) (void) Plmid(P, pmp->pr_vaddr, &lmid); #endif @@ -571,9 +563,7 @@ dt_pid_usdt_mapping(void *data, const pr { struct ps_prochandle *P = data; GElf_Sym sym; -#if defined(sun) prsyminfo_t sip; -#endif dof_helper_t dh; GElf_Half e_type; const char *mname; @@ -852,11 +842,7 @@ dt_pid_get_types(dtrace_hdl_t *dtp, cons ctf_funcinfo_t f; ctf_id_t argv[32]; GElf_Sym sym; -#if defined(sun) prsyminfo_t si; -#else - void *si; -#endif struct ps_prochandle *p; int i, args; char buf[DTRACE_ARGTYPELEN]; @@ -941,13 +927,11 @@ dt_pid_get_types(dtrace_hdl_t *dtp, cons pdp->dtpd_func, pdp->dtpd_provider, pdp->dtpd_mod); goto out; } -#if defined(sun) if (ctf_func_info(fp, si.prs_id, &f) == CTF_ERR) { dt_dprintf("failed to get ctf information for %s in %s`%s\n", pdp->dtpd_func, pdp->dtpd_provider, pdp->dtpd_mod); goto out; } -#endif (void) snprintf(buf, sizeof (buf), "%s`%s", pdp->dtpd_provider, pdp->dtpd_mod); @@ -977,7 +961,6 @@ dt_pid_get_types(dtrace_hdl_t *dtp, cons (void) ctf_type_qname(fp, f.ctc_return, adp->dtargd_native + ret, DTRACE_ARGTYPELEN - ret, buf); *nargs = 2; -#if defined(sun) } else { if (ctf_func_args(fp, si.prs_id, argc, argv) == CTF_ERR) goto out; @@ -993,7 +976,6 @@ dt_pid_get_types(dtrace_hdl_t *dtp, cons (void) ctf_type_qname(fp, argv[i], adp->dtargd_native + ret, DTRACE_ARGTYPELEN - ret, buf); } -#endif } out: dt_proc_unlock(dtp, p); Modified: head/cddl/lib/libdtrace/libproc_compat.h ============================================================================== --- head/cddl/lib/libdtrace/libproc_compat.h Fri Oct 3 21:46:07 2014 (r272487) +++ head/cddl/lib/libdtrace/libproc_compat.h Fri Oct 3 23:20:37 2014 (r272488) @@ -38,7 +38,7 @@ #define Pxlookup_by_addr(p, a, n, s, sym, i) \ proc_addr2sym(p, a, n, s, sym) #define Pxlookup_by_name(p, l, s1, s2, sym, a) \ - proc_name2sym((p), (s1), (s2), (sym)) + proc_name2sym(p, s1, s2, sym, a) #define Paddr_to_map proc_addr2map #define Pcreate_error strerror #define Pdelbkpt proc_bkptdel @@ -46,10 +46,10 @@ #define Plmid(p, a, l) (-1) #define Plmid_to_map(p, l, o) proc_obj2map((p), (o)) #define Plookup_by_addr proc_addr2sym -#define Pname_to_ctf(p, obj) NULL +#define Pname_to_ctf(p, obj) (ctf_file_t *)proc_name2ctf(p, obj) #define Pname_to_map proc_name2map #define Pobject_iter proc_iter_objs -#define Pobject_iter_resolved(p, f, arg) 1 +#define Pobject_iter_resolved(p, f, arg) proc_iter_objs(p, f, arg) #define Pobjname proc_objname #define Pread proc_read #define Prd_agent proc_rdagent Modified: head/lib/libproc/Makefile ============================================================================== --- head/lib/libproc/Makefile Fri Oct 3 21:46:07 2014 (r272487) +++ head/lib/libproc/Makefile Fri Oct 3 23:20:37 2014 (r272488) @@ -25,7 +25,18 @@ LDADD+= -lsupc++ DPADD+= ${LIBSTDCPLUSPLUS} .endif -SHLIB_MAJOR= 2 +.if ${MK_CDDL} != "no" +LDADD+= -lctf +DPADD+= ${LIBCTF} +IGNORE_PRAGMA= YES +CFLAGS+= -I${.CURDIR}/../../cddl/contrib/opensolaris/lib/libctf/common \ + -I${.CURDIR}/../../sys/cddl/contrib/opensolaris/uts/common \ + -I${.CURDIR}/../../sys/cddl/compat/opensolaris +.else +CFLAGS+= -DNO_CTF +.endif + +SHLIB_MAJOR= 3 MAN= Modified: head/lib/libproc/libproc.h ============================================================================== --- head/lib/libproc/libproc.h Fri Oct 3 21:46:07 2014 (r272487) +++ head/lib/libproc/libproc.h Fri Oct 3 23:20:37 2014 (r272488) @@ -37,6 +37,7 @@ #include #include +struct ctf_file; struct proc_handle; typedef void (*proc_child_func)(void *); @@ -67,6 +68,11 @@ typedef struct prmap { #define MA_NOCOREDUMP 0x20 } prmap_t; +typedef struct prsyminfo { + u_int prs_lmid; /* Map id. */ + u_int prs_id; /* Symbol id. */ +} prsyminfo_t; + typedef int proc_map_f(void *, const prmap_t *, const char *); typedef int proc_sym_f(void *, const GElf_Sym *, const char *); @@ -125,7 +131,9 @@ int proc_create(const char *, char * con struct proc_handle **); int proc_detach(struct proc_handle *, int); int proc_getflags(struct proc_handle *); -int proc_name2sym(struct proc_handle *, const char *, const char *, GElf_Sym *); +int proc_name2sym(struct proc_handle *, const char *, const char *, + GElf_Sym *, prsyminfo_t *); +struct ctf_file *proc_name2ctf(struct proc_handle *, const char *); int proc_setflags(struct proc_handle *, int); int proc_state(struct proc_handle *); pid_t proc_getpid(struct proc_handle *); @@ -133,8 +141,7 @@ int proc_wstatus(struct proc_handle *); int proc_getwstat(struct proc_handle *); char * proc_signame(int, char *, size_t); int proc_read(struct proc_handle *, void *, size_t, size_t); -const lwpstatus_t * - proc_getlwpstatus(struct proc_handle *); +const lwpstatus_t *proc_getlwpstatus(struct proc_handle *); void proc_free(struct proc_handle *); rd_agent_t *proc_rdagent(struct proc_handle *); void proc_updatesyms(struct proc_handle *); Modified: head/lib/libproc/proc_sym.c ============================================================================== --- head/lib/libproc/proc_sym.c Fri Oct 3 21:46:07 2014 (r272487) +++ head/lib/libproc/proc_sym.c Fri Oct 3 23:20:37 2014 (r272488) @@ -32,6 +32,10 @@ __FBSDID("$FreeBSD$"); #include +#ifndef NO_CTF +#include +#include +#endif #include #include @@ -42,10 +46,17 @@ __FBSDID("$FreeBSD$"); #include #include #include +#ifndef NO_CTF +#include +#endif #include #include "_libproc.h" +#ifdef NO_CTF +typedef struct ctf_file ctf_file_t; +#endif + #ifndef NO_CXA_DEMANGLE extern char *__cxa_demangle(const char *, char *, size_t *, int *); #endif /* NO_CXA_DEMANGLE */ @@ -389,7 +400,7 @@ proc_name2map(struct proc_handle *p, con */ static int lookup_name(Elf *e, Elf_Scn *scn, u_long stridx, const char *symbol, - GElf_Sym *symcopy) + GElf_Sym *symcopy, prsyminfo_t *si) { GElf_Sym sym; Elf_Data *data; @@ -404,6 +415,8 @@ lookup_name(Elf *e, Elf_Scn *scn, u_long s = elf_strptr(e, stridx, sym.st_name); if (s != NULL && strcmp(s, symbol) == 0) { memcpy(symcopy, &sym, sizeof(*symcopy)); + if (si != NULL) + si->prs_id = i; return (0); } } @@ -412,7 +425,7 @@ lookup_name(Elf *e, Elf_Scn *scn, u_long int proc_name2sym(struct proc_handle *p, const char *object, const char *symbol, - GElf_Sym *symcopy) + GElf_Sym *symcopy, prsyminfo_t *si) { Elf *e; Elf_Scn *scn, *dynsymscn = NULL, *symtabscn = NULL; @@ -462,11 +475,11 @@ proc_name2sym(struct proc_handle *p, con * First look up the symbol in the dynsymtab, and fall back to the * symtab if the lookup fails. */ - error = lookup_name(e, dynsymscn, dynsymstridx, symbol, symcopy); + error = lookup_name(e, dynsymscn, dynsymstridx, symbol, symcopy, si); if (error == 0) goto out; - error = lookup_name(e, symtabscn, symtabstridx, symbol, symcopy); + error = lookup_name(e, symtabscn, symtabstridx, symbol, symcopy, si); if (error == 0) goto out; @@ -484,6 +497,26 @@ err0: return (error); } +ctf_file_t * +proc_name2ctf(struct proc_handle *p, const char *name) +{ +#ifndef NO_CTF + prmap_t *map; + int error; + + if ((map = proc_name2map(p, name)) == NULL) { + DPRINTFX("ERROR: couldn't find object %s", object); + return (NULL); + } + + return (ctf_open(map->pr_mapname, &error)); +#else + (void)p; + (void)name; + return (NULL); +#endif +} + int proc_iter_symbyaddr(struct proc_handle *p, const char *object, int which, int mask, proc_sym_f *func, void *cd) Modified: head/lib/libproc/tests/proc_test.c ============================================================================== --- head/lib/libproc/tests/proc_test.c Fri Oct 3 21:46:07 2014 (r272487) +++ head/lib/libproc/tests/proc_test.c Fri Oct 3 23:20:37 2014 (r272488) @@ -227,6 +227,7 @@ ATF_TC_HEAD(map_alias_name2sym, tc) ATF_TC_BODY(map_alias_name2sym, tc) { GElf_Sym sym1, sym2; + prsyminfo_t si1, si2; struct proc_handle *phdl; int error; @@ -239,14 +240,15 @@ ATF_TC_BODY(map_alias_name2sym, tc) * Make sure that "target_prog:main" and "a.out:main" return the same * symbol. */ - error = proc_name2sym(phdl, target_prog_file, "main", &sym1); + error = proc_name2sym(phdl, target_prog_file, "main", &sym1, &si1); ATF_REQUIRE_EQ_MSG(error, 0, "failed to look up 'main' via %s", target_prog_file); - error = proc_name2sym(phdl, aout_object, "main", &sym2); + error = proc_name2sym(phdl, aout_object, "main", &sym2, &si2); ATF_REQUIRE_EQ_MSG(error, 0, "failed to look up 'main' via %s", aout_object); ATF_CHECK_EQ(memcmp(&sym1, &sym2, sizeof(sym1)), 0); + ATF_CHECK_EQ(si1.prs_id, si2.prs_id); ATF_CHECK_EQ_MSG(proc_continue(phdl), 0, "failed to resume execution"); @@ -271,11 +273,11 @@ ATF_TC_BODY(symbol_lookup, tc) phdl = start_prog(tc, false); - error = proc_name2sym(phdl, target_prog_file, "main", &main_sym); + error = proc_name2sym(phdl, target_prog_file, "main", &main_sym, NULL); ATF_REQUIRE_EQ_MSG(error, 0, "failed to look up 'main'"); error = proc_name2sym(phdl, ldelf_object, "r_debug_state", - &r_debug_state_sym); + &r_debug_state_sym, NULL); ATF_REQUIRE_EQ_MSG(error, 0, "failed to look up 'r_debug_state'"); set_bkpt(phdl, r_debug_state_sym.st_value, &saved); Modified: head/lib/librtld_db/rtld_db.c ============================================================================== --- head/lib/librtld_db/rtld_db.c Fri Oct 3 21:46:07 2014 (r272487) +++ head/lib/librtld_db/rtld_db.c Fri Oct 3 23:20:37 2014 (r272488) @@ -237,14 +237,14 @@ rd_reset(rd_agent_t *rdap) GElf_Sym sym; if (proc_name2sym(rdap->rda_php, "ld-elf.so.1", "r_debug_state", - &sym) < 0) + &sym, NULL) < 0) return (RD_ERR); DPRINTF("found r_debug_state at 0x%lx\n", (unsigned long)sym.st_value); rdap->rda_preinit_addr = sym.st_value; rdap->rda_dlactivity_addr = sym.st_value; if (proc_name2sym(rdap->rda_php, "ld-elf.so.1", "_r_debug_postinit", - &sym) < 0) + &sym, NULL) < 0) return (RD_ERR); DPRINTF("found _r_debug_postinit at 0x%lx\n", (unsigned long)sym.st_value); From owner-svn-src-all@FreeBSD.ORG Fri Oct 3 23:26:58 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C7CC466B; Fri, 3 Oct 2014 23:26:58 +0000 (UTC) Received: from smtp1.multiplay.co.uk (smtp1.multiplay.co.uk [85.236.96.35]) by mx1.freebsd.org (Postfix) with ESMTP id 30F55BB2; Fri, 3 Oct 2014 23:26:58 +0000 (UTC) Received: by smtp1.multiplay.co.uk (Postfix, from userid 65534) id C586520E7088B; Fri, 3 Oct 2014 23:26:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.multiplay.co.uk X-Spam-Level: ** X-Spam-Status: No, score=2.2 required=8.0 tests=AWL,BAYES_00,DOS_OE_TO_MX, FSL_HELO_NON_FQDN_1,RDNS_DYNAMIC,STOX_REPLY_TYPE autolearn=no version=3.3.1 Received: from r2d2 (82-69-141-170.dsl.in-addr.zen.co.uk [82.69.141.170]) by smtp1.multiplay.co.uk (Postfix) with ESMTPS id 5DE2B20E70886; Fri, 3 Oct 2014 23:26:47 +0000 (UTC) Message-ID: <985EC1F71A75425DB8055BE27C00D9A4@multiplay.co.uk> From: "Steven Hartland" To: "Mark Johnston" , , , References: <201410032320.s93NKcBQ052316@svn.freebsd.org> Subject: Re: svn commit: r272488 - in head: . cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/uctf cddl/contrib/opensolaris/lib/libdtrace/common cddl/lib/libdtrace lib/libproc lib/libproc/tests lib/librtld_db Date: Sat, 4 Oct 2014 00:26:40 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="UTF-8"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Oct 2014 23:26:58 -0000 Nice work Mark! ----- Original Message ----- From: "Mark Johnston" To: ; ; Sent: Saturday, October 04, 2014 12:20 AM Subject: svn commit: r272488 - in head: . cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/uctf cddl/contrib/opensolaris/lib/libdtrace/common cddl/lib/libdtrace lib/libproc lib/libproc/tests lib/librtld_db > Author: markj > Date: Fri Oct 3 23:20:37 2014 > New Revision: 272488 > URL: https://svnweb.freebsd.org/changeset/base/272488 > > Log: > Hook up support for userland CTF support in DTrace. This required some > modifications to libproc to support fetching the CTF info for a given file. > > With this change, dtrace(1) is able to resolve type info for function and > USDT probe arguments, and function return values. In particular, the args[n] > syntax should now work for referencing arguments of userland probes, > provided that the requisite CTF info is available. > > The uctf tests pass if the test programs are compiled with CTF info. The > current infrastructure around the DTrace test suite doesn't support this > yet. > > Differential Revision: https://reviews.freebsd.org/D891 > MFC after: 1 month > Relnotes: yes > Sponsored by: EMC / Isilon Storage Division > > Modified: > head/ObsoleteFiles.inc > head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/uctf/tst.userlandkey.ksh > head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_pid.c > head/cddl/lib/libdtrace/libproc_compat.h > head/lib/libproc/Makefile > head/lib/libproc/libproc.h > head/lib/libproc/proc_sym.c > head/lib/libproc/tests/proc_test.c > head/lib/librtld_db/rtld_db.c > > Modified: head/ObsoleteFiles.inc > ============================================================================== > --- head/ObsoleteFiles.inc Fri Oct 3 21:46:07 2014 (r272487) > +++ head/ObsoleteFiles.inc Fri Oct 3 23:20:37 2014 (r272488) > @@ -1496,6 +1496,7 @@ OLD_LIBS+=usr/lib/libpanel.so.4 > OLD_LIBS+=usr/lib/libpanelw.so.4 > OLD_LIBS+=usr/lib/libpmc.so.4 > OLD_LIBS+=usr/lib/libproc.so.1 > +OLD_LIBS+=usr/lib/libproc.so.2 > OLD_LIBS+=usr/lib/libradius.so.3 > OLD_LIBS+=usr/lib/librpcsvc.so.4 > OLD_LIBS+=usr/lib/libsdp.so.3 > > Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/uctf/tst.userlandkey.ksh > ============================================================================== > --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/uctf/tst.userlandkey.ksh Fri Oct 3 21:46:07 2014 (r272487) > +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/uctf/tst.userlandkey.ksh Fri Oct 3 23:20:37 2014 (r272488) > @@ -38,7 +38,7 @@ fi > ./$exe & > pid=$! > > -$dtrace -32 -qs /dev/stdin < +$dtrace -qs /dev/stdin < typedef struct info { > char *zi_gamename; > int zi_ndungeons; > > Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_pid.c > ============================================================================== > --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_pid.c Fri Oct 3 21:46:07 2014 (r272487) > +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_pid.c Fri Oct 3 23:20:37 2014 (r272488) > @@ -434,15 +434,10 @@ static const prmap_t * > dt_pid_fix_mod(dtrace_probedesc_t *pdp, struct ps_prochandle *P) > { > char m[MAXPATHLEN]; > -#if defined(sun) > Lmid_t lmid = PR_LMID_EVERY; > -#else > - Lmid_t lmid = 0; > -#endif > const char *obj; > const prmap_t *pmp; > > -#if defined(sun) > /* > * Pick apart the link map from the library name. > */ > @@ -463,20 +458,17 @@ dt_pid_fix_mod(dtrace_probedesc_t *pdp, > } else { > obj = pdp->dtpd_mod; > } > -#else > - obj = pdp->dtpd_mod; > -#endif > > if ((pmp = Plmid_to_map(P, lmid, obj)) == NULL) > return (NULL); > > -#if defined(sun) > (void) Pobjname(P, pmp->pr_vaddr, m, sizeof (m)); > if ((obj = strrchr(m, '/')) == NULL) > obj = &m[0]; > else > obj++; > > +#if defined(sun) > (void) Plmid(P, pmp->pr_vaddr, &lmid); > #endif > > @@ -571,9 +563,7 @@ dt_pid_usdt_mapping(void *data, const pr > { > struct ps_prochandle *P = data; > GElf_Sym sym; > -#if defined(sun) > prsyminfo_t sip; > -#endif > dof_helper_t dh; > GElf_Half e_type; > const char *mname; > @@ -852,11 +842,7 @@ dt_pid_get_types(dtrace_hdl_t *dtp, cons > ctf_funcinfo_t f; > ctf_id_t argv[32]; > GElf_Sym sym; > -#if defined(sun) > prsyminfo_t si; > -#else > - void *si; > -#endif > struct ps_prochandle *p; > int i, args; > char buf[DTRACE_ARGTYPELEN]; > @@ -941,13 +927,11 @@ dt_pid_get_types(dtrace_hdl_t *dtp, cons > pdp->dtpd_func, pdp->dtpd_provider, pdp->dtpd_mod); > goto out; > } > -#if defined(sun) > if (ctf_func_info(fp, si.prs_id, &f) == CTF_ERR) { > dt_dprintf("failed to get ctf information for %s in %s`%s\n", > pdp->dtpd_func, pdp->dtpd_provider, pdp->dtpd_mod); > goto out; > } > -#endif > > (void) snprintf(buf, sizeof (buf), "%s`%s", pdp->dtpd_provider, > pdp->dtpd_mod); > @@ -977,7 +961,6 @@ dt_pid_get_types(dtrace_hdl_t *dtp, cons > (void) ctf_type_qname(fp, f.ctc_return, adp->dtargd_native + > ret, DTRACE_ARGTYPELEN - ret, buf); > *nargs = 2; > -#if defined(sun) > } else { > if (ctf_func_args(fp, si.prs_id, argc, argv) == CTF_ERR) > goto out; > @@ -993,7 +976,6 @@ dt_pid_get_types(dtrace_hdl_t *dtp, cons > (void) ctf_type_qname(fp, argv[i], adp->dtargd_native + > ret, DTRACE_ARGTYPELEN - ret, buf); > } > -#endif > } > out: > dt_proc_unlock(dtp, p); > > Modified: head/cddl/lib/libdtrace/libproc_compat.h > ============================================================================== > --- head/cddl/lib/libdtrace/libproc_compat.h Fri Oct 3 21:46:07 2014 (r272487) > +++ head/cddl/lib/libdtrace/libproc_compat.h Fri Oct 3 23:20:37 2014 (r272488) > @@ -38,7 +38,7 @@ > #define Pxlookup_by_addr(p, a, n, s, sym, i) \ > proc_addr2sym(p, a, n, s, sym) > #define Pxlookup_by_name(p, l, s1, s2, sym, a) \ > - proc_name2sym((p), (s1), (s2), (sym)) > + proc_name2sym(p, s1, s2, sym, a) > #define Paddr_to_map proc_addr2map > #define Pcreate_error strerror > #define Pdelbkpt proc_bkptdel > @@ -46,10 +46,10 @@ > #define Plmid(p, a, l) (-1) > #define Plmid_to_map(p, l, o) proc_obj2map((p), (o)) > #define Plookup_by_addr proc_addr2sym > -#define Pname_to_ctf(p, obj) NULL > +#define Pname_to_ctf(p, obj) (ctf_file_t *)proc_name2ctf(p, obj) > #define Pname_to_map proc_name2map > #define Pobject_iter proc_iter_objs > -#define Pobject_iter_resolved(p, f, arg) 1 > +#define Pobject_iter_resolved(p, f, arg) proc_iter_objs(p, f, arg) > #define Pobjname proc_objname > #define Pread proc_read > #define Prd_agent proc_rdagent > > Modified: head/lib/libproc/Makefile > ============================================================================== > --- head/lib/libproc/Makefile Fri Oct 3 21:46:07 2014 (r272487) > +++ head/lib/libproc/Makefile Fri Oct 3 23:20:37 2014 (r272488) > @@ -25,7 +25,18 @@ LDADD+= -lsupc++ > DPADD+= ${LIBSTDCPLUSPLUS} > .endif > > -SHLIB_MAJOR= 2 > +.if ${MK_CDDL} != "no" > +LDADD+= -lctf > +DPADD+= ${LIBCTF} > +IGNORE_PRAGMA= YES > +CFLAGS+= -I${.CURDIR}/../../cddl/contrib/opensolaris/lib/libctf/common \ > + -I${.CURDIR}/../../sys/cddl/contrib/opensolaris/uts/common \ > + -I${.CURDIR}/../../sys/cddl/compat/opensolaris > +.else > +CFLAGS+= -DNO_CTF > +.endif > + > +SHLIB_MAJOR= 3 > > MAN= > > > Modified: head/lib/libproc/libproc.h > ============================================================================== > --- head/lib/libproc/libproc.h Fri Oct 3 21:46:07 2014 (r272487) > +++ head/lib/libproc/libproc.h Fri Oct 3 23:20:37 2014 (r272488) > @@ -37,6 +37,7 @@ > #include > #include > > +struct ctf_file; > struct proc_handle; > > typedef void (*proc_child_func)(void *); > @@ -67,6 +68,11 @@ typedef struct prmap { > #define MA_NOCOREDUMP 0x20 > } prmap_t; > > +typedef struct prsyminfo { > + u_int prs_lmid; /* Map id. */ > + u_int prs_id; /* Symbol id. */ > +} prsyminfo_t; > + > typedef int proc_map_f(void *, const prmap_t *, const char *); > typedef int proc_sym_f(void *, const GElf_Sym *, const char *); > > @@ -125,7 +131,9 @@ int proc_create(const char *, char * con > struct proc_handle **); > int proc_detach(struct proc_handle *, int); > int proc_getflags(struct proc_handle *); > -int proc_name2sym(struct proc_handle *, const char *, const char *, GElf_Sym *); > +int proc_name2sym(struct proc_handle *, const char *, const char *, > + GElf_Sym *, prsyminfo_t *); > +struct ctf_file *proc_name2ctf(struct proc_handle *, const char *); > int proc_setflags(struct proc_handle *, int); > int proc_state(struct proc_handle *); > pid_t proc_getpid(struct proc_handle *); > @@ -133,8 +141,7 @@ int proc_wstatus(struct proc_handle *); > int proc_getwstat(struct proc_handle *); > char * proc_signame(int, char *, size_t); > int proc_read(struct proc_handle *, void *, size_t, size_t); > -const lwpstatus_t * > - proc_getlwpstatus(struct proc_handle *); > +const lwpstatus_t *proc_getlwpstatus(struct proc_handle *); > void proc_free(struct proc_handle *); > rd_agent_t *proc_rdagent(struct proc_handle *); > void proc_updatesyms(struct proc_handle *); > > Modified: head/lib/libproc/proc_sym.c > ============================================================================== > --- head/lib/libproc/proc_sym.c Fri Oct 3 21:46:07 2014 (r272487) > +++ head/lib/libproc/proc_sym.c Fri Oct 3 23:20:37 2014 (r272488) > @@ -32,6 +32,10 @@ > __FBSDID("$FreeBSD$"); > > #include > +#ifndef NO_CTF > +#include > +#include > +#endif > #include > > #include > @@ -42,10 +46,17 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#ifndef NO_CTF > +#include > +#endif > #include > > #include "_libproc.h" > > +#ifdef NO_CTF > +typedef struct ctf_file ctf_file_t; > +#endif > + > #ifndef NO_CXA_DEMANGLE > extern char *__cxa_demangle(const char *, char *, size_t *, int *); > #endif /* NO_CXA_DEMANGLE */ > @@ -389,7 +400,7 @@ proc_name2map(struct proc_handle *p, con > */ > static int > lookup_name(Elf *e, Elf_Scn *scn, u_long stridx, const char *symbol, > - GElf_Sym *symcopy) > + GElf_Sym *symcopy, prsyminfo_t *si) > { > GElf_Sym sym; > Elf_Data *data; > @@ -404,6 +415,8 @@ lookup_name(Elf *e, Elf_Scn *scn, u_long > s = elf_strptr(e, stridx, sym.st_name); > if (s != NULL && strcmp(s, symbol) == 0) { > memcpy(symcopy, &sym, sizeof(*symcopy)); > + if (si != NULL) > + si->prs_id = i; > return (0); > } > } > @@ -412,7 +425,7 @@ lookup_name(Elf *e, Elf_Scn *scn, u_long > > int > proc_name2sym(struct proc_handle *p, const char *object, const char *symbol, > - GElf_Sym *symcopy) > + GElf_Sym *symcopy, prsyminfo_t *si) > { > Elf *e; > Elf_Scn *scn, *dynsymscn = NULL, *symtabscn = NULL; > @@ -462,11 +475,11 @@ proc_name2sym(struct proc_handle *p, con > * First look up the symbol in the dynsymtab, and fall back to the > * symtab if the lookup fails. > */ > - error = lookup_name(e, dynsymscn, dynsymstridx, symbol, symcopy); > + error = lookup_name(e, dynsymscn, dynsymstridx, symbol, symcopy, si); > if (error == 0) > goto out; > > - error = lookup_name(e, symtabscn, symtabstridx, symbol, symcopy); > + error = lookup_name(e, symtabscn, symtabstridx, symbol, symcopy, si); > if (error == 0) > goto out; > > @@ -484,6 +497,26 @@ err0: > return (error); > } > > +ctf_file_t * > +proc_name2ctf(struct proc_handle *p, const char *name) > +{ > +#ifndef NO_CTF > + prmap_t *map; > + int error; > + > + if ((map = proc_name2map(p, name)) == NULL) { > + DPRINTFX("ERROR: couldn't find object %s", object); > + return (NULL); > + } > + > + return (ctf_open(map->pr_mapname, &error)); > +#else > + (void)p; > + (void)name; > + return (NULL); > +#endif > +} > + > int > proc_iter_symbyaddr(struct proc_handle *p, const char *object, int which, > int mask, proc_sym_f *func, void *cd) > > Modified: head/lib/libproc/tests/proc_test.c > ============================================================================== > --- head/lib/libproc/tests/proc_test.c Fri Oct 3 21:46:07 2014 (r272487) > +++ head/lib/libproc/tests/proc_test.c Fri Oct 3 23:20:37 2014 (r272488) > @@ -227,6 +227,7 @@ ATF_TC_HEAD(map_alias_name2sym, tc) > ATF_TC_BODY(map_alias_name2sym, tc) > { > GElf_Sym sym1, sym2; > + prsyminfo_t si1, si2; > struct proc_handle *phdl; > int error; > > @@ -239,14 +240,15 @@ ATF_TC_BODY(map_alias_name2sym, tc) > * Make sure that "target_prog:main" and "a.out:main" return the same > * symbol. > */ > - error = proc_name2sym(phdl, target_prog_file, "main", &sym1); > + error = proc_name2sym(phdl, target_prog_file, "main", &sym1, &si1); > ATF_REQUIRE_EQ_MSG(error, 0, "failed to look up 'main' via %s", > target_prog_file); > - error = proc_name2sym(phdl, aout_object, "main", &sym2); > + error = proc_name2sym(phdl, aout_object, "main", &sym2, &si2); > ATF_REQUIRE_EQ_MSG(error, 0, "failed to look up 'main' via %s", > aout_object); > > ATF_CHECK_EQ(memcmp(&sym1, &sym2, sizeof(sym1)), 0); > + ATF_CHECK_EQ(si1.prs_id, si2.prs_id); > > ATF_CHECK_EQ_MSG(proc_continue(phdl), 0, "failed to resume execution"); > > @@ -271,11 +273,11 @@ ATF_TC_BODY(symbol_lookup, tc) > > phdl = start_prog(tc, false); > > - error = proc_name2sym(phdl, target_prog_file, "main", &main_sym); > + error = proc_name2sym(phdl, target_prog_file, "main", &main_sym, NULL); > ATF_REQUIRE_EQ_MSG(error, 0, "failed to look up 'main'"); > > error = proc_name2sym(phdl, ldelf_object, "r_debug_state", > - &r_debug_state_sym); > + &r_debug_state_sym, NULL); > ATF_REQUIRE_EQ_MSG(error, 0, "failed to look up 'r_debug_state'"); > > set_bkpt(phdl, r_debug_state_sym.st_value, &saved); > > Modified: head/lib/librtld_db/rtld_db.c > ============================================================================== > --- head/lib/librtld_db/rtld_db.c Fri Oct 3 21:46:07 2014 (r272487) > +++ head/lib/librtld_db/rtld_db.c Fri Oct 3 23:20:37 2014 (r272488) > @@ -237,14 +237,14 @@ rd_reset(rd_agent_t *rdap) > GElf_Sym sym; > > if (proc_name2sym(rdap->rda_php, "ld-elf.so.1", "r_debug_state", > - &sym) < 0) > + &sym, NULL) < 0) > return (RD_ERR); > DPRINTF("found r_debug_state at 0x%lx\n", (unsigned long)sym.st_value); > rdap->rda_preinit_addr = sym.st_value; > rdap->rda_dlactivity_addr = sym.st_value; > > if (proc_name2sym(rdap->rda_php, "ld-elf.so.1", "_r_debug_postinit", > - &sym) < 0) > + &sym, NULL) < 0) > return (RD_ERR); > DPRINTF("found _r_debug_postinit at 0x%lx\n", > (unsigned long)sym.st_value); > > From owner-svn-src-all@FreeBSD.ORG Sat Oct 4 02:34:31 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AC0208F4; Sat, 4 Oct 2014 02:34:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 98976E39; Sat, 4 Oct 2014 02:34:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s942YVxb044246; Sat, 4 Oct 2014 02:34:31 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s942YVR1044244; Sat, 4 Oct 2014 02:34:31 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201410040234.s942YVR1044244@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 4 Oct 2014 02:34:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272489 - head/lib/libproc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 02:34:31 -0000 Author: markj Date: Sat Oct 4 02:34:30 2014 New Revision: 272489 URL: https://svnweb.freebsd.org/changeset/base/272489 Log: Remove an incorrect and useless debug print. X-MFC-With: r272488 Modified: head/lib/libproc/proc_sym.c Modified: head/lib/libproc/proc_sym.c ============================================================================== --- head/lib/libproc/proc_sym.c Fri Oct 3 23:20:37 2014 (r272488) +++ head/lib/libproc/proc_sym.c Sat Oct 4 02:34:30 2014 (r272489) @@ -504,10 +504,8 @@ proc_name2ctf(struct proc_handle *p, con prmap_t *map; int error; - if ((map = proc_name2map(p, name)) == NULL) { - DPRINTFX("ERROR: couldn't find object %s", object); + if ((map = proc_name2map(p, name)) == NULL) return (NULL); - } return (ctf_open(map->pr_mapname, &error)); #else From owner-svn-src-all@FreeBSD.ORG Sat Oct 4 03:11:10 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 475E9F47; Sat, 4 Oct 2014 03:11:10 +0000 (UTC) Received: from mail-pa0-x22c.google.com (mail-pa0-x22c.google.com [IPv6:2607:f8b0:400e:c03::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F032528C; Sat, 4 Oct 2014 03:11:09 +0000 (UTC) Received: by mail-pa0-f44.google.com with SMTP id et14so2427844pad.31 for ; Fri, 03 Oct 2014 20:11:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=qnDAyq3iNCuTH8OIX8dkSJI6pQYsK2kAgyM+EpB+Lw0=; b=CeyEY9XQPKMf/pEjQUP6Yf2X3f874CQjl9rypWW02uWGzOV7JMPsjzBo8lAoS7pD/8 xKA4IZYdDoAmp6Edq7l4T5Xm5z3l8gSQU70oBwQODzmRIQmtzJyqd4t0omuk73tkvaCY 0PqErtlNi7VZ9dmXO54UEpoBOK8J4fxEgJ622wPwCaeTzyIYBUBvw1EH/EErZq8YCOMI brgEYIXiZxJ/9JFIkXB6TkxqBGUsU0HXNyt6vWM5/y8hxxmuMV9nbcaDTIBCqR64gb9M q5VdInUfxSmKVK3SkIMVhCqcF1597D4NYlogk+kHpWxZWR62k4/ztvkbr9ptwkWJx0H/ 7emg== X-Received: by 10.66.219.6 with SMTP id pk6mr10827030pac.35.1412392269331; Fri, 03 Oct 2014 20:11:09 -0700 (PDT) Received: from ?IPv6:2601:8:ab80:7d6:44b4:d70:65e5:35a5? ([2601:8:ab80:7d6:44b4:d70:65e5:35a5]) by mx.google.com with ESMTPSA id t11sm5258287pdj.89.2014.10.03.20.11.08 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 03 Oct 2014 20:11:08 -0700 (PDT) Content-Type: multipart/signed; boundary="Apple-Mail=_7CDEB9E0-CF06-451B-971D-D7DC20EFC349"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r272372 - stable/10/bin/rm From: Garrett Cooper In-Reply-To: <20141003084842.T998@besplex.bde.org> Date: Fri, 3 Oct 2014 20:11:02 -0700 Message-Id: References: <201410011618.s91GIfR5071251@svn.freebsd.org> <20141002141656.Y1807@besplex.bde.org> <20141002061628.GO1275@hub.FreeBSD.org> <201410021713.57943.jhb@freebsd.org> <20141003084842.T998@besplex.bde.org> To: Bruce Evans X-Mailer: Apple Mail (2.1878.6) Cc: src-committers@freebsd.org, svn-src-stable-10@freebsd.org, John Baldwin , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, Glen Barber X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 03:11:10 -0000 --Apple-Mail=_7CDEB9E0-CF06-451B-971D-D7DC20EFC349 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On Oct 2, 2014, at 16:34, Bruce Evans wrote: > There is still the larger problem with fts_read(). Applications like = rm > are specified to do a complete tree walk, with special handling for = files > that do not exist. If fts_read() is going to abort in the middle of a > tree walk, then it is unusable for implementing applications like rm. +1. In this case I was doing a du -sh /* while I was running rm -Rf /rel = (an old make release directory tree). This stopped the du -sh: $ sudo du -sh /* = = =20 8.0K /COPYRIGHT 996K /bin 218M /boot 0B /boot.config 2.5K /dev 4.0K /entropy 2.2M /etc 1.0G /home 16M /lib 280K /libexec 4.0K /media 4.0K /mnt 4.0K /proc du: /rel/usr/ports/net/samba36: No such file or directory du: /rel/usr/ports/net/aslookup: No such file or directory du: /rel/usr/ports/net/p5-Net-Amazon-AWSSign: No such file or directory du: /rel/usr/ports/net/p5-Net-Server-SS-PreFork: No such file or = directory du: /rel/usr/ports/net/lla: No such file or directory du: /rel/usr/ports/net/sslh: No such file or directory du: /rel/usr/ports/net/wmlj: No such file or directory du: /rel/usr/ports/net/sendsms: No such file or directory du: /rel/usr/ports/net/uriparser: No such file or directory du: /rel/usr/ports/net/p5-Data-IPV4-Range-Parse: No such file or = directory du: /rel/usr/ports/net/cagibi: No such file or directory du: /rel/usr/ports/net/fsplib: No such file or directory du: fts_read: No such file or directory The problem with changing fts_read to ignore ENOENT or other = errors will break compatibility with Linux [and other OSes potentially], = and is not the correct solution for this issue. I do however think that = the errnos to ignore with -f should be... - EACCES - ENOENT - EPERM =85 as filtering out these errors would handle the case that -f = should handle according to the manpage: -f Attempt to remove the files without prompting for = confirmation, regardless of the file's permissions. If the file does not exist, do not display a diagnostic message or modify the = exit status to reflect an error. The -f option overrides any = previous -i options. Thanks, -Garrett --Apple-Mail=_7CDEB9E0-CF06-451B-971D-D7DC20EFC349 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----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJUL2VGAAoJEMZr5QU6S73ejPIH/1OaP9BHeJlVIwCwtzE9od2u yOMa8KH/4gzsYRQ15puBrZ2CDBIuwFbLmuAp1aaoiSCTf+EUqDCG4RT1+LcQ/d3D E+XHCqQ6RrgVuxyRohYcfFQk0bhvrc8sRkQaKBzRHCqk8TCHPoJydi9Ix7Ir2lem tPQOyq9fdUQlzN6dFdBMUAQCrwC0sN8Ozk0qxDeQnlMgD/w/paOemmQ3Bx4Yw7Pv 17C6ZsdccUtDwLB7yXtKLd7WMeJYUEtoqZKI4AEIIzBqyJdek0EBBxELoSFsL/bG 8RPvxEV4Pwi+CM/ItVjxnugwSMF/6s1vI89enoBJJgcUyEf1MXo1K2SylBQaoGU= =5ft1 -----END PGP SIGNATURE----- --Apple-Mail=_7CDEB9E0-CF06-451B-971D-D7DC20EFC349-- From owner-svn-src-all@FreeBSD.ORG Sat Oct 4 04:09:05 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 988954F2; Sat, 4 Oct 2014 04:09:05 +0000 (UTC) Received: from mho-01-ewr.mailhop.org (mho-03-ewr.mailhop.org [204.13.248.66]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 683708E5; Sat, 4 Oct 2014 04:09:04 +0000 (UTC) Received: from [73.34.117.227] (helo=ilsoft.org) by mho-01-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1XaGeP-000KRl-NJ; Sat, 04 Oct 2014 04:08:57 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id s9448uMD022630; Fri, 3 Oct 2014 22:08:56 -0600 (MDT) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1/UUThfTFteRu4pWOmYWTkC X-Authentication-Warning: paranoia.hippie.lan: Host revolution.hippie.lan [172.22.42.240] claimed to be [172.22.42.240] Subject: Re: svn commit: r272372 - stable/10/bin/rm From: Ian Lepore To: NGie Cooper In-Reply-To: References: <201410011618.s91GIfR5071251@svn.freebsd.org> <20141002141656.Y1807@besplex.bde.org> <20141002061628.GO1275@hub.FreeBSD.org> Content-Type: text/plain; charset="us-ascii" Date: Fri, 03 Oct 2014 22:08:55 -0600 Message-ID: <1412395735.12052.104.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: "src-committers@freebsd.org" , svn-src-stable-10@freebsd.org, svn-src-stable@freebsd.org, "svn-src-all@freebsd.org" , Glen Barber , Bruce Evans X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 04:09:05 -0000 On Wed, 2014-10-01 at 23:25 -0700, NGie Cooper wrote: > On Wed, Oct 1, 2014 at 11:16 PM, Glen Barber wrote: > > On Thu, Oct 02, 2014 at 02:56:05PM +1000, Bruce Evans wrote: > >> On Wed, 1 Oct 2014, Glen Barber wrote: > >> > >> >Log: > >> > MFC r268376 (imp): > >> > > >> > rm -rf can fail sometimes with an error from fts_read. Make it > >> > honor fflag to ignore fts_read errors, but stop deleting from > >> > that directory because no further progress can be made. > >> > >> I asked for this to be backed out in -current. It is not suitable for MFC. > >> > > > > It fixes an immediate issue that prevents high-concurrent make(1) jobs > > from stomping over each other. > > The real problem is noted in this bug: > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192490 ; the > SUBDIR_PARALLEL logic is executing multiple instances of the > clean/cleandir .PHONY targets. > > I agree with bde@ that this commit is papering over a bigger problem, > but it's annoying enough and causes enough false positives that I > understand why gjb@ MFCed the commit imp@ did in head. > > Thank you.. > I agree that the change to rm only papers over the real problem. I think bug 192490 should be re-opened so that we can address the actual build system problem, but I don't know if that's allowed for in the new bugzilla workflows, or if we need to open a new report now. I've been digging into the actual build system problem this evening, and I'm starting to think that all the reported failures that contain enough of the log to be useful show that the build failed in a directory that has subdirectories. That is, one of the failures appeared to be caused by rm -rf running concurrently in usr.bin/lex and usr.bin/lex/lib. Another failure involves modules/aic7xxx and modules/aic7xxx/ahc. In another log it appeared that ata/atapci/chipsets was being deleted simulataneously with ata/atapci/chipsets/ataacard and several other subdirs under chipsets/. If this is indeed the cause of the problem I'm too tired right now to think of a fix, but I at least wanted to get what I found in writing before I sleep and completely forget it. :) BTW, I didn't see any evidence that the exact same path was being multiply deleted at the same time. That is, no duplicated entries in SUBDIR lists or accidentally processing the entire sys/modules hiearchy twice in parallel somehow through two different parent paths or anything like that. -- Ian From owner-svn-src-all@FreeBSD.ORG Sat Oct 4 05:01:58 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8451CA89; Sat, 4 Oct 2014 05:01:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 70E5CE59; Sat, 4 Oct 2014 05:01:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9451wvO014440; Sat, 4 Oct 2014 05:01:58 GMT (envelope-from nyan@FreeBSD.org) Received: (from nyan@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9451wJF014439; Sat, 4 Oct 2014 05:01:58 GMT (envelope-from nyan@FreeBSD.org) Message-Id: <201410040501.s9451wJF014439@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nyan set sender to nyan@FreeBSD.org using -f From: Takahashi Yoshihiro Date: Sat, 4 Oct 2014 05:01:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272490 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 05:01:58 -0000 Author: nyan Date: Sat Oct 4 05:01:57 2014 New Revision: 272490 URL: https://svnweb.freebsd.org/changeset/base/272490 Log: - MFi386: Add compile-with option for tau32-ddk.c. - Whitespace change. - Remove duplicate line. Modified: head/sys/conf/files.pc98 Modified: head/sys/conf/files.pc98 ============================================================================== --- head/sys/conf/files.pc98 Sat Oct 4 02:34:30 2014 (r272489) +++ head/sys/conf/files.pc98 Sat Oct 4 05:01:57 2014 (r272490) @@ -89,7 +89,8 @@ dev/agp/agp_via.c optional agp dev/aic/aic_cbus.c optional aic isa dev/ce/ceddk.c optional ce dev/ce/if_ce.c optional ce -dev/ce/tau32-ddk.c optional ce +dev/ce/tau32-ddk.c optional ce \ + compile-with "${NORMAL_C} ${NO_WCONSTANT_CONVERSION}" dev/cp/cpddk.c optional cp dev/cp/if_cp.c optional cp dev/ct/bshw_machdep.c optional ct @@ -241,7 +242,7 @@ pc98/pc98/pc98_machdep.c standard # # x86 shared code between IA32, AMD64 and PC98 architectures # -x86/isa/atpic.c optional atpic +x86/isa/atpic.c optional atpic x86/isa/clock.c standard x86/isa/isa.c optional isa x86/pci/pci_bus.c optional pci @@ -259,5 +260,4 @@ x86/x86/mptable_pci.c optional apic pci x86/x86/msi.c optional apic pci x86/x86/nexus.c standard x86/x86/tsc.c standard -x86/x86/tsc.c standard x86/x86/delay.c standard From owner-svn-src-all@FreeBSD.ORG Sat Oct 4 05:03:40 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8621CC63; Sat, 4 Oct 2014 05:03:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 73230E6F; Sat, 4 Oct 2014 05:03:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9453eCR014676; Sat, 4 Oct 2014 05:03:40 GMT (envelope-from nyan@FreeBSD.org) Received: (from nyan@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9453ewp014675; Sat, 4 Oct 2014 05:03:40 GMT (envelope-from nyan@FreeBSD.org) Message-Id: <201410040503.s9453ewp014675@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nyan set sender to nyan@FreeBSD.org using -f From: Takahashi Yoshihiro Date: Sat, 4 Oct 2014 05:03:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272491 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 05:03:40 -0000 Author: nyan Date: Sat Oct 4 05:03:39 2014 New Revision: 272491 URL: https://svnweb.freebsd.org/changeset/base/272491 Log: Reduce diffs against i386. Modified: head/sys/conf/options.pc98 Modified: head/sys/conf/options.pc98 ============================================================================== --- head/sys/conf/options.pc98 Sat Oct 4 05:01:57 2014 (r272490) +++ head/sys/conf/options.pc98 Sat Oct 4 05:03:39 2014 (r272491) @@ -31,12 +31,6 @@ KVA_PAGES opt_global.h TIMER_FREQ opt_clock.h -# options for serial support -COM_ESP opt_sio.h -COM_MULTIPORT opt_sio.h -CONSPEED opt_sio.h -GDBSPEED opt_sio.h - CPU_BLUELIGHTNING_3X opt_cpu.h CPU_BLUELIGHTNING_FPU_OP_CACHE opt_cpu.h CPU_BTB_EN opt_cpu.h @@ -67,8 +61,17 @@ I486_CPU opt_global.h I586_CPU opt_global.h I686_CPU opt_global.h +# options for serial support +COM_ESP opt_sio.h +COM_MULTIPORT opt_sio.h +CONSPEED opt_sio.h +GDBSPEED opt_sio.h + GDC +# AGP debugging support +AGP_DEBUG opt_agp.h + # Video spigot SPIGOT_UNSECURE opt_spigot.h @@ -96,7 +99,6 @@ DEV_NPX opt_npx.h # Debugging NPX_DEBUG opt_npx.h -AGP_DEBUG opt_agp.h # BPF just-in-time compiler BPF_JITTER opt_bpf.h From owner-svn-src-all@FreeBSD.ORG Sat Oct 4 05:50:06 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0735F542; Sat, 4 Oct 2014 05:50:06 +0000 (UTC) Received: from mail104.syd.optusnet.com.au (mail104.syd.optusnet.com.au [211.29.132.246]) by mx1.freebsd.org (Postfix) with ESMTP id 8ABA8308; Sat, 4 Oct 2014 05:50:05 +0000 (UTC) Received: from c122-106-147-133.carlnfd1.nsw.optusnet.com.au (c122-106-147-133.carlnfd1.nsw.optusnet.com.au [122.106.147.133]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id 8AC844228DF; Sat, 4 Oct 2014 15:49:57 +1000 (EST) Date: Sat, 4 Oct 2014 15:49:56 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Garrett Cooper Subject: Re: svn commit: r272372 - stable/10/bin/rm In-Reply-To: Message-ID: <20141004145802.M1399@besplex.bde.org> References: <201410011618.s91GIfR5071251@svn.freebsd.org> <20141002141656.Y1807@besplex.bde.org> <20141002061628.GO1275@hub.FreeBSD.org> <201410021713.57943.jhb@freebsd.org> <20141003084842.T998@besplex.bde.org> MIME-Version: 1.0 X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=fvDlOjIf c=1 sm=1 tr=0 a=7NqvjVvQucbO2RlWB8PEog==:117 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=nlC_4_pT8q9DhB4Ho9EA:9 a=cz2ZRIgtxKwA:10 a=wJWlkF7cXJYA:10 a=RB0AxxmXJQVUJ4zGl94A:9 a=45ClL6m2LaAA:10 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: src-committers@freebsd.org, svn-src-stable-10@freebsd.org, John Baldwin , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, Glen Barber , Bruce Evans X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 05:50:06 -0000 On Fri, 3 Oct 2014, Garrett Cooper wrote: > On Oct 2, 2014, at 16:34, Bruce Evans wrote: > >> There is still the larger problem with fts_read(). Applications like rm >> are specified to do a complete tree walk, with special handling for file= s >> that do not exist. If fts_read() is going to abort in the middle of a >> tree walk, then it is unusable for implementing applications like rm. > > +1. In this case I was doing a du -sh /* while I was running rm -Rf /rel = (an old make release directory tree). This stopped the du -sh: > > $ sudo du -sh /* > 8.0K /COPYRIGHT > 996K /bin > ... > du: /rel/usr/ports/net/fsplib: No such file or directory > du: fts_read: No such file or directory It is fine garbage collection to delete itself, but that should be more like "du: du: No such file or directory" :-). > =09The problem with changing fts_read to ignore ENOENT or other errors wi= ll break compatibility with Linux [and other OSes potentially], and is not = the correct solution for this issue. I do however think that the errnos to = ignore with -f should be... > > - EACCES > - ENOENT > - EPERM No, the only error that can be safely ignored in most cases is ENOENT. EACCES and EPERM mean that rm has failed to remove the requested files. More errors could be ignored under a different option. > =09=85 as filtering out these errors would handle the case that -f should= handle according to the manpage: > > -f Attempt to remove the files without prompting for confirmatio= n, > regardless of the file's permissions. If the file does not > exist, do not display a diagnostic message or modify the exit > status to reflect an error. The -f option overrides any prev= ious > -i options. I didn't realize theat the man page was that broken. It doesn't even menti= on the main effect of -f -- to ignore errors for nonexistent files. This is discussed in the COMPATIBILITY section, with quite bad wording: % COMPATIBILITY % The rm utility differs from historical implementations in that the -= f % option only masks attempts to remove non-existent files instead of m= ask- % ing a large variety of errors. The -v option is non-standard and it= s use % in scripts is not recommended. "masks attempts to remove" is strange wording. rm doesn't attempt to remove nonexistent files; it attempts to remove existent files ... The code doesn't do anything like that. It is close to POSIX, and just tries to remove existent files and then ignores the ENOENT error for nonexistent files iff -f. These bugs haven't changed since FreeBSD-1 (Net/2?). They are only in the man page. The change to POSIX conformance is documented in the FreeBSD-1 version: %%% /* * rm -- *=09This rm is different from historic rm's, but is expected to match *=09POSIX 1003.2 behavior. The most visible difference is that -f *=09has two specific effects now, ignore non-existent files and force * =09file removal. */ %%% This hasn't changed, and neither has the man page which apparently documents a version before this. I think it is misleading to say "force file removal". I still tend to think of the f in rm -f being "force". That seems to have been last correct in 1988 (?) before Net/2. All f does is to force is turn off some checking and interactivity. It doesn't do things like clobbering immutable flags so that unlink() can work. Bruce From owner-svn-src-all@FreeBSD.ORG Sat Oct 4 05:59:10 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B55BE6A9; Sat, 4 Oct 2014 05:59:10 +0000 (UTC) Received: from mail107.syd.optusnet.com.au (mail107.syd.optusnet.com.au [211.29.132.53]) by mx1.freebsd.org (Postfix) with ESMTP id 70A673CD; Sat, 4 Oct 2014 05:59:09 +0000 (UTC) Received: from c122-106-147-133.carlnfd1.nsw.optusnet.com.au (c122-106-147-133.carlnfd1.nsw.optusnet.com.au [122.106.147.133]) by mail107.syd.optusnet.com.au (Postfix) with ESMTPS id CCB87D43D00; Sat, 4 Oct 2014 15:59:00 +1000 (EST) Date: Sat, 4 Oct 2014 15:58:59 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Bruce Evans Subject: Re: svn commit: r272372 - stable/10/bin/rm In-Reply-To: <20141004145802.M1399@besplex.bde.org> Message-ID: <20141004155126.W1586@besplex.bde.org> References: <201410011618.s91GIfR5071251@svn.freebsd.org> <20141002141656.Y1807@besplex.bde.org> <20141002061628.GO1275@hub.FreeBSD.org> <201410021713.57943.jhb@freebsd.org> <20141003084842.T998@besplex.bde.org> <20141004145802.M1399@besplex.bde.org> MIME-Version: 1.0 X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=BdjhjNd2 c=1 sm=1 tr=0 a=7NqvjVvQucbO2RlWB8PEog==:117 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=nlC_4_pT8q9DhB4Ho9EA:9 a=cz2ZRIgtxKwA:10 a=wJWlkF7cXJYA:10 a=MM4l8k_P8ruoUpHBXfQA:9 a=45ClL6m2LaAA:10 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: src-committers@freebsd.org, svn-src-stable-10@freebsd.org, John Baldwin , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, Glen Barber , Garrett Cooper X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 05:59:10 -0000 On Sat, 4 Oct 2014, Bruce Evans wrote: > On Fri, 3 Oct 2014, Garrett Cooper wrote: >> =09=85 as filtering out these errors would handle the case that -f shoul= d=20 >> handle according to the manpage: >>=20 >> -f Attempt to remove the files without prompting for confirmati= on, >> regardless of the file's permissions. If the file does not >> exist, do not display a diagnostic message or modify the exi= t >> status to reflect an error. The -f option overrides any=20 >> previous >> -i options. > > I didn't realize theat the man page was that broken. It doesn't even men= tion > the main effect of -f -- to ignore errors for nonexistent files. This is > discussed in the COMPATIBILITY section, with quite bad wording: Oops, I missed the second sentence in the above. > % COMPATIBILITY > % The rm utility differs from historical implementations in that the= -f > % option only masks attempts to remove non-existent files instead of= =20 > mask- > % ing a large variety of errors. The -v option is non-standard and = its=20 > use > % in scripts is not recommended. > > "masks attempts to remove" is strange wording. rm doesn't attempt to > remove nonexistent files; it attempts to remove existent files ... > > The code doesn't do anything like that. It is close to POSIX, and just > tries to remove existent files and then ignores the ENOENT error for > nonexistent files iff -f. I misread this too. There are only minor wording problems. Bruce From owner-svn-src-all@FreeBSD.ORG Sat Oct 4 06:01:31 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C8FC67EB; Sat, 4 Oct 2014 06:01:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A99AF3E0; Sat, 4 Oct 2014 06:01:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9461VNv041361; Sat, 4 Oct 2014 06:01:31 GMT (envelope-from nyan@FreeBSD.org) Received: (from nyan@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9461Vxk041359; Sat, 4 Oct 2014 06:01:31 GMT (envelope-from nyan@FreeBSD.org) Message-Id: <201410040601.s9461Vxk041359@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nyan set sender to nyan@FreeBSD.org using -f From: Takahashi Yoshihiro Date: Sat, 4 Oct 2014 06:01:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272492 - in head/sys: conf i386/i386 pc98/pc98 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 06:01:31 -0000 Author: nyan Date: Sat Oct 4 06:01:30 2014 New Revision: 272492 URL: https://svnweb.freebsd.org/changeset/base/272492 Log: Merge pc98's machdep.c into i386/i386/machdep.c. Deleted: head/sys/pc98/pc98/machdep.c Modified: head/sys/conf/files.pc98 head/sys/i386/i386/machdep.c Modified: head/sys/conf/files.pc98 ============================================================================== --- head/sys/conf/files.pc98 Sat Oct 4 05:03:39 2014 (r272491) +++ head/sys/conf/files.pc98 Sat Oct 4 06:01:30 2014 (r272492) @@ -149,6 +149,7 @@ i386/i386/initcpu.c standard i386/i386/io.c optional io i386/i386/k6_mem.c optional mem i386/i386/locore.s standard no-obj +i386/i386/machdep.c standard i386/i386/mem.c optional mem i386/i386/minidump_machdep.c standard i386/i386/mp_clock.c optional smp @@ -237,7 +238,6 @@ pc98/pc98/busiosubr.c standard pc98/pc98/canbepm.c optional canbepm pc98/pc98/canbus.c optional canbus pc98/pc98/canbus_if.m optional canbus -pc98/pc98/machdep.c standard pc98/pc98/pc98_machdep.c standard # # x86 shared code between IA32, AMD64 and PC98 architectures Modified: head/sys/i386/i386/machdep.c ============================================================================== --- head/sys/i386/i386/machdep.c Sat Oct 4 05:03:39 2014 (r272491) +++ head/sys/i386/i386/machdep.c Sat Oct 4 06:01:30 2014 (r272492) @@ -109,7 +109,11 @@ __FBSDID("$FreeBSD$"); #include #endif +#ifdef PC98 +#include +#else #include +#endif #include @@ -204,6 +208,14 @@ SYSINIT(cpu, SI_SUB_CPU, SI_ORDER_FIRST, int _udatasel, _ucodesel; u_int basemem; +#ifdef PC98 +int need_pre_dma_flush; /* If 1, use wbinvd befor DMA transfer. */ +int need_post_dma_flush; /* If 1, use invd after DMA transfer. */ + +static int ispc98 = 1; +SYSCTL_INT(_machdep, OID_AUTO, ispc98, CTLFLAG_RD, &ispc98, 0, ""); +#endif + int cold = 1; #ifdef COMPAT_43 @@ -259,7 +271,8 @@ cpu_startup(dummy) { uintmax_t memsize; char *sysenv; - + +#ifndef PC98 /* * On MacBooks, we need to disallow the legacy USB circuit to * generate an SMI# because this can cause several problems, @@ -285,6 +298,7 @@ cpu_startup(dummy) } freeenv(sysenv); } +#endif /* !PC98 */ /* * Good {morning,afternoon,evening,night}. @@ -1235,6 +1249,7 @@ SYSCTL_INT(_machdep, OID_AUTO, idle_mwai #define STATE_MWAIT 0x1 #define STATE_SLEEPING 0x2 +#ifndef PC98 static void cpu_idle_acpi(sbintime_t sbt) { @@ -1253,6 +1268,7 @@ cpu_idle_acpi(sbintime_t sbt) __asm __volatile("sti; hlt"); *state = STATE_RUNNING; } +#endif /* !PC98 */ #ifndef XEN static void @@ -1370,7 +1386,7 @@ cpu_probe_amdc1e(void) } } -#ifdef XEN +#if defined(PC98) || defined(XEN) void (*cpu_idle_fn)(sbintime_t) = cpu_idle_hlt; #else void (*cpu_idle_fn)(sbintime_t) = cpu_idle_acpi; @@ -1458,7 +1474,9 @@ struct { { cpu_idle_spin, "spin" }, { cpu_idle_mwait, "mwait" }, { cpu_idle_hlt, "hlt" }, +#ifndef PC98 { cpu_idle_acpi, "acpi" }, +#endif { NULL, NULL } }; @@ -1475,9 +1493,11 @@ idle_sysctl_available(SYSCTL_HANDLER_ARG if (strstr(idle_tbl[i].id_name, "mwait") && (cpu_feature2 & CPUID2_MON) == 0) continue; +#ifndef PC98 if (strcmp(idle_tbl[i].id_name, "acpi") == 0 && cpu_idle_hook == NULL) continue; +#endif p += sprintf(p, "%s%s", p != avail ? ", " : "", idle_tbl[i].id_name); } @@ -1512,9 +1532,11 @@ idle_sysctl(SYSCTL_HANDLER_ARGS) if (strstr(idle_tbl[i].id_name, "mwait") && (cpu_feature2 & CPUID2_MON) == 0) continue; +#ifndef PC98 if (strcmp(idle_tbl[i].id_name, "acpi") == 0 && cpu_idle_hook == NULL) continue; +#endif if (strcmp(idle_tbl[i].id_name, buf)) continue; cpu_idle_fn = idle_tbl[i].id_fn; @@ -2000,7 +2022,7 @@ sdtossd(sd, ssd) ssd->ssd_gran = sd->sd_gran; } -#ifndef XEN +#if !defined(PC98) && !defined(XEN) static int add_physmap_entry(uint64_t base, uint64_t length, vm_paddr_t *physmap, int *physmap_idxp) @@ -2107,7 +2129,9 @@ add_smap_entries(struct bios_smap *smapb if (!add_smap_entry(smap, physmap, physmap_idxp)) break; } +#endif /* !PC98 && !XEN */ +#ifndef XEN static void basemem_setup(void) { @@ -2155,7 +2179,7 @@ basemem_setup(void) for (i = basemem / 4; i < 160; i++) pte[i] = (i << PAGE_SHIFT) | PG_V | PG_RW | PG_U; } -#endif +#endif /* !XEN */ /* * Populate the (physmap) array with base/bound pairs describing the @@ -2170,6 +2194,271 @@ basemem_setup(void) * * XXX first should be vm_paddr_t. */ +#ifdef PC98 +static void +getmemsize(int first) +{ + int off, physmap_idx, pa_indx, da_indx; + u_long physmem_tunable, memtest; + vm_paddr_t physmap[PHYSMAP_SIZE]; + pt_entry_t *pte; + quad_t dcons_addr, dcons_size; + int i; + int pg_n; + u_int extmem; + u_int under16; + vm_paddr_t pa; + + bzero(physmap, sizeof(physmap)); + + /* XXX - some of EPSON machines can't use PG_N */ + pg_n = PG_N; + if (pc98_machine_type & M_EPSON_PC98) { + switch (epson_machine_id) { +#ifdef WB_CACHE + default: +#endif + case EPSON_PC486_HX: + case EPSON_PC486_HG: + case EPSON_PC486_HA: + pg_n = 0; + break; + } + } + + under16 = pc98_getmemsize(&basemem, &extmem); + basemem_setup(); + + physmap[0] = 0; + physmap[1] = basemem * 1024; + physmap_idx = 2; + physmap[physmap_idx] = 0x100000; + physmap[physmap_idx + 1] = physmap[physmap_idx] + extmem * 1024; + + /* + * Now, physmap contains a map of physical memory. + */ + +#ifdef SMP + /* make hole for AP bootstrap code */ + physmap[1] = mp_bootaddress(physmap[1]); +#endif + + /* + * Maxmem isn't the "maximum memory", it's one larger than the + * highest page of the physical address space. It should be + * called something like "Maxphyspage". We may adjust this + * based on ``hw.physmem'' and the results of the memory test. + */ + Maxmem = atop(physmap[physmap_idx + 1]); + +#ifdef MAXMEM + Maxmem = MAXMEM / 4; +#endif + + if (TUNABLE_ULONG_FETCH("hw.physmem", &physmem_tunable)) + Maxmem = atop(physmem_tunable); + + /* + * By default keep the memtest enabled. Use a general name so that + * one could eventually do more with the code than just disable it. + */ + memtest = 1; + TUNABLE_ULONG_FETCH("hw.memtest.tests", &memtest); + + if (atop(physmap[physmap_idx + 1]) != Maxmem && + (boothowto & RB_VERBOSE)) + printf("Physical memory use set to %ldK\n", Maxmem * 4); + + /* + * If Maxmem has been increased beyond what the system has detected, + * extend the last memory segment to the new limit. + */ + if (atop(physmap[physmap_idx + 1]) < Maxmem) + physmap[physmap_idx + 1] = ptoa((vm_paddr_t)Maxmem); + + /* + * We need to divide chunk if Maxmem is larger than 16MB and + * under 16MB area is not full of memory. + * (1) system area (15-16MB region) is cut off + * (2) extended memory is only over 16MB area (ex. Melco "HYPERMEMORY") + */ + if ((under16 != 16 * 1024) && (extmem > 15 * 1024)) { + /* 15M - 16M region is cut off, so need to divide chunk */ + physmap[physmap_idx + 1] = under16 * 1024; + physmap_idx += 2; + physmap[physmap_idx] = 0x1000000; + physmap[physmap_idx + 1] = physmap[2] + extmem * 1024; + } + + /* call pmap initialization to make new kernel address space */ + pmap_bootstrap(first); + + /* + * Size up each available chunk of physical memory. + */ + physmap[0] = PAGE_SIZE; /* mask off page 0 */ + pa_indx = 0; + da_indx = 1; + phys_avail[pa_indx++] = physmap[0]; + phys_avail[pa_indx] = physmap[0]; + dump_avail[da_indx] = physmap[0]; + pte = CMAP3; + + /* + * Get dcons buffer address + */ + if (getenv_quad("dcons.addr", &dcons_addr) == 0 || + getenv_quad("dcons.size", &dcons_size) == 0) + dcons_addr = 0; + + /* + * physmap is in bytes, so when converting to page boundaries, + * round up the start address and round down the end address. + */ + for (i = 0; i <= physmap_idx; i += 2) { + vm_paddr_t end; + + end = ptoa((vm_paddr_t)Maxmem); + if (physmap[i + 1] < end) + end = trunc_page(physmap[i + 1]); + for (pa = round_page(physmap[i]); pa < end; pa += PAGE_SIZE) { + int tmp, page_bad, full; + int *ptr = (int *)CADDR3; + + full = FALSE; + /* + * block out kernel memory as not available. + */ + if (pa >= KERNLOAD && pa < first) + goto do_dump_avail; + + /* + * block out dcons buffer + */ + if (dcons_addr > 0 + && pa >= trunc_page(dcons_addr) + && pa < dcons_addr + dcons_size) + goto do_dump_avail; + + page_bad = FALSE; + if (memtest == 0) + goto skip_memtest; + + /* + * map page into kernel: valid, read/write,non-cacheable + */ + *pte = pa | PG_V | PG_RW | pg_n; + invltlb(); + + tmp = *(int *)ptr; + /* + * Test for alternating 1's and 0's + */ + *(volatile int *)ptr = 0xaaaaaaaa; + if (*(volatile int *)ptr != 0xaaaaaaaa) + page_bad = TRUE; + /* + * Test for alternating 0's and 1's + */ + *(volatile int *)ptr = 0x55555555; + if (*(volatile int *)ptr != 0x55555555) + page_bad = TRUE; + /* + * Test for all 1's + */ + *(volatile int *)ptr = 0xffffffff; + if (*(volatile int *)ptr != 0xffffffff) + page_bad = TRUE; + /* + * Test for all 0's + */ + *(volatile int *)ptr = 0x0; + if (*(volatile int *)ptr != 0x0) + page_bad = TRUE; + /* + * Restore original value. + */ + *(int *)ptr = tmp; + +skip_memtest: + /* + * Adjust array of valid/good pages. + */ + if (page_bad == TRUE) + continue; + /* + * If this good page is a continuation of the + * previous set of good pages, then just increase + * the end pointer. Otherwise start a new chunk. + * Note that "end" points one higher than end, + * making the range >= start and < end. + * If we're also doing a speculative memory + * test and we at or past the end, bump up Maxmem + * so that we keep going. The first bad page + * will terminate the loop. + */ + if (phys_avail[pa_indx] == pa) { + phys_avail[pa_indx] += PAGE_SIZE; + } else { + pa_indx++; + if (pa_indx == PHYS_AVAIL_ARRAY_END) { + printf( + "Too many holes in the physical address space, giving up\n"); + pa_indx--; + full = TRUE; + goto do_dump_avail; + } + phys_avail[pa_indx++] = pa; /* start */ + phys_avail[pa_indx] = pa + PAGE_SIZE; /* end */ + } + physmem++; +do_dump_avail: + if (dump_avail[da_indx] == pa) { + dump_avail[da_indx] += PAGE_SIZE; + } else { + da_indx++; + if (da_indx == DUMP_AVAIL_ARRAY_END) { + da_indx--; + goto do_next; + } + dump_avail[da_indx++] = pa; /* start */ + dump_avail[da_indx] = pa + PAGE_SIZE; /* end */ + } +do_next: + if (full) + break; + } + } + *pte = 0; + invltlb(); + + /* + * XXX + * The last chunk must contain at least one page plus the message + * buffer to avoid complicating other code (message buffer address + * calculation, etc.). + */ + while (phys_avail[pa_indx - 1] + PAGE_SIZE + + round_page(msgbufsize) >= phys_avail[pa_indx]) { + physmem -= atop(phys_avail[pa_indx] - phys_avail[pa_indx - 1]); + phys_avail[pa_indx--] = 0; + phys_avail[pa_indx--] = 0; + } + + Maxmem = atop(phys_avail[pa_indx]); + + /* Trim off space for the message buffer. */ + phys_avail[pa_indx] -= round_page(msgbufsize); + + /* Map the message buffer. */ + for (off = 0; off < round_page(msgbufsize); off += PAGE_SIZE) + pmap_kenter((vm_offset_t)msgbufp + off, phys_avail[pa_indx] + + off); + + PT_UPDATES_FLUSH(); +} +#else /* PC98 */ static void getmemsize(int first) { @@ -2567,6 +2856,7 @@ do_next: PT_UPDATES_FLUSH(); } +#endif /* PC98 */ #ifdef XEN #define MTOPSIZE (1<<(14 + PAGE_SHIFT)) @@ -2830,6 +3120,13 @@ init386(first) */ proc_linkup0(&proc0, &thread0); +#ifdef PC98 + /* + * Initialize DMAC + */ + pc98_init_dmac(); +#endif + metadata_missing = 0; if (bootinfo.bi_modulep) { preload_metadata = (caddr_t)bootinfo.bi_modulep + KERNBASE; @@ -2993,7 +3290,9 @@ init386(first) #ifdef DEV_ISA #ifdef DEV_ATPIC +#ifndef PC98 elcr_probe(); +#endif atpic_startup(); #else /* Reset and mask the atpics and leave them shut down. */ @@ -3027,6 +3326,9 @@ init386(first) setidt(IDT_GP, &IDTVEC(prot), SDT_SYS386TGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL)); initializecpu(); /* Initialize CPU registers */ +#ifdef PC98 + initializecpucache(); +#endif /* make an initial tss so cpu can get interrupt stack on syscall! */ /* Note: -16 is so we can grow the trapframe if we came from vm86 */ @@ -3114,6 +3416,7 @@ cpu_pcpu_init(struct pcpu *pcpu, int cpu pcpu->pc_acpi_id = 0xffffffff; } +#ifndef PC98 static int smap_sysctl_handler(SYSCTL_HANDLER_ARGS) { @@ -3149,6 +3452,7 @@ smap_sysctl_handler(SYSCTL_HANDLER_ARGS) } SYSCTL_PROC(_machdep, OID_AUTO, smap, CTLTYPE_OPAQUE|CTLFLAG_RD, NULL, 0, smap_sysctl_handler, "S,bios_smap_xattr", "Raw BIOS SMAP data"); +#endif /* !PC98 */ void spinlock_enter(void) From owner-svn-src-all@FreeBSD.ORG Sat Oct 4 07:24:36 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8724D419; Sat, 4 Oct 2014 07:24:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 72D25D14; Sat, 4 Oct 2014 07:24:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s947Oa0n079328; Sat, 4 Oct 2014 07:24:36 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s947OapX079325; Sat, 4 Oct 2014 07:24:36 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201410040724.s947OapX079325@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 4 Oct 2014 07:24:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r272493 - in vendor/illumos/dist: cmd/zpool lib/libzfs/common X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 07:24:36 -0000 Author: delphij Date: Sat Oct 4 07:24:35 2014 New Revision: 272493 URL: https://svnweb.freebsd.org/changeset/base/272493 Log: 5147 zpool list -v should show individual disk capacity Reviewed by: Adam Leventhal Reviewed by: Christopher Siden Reviewed by: Matthew Ahrens Reviewed by: Richard Elling Approved by: Dan McDonald Author: George Wilson illumos/illumos-gate@7a09f97bc0d52b763c580864e78a665b15be37f8 Modified: vendor/illumos/dist/cmd/zpool/zpool_main.c vendor/illumos/dist/lib/libzfs/common/libzfs_pool.c Modified: vendor/illumos/dist/cmd/zpool/zpool_main.c ============================================================================== --- vendor/illumos/dist/cmd/zpool/zpool_main.c Sat Oct 4 06:01:30 2014 (r272492) +++ vendor/illumos/dist/cmd/zpool/zpool_main.c Sat Oct 4 07:24:35 2014 (r272493) @@ -2711,10 +2711,7 @@ print_pool(zpool_handle_t *zhp, list_cbd right_justify = B_FALSE; if (pl->pl_prop != ZPROP_INVAL) { - if (pl->pl_prop == ZPOOL_PROP_EXPANDSZ && - zpool_get_prop_int(zhp, pl->pl_prop, NULL) == 0) - propstr = "-"; - else if (zpool_get_prop(zhp, pl->pl_prop, property, + if (zpool_get_prop(zhp, pl->pl_prop, property, sizeof (property), NULL, cb->cb_literal) != 0) propstr = "-"; else @@ -2748,21 +2745,37 @@ print_pool(zpool_handle_t *zhp, list_cbd } static void -print_one_column(zpool_prop_t prop, uint64_t value, boolean_t scripted) +print_one_column(zpool_prop_t prop, uint64_t value, boolean_t scripted, + boolean_t valid) { char propval[64]; boolean_t fixed; size_t width = zprop_width(prop, &fixed, ZFS_TYPE_POOL); - - if (prop == ZPOOL_PROP_EXPANDSZ && value == 0) - (void) strlcpy(propval, "-", sizeof (propval)); - else if (prop == ZPOOL_PROP_FRAGMENTATION && value == ZFS_FRAG_INVALID) - (void) strlcpy(propval, "-", sizeof (propval)); - else if (prop == ZPOOL_PROP_FRAGMENTATION) + switch (prop) { + case ZPOOL_PROP_EXPANDSZ: + if (value == 0) + (void) strlcpy(propval, "-", sizeof (propval)); + else + zfs_nicenum(value, propval, sizeof (propval)); + break; + case ZPOOL_PROP_FRAGMENTATION: + if (value == ZFS_FRAG_INVALID) { + (void) strlcpy(propval, "-", sizeof (propval)); + } else { + (void) snprintf(propval, sizeof (propval), "%llu%%", + value); + } + break; + case ZPOOL_PROP_CAPACITY: (void) snprintf(propval, sizeof (propval), "%llu%%", value); - else + break; + default: zfs_nicenum(value, propval, sizeof (propval)); + } + + if (!valid) + (void) strlcpy(propval, "-", sizeof (propval)); if (scripted) (void) printf("\t%s", propval); @@ -2784,6 +2797,9 @@ print_list_stats(zpool_handle_t *zhp, co (uint64_t **)&vs, &c) == 0); if (name != NULL) { + boolean_t toplevel = (vs->vs_space != 0); + uint64_t cap; + if (scripted) (void) printf("\t%s", name); else if (strlen(name) + depth > cb->cb_namewidth) @@ -2792,24 +2808,26 @@ print_list_stats(zpool_handle_t *zhp, co (void) printf("%*s%s%*s", depth, "", name, (int)(cb->cb_namewidth - strlen(name) - depth), ""); - /* only toplevel vdevs have capacity stats */ - if (vs->vs_space == 0) { - if (scripted) - (void) printf("\t-\t-\t-\t-"); - else - (void) printf(" - - - -"); - } else { - print_one_column(ZPOOL_PROP_SIZE, vs->vs_space, - scripted); - print_one_column(ZPOOL_PROP_CAPACITY, vs->vs_alloc, - scripted); - print_one_column(ZPOOL_PROP_FREE, - vs->vs_space - vs->vs_alloc, scripted); - print_one_column(ZPOOL_PROP_FRAGMENTATION, - vs->vs_fragmentation, scripted); - } - print_one_column(ZPOOL_PROP_EXPANDSZ, vs->vs_esize, - scripted); + /* + * Print the properties for the individual vdevs. Some + * properties are only applicable to toplevel vdevs. The + * 'toplevel' boolean value is passed to the print_one_column() + * to indicate that the value is valid. + */ + print_one_column(ZPOOL_PROP_SIZE, vs->vs_space, scripted, + toplevel); + print_one_column(ZPOOL_PROP_ALLOCATED, vs->vs_alloc, scripted, + toplevel); + print_one_column(ZPOOL_PROP_FREE, vs->vs_space - vs->vs_alloc, + scripted, toplevel); + print_one_column(ZPOOL_PROP_EXPANDSZ, vs->vs_esize, scripted, + B_TRUE); + print_one_column(ZPOOL_PROP_FRAGMENTATION, + vs->vs_fragmentation, scripted, + (vs->vs_fragmentation != ZFS_FRAG_INVALID && toplevel)); + cap = (vs->vs_space == 0) ? 0 : + (vs->vs_alloc * 100 / vs->vs_space); + print_one_column(ZPOOL_PROP_CAPACITY, cap, scripted, toplevel); (void) printf("\n"); } @@ -2878,7 +2896,8 @@ list_callback(zpool_handle_t *zhp, void * -H Scripted mode. Don't display headers, and separate properties * by a single tab. * -o List of properties to display. Defaults to - * "name,size,allocated,free,capacity,health,altroot" + * "name,size,allocated,free,expandsize,fragmentation,capacity," + * "dedupratio,health,altroot" * -p Diplay values in parsable (exact) format. * -T Display a timestamp in date(1) or Unix format * @@ -2892,7 +2911,7 @@ zpool_do_list(int argc, char **argv) int ret; list_cbdata_t cb = { 0 }; static char default_props[] = - "name,size,allocated,free,fragmentation,expandsize,capacity," + "name,size,allocated,free,expandsize,fragmentation,capacity," "dedupratio,health,altroot"; char *props = default_props; unsigned long interval = 0, count = 0; Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_pool.c ============================================================================== --- vendor/illumos/dist/lib/libzfs/common/libzfs_pool.c Sat Oct 4 06:01:30 2014 (r272492) +++ vendor/illumos/dist/lib/libzfs/common/libzfs_pool.c Sat Oct 4 07:24:35 2014 (r272493) @@ -22,7 +22,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. - * Copyright (c) 2012, 2014 by Delphix. All rights reserved. + * Copyright (c) 2011, 2014 by Delphix. All rights reserved. * Copyright (c) 2013, Joyent, Inc. All rights reserved. */ @@ -276,7 +276,6 @@ zpool_get_prop(zpool_handle_t *zhp, zpoo case ZPOOL_PROP_FREE: case ZPOOL_PROP_FREEING: case ZPOOL_PROP_LEAKED: - case ZPOOL_PROP_EXPANDSZ: if (literal) { (void) snprintf(buf, len, "%llu", (u_longlong_t)intval); @@ -284,7 +283,16 @@ zpool_get_prop(zpool_handle_t *zhp, zpoo (void) zfs_nicenum(intval, buf, len); } break; - + case ZPOOL_PROP_EXPANDSZ: + if (intval == 0) { + (void) strlcpy(buf, "-", len); + } else if (literal) { + (void) snprintf(buf, len, "%llu", + (u_longlong_t)intval); + } else { + (void) zfs_nicenum(intval, buf, len); + } + break; case ZPOOL_PROP_CAPACITY: if (literal) { (void) snprintf(buf, len, "%llu", @@ -302,13 +310,11 @@ zpool_get_prop(zpool_handle_t *zhp, zpoo (u_longlong_t)intval); } break; - case ZPOOL_PROP_DEDUPRATIO: (void) snprintf(buf, len, "%llu.%02llux", (u_longlong_t)(intval / 100), (u_longlong_t)(intval % 100)); break; - case ZPOOL_PROP_HEALTH: verify(nvlist_lookup_nvlist(zpool_get_config(zhp, NULL), ZPOOL_CONFIG_VDEV_TREE, &nvroot) == 0); From owner-svn-src-all@FreeBSD.ORG Sat Oct 4 07:26:43 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 898A7554; Sat, 4 Oct 2014 07:26:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6AE6FD20; Sat, 4 Oct 2014 07:26:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s947QhaV079643; Sat, 4 Oct 2014 07:26:43 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s947Qg34079638; Sat, 4 Oct 2014 07:26:42 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201410040726.s947Qg34079638@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 4 Oct 2014 07:26:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r272494 - in vendor-sys/illumos/dist/uts/common/fs/zfs: . sys X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 07:26:43 -0000 Author: delphij Date: Sat Oct 4 07:26:42 2014 New Revision: 272494 URL: https://svnweb.freebsd.org/changeset/base/272494 Log: 5164 space_map_max_blksz causes panic, does not work 5165 zdb fails assertion when run on pool with recently-enabled spacemap_histogram feature Reviewed by: Christopher Siden Reviewed by: George Wilson Reviewed by: Saso Kiselkov Approved by: Dan McDonald Author: Matthew Ahrens illumos/illumos-gate@b1be2892dd07cf9a97d47ad06334cdc879196aaf Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/metaslab.c vendor-sys/illumos/dist/uts/common/fs/zfs/space_map.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/space_map.h Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/metaslab.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/metaslab.c Sat Oct 4 07:24:35 2014 (r272493) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/metaslab.c Sat Oct 4 07:26:42 2014 (r272494) @@ -65,7 +65,7 @@ int zfs_condense_pct = 200; /* * Condensing a metaslab is not guaranteed to actually reduce the amount of * space used on disk. In particular, a space map uses data in increments of - * MAX(1 << ashift, SPACE_MAP_INITIAL_BLOCKSIZE), so a metaslab might use the + * MAX(1 << ashift, space_map_blksize), so a metaslab might use the * same number of blocks after condensing. Since the goal of condensing is to * reduce the number of IOPs required to read the space map, we only want to * condense when we can be sure we will reduce the number of blocks used by the @@ -1381,10 +1381,12 @@ metaslab_fragmentation(metaslab_t *msp) uint64_t txg = spa_syncing_txg(spa); vdev_t *vd = msp->ms_group->mg_vd; - msp->ms_condense_wanted = B_TRUE; - vdev_dirty(vd, VDD_METASLAB, msp, txg + 1); - spa_dbgmsg(spa, "txg %llu, requesting force condense: " - "msp %p, vd %p", txg, msp, vd); + if (spa_writeable(spa)) { + msp->ms_condense_wanted = B_TRUE; + vdev_dirty(vd, VDD_METASLAB, msp, txg + 1); + spa_dbgmsg(spa, "txg %llu, requesting force condense: " + "msp %p, vd %p", txg, msp, vd); + } return (ZFS_FRAG_INVALID); } @@ -1828,6 +1830,15 @@ metaslab_sync(metaslab_t *msp, uint64_t mutex_enter(&msp->ms_lock); + /* + * Note: metaslab_condense() clears the space_map's histogram. + * Therefore we must verify and remove this histogram before + * condensing. + */ + metaslab_group_histogram_verify(mg); + metaslab_class_histogram_verify(mg->mg_class); + metaslab_group_histogram_remove(mg, msp); + if (msp->ms_loaded && spa_sync_pass(spa) == 1 && metaslab_should_condense(msp)) { metaslab_condense(msp, txg, tx); @@ -1836,9 +1847,6 @@ metaslab_sync(metaslab_t *msp, uint64_t space_map_write(msp->ms_sm, *freetree, SM_FREE, tx); } - metaslab_group_histogram_verify(mg); - metaslab_class_histogram_verify(mg->mg_class); - metaslab_group_histogram_remove(mg, msp); if (msp->ms_loaded) { /* * When the space map is loaded, we have an accruate Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/space_map.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/space_map.c Sat Oct 4 07:24:35 2014 (r272493) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/space_map.c Sat Oct 4 07:26:42 2014 (r272494) @@ -38,15 +38,12 @@ #include /* - * This value controls how the space map's block size is allowed to grow. - * If the value is set to the same size as SPACE_MAP_INITIAL_BLOCKSIZE then - * the space map block size will remain fixed. Setting this value to something - * greater than SPACE_MAP_INITIAL_BLOCKSIZE will allow the space map to - * increase its block size as needed. To maintain backwards compatibilty the - * space map's block size must be a power of 2 and SPACE_MAP_INITIAL_BLOCKSIZE - * or larger. + * The data for a given space map can be kept on blocks of any size. + * Larger blocks entail fewer i/o operations, but they also cause the + * DMU to keep more data in-core, and also to waste more i/o bandwidth + * when only a few blocks have changed since the last transaction group. */ -int space_map_max_blksz = (1 << 12); +int space_map_blksz = (1 << 12); /* * Load the space map disk into the specified range tree. Segments of maptype @@ -233,58 +230,6 @@ space_map_entries(space_map_t *sm, range return (entries); } -void -space_map_set_blocksize(space_map_t *sm, uint64_t size, dmu_tx_t *tx) -{ - uint32_t blksz; - u_longlong_t blocks; - - ASSERT3U(sm->sm_blksz, !=, 0); - ASSERT3U(space_map_object(sm), !=, 0); - ASSERT(sm->sm_dbuf != NULL); - VERIFY(ISP2(space_map_max_blksz)); - - if (sm->sm_blksz >= space_map_max_blksz) - return; - - /* - * The object contains more than one block so we can't adjust - * its size. - */ - if (sm->sm_phys->smp_objsize > sm->sm_blksz) - return; - - if (size > sm->sm_blksz) { - uint64_t newsz; - - /* - * Older software versions treat space map blocks as fixed - * entities. The DMU is capable of handling different block - * sizes making it possible for us to increase the - * block size and maintain backwards compatibility. The - * caveat is that the new block sizes must be a - * power of 2 so that old software can append to the file, - * adding more blocks. The block size can grow until it - * reaches space_map_max_blksz. - */ - newsz = ISP2(size) ? size : 1ULL << highbit64(size); - if (newsz > space_map_max_blksz) - newsz = space_map_max_blksz; - - VERIFY0(dmu_object_set_blocksize(sm->sm_os, - space_map_object(sm), newsz, 0, tx)); - dmu_object_size_from_db(sm->sm_dbuf, &blksz, &blocks); - - zfs_dbgmsg("txg %llu, spa %s, increasing blksz from %d to %d", - dmu_tx_get_txg(tx), spa_name(dmu_objset_spa(sm->sm_os)), - sm->sm_blksz, blksz); - - VERIFY3U(newsz, ==, blksz); - VERIFY3U(sm->sm_blksz, <, blksz); - sm->sm_blksz = blksz; - } -} - /* * Note: space_map_write() will drop sm_lock across dmu_write() calls. */ @@ -298,7 +243,7 @@ space_map_write(space_map_t *sm, range_t range_seg_t *rs; uint64_t size, total, rt_space, nodes; uint64_t *entry, *entry_map, *entry_map_end; - uint64_t newsz, expected_entries, actual_entries = 1; + uint64_t expected_entries, actual_entries = 1; ASSERT(MUTEX_HELD(rt->rt_lock)); ASSERT(dsl_pool_sync_context(dmu_objset_pool(os))); @@ -324,13 +269,6 @@ space_map_write(space_map_t *sm, range_t expected_entries = space_map_entries(sm, rt); - /* - * Calculate the new size for the space map on-disk and see if - * we can grow the block size to accommodate the new size. - */ - newsz = sm->sm_phys->smp_objsize + expected_entries * sizeof (uint64_t); - space_map_set_blocksize(sm, newsz, tx); - entry_map = zio_buf_alloc(sm->sm_blksz); entry_map_end = entry_map + (sm->sm_blksz / sizeof (uint64_t)); entry = entry_map; @@ -457,46 +395,48 @@ space_map_close(space_map_t *sm) kmem_free(sm, sizeof (*sm)); } -static void -space_map_reallocate(space_map_t *sm, dmu_tx_t *tx) -{ - ASSERT(dmu_tx_is_syncing(tx)); - - space_map_free(sm, tx); - dmu_buf_rele(sm->sm_dbuf, sm); - - sm->sm_object = space_map_alloc(sm->sm_os, tx); - VERIFY0(space_map_open_impl(sm)); -} - void space_map_truncate(space_map_t *sm, dmu_tx_t *tx) { objset_t *os = sm->sm_os; spa_t *spa = dmu_objset_spa(os); dmu_object_info_t doi; - int bonuslen; ASSERT(dsl_pool_sync_context(dmu_objset_pool(os))); ASSERT(dmu_tx_is_syncing(tx)); - VERIFY0(dmu_free_range(os, space_map_object(sm), 0, -1ULL, tx)); dmu_object_info_from_db(sm->sm_dbuf, &doi); - if (spa_feature_is_enabled(spa, SPA_FEATURE_SPACEMAP_HISTOGRAM)) { - bonuslen = sizeof (space_map_phys_t); - ASSERT3U(bonuslen, <=, dmu_bonus_max()); - } else { - bonuslen = SPACE_MAP_SIZE_V0; - } - - if (bonuslen != doi.doi_bonus_size || - doi.doi_data_block_size != SPACE_MAP_INITIAL_BLOCKSIZE) { + /* + * If the space map has the wrong bonus size (because + * SPA_FEATURE_SPACEMAP_HISTOGRAM has recently been enabled), or + * the wrong block size (because space_map_blksz has changed), + * free and re-allocate its object with the updated sizes. + * + * Otherwise, just truncate the current object. + */ + if ((spa_feature_is_enabled(spa, SPA_FEATURE_SPACEMAP_HISTOGRAM) && + doi.doi_bonus_size != sizeof (space_map_phys_t)) || + doi.doi_data_block_size != space_map_blksz) { zfs_dbgmsg("txg %llu, spa %s, reallocating: " "old bonus %u, old blocksz %u", dmu_tx_get_txg(tx), spa_name(spa), doi.doi_bonus_size, doi.doi_data_block_size); - space_map_reallocate(sm, tx); - VERIFY3U(sm->sm_blksz, ==, SPACE_MAP_INITIAL_BLOCKSIZE); + + space_map_free(sm, tx); + dmu_buf_rele(sm->sm_dbuf, sm); + + sm->sm_object = space_map_alloc(sm->sm_os, tx); + VERIFY0(space_map_open_impl(sm)); + } else { + VERIFY0(dmu_free_range(os, space_map_object(sm), 0, -1ULL, tx)); + + /* + * If the spacemap is reallocated, its histogram + * will be reset. Do the same in the common case so that + * bugs related to the uncommon case do not go unnoticed. + */ + bzero(sm->sm_phys->smp_histogram, + sizeof (sm->sm_phys->smp_histogram)); } dmu_buf_will_dirty(sm->sm_dbuf, tx); @@ -535,7 +475,7 @@ space_map_alloc(objset_t *os, dmu_tx_t * } object = dmu_object_alloc(os, - DMU_OT_SPACE_MAP, SPACE_MAP_INITIAL_BLOCKSIZE, + DMU_OT_SPACE_MAP, space_map_blksz, DMU_OT_SPACE_MAP_HEADER, bonuslen, tx); return (object); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/space_map.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/space_map.h Sat Oct 4 07:24:35 2014 (r272493) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/space_map.h Sat Oct 4 07:26:42 2014 (r272494) @@ -133,17 +133,6 @@ typedef enum { SM_FREE } maptype_t; -/* - * The data for a given space map can be kept on blocks of any size. - * Larger blocks entail fewer i/o operations, but they also cause the - * DMU to keep more data in-core, and also to waste more i/o bandwidth - * when only a few blocks have changed since the last transaction group. - * Rather than having a fixed block size for all space maps the block size - * can adjust as needed (see space_map_max_blksz). Set the initial block - * size for the space map to 4k. - */ -#define SPACE_MAP_INITIAL_BLOCKSIZE (1ULL << 12) - int space_map_load(space_map_t *sm, range_tree_t *rt, maptype_t maptype); void space_map_histogram_clear(space_map_t *sm); From owner-svn-src-all@FreeBSD.ORG Sat Oct 4 07:32:20 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9343D6AB; Sat, 4 Oct 2014 07:32:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 65DDDDC3; Sat, 4 Oct 2014 07:32:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s947WKQv083776; Sat, 4 Oct 2014 07:32:20 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s947WJ6H083774; Sat, 4 Oct 2014 07:32:19 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201410040732.s947WJ6H083774@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 4 Oct 2014 07:32:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r272495 - vendor-sys/illumos/dist/uts/common/fs/zfs X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 07:32:20 -0000 Author: delphij Date: Sat Oct 4 07:32:19 2014 New Revision: 272495 URL: https://svnweb.freebsd.org/changeset/base/272495 Log: 5163 arc should reap range_seg_cache Reviewed by: Christopher Siden Reviewed by: Matthew Ahrens Reviewed by: Richard Elling Reviewed by: Saso Kiselkov Approved by: Dan McDonald Author: George Wilson illumos/illumos@83803b51e1fa57fbf4e86ca5aa58eab6c5822dae Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c vendor-sys/illumos/dist/uts/common/fs/zfs/range_tree.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c Sat Oct 4 07:26:42 2014 (r272494) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c Sat Oct 4 07:32:19 2014 (r272495) @@ -2303,6 +2303,7 @@ arc_kmem_reap_now(arc_reclaim_strategy_t kmem_cache_t *prev_data_cache = NULL; extern kmem_cache_t *zio_buf_cache[]; extern kmem_cache_t *zio_data_buf_cache[]; + extern kmem_cache_t *range_seg_cache; #ifdef _KERNEL if (arc_meta_used >= arc_meta_limit) { @@ -2339,6 +2340,7 @@ arc_kmem_reap_now(arc_reclaim_strategy_t } kmem_cache_reap_now(buf_cache); kmem_cache_reap_now(hdr_cache); + kmem_cache_reap_now(range_seg_cache); /* * Ask the vmem areana to reclaim unused memory from its Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/range_tree.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/range_tree.c Sat Oct 4 07:26:42 2014 (r272494) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/range_tree.c Sat Oct 4 07:32:19 2014 (r272495) @@ -33,7 +33,7 @@ #include #include -static kmem_cache_t *range_seg_cache; +kmem_cache_t *range_seg_cache; void range_tree_init(void) From owner-svn-src-all@FreeBSD.ORG Sat Oct 4 07:34:51 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 039617E7; Sat, 4 Oct 2014 07:34:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E37ADDCE; Sat, 4 Oct 2014 07:34:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s947YoUg084135; Sat, 4 Oct 2014 07:34:50 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s947YoiV084134; Sat, 4 Oct 2014 07:34:50 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201410040734.s947YoiV084134@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 4 Oct 2014 07:34:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r272496 - vendor-sys/illumos/dist/uts/common/fs/zfs X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 07:34:51 -0000 Author: delphij Date: Sat Oct 4 07:34:50 2014 New Revision: 272496 URL: https://svnweb.freebsd.org/changeset/base/272496 Log: 5161 add tunable for number of metaslabs per vdev Reviewed by: Alex Reece Reviewed by: Christopher Siden Reviewed by: George Wilson Reviewed by: Paul Dagnelie Reviewed by: Saso Kiselkov Reviewed by: Richard Elling Approved by: Richard Lowe Author: Matthew Ahrens illumos/illumos-gate@bf3e216c7efa56332b456f4cf19d208e21d63839 Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/vdev.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/vdev.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/vdev.c Sat Oct 4 07:32:19 2014 (r272495) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/vdev.c Sat Oct 4 07:34:50 2014 (r272496) @@ -65,6 +65,12 @@ static vdev_ops_t *vdev_ops_table[] = { int zfs_scrub_limit = 10; /* + * When a vdev is added, it will be divided into approximately (but no + * more than) this number of metaslabs. + */ +int metaslabs_per_vdev = 200; + +/* * Given a vdev type, return the appropriate ops vector. */ static vdev_ops_t * @@ -1551,9 +1557,9 @@ void vdev_metaslab_set_size(vdev_t *vd) { /* - * Aim for roughly 200 metaslabs per vdev. + * Aim for roughly metaslabs_per_vdev (default 200) metaslabs per vdev. */ - vd->vdev_ms_shift = highbit64(vd->vdev_asize / 200); + vd->vdev_ms_shift = highbit64(vd->vdev_asize / metaslabs_per_vdev); vd->vdev_ms_shift = MAX(vd->vdev_ms_shift, SPA_MAXBLOCKSHIFT); } From owner-svn-src-all@FreeBSD.ORG Sat Oct 4 07:35:51 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 82CE1912; Sat, 4 Oct 2014 07:35:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6EEEBDD6; Sat, 4 Oct 2014 07:35:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s947Zpdn084335; Sat, 4 Oct 2014 07:35:51 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s947Zpw5084334; Sat, 4 Oct 2014 07:35:51 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201410040735.s947Zpw5084334@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 4 Oct 2014 07:35:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r272497 - vendor-sys/illumos/dist/uts/common/fs/zfs X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 07:35:51 -0000 Author: delphij Date: Sat Oct 4 07:35:50 2014 New Revision: 272497 URL: https://svnweb.freebsd.org/changeset/base/272497 Log: 5148 zvol's DKIOCFREE holds zfsdev_state_lock too long Reviewed by: Matthew Ahrens Reviewed by: Paul Dagnelie Reviewed by: Sebastien Roy Reviewed by: Josef 'Jeff' Sipek Reviewed by: Dan McDonald Approved by: Richard Lowe Author: George Wilson illumos/illumos-gate@574e2414ac6a50c9d6097c2e4a98eb9263f90c44 Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zvol.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zvol.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zvol.c Sat Oct 4 07:34:50 2014 (r272496) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zvol.c Sat Oct 4 07:35:50 2014 (r272497) @@ -1781,8 +1781,8 @@ zvol_ioctl(dev_t dev, int cmd, intptr_t */ if (df.df_start >= zv->zv_volsize) break; /* No need to do anything... */ - if (df.df_start + df.df_length > zv->zv_volsize) - df.df_length = DMU_OBJECT_END; + + mutex_exit(&zfsdev_state_lock); rl = zfs_range_lock(&zv->zv_znode, df.df_start, df.df_length, RL_WRITER); @@ -1821,7 +1821,7 @@ zvol_ioctl(dev_t dev, int cmd, intptr_t dmu_objset_pool(zv->zv_objset), 0); } } - break; + return (error); } default: From owner-svn-src-all@FreeBSD.ORG Sat Oct 4 07:37:17 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EB061A40; Sat, 4 Oct 2014 07:37:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D720FDE3; Sat, 4 Oct 2014 07:37:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s947bHeX084560; Sat, 4 Oct 2014 07:37:17 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s947bHS8084559; Sat, 4 Oct 2014 07:37:17 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201410040737.s947bHS8084559@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 4 Oct 2014 07:37:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r272498 - vendor-sys/illumos/dist/uts/common/fs/zfs X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 07:37:18 -0000 Author: delphij Date: Sat Oct 4 07:37:17 2014 New Revision: 272498 URL: https://svnweb.freebsd.org/changeset/base/272498 Log: 5149 zvols need a way to ignore DKIOCFREE Reviewed by: Adam Leventhal Reviewed by: Matthew Ahrens Reviewed by: Sebastien Roy Reviewed by: Dan McDonald Reviewed by: Saso Kiselkov Approved by: Robert Mustacchi Author: George Wilson illumos/illumos-gate@893c83ba3e1c87a785b5274ce2ef02f45fba6087 Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zvol.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zvol.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zvol.c Sat Oct 4 07:35:50 2014 (r272497) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zvol.c Sat Oct 4 07:37:17 2014 (r272498) @@ -142,6 +142,11 @@ typedef struct zvol_state { */ int zvol_maxphys = DMU_MAX_ACCESS/2; +/* + * Toggle unmap functionality. + */ +boolean_t zvol_unmap_enabled = B_TRUE; + extern int zfs_set_prop_nvlist(const char *, zprop_source_t, nvlist_t *, nvlist_t *); static int zvol_remove_zv(zvol_state_t *); @@ -1769,6 +1774,9 @@ zvol_ioctl(dev_t dev, int cmd, intptr_t dkioc_free_t df; dmu_tx_t *tx; + if (!zvol_unmap_enabled) + break; + if (ddi_copyin((void *)arg, &df, sizeof (df), flag)) { error = SET_ERROR(EFAULT); break; From owner-svn-src-all@FreeBSD.ORG Sat Oct 4 07:39:00 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B2709B8A; Sat, 4 Oct 2014 07:39:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9E591DEA; Sat, 4 Oct 2014 07:39:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s947d05J084798; Sat, 4 Oct 2014 07:39:00 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s947d0Em084797; Sat, 4 Oct 2014 07:39:00 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201410040739.s947d0Em084797@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 4 Oct 2014 07:39:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r272499 - vendor-sys/illumos/dist/uts/common/fs/zfs X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 07:39:00 -0000 Author: delphij Date: Sat Oct 4 07:38:59 2014 New Revision: 272499 URL: https://svnweb.freebsd.org/changeset/base/272499 Log: 5174 add sdt probe for blocked read in dbuf_read() Reviewed by: Basil Crow Reviewed by: Matthew Ahrens Reviewed by: Steven Hartland Reviewed by: Richard Elling Reviewed by: Boris Protopopov Reviewed by: Steven Hartland Reviewed by: Garrett D'Amore Approved by: Robert Mustacchi Author: Adam H. Leventhal illumos/illumos-gate@f6164ad638e7346c4ae4ba393760a897cf6eb744 Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c Sat Oct 4 07:37:17 2014 (r272498) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c Sat Oct 4 07:38:59 2014 (r272499) @@ -671,6 +671,8 @@ dbuf_read(dmu_buf_impl_t *db, zio_t *zio db->db_state == DB_FILL) { ASSERT(db->db_state == DB_READ || (flags & DB_RF_HAVESTRUCT) == 0); + DTRACE_PROBE2(blocked__read, dmu_buf_impl_t *, + db, zio_t *, zio); cv_wait(&db->db_changed, &db->db_mtx); } if (db->db_state == DB_UNCACHED) From owner-svn-src-all@FreeBSD.ORG Sat Oct 4 07:49:07 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7922FEB5; Sat, 4 Oct 2014 07:49:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4AAF1EA8; Sat, 4 Oct 2014 07:49:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s947n7fP089577; Sat, 4 Oct 2014 07:49:07 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s947n7iY089576; Sat, 4 Oct 2014 07:49:07 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201410040749.s947n7iY089576@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 4 Oct 2014 07:49:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r272500 - vendor-sys/illumos/dist/uts/common/fs/zfs X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 07:49:07 -0000 Author: delphij Date: Sat Oct 4 07:49:06 2014 New Revision: 272500 URL: https://svnweb.freebsd.org/changeset/base/272500 Log: 5150 zfs clone of a defer_destroy snapshot causes strangeness Reviewed by: Christopher Siden Reviewed by: George Wilson Reviewed by: Max Grossman Reviewed by: Saso Kiselkov Reviewed by: Richard Elling Approved by: Robert Mustacchi Author: Matthew Ahrens illumos/illumos-gate@42fcb65ea4f2c6f8cc5a3c6142a486cb49871fd2 Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c Sat Oct 4 07:38:59 2014 (r272499) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c Sat Oct 4 07:49:06 2014 (r272500) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013, 2014 by Delphix. All rights reserved. + * Copyright (c) 2011, 2014 by Delphix. All rights reserved. * Copyright (c) 2014, Joyent, Inc. All rights reserved. * Copyright (c) 2014 RackTop Systems. */ @@ -692,7 +692,13 @@ dsl_dataset_create_sync_dd(dsl_dir_t *dd dsphys->ds_uncompressed_bytes = origin->ds_phys->ds_uncompressed_bytes; dsphys->ds_bp = origin->ds_phys->ds_bp; - dsphys->ds_flags |= origin->ds_phys->ds_flags; + + /* + * Inherit flags that describe the dataset's contents + * (INCONSISTENT) or properties (Case Insensitive). + */ + dsphys->ds_flags |= origin->ds_phys->ds_flags & + (DS_FLAG_INCONSISTENT | DS_FLAG_CI_DATASET); dmu_buf_will_dirty(origin->ds_dbuf, tx); origin->ds_phys->ds_num_children++; From owner-svn-src-all@FreeBSD.ORG Sat Oct 4 07:50:07 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1BC03156; Sat, 4 Oct 2014 07:50:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F24E3EC1; Sat, 4 Oct 2014 07:50:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s947o6YY089810; Sat, 4 Oct 2014 07:50:06 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s947o6Vs089809; Sat, 4 Oct 2014 07:50:06 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201410040750.s947o6Vs089809@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 4 Oct 2014 07:50:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r272501 - vendor-sys/illumos/dist/uts/common/fs/zfs X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 07:50:07 -0000 Author: delphij Date: Sat Oct 4 07:50:06 2014 New Revision: 272501 URL: https://svnweb.freebsd.org/changeset/base/272501 Log: 5177 remove dead code from dsl_scan.c Reviewed by: Christopher Siden Reviewed by: George Wilson Reviewed by: Richard Elling Reviewed by: Richard Lowe Approved by: Robert Mustacchi Author: Matthew Ahrens illumos/illumos-gate@5f37736ac8f99922368294d745d3fefa22b49d11 Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_scan.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_scan.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_scan.c Sat Oct 4 07:49:06 2014 (r272500) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_scan.c Sat Oct 4 07:50:06 2014 (r272501) @@ -351,13 +351,12 @@ dsl_scan_cancel(dsl_pool_t *dp) dsl_scan_cancel_sync, NULL, 3, ZFS_SPACE_CHECK_RESERVED)); } -static void dsl_scan_visitbp(blkptr_t *bp, - const zbookmark_phys_t *zb, dnode_phys_t *dnp, arc_buf_t *pbuf, - dsl_dataset_t *ds, dsl_scan_t *scn, dmu_objset_type_t ostype, - dmu_tx_t *tx); +static void dsl_scan_visitbp(blkptr_t *bp, const zbookmark_phys_t *zb, + dnode_phys_t *dnp, dsl_dataset_t *ds, dsl_scan_t *scn, + dmu_objset_type_t ostype, dmu_tx_t *tx); static void dsl_scan_visitdnode(dsl_scan_t *, dsl_dataset_t *ds, dmu_objset_type_t ostype, - dnode_phys_t *dnp, arc_buf_t *buf, uint64_t object, dmu_tx_t *tx); + dnode_phys_t *dnp, uint64_t object, dmu_tx_t *tx); void dsl_free(dsl_pool_t *dp, uint64_t txg, const blkptr_t *bp) @@ -590,7 +589,7 @@ dsl_scan_check_resume(dsl_scan_t *scn, c static int dsl_scan_recurse(dsl_scan_t *scn, dsl_dataset_t *ds, dmu_objset_type_t ostype, dnode_phys_t *dnp, const blkptr_t *bp, - const zbookmark_phys_t *zb, dmu_tx_t *tx, arc_buf_t **bufp) + const zbookmark_phys_t *zb, dmu_tx_t *tx) { dsl_pool_t *dp = scn->scn_dp; int zio_flags = ZIO_FLAG_CANFAIL | ZIO_FLAG_SCAN_THREAD; @@ -601,76 +600,72 @@ dsl_scan_recurse(dsl_scan_t *scn, dsl_da int i; blkptr_t *cbp; int epb = BP_GET_LSIZE(bp) >> SPA_BLKPTRSHIFT; + arc_buf_t *buf; - err = arc_read(NULL, dp->dp_spa, bp, arc_getbuf_func, bufp, + err = arc_read(NULL, dp->dp_spa, bp, arc_getbuf_func, &buf, ZIO_PRIORITY_ASYNC_READ, zio_flags, &flags, zb); if (err) { scn->scn_phys.scn_errors++; return (err); } - for (i = 0, cbp = (*bufp)->b_data; i < epb; i++, cbp++) { - dsl_scan_prefetch(scn, *bufp, cbp, zb->zb_objset, + for (i = 0, cbp = buf->b_data; i < epb; i++, cbp++) { + dsl_scan_prefetch(scn, buf, cbp, zb->zb_objset, zb->zb_object, zb->zb_blkid * epb + i); } - for (i = 0, cbp = (*bufp)->b_data; i < epb; i++, cbp++) { + for (i = 0, cbp = buf->b_data; i < epb; i++, cbp++) { zbookmark_phys_t czb; SET_BOOKMARK(&czb, zb->zb_objset, zb->zb_object, zb->zb_level - 1, zb->zb_blkid * epb + i); dsl_scan_visitbp(cbp, &czb, dnp, - *bufp, ds, scn, ostype, tx); - } - } else if (BP_GET_TYPE(bp) == DMU_OT_USERGROUP_USED) { - uint32_t flags = ARC_WAIT; - - err = arc_read(NULL, dp->dp_spa, bp, arc_getbuf_func, bufp, - ZIO_PRIORITY_ASYNC_READ, zio_flags, &flags, zb); - if (err) { - scn->scn_phys.scn_errors++; - return (err); + ds, scn, ostype, tx); } + (void) arc_buf_remove_ref(buf, &buf); } else if (BP_GET_TYPE(bp) == DMU_OT_DNODE) { uint32_t flags = ARC_WAIT; dnode_phys_t *cdnp; int i, j; int epb = BP_GET_LSIZE(bp) >> DNODE_SHIFT; + arc_buf_t *buf; - err = arc_read(NULL, dp->dp_spa, bp, arc_getbuf_func, bufp, + err = arc_read(NULL, dp->dp_spa, bp, arc_getbuf_func, &buf, ZIO_PRIORITY_ASYNC_READ, zio_flags, &flags, zb); if (err) { scn->scn_phys.scn_errors++; return (err); } - for (i = 0, cdnp = (*bufp)->b_data; i < epb; i++, cdnp++) { + for (i = 0, cdnp = buf->b_data; i < epb; i++, cdnp++) { for (j = 0; j < cdnp->dn_nblkptr; j++) { blkptr_t *cbp = &cdnp->dn_blkptr[j]; - dsl_scan_prefetch(scn, *bufp, cbp, + dsl_scan_prefetch(scn, buf, cbp, zb->zb_objset, zb->zb_blkid * epb + i, j); } } - for (i = 0, cdnp = (*bufp)->b_data; i < epb; i++, cdnp++) { + for (i = 0, cdnp = buf->b_data; i < epb; i++, cdnp++) { dsl_scan_visitdnode(scn, ds, ostype, - cdnp, *bufp, zb->zb_blkid * epb + i, tx); + cdnp, zb->zb_blkid * epb + i, tx); } + (void) arc_buf_remove_ref(buf, &buf); } else if (BP_GET_TYPE(bp) == DMU_OT_OBJSET) { uint32_t flags = ARC_WAIT; objset_phys_t *osp; + arc_buf_t *buf; - err = arc_read(NULL, dp->dp_spa, bp, arc_getbuf_func, bufp, + err = arc_read(NULL, dp->dp_spa, bp, arc_getbuf_func, &buf, ZIO_PRIORITY_ASYNC_READ, zio_flags, &flags, zb); if (err) { scn->scn_phys.scn_errors++; return (err); } - osp = (*bufp)->b_data; + osp = buf->b_data; dsl_scan_visitdnode(scn, ds, osp->os_type, - &osp->os_meta_dnode, *bufp, DMU_META_DNODE_OBJECT, tx); + &osp->os_meta_dnode, DMU_META_DNODE_OBJECT, tx); - if (OBJSET_BUF_HAS_USERUSED(*bufp)) { + if (OBJSET_BUF_HAS_USERUSED(buf)) { /* * We also always visit user/group accounting * objects, and never skip them, even if we are @@ -678,12 +673,13 @@ dsl_scan_recurse(dsl_scan_t *scn, dsl_da * deltas from this txg get integrated. */ dsl_scan_visitdnode(scn, ds, osp->os_type, - &osp->os_groupused_dnode, *bufp, + &osp->os_groupused_dnode, DMU_GROUPUSED_OBJECT, tx); dsl_scan_visitdnode(scn, ds, osp->os_type, - &osp->os_userused_dnode, *bufp, + &osp->os_userused_dnode, DMU_USERUSED_OBJECT, tx); } + (void) arc_buf_remove_ref(buf, &buf); } return (0); @@ -691,7 +687,7 @@ dsl_scan_recurse(dsl_scan_t *scn, dsl_da static void dsl_scan_visitdnode(dsl_scan_t *scn, dsl_dataset_t *ds, - dmu_objset_type_t ostype, dnode_phys_t *dnp, arc_buf_t *buf, + dmu_objset_type_t ostype, dnode_phys_t *dnp, uint64_t object, dmu_tx_t *tx) { int j; @@ -702,7 +698,7 @@ dsl_scan_visitdnode(dsl_scan_t *scn, dsl SET_BOOKMARK(&czb, ds ? ds->ds_object : 0, object, dnp->dn_nlevels - 1, j); dsl_scan_visitbp(&dnp->dn_blkptr[j], - &czb, dnp, buf, ds, scn, ostype, tx); + &czb, dnp, ds, scn, ostype, tx); } if (dnp->dn_flags & DNODE_FLAG_SPILL_BLKPTR) { @@ -710,7 +706,7 @@ dsl_scan_visitdnode(dsl_scan_t *scn, dsl SET_BOOKMARK(&czb, ds ? ds->ds_object : 0, object, 0, DMU_SPILL_BLKID); dsl_scan_visitbp(&dnp->dn_spill, - &czb, dnp, buf, ds, scn, ostype, tx); + &czb, dnp, ds, scn, ostype, tx); } } @@ -720,9 +716,8 @@ dsl_scan_visitdnode(dsl_scan_t *scn, dsl */ static void dsl_scan_visitbp(blkptr_t *bp, const zbookmark_phys_t *zb, - dnode_phys_t *dnp, arc_buf_t *pbuf, - dsl_dataset_t *ds, dsl_scan_t *scn, dmu_objset_type_t ostype, - dmu_tx_t *tx) + dnode_phys_t *dnp, dsl_dataset_t *ds, dsl_scan_t *scn, + dmu_objset_type_t ostype, dmu_tx_t *tx) { dsl_pool_t *dp = scn->scn_dp; arc_buf_t *buf = NULL; @@ -742,16 +737,15 @@ dsl_scan_visitbp(blkptr_t *bp, const zbo scn->scn_visited_this_txg++; dprintf_bp(bp, - "visiting ds=%p/%llu zb=%llx/%llx/%llx/%llx buf=%p bp=%p", + "visiting ds=%p/%llu zb=%llx/%llx/%llx/%llx bp=%p", ds, ds ? ds->ds_object : 0, zb->zb_objset, zb->zb_object, zb->zb_level, zb->zb_blkid, - pbuf, bp); + bp); if (bp->blk_birth <= scn->scn_phys.scn_cur_min_txg) return; - if (dsl_scan_recurse(scn, ds, ostype, dnp, &bp_toread, zb, tx, - &buf) != 0) + if (dsl_scan_recurse(scn, ds, ostype, dnp, &bp_toread, zb, tx) != 0) return; /* @@ -775,8 +769,6 @@ dsl_scan_visitbp(blkptr_t *bp, const zbo if (BP_PHYSICAL_BIRTH(bp) <= scn->scn_phys.scn_cur_max_txg) { scan_funcs[scn->scn_phys.scn_func](dp, bp, zb); } - if (buf) - (void) arc_buf_remove_ref(buf, &buf); } static void @@ -787,7 +779,7 @@ dsl_scan_visit_rootbp(dsl_scan_t *scn, d SET_BOOKMARK(&zb, ds ? ds->ds_object : DMU_META_OBJSET, ZB_ROOT_OBJECT, ZB_ROOT_LEVEL, ZB_ROOT_BLKID); - dsl_scan_visitbp(bp, &zb, NULL, NULL, + dsl_scan_visitbp(bp, &zb, NULL, ds, scn, DMU_OST_NONE, tx); dprintf_ds(ds, "finished scan%s", ""); From owner-svn-src-all@FreeBSD.ORG Sat Oct 4 07:56:51 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B1B862DC; Sat, 4 Oct 2014 07:56:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9C9ADF6C; Sat, 4 Oct 2014 07:56:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s947upGO093985; Sat, 4 Oct 2014 07:56:51 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s947upS2093983; Sat, 4 Oct 2014 07:56:51 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201410040756.s947upS2093983@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 4 Oct 2014 07:56:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272502 - in head/cddl/contrib/opensolaris: cmd/zpool lib/libzfs/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 07:56:51 -0000 Author: delphij Date: Sat Oct 4 07:56:50 2014 New Revision: 272502 URL: https://svnweb.freebsd.org/changeset/base/272502 Log: MFV r272493: Show individual disk capacity when doing zpool list -v. Illumos issue: 5147 zpool list -v should show individual disk capacity MFC after: 1 week Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Directory Properties: head/cddl/contrib/opensolaris/ (props changed) head/cddl/contrib/opensolaris/lib/libzfs/ (props changed) Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Sat Oct 4 07:50:06 2014 (r272501) +++ head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Sat Oct 4 07:56:50 2014 (r272502) @@ -2857,10 +2857,7 @@ print_pool(zpool_handle_t *zhp, list_cbd right_justify = B_FALSE; if (pl->pl_prop != ZPROP_INVAL) { - if (pl->pl_prop == ZPOOL_PROP_EXPANDSZ && - zpool_get_prop_int(zhp, pl->pl_prop, NULL) == 0) - propstr = "-"; - else if (zpool_get_prop(zhp, pl->pl_prop, property, + if (zpool_get_prop(zhp, pl->pl_prop, property, sizeof (property), NULL, cb->cb_literal) != 0) propstr = "-"; else @@ -2894,21 +2891,37 @@ print_pool(zpool_handle_t *zhp, list_cbd } static void -print_one_column(zpool_prop_t prop, uint64_t value, boolean_t scripted) +print_one_column(zpool_prop_t prop, uint64_t value, boolean_t scripted, + boolean_t valid) { char propval[64]; boolean_t fixed; size_t width = zprop_width(prop, &fixed, ZFS_TYPE_POOL); - - if (prop == ZPOOL_PROP_EXPANDSZ && value == 0) - (void) strlcpy(propval, "-", sizeof (propval)); - else if (prop == ZPOOL_PROP_FRAGMENTATION && value == ZFS_FRAG_INVALID) - (void) strlcpy(propval, "-", sizeof (propval)); - else if (prop == ZPOOL_PROP_FRAGMENTATION) + switch (prop) { + case ZPOOL_PROP_EXPANDSZ: + if (value == 0) + (void) strlcpy(propval, "-", sizeof (propval)); + else + zfs_nicenum(value, propval, sizeof (propval)); + break; + case ZPOOL_PROP_FRAGMENTATION: + if (value == ZFS_FRAG_INVALID) { + (void) strlcpy(propval, "-", sizeof (propval)); + } else { + (void) snprintf(propval, sizeof (propval), "%llu%%", + value); + } + break; + case ZPOOL_PROP_CAPACITY: (void) snprintf(propval, sizeof (propval), "%llu%%", value); - else + break; + default: zfs_nicenum(value, propval, sizeof (propval)); + } + + if (!valid) + (void) strlcpy(propval, "-", sizeof (propval)); if (scripted) (void) printf("\t%s", propval); @@ -2930,6 +2943,9 @@ print_list_stats(zpool_handle_t *zhp, co (uint64_t **)&vs, &c) == 0); if (name != NULL) { + boolean_t toplevel = (vs->vs_space != 0); + uint64_t cap; + if (scripted) (void) printf("\t%s", name); else if (strlen(name) + depth > cb->cb_namewidth) @@ -2938,24 +2954,26 @@ print_list_stats(zpool_handle_t *zhp, co (void) printf("%*s%s%*s", depth, "", name, (int)(cb->cb_namewidth - strlen(name) - depth), ""); - /* only toplevel vdevs have capacity stats */ - if (vs->vs_space == 0) { - if (scripted) - (void) printf("\t-\t-\t-\t-"); - else - (void) printf(" - - - -"); - } else { - print_one_column(ZPOOL_PROP_SIZE, vs->vs_space, - scripted); - print_one_column(ZPOOL_PROP_CAPACITY, vs->vs_alloc, - scripted); - print_one_column(ZPOOL_PROP_FREE, - vs->vs_space - vs->vs_alloc, scripted); - print_one_column(ZPOOL_PROP_FRAGMENTATION, - vs->vs_fragmentation, scripted); - } - print_one_column(ZPOOL_PROP_EXPANDSZ, vs->vs_esize, - scripted); + /* + * Print the properties for the individual vdevs. Some + * properties are only applicable to toplevel vdevs. The + * 'toplevel' boolean value is passed to the print_one_column() + * to indicate that the value is valid. + */ + print_one_column(ZPOOL_PROP_SIZE, vs->vs_space, scripted, + toplevel); + print_one_column(ZPOOL_PROP_ALLOCATED, vs->vs_alloc, scripted, + toplevel); + print_one_column(ZPOOL_PROP_FREE, vs->vs_space - vs->vs_alloc, + scripted, toplevel); + print_one_column(ZPOOL_PROP_EXPANDSZ, vs->vs_esize, scripted, + B_TRUE); + print_one_column(ZPOOL_PROP_FRAGMENTATION, + vs->vs_fragmentation, scripted, + (vs->vs_fragmentation != ZFS_FRAG_INVALID && toplevel)); + cap = (vs->vs_space == 0) ? 0 : + (vs->vs_alloc * 100 / vs->vs_space); + print_one_column(ZPOOL_PROP_CAPACITY, cap, scripted, toplevel); (void) printf("\n"); } @@ -3024,7 +3042,8 @@ list_callback(zpool_handle_t *zhp, void * -H Scripted mode. Don't display headers, and separate properties * by a single tab. * -o List of properties to display. Defaults to - * "name,size,allocated,free,capacity,health,altroot" + * "name,size,allocated,free,expandsize,fragmentation,capacity," + * "dedupratio,health,altroot" * -p Diplay values in parsable (exact) format. * -T Display a timestamp in date(1) or Unix format * @@ -3038,7 +3057,7 @@ zpool_do_list(int argc, char **argv) int ret; list_cbdata_t cb = { 0 }; static char default_props[] = - "name,size,allocated,free,fragmentation,expandsize,capacity," + "name,size,allocated,free,expandsize,fragmentation,capacity," "dedupratio,health,altroot"; char *props = default_props; unsigned long interval = 0, count = 0; Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Sat Oct 4 07:50:06 2014 (r272501) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Sat Oct 4 07:56:50 2014 (r272502) @@ -22,7 +22,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. - * Copyright (c) 2012, 2014 by Delphix. All rights reserved. + * Copyright (c) 2011, 2014 by Delphix. All rights reserved. * Copyright (c) 2013, Joyent, Inc. All rights reserved. */ @@ -304,7 +304,6 @@ zpool_get_prop(zpool_handle_t *zhp, zpoo case ZPOOL_PROP_FREE: case ZPOOL_PROP_FREEING: case ZPOOL_PROP_LEAKED: - case ZPOOL_PROP_EXPANDSZ: if (literal) { (void) snprintf(buf, len, "%llu", (u_longlong_t)intval); @@ -312,7 +311,16 @@ zpool_get_prop(zpool_handle_t *zhp, zpoo (void) zfs_nicenum(intval, buf, len); } break; - + case ZPOOL_PROP_EXPANDSZ: + if (intval == 0) { + (void) strlcpy(buf, "-", len); + } else if (literal) { + (void) snprintf(buf, len, "%llu", + (u_longlong_t)intval); + } else { + (void) zfs_nicenum(intval, buf, len); + } + break; case ZPOOL_PROP_CAPACITY: if (literal) { (void) snprintf(buf, len, "%llu", @@ -330,13 +338,11 @@ zpool_get_prop(zpool_handle_t *zhp, zpoo (u_longlong_t)intval); } break; - case ZPOOL_PROP_DEDUPRATIO: (void) snprintf(buf, len, "%llu.%02llux", (u_longlong_t)(intval / 100), (u_longlong_t)(intval % 100)); break; - case ZPOOL_PROP_HEALTH: verify(nvlist_lookup_nvlist(zpool_get_config(zhp, NULL), ZPOOL_CONFIG_VDEV_TREE, &nvroot) == 0); From owner-svn-src-all@FreeBSD.ORG Sat Oct 4 08:03:53 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 926716A8; Sat, 4 Oct 2014 08:03:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7EC70CA; Sat, 4 Oct 2014 08:03:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9483r1B098389; Sat, 4 Oct 2014 08:03:53 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9483rJH098388; Sat, 4 Oct 2014 08:03:53 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201410040803.s9483rJH098388@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sat, 4 Oct 2014 08:03:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272503 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 08:03:53 -0000 Author: mjg Date: Sat Oct 4 08:03:52 2014 New Revision: 272503 URL: https://svnweb.freebsd.org/changeset/base/272503 Log: Add sequence counters with memory barriers. Current implementation is somewhat simplistic and hackish, will be improved later after possible memory barrier overhaul. Reviewed by: kib MFC after: 3 weeks Added: head/sys/sys/seq.h (contents, props changed) Added: head/sys/sys/seq.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/sys/seq.h Sat Oct 4 08:03:52 2014 (r272503) @@ -0,0 +1,139 @@ +/*- + * Copyright (c) 2014 Mateusz Guzik + * + * 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 _SYS_SEQ_H_ +#define _SYS_SEQ_H_ + +#ifdef _KERNEL + +/* + * Typical usage: + * + * writers: + * lock_exclusive(&obj->lock); + * seq_write_begin(&obj->seq); + * ..... + * seq_write_end(&obj->seq); + * unlock_exclusive(&obj->unlock); + * + * readers: + * obj_t lobj; + * seq_t seq; + * + * for (;;) { + * seq = seq_read(&gobj->seq); + * lobj = gobj; + * if (seq_consistent(&gobj->seq, seq)) + * break; + * cpu_spinwait(); + * } + * foo(lobj); + */ + +typedef uint32_t seq_t; + +/* A hack to get MPASS macro */ +#include +#include + +#include + +/* + * This is a temporary hack until memory barriers are cleaned up. + * + * atomic_load_acq_int at least on amd64 provides a full memory barrier, + * in a way which affects perforance. + * + * Hack below covers all architectures and avoids most of the penalty at least + * on amd64. + */ +static __inline int +atomic_load_acq_rmb_int(volatile u_int *p) +{ + volatile u_int v; + + v = *p; + atomic_load_acq_int(&v); + return (v); +} + +static __inline bool +seq_in_modify(seq_t seqp) +{ + + return (seqp & 1); +} + +static __inline void +seq_write_begin(seq_t *seqp) +{ + + MPASS(!seq_in_modify(*seqp)); + atomic_add_acq_int(seqp, 1); +} + +static __inline void +seq_write_end(seq_t *seqp) +{ + + atomic_add_rel_int(seqp, 1); + MPASS(!seq_in_modify(*seqp)); +} + +static __inline seq_t +seq_read(seq_t *seqp) +{ + seq_t ret; + + for (;;) { + ret = atomic_load_acq_rmb_int(seqp); + if (seq_in_modify(ret)) { + cpu_spinwait(); + continue; + } + break; + } + + return (ret); +} + +static __inline seq_t +seq_consistent(seq_t *seqp, seq_t oldseq) +{ + + return (atomic_load_acq_rmb_int(seqp) == oldseq); +} + +static __inline seq_t +seq_consistent_nomb(seq_t *seqp, seq_t oldseq) +{ + + return (*seqp == oldseq); +} + +#endif /* _KERNEL */ +#endif /* _SYS_SEQ_H_ */ From owner-svn-src-all@FreeBSD.ORG Sat Oct 4 08:05:40 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BADBA8F7; Sat, 4 Oct 2014 08:05:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9D6E3E6; Sat, 4 Oct 2014 08:05:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9485el0098741; Sat, 4 Oct 2014 08:05:40 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9485dtx098736; Sat, 4 Oct 2014 08:05:39 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201410040805.s9485dtx098736@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 4 Oct 2014 08:05:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272504 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 08:05:40 -0000 Author: delphij Date: Sat Oct 4 08:05:39 2014 New Revision: 272504 URL: https://svnweb.freebsd.org/changeset/base/272504 Log: MFV r272494: Make space_map_truncate() always do space_map_reallocate(). Without this, setting space_map_max_blksz would cause panic for existing pool, as dmu_objset_set_blocksize would fail if the object have multiple blocks. Illumos issues: 5164 space_map_max_blksz causes panic, does not work 5165 zdb fails assertion when run on pool with recently-enabled spacemap_histogram feature MFC after: 2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/space_map.h Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c Sat Oct 4 08:03:52 2014 (r272503) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c Sat Oct 4 08:05:39 2014 (r272504) @@ -75,7 +75,7 @@ SYSCTL_INT(_vfs_zfs, OID_AUTO, condense_ /* * Condensing a metaslab is not guaranteed to actually reduce the amount of * space used on disk. In particular, a space map uses data in increments of - * MAX(1 << ashift, SPACE_MAP_INITIAL_BLOCKSIZE), so a metaslab might use the + * MAX(1 << ashift, space_map_blksize), so a metaslab might use the * same number of blocks after condensing. Since the goal of condensing is to * reduce the number of IOPs required to read the space map, we only want to * condense when we can be sure we will reduce the number of blocks used by the @@ -1470,10 +1470,12 @@ metaslab_fragmentation(metaslab_t *msp) uint64_t txg = spa_syncing_txg(spa); vdev_t *vd = msp->ms_group->mg_vd; - msp->ms_condense_wanted = B_TRUE; - vdev_dirty(vd, VDD_METASLAB, msp, txg + 1); - spa_dbgmsg(spa, "txg %llu, requesting force condense: " - "msp %p, vd %p", txg, msp, vd); + if (spa_writeable(spa)) { + msp->ms_condense_wanted = B_TRUE; + vdev_dirty(vd, VDD_METASLAB, msp, txg + 1); + spa_dbgmsg(spa, "txg %llu, requesting force condense: " + "msp %p, vd %p", txg, msp, vd); + } return (ZFS_FRAG_INVALID); } @@ -1917,6 +1919,15 @@ metaslab_sync(metaslab_t *msp, uint64_t mutex_enter(&msp->ms_lock); + /* + * Note: metaslab_condense() clears the space_map's histogram. + * Therefore we must verify and remove this histogram before + * condensing. + */ + metaslab_group_histogram_verify(mg); + metaslab_class_histogram_verify(mg->mg_class); + metaslab_group_histogram_remove(mg, msp); + if (msp->ms_loaded && spa_sync_pass(spa) == 1 && metaslab_should_condense(msp)) { metaslab_condense(msp, txg, tx); @@ -1925,9 +1936,6 @@ metaslab_sync(metaslab_t *msp, uint64_t space_map_write(msp->ms_sm, *freetree, SM_FREE, tx); } - metaslab_group_histogram_verify(mg); - metaslab_class_histogram_verify(mg->mg_class); - metaslab_group_histogram_remove(mg, msp); if (msp->ms_loaded) { /* * When the space map is loaded, we have an accruate Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c Sat Oct 4 08:03:52 2014 (r272503) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c Sat Oct 4 08:05:39 2014 (r272504) @@ -38,15 +38,12 @@ #include /* - * This value controls how the space map's block size is allowed to grow. - * If the value is set to the same size as SPACE_MAP_INITIAL_BLOCKSIZE then - * the space map block size will remain fixed. Setting this value to something - * greater than SPACE_MAP_INITIAL_BLOCKSIZE will allow the space map to - * increase its block size as needed. To maintain backwards compatibilty the - * space map's block size must be a power of 2 and SPACE_MAP_INITIAL_BLOCKSIZE - * or larger. + * The data for a given space map can be kept on blocks of any size. + * Larger blocks entail fewer i/o operations, but they also cause the + * DMU to keep more data in-core, and also to waste more i/o bandwidth + * when only a few blocks have changed since the last transaction group. */ -int space_map_max_blksz = (1 << 12); +int space_map_blksz = (1 << 12); /* * Load the space map disk into the specified range tree. Segments of maptype @@ -233,58 +230,6 @@ space_map_entries(space_map_t *sm, range return (entries); } -void -space_map_set_blocksize(space_map_t *sm, uint64_t size, dmu_tx_t *tx) -{ - uint32_t blksz; - u_longlong_t blocks; - - ASSERT3U(sm->sm_blksz, !=, 0); - ASSERT3U(space_map_object(sm), !=, 0); - ASSERT(sm->sm_dbuf != NULL); - VERIFY(ISP2(space_map_max_blksz)); - - if (sm->sm_blksz >= space_map_max_blksz) - return; - - /* - * The object contains more than one block so we can't adjust - * its size. - */ - if (sm->sm_phys->smp_objsize > sm->sm_blksz) - return; - - if (size > sm->sm_blksz) { - uint64_t newsz; - - /* - * Older software versions treat space map blocks as fixed - * entities. The DMU is capable of handling different block - * sizes making it possible for us to increase the - * block size and maintain backwards compatibility. The - * caveat is that the new block sizes must be a - * power of 2 so that old software can append to the file, - * adding more blocks. The block size can grow until it - * reaches space_map_max_blksz. - */ - newsz = ISP2(size) ? size : 1ULL << highbit64(size); - if (newsz > space_map_max_blksz) - newsz = space_map_max_blksz; - - VERIFY0(dmu_object_set_blocksize(sm->sm_os, - space_map_object(sm), newsz, 0, tx)); - dmu_object_size_from_db(sm->sm_dbuf, &blksz, &blocks); - - zfs_dbgmsg("txg %llu, spa %s, increasing blksz from %d to %d", - dmu_tx_get_txg(tx), spa_name(dmu_objset_spa(sm->sm_os)), - sm->sm_blksz, blksz); - - VERIFY3U(newsz, ==, blksz); - VERIFY3U(sm->sm_blksz, <, blksz); - sm->sm_blksz = blksz; - } -} - /* * Note: space_map_write() will drop sm_lock across dmu_write() calls. */ @@ -298,7 +243,7 @@ space_map_write(space_map_t *sm, range_t range_seg_t *rs; uint64_t size, total, rt_space, nodes; uint64_t *entry, *entry_map, *entry_map_end; - uint64_t newsz, expected_entries, actual_entries = 1; + uint64_t expected_entries, actual_entries = 1; ASSERT(MUTEX_HELD(rt->rt_lock)); ASSERT(dsl_pool_sync_context(dmu_objset_pool(os))); @@ -324,13 +269,6 @@ space_map_write(space_map_t *sm, range_t expected_entries = space_map_entries(sm, rt); - /* - * Calculate the new size for the space map on-disk and see if - * we can grow the block size to accommodate the new size. - */ - newsz = sm->sm_phys->smp_objsize + expected_entries * sizeof (uint64_t); - space_map_set_blocksize(sm, newsz, tx); - entry_map = zio_buf_alloc(sm->sm_blksz); entry_map_end = entry_map + (sm->sm_blksz / sizeof (uint64_t)); entry = entry_map; @@ -457,46 +395,48 @@ space_map_close(space_map_t *sm) kmem_free(sm, sizeof (*sm)); } -static void -space_map_reallocate(space_map_t *sm, dmu_tx_t *tx) -{ - ASSERT(dmu_tx_is_syncing(tx)); - - space_map_free(sm, tx); - dmu_buf_rele(sm->sm_dbuf, sm); - - sm->sm_object = space_map_alloc(sm->sm_os, tx); - VERIFY0(space_map_open_impl(sm)); -} - void space_map_truncate(space_map_t *sm, dmu_tx_t *tx) { objset_t *os = sm->sm_os; spa_t *spa = dmu_objset_spa(os); dmu_object_info_t doi; - int bonuslen; ASSERT(dsl_pool_sync_context(dmu_objset_pool(os))); ASSERT(dmu_tx_is_syncing(tx)); - VERIFY0(dmu_free_range(os, space_map_object(sm), 0, -1ULL, tx)); dmu_object_info_from_db(sm->sm_dbuf, &doi); - if (spa_feature_is_enabled(spa, SPA_FEATURE_SPACEMAP_HISTOGRAM)) { - bonuslen = sizeof (space_map_phys_t); - ASSERT3U(bonuslen, <=, dmu_bonus_max()); - } else { - bonuslen = SPACE_MAP_SIZE_V0; - } - - if (bonuslen != doi.doi_bonus_size || - doi.doi_data_block_size != SPACE_MAP_INITIAL_BLOCKSIZE) { + /* + * If the space map has the wrong bonus size (because + * SPA_FEATURE_SPACEMAP_HISTOGRAM has recently been enabled), or + * the wrong block size (because space_map_blksz has changed), + * free and re-allocate its object with the updated sizes. + * + * Otherwise, just truncate the current object. + */ + if ((spa_feature_is_enabled(spa, SPA_FEATURE_SPACEMAP_HISTOGRAM) && + doi.doi_bonus_size != sizeof (space_map_phys_t)) || + doi.doi_data_block_size != space_map_blksz) { zfs_dbgmsg("txg %llu, spa %s, reallocating: " "old bonus %u, old blocksz %u", dmu_tx_get_txg(tx), spa_name(spa), doi.doi_bonus_size, doi.doi_data_block_size); - space_map_reallocate(sm, tx); - VERIFY3U(sm->sm_blksz, ==, SPACE_MAP_INITIAL_BLOCKSIZE); + + space_map_free(sm, tx); + dmu_buf_rele(sm->sm_dbuf, sm); + + sm->sm_object = space_map_alloc(sm->sm_os, tx); + VERIFY0(space_map_open_impl(sm)); + } else { + VERIFY0(dmu_free_range(os, space_map_object(sm), 0, -1ULL, tx)); + + /* + * If the spacemap is reallocated, its histogram + * will be reset. Do the same in the common case so that + * bugs related to the uncommon case do not go unnoticed. + */ + bzero(sm->sm_phys->smp_histogram, + sizeof (sm->sm_phys->smp_histogram)); } dmu_buf_will_dirty(sm->sm_dbuf, tx); @@ -535,7 +475,7 @@ space_map_alloc(objset_t *os, dmu_tx_t * } object = dmu_object_alloc(os, - DMU_OT_SPACE_MAP, SPACE_MAP_INITIAL_BLOCKSIZE, + DMU_OT_SPACE_MAP, space_map_blksz, DMU_OT_SPACE_MAP_HEADER, bonuslen, tx); return (object); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/space_map.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/space_map.h Sat Oct 4 08:03:52 2014 (r272503) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/space_map.h Sat Oct 4 08:05:39 2014 (r272504) @@ -133,17 +133,6 @@ typedef enum { SM_FREE } maptype_t; -/* - * The data for a given space map can be kept on blocks of any size. - * Larger blocks entail fewer i/o operations, but they also cause the - * DMU to keep more data in-core, and also to waste more i/o bandwidth - * when only a few blocks have changed since the last transaction group. - * Rather than having a fixed block size for all space maps the block size - * can adjust as needed (see space_map_max_blksz). Set the initial block - * size for the space map to 4k. - */ -#define SPACE_MAP_INITIAL_BLOCKSIZE (1ULL << 12) - int space_map_load(space_map_t *sm, range_tree_t *rt, maptype_t maptype); void space_map_histogram_clear(space_map_t *sm); From owner-svn-src-all@FreeBSD.ORG Sat Oct 4 08:08:57 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 58A64A95; Sat, 4 Oct 2014 08:08:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 44BC811E; Sat, 4 Oct 2014 08:08:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9488vge099168; Sat, 4 Oct 2014 08:08:57 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9488uAI099166; Sat, 4 Oct 2014 08:08:56 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201410040808.s9488uAI099166@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sat, 4 Oct 2014 08:08:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272505 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 08:08:57 -0000 Author: mjg Date: Sat Oct 4 08:08:56 2014 New Revision: 272505 URL: https://svnweb.freebsd.org/changeset/base/272505 Log: Plug capability races. fp and appropriate capability lookups were not atomic, which could result in improper capabilities being checked. This could result either in protection bypass or in a spurious ENOTCAPABLE. Make fp + capability check atomic with the help of sequence counters. Reviewed by: kib MFC after: 3 weeks Modified: head/sys/kern/kern_descrip.c head/sys/sys/filedesc.h Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Sat Oct 4 08:05:39 2014 (r272504) +++ head/sys/kern/kern_descrip.c Sat Oct 4 08:08:56 2014 (r272505) @@ -288,11 +288,18 @@ _fdfree(struct filedesc *fdp, int fd, in struct filedescent *fde; fde = &fdp->fd_ofiles[fd]; +#ifdef CAPABILITIES + if (!last) + seq_write_begin(&fde->fde_seq); +#endif filecaps_free(&fde->fde_caps); if (last) return; - bzero(fde, sizeof(*fde)); + bzero(fde_change(fde), fde_change_size); fdunused(fdp, fd); +#ifdef CAPABILITIES + seq_write_end(&fde->fde_seq); +#endif } static inline void @@ -883,13 +890,19 @@ do_dup(struct thread *td, int flags, int /* * Duplicate the source descriptor. */ +#ifdef CAPABILITIES + seq_write_begin(&newfde->fde_seq); +#endif filecaps_free(&newfde->fde_caps); - *newfde = *oldfde; + memcpy(fde_change(newfde), fde_change(oldfde), fde_change_size); filecaps_copy(&oldfde->fde_caps, &newfde->fde_caps); if ((flags & DUP_CLOEXEC) != 0) newfde->fde_flags = oldfde->fde_flags | UF_EXCLOSE; else newfde->fde_flags = oldfde->fde_flags & ~UF_EXCLOSE; +#ifdef CAPABILITIES + seq_write_end(&newfde->fde_seq); +#endif *retval = new; if (delfp != NULL) { @@ -1756,6 +1769,9 @@ finstall(struct thread *td, struct file } fhold(fp); fde = &fdp->fd_ofiles[*fd]; +#ifdef CAPABILITIES + seq_write_begin(&fde->fde_seq); +#endif fde->fde_file = fp; if ((flags & O_CLOEXEC) != 0) fde->fde_flags |= UF_EXCLOSE; @@ -1763,6 +1779,9 @@ finstall(struct thread *td, struct file filecaps_move(fcaps, &fde->fde_caps); else filecaps_fill(&fde->fde_caps); +#ifdef CAPABILITIES + seq_write_end(&fde->fde_seq); +#endif FILEDESC_XUNLOCK(fdp); return (0); } @@ -2294,6 +2313,7 @@ fget_unlocked(struct filedesc *fdp, int struct file *fp; u_int count; #ifdef CAPABILITIES + seq_t seq; cap_rights_t haverights; int error; #endif @@ -2314,7 +2334,12 @@ fget_unlocked(struct filedesc *fdp, int */ for (;;) { #ifdef CAPABILITIES + seq = seq_read(fd_seq(fdp, fd)); fde = fdp->fd_ofiles[fd]; + if (!seq_consistent(fd_seq(fdp, fd), seq)) { + cpu_spinwait(); + continue; + } fp = fde.fde_file; #else fp = fdp->fd_ofiles[fd].fde_file; @@ -2343,7 +2368,11 @@ fget_unlocked(struct filedesc *fdp, int */ if (atomic_cmpset_acq_int(&fp->f_count, count, count + 1) != 1) continue; +#ifdef CAPABILITIES + if (seq_consistent_nomb(fd_seq(fdp, fd), seq)) +#else if (fp == fdp->fd_ofiles[fd].fde_file) +#endif break; fdrop(fp, curthread); } @@ -2700,6 +2729,7 @@ int dupfdopen(struct thread *td, struct filedesc *fdp, int dfd, int mode, int openerror, int *indxp) { + struct filedescent *newfde, *oldfde; struct file *fp; int error, indx; @@ -2743,17 +2773,32 @@ dupfdopen(struct thread *td, struct file return (EACCES); } fhold(fp); - fdp->fd_ofiles[indx] = fdp->fd_ofiles[dfd]; - filecaps_copy(&fdp->fd_ofiles[dfd].fde_caps, - &fdp->fd_ofiles[indx].fde_caps); + newfde = &fdp->fd_ofiles[indx]; + oldfde = &fdp->fd_ofiles[dfd]; +#ifdef CAPABILITIES + seq_write_begin(&newfde->fde_seq); +#endif + memcpy(fde_change(newfde), fde_change(oldfde), fde_change_size); + filecaps_copy(&oldfde->fde_caps, &newfde->fde_caps); +#ifdef CAPABILITIES + seq_write_end(&newfde->fde_seq); +#endif break; case ENXIO: /* * Steal away the file pointer from dfd and stuff it into indx. */ - fdp->fd_ofiles[indx] = fdp->fd_ofiles[dfd]; - bzero(&fdp->fd_ofiles[dfd], sizeof(fdp->fd_ofiles[dfd])); + newfde = &fdp->fd_ofiles[indx]; + oldfde = &fdp->fd_ofiles[dfd]; +#ifdef CAPABILITIES + seq_write_begin(&newfde->fde_seq); +#endif + memcpy(fde_change(newfde), fde_change(oldfde), fde_change_size); + bzero(fde_change(oldfde), fde_change_size); fdunused(fdp, dfd); +#ifdef CAPABILITIES + seq_write_end(&newfde->fde_seq); +#endif break; } FILEDESC_XUNLOCK(fdp); Modified: head/sys/sys/filedesc.h ============================================================================== --- head/sys/sys/filedesc.h Sat Oct 4 08:05:39 2014 (r272504) +++ head/sys/sys/filedesc.h Sat Oct 4 08:08:56 2014 (r272505) @@ -33,11 +33,14 @@ #ifndef _SYS_FILEDESC_H_ #define _SYS_FILEDESC_H_ +#include "opt_capsicum.h" + #include #include #include #include #include +#include #include #include @@ -50,6 +53,9 @@ struct filecaps { }; struct filedescent { +#ifdef CAPABILITIES + seq_t fde_seq; /* if you need fde_file and fde_caps in sync */ +#endif struct file *fde_file; /* file structure for open file */ struct filecaps fde_caps; /* per-descriptor rights */ uint8_t fde_flags; /* per-process open file flags */ @@ -58,6 +64,13 @@ struct filedescent { #define fde_fcntls fde_caps.fc_fcntls #define fde_ioctls fde_caps.fc_ioctls #define fde_nioctls fde_caps.fc_nioctls +#ifdef CAPABILITIES +#define fde_change(fde) ((char *)(fde) + sizeof(seq_t)) +#define fde_change_size (sizeof(struct filedescent) - sizeof(seq_t)) +#else +#define fde_change(fde) ((fde)) +#define fde_change_size (sizeof(struct filedescent)) +#endif /* * This structure is used for the management of descriptors. It may be @@ -82,6 +95,9 @@ struct filedesc { int fd_holdleaderscount; /* block fdfree() for shared close() */ int fd_holdleaderswakeup; /* fdfree() needs wakeup */ }; +#ifdef CAPABILITIES +#define fd_seq(fdp, fd) (&(fdp)->fd_ofiles[(fd)].fde_seq) +#endif /* * Structure to keep track of (process leader, struct fildedesc) tuples. From owner-svn-src-all@FreeBSD.ORG Sat Oct 4 08:14:11 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DF15BC9D; Sat, 4 Oct 2014 08:14:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CAE781C4; Sat, 4 Oct 2014 08:14:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s948EBsB003549; Sat, 4 Oct 2014 08:14:11 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s948EBH0003546; Sat, 4 Oct 2014 08:14:11 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201410040814.s948EBH0003546@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 4 Oct 2014 08:14:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272506 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 08:14:12 -0000 Author: delphij Date: Sat Oct 4 08:14:10 2014 New Revision: 272506 URL: https://svnweb.freebsd.org/changeset/base/272506 Log: MFV r272495: In arc_kmem_reap_now(), reap range_seg_cache too to reclaim memory in response of memory pressure. Illumos issue: 5163 arc should reap range_seg_cache MFC after: 1 week Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/range_tree.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Sat Oct 4 08:08:56 2014 (r272505) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Sat Oct 4 08:14:10 2014 (r272506) @@ -2591,6 +2591,7 @@ arc_kmem_reap_now(arc_reclaim_strategy_t size_t i; kmem_cache_t *prev_cache = NULL; kmem_cache_t *prev_data_cache = NULL; + extern kmem_cache_t *range_seg_cache; DTRACE_PROBE(arc__kmem_reap_start); #ifdef _KERNEL @@ -2628,6 +2629,7 @@ arc_kmem_reap_now(arc_reclaim_strategy_t } kmem_cache_reap_now(buf_cache); kmem_cache_reap_now(hdr_cache); + kmem_cache_reap_now(range_seg_cache); #ifdef sun /* Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/range_tree.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/range_tree.c Sat Oct 4 08:08:56 2014 (r272505) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/range_tree.c Sat Oct 4 08:14:10 2014 (r272506) @@ -33,7 +33,7 @@ #include #include -static kmem_cache_t *range_seg_cache; +kmem_cache_t *range_seg_cache; void range_tree_init(void) From owner-svn-src-all@FreeBSD.ORG Sat Oct 4 08:29:49 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7DEFAF61; Sat, 4 Oct 2014 08:29:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 69EC92D8; Sat, 4 Oct 2014 08:29:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s948Tnp3008985; Sat, 4 Oct 2014 08:29:49 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s948Tnof008984; Sat, 4 Oct 2014 08:29:49 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201410040829.s948Tnof008984@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 4 Oct 2014 08:29:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272507 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 08:29:49 -0000 Author: delphij Date: Sat Oct 4 08:29:48 2014 New Revision: 272507 URL: https://svnweb.freebsd.org/changeset/base/272507 Log: MFV r272496: Add tunable for number of metaslabs per vdev (vfs.zfs.vdev.metaslabs_per_vdev). The default remains at 200. Illumos issue: 5161 add tunable for number of metaslabs per vdev MFC after: 2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Sat Oct 4 08:14:10 2014 (r272506) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Sat Oct 4 08:29:48 2014 (r272507) @@ -156,6 +156,15 @@ static vdev_ops_t *vdev_ops_table[] = { /* + * When a vdev is added, it will be divided into approximately (but no + * more than) this number of metaslabs. + */ +int metaslabs_per_vdev = 200; +SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, metaslabs_per_vdev, CTLFLAG_RDTUN, + &metaslabs_per_vdev, 0, + "When a vdev is added, how many metaslabs the vdev should be divided into"); + +/* * Given a vdev type, return the appropriate ops vector. */ static vdev_ops_t * @@ -1663,9 +1672,9 @@ void vdev_metaslab_set_size(vdev_t *vd) { /* - * Aim for roughly 200 metaslabs per vdev. + * Aim for roughly metaslabs_per_vdev (default 200) metaslabs per vdev. */ - vd->vdev_ms_shift = highbit64(vd->vdev_asize / 200); + vd->vdev_ms_shift = highbit64(vd->vdev_asize / metaslabs_per_vdev); vd->vdev_ms_shift = MAX(vd->vdev_ms_shift, SPA_MAXBLOCKSHIFT); } From owner-svn-src-all@FreeBSD.ORG Sat Oct 4 08:32:16 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DDD6C485; Sat, 4 Oct 2014 08:32:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C9A09399; Sat, 4 Oct 2014 08:32:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s948WFpl012784; Sat, 4 Oct 2014 08:32:15 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s948WFCw012783; Sat, 4 Oct 2014 08:32:15 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201410040832.s948WFCw012783@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 4 Oct 2014 08:32:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272508 - head/tools/tools/ath/athalq X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 08:32:16 -0000 Author: adrian Date: Sat Oct 4 08:32:15 2014 New Revision: 272508 URL: https://svnweb.freebsd.org/changeset/base/272508 Log: Add in decode for the AR9300 RX descriptor. Modified: head/tools/tools/ath/athalq/ar9300_ds.c Modified: head/tools/tools/ath/athalq/ar9300_ds.c ============================================================================== --- head/tools/tools/ath/athalq/ar9300_ds.c Sat Oct 4 08:29:48 2014 (r272507) +++ head/tools/tools/ath/athalq/ar9300_ds.c Sat Oct 4 08:32:15 2014 (r272508) @@ -317,6 +317,80 @@ ar9300_decode_rxstatus(struct if_ath_alq (unsigned int) be32toh(a->hdr.tstamp_sec), (unsigned int) be32toh(a->hdr.tstamp_usec), (unsigned long long) be64toh(a->hdr.threadid)); + + /* status1 */ + /* .. and status5 */ + printf(" RSSI %d/%d/%d / %d/%d/%d; combined: %d; rate=0x%02x\n", + MS(rxs.status1, AR_rx_rssi_ant00), + MS(rxs.status1, AR_rx_rssi_ant01), + MS(rxs.status1, AR_rx_rssi_ant02), + MS(rxs.status5, AR_rx_rssi_ant10), + MS(rxs.status5, AR_rx_rssi_ant11), + MS(rxs.status5, AR_rx_rssi_ant12), + MS(rxs.status5, AR_rx_rssi_combined), + MS(rxs.status1, AR_rx_rate)); + + /* status2 */ + printf(" Len: %d; more=%d, delim=%d, upload=%d\n", + MS(rxs.status2, AR_data_len), + MF(rxs.status2, AR_rx_more), + MS(rxs.status2, AR_num_delim), + MS(rxs.status2, AR_hw_upload_data)); + + /* status3 */ + printf(" RX timestamp: %d\n", rxs.status3); + + /* status4 */ + printf(" GI: %d, 2040: %d, parallel40: %d, stbc=%d\n", + MF(rxs.status4, AR_gi), + MF(rxs.status4, AR_2040), + MF(rxs.status4, AR_parallel40), + MF(rxs.status4, AR_rx_stbc)); + printf(" Not sounding: %d, ness: %d, upload_valid: %d\n", + MF(rxs.status4, AR_rx_not_sounding), + MS(rxs.status4, AR_rx_ness), + MS(rxs.status4, AR_hw_upload_data_valid)); + printf(" RX antenna: 0x%08x\n", + MS(rxs.status4, AR_rx_antenna)); + + /* EVM */ + /* status6 - 9 */ + printf(" EVM: 0x%08x; 0x%08x; 0x%08x; 0x%08x\n", + rxs.status6, + rxs.status7, + rxs.status8, + rxs.status9); + + /* status10 - ? */ + + /* status11 */ + printf(" RX done: %d, RX frame ok: %d, CRC error: %d\n", + MF(rxs.status11, AR_rx_done), + MF(rxs.status11, AR_rx_frame_ok), + MF(rxs.status11, AR_crc_err)); + printf(" Decrypt CRC err: %d, PHY err: %d, MIC err: %d\n", + MF(rxs.status11, AR_decrypt_crc_err), + MF(rxs.status11, AR_phyerr), + MF(rxs.status11, AR_michael_err)); + printf(" Pre delim CRC err: %d, uAPSD Trig: %d\n", + MF(rxs.status11, AR_pre_delim_crc_err), + MF(rxs.status11, AR_apsd_trig)); + printf(" RXKeyIdxValid: %d, KeyIdx: %d, PHY error: %d\n", + MF(rxs.status11, AR_rx_key_idx_valid), + MS(rxs.status11, AR_key_idx), + MS(rxs.status11, AR_phy_err_code)); + printf(" RX more Aggr: %d, RX aggr %d, post delim CRC err: %d\n", + MF(rxs.status11, AR_rx_more_aggr), + MF(rxs.status11, AR_rx_aggr), + MF(rxs.status11, AR_post_delim_crc_err)); + printf(" hw upload data type: %d; position bit: %d\n", + MS(rxs.status11, AR_hw_upload_data_type), + MF(rxs.status11, AR_position_bit)); + printf(" Hi RX chain: %d, RxFirstAggr: %d, DecryptBusy: %d, KeyMiss: %d\n", + MF(rxs.status11, AR_hi_rx_chain), + MF(rxs.status11, AR_rx_first_aggr), + MF(rxs.status11, AR_decrypt_busy_err), + MF(rxs.status11, AR_key_miss)); } void From owner-svn-src-all@FreeBSD.ORG Sat Oct 4 08:41:24 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 432F9663; Sat, 4 Oct 2014 08:41:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 27C6E650; Sat, 4 Oct 2014 08:41:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s948fNwm016265; Sat, 4 Oct 2014 08:41:23 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s948fNVE016264; Sat, 4 Oct 2014 08:41:23 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201410040841.s948fNVE016264@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 4 Oct 2014 08:41:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272509 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 08:41:24 -0000 Author: delphij Date: Sat Oct 4 08:41:23 2014 New Revision: 272509 URL: https://svnweb.freebsd.org/changeset/base/272509 Log: Diff reduction with upstream. The code change is not really applicable to FreeBSD. Illumos issue: 5148 zvol's DKIOCFREE holds zfsdev_state_lock too long MFC after: 1 month Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Sat Oct 4 08:32:15 2014 (r272508) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Sat Oct 4 08:41:23 2014 (r272509) @@ -1983,8 +1983,8 @@ zvol_ioctl(dev_t dev, int cmd, intptr_t */ if (df.df_start >= zv->zv_volsize) break; /* No need to do anything... */ - if (df.df_start + df.df_length > zv->zv_volsize) - df.df_length = DMU_OBJECT_END; + + mutex_exit(&spa_namespace_lock); rl = zfs_range_lock(&zv->zv_znode, df.df_start, df.df_length, RL_WRITER); @@ -2023,7 +2023,7 @@ zvol_ioctl(dev_t dev, int cmd, intptr_t dmu_objset_pool(zv->zv_objset), 0); } } - break; + return (error); } default: From owner-svn-src-all@FreeBSD.ORG Sat Oct 4 08:51:58 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 31A258A2; Sat, 4 Oct 2014 08:51:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1DF50767; Sat, 4 Oct 2014 08:51:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s948pvJ4022066; Sat, 4 Oct 2014 08:51:57 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s948pviu022065; Sat, 4 Oct 2014 08:51:57 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201410040851.s948pviu022065@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 4 Oct 2014 08:51:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272510 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 08:51:58 -0000 Author: delphij Date: Sat Oct 4 08:51:57 2014 New Revision: 272510 URL: https://svnweb.freebsd.org/changeset/base/272510 Log: Add a new sysctl, vfs.zfs.vol.unmap_enabled, which allows the system administrator to toggle whether ZFS should ignore UNMAP requests. Illumos issue: 5149 zvols need a way to ignore DKIOCFREE MFC after: 2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Sat Oct 4 08:41:23 2014 (r272509) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Sat Oct 4 08:51:57 2014 (r272510) @@ -167,6 +167,14 @@ static LIST_HEAD(, zvol_state) all_zvols */ int zvol_maxphys = DMU_MAX_ACCESS/2; +/* + * Toggle unmap functionality. + */ +boolean_t zvol_unmap_enabled = B_TRUE; +SYSCTL_INT(_vfs_zfs_vol, OID_AUTO, unmap_enabled, CTLFLAG_RWTUN, + &zvol_unmap_enabled, 0, + "Enable UNMAP functionality"); + static d_open_t zvol_d_open; static d_close_t zvol_d_close; static d_read_t zvol_read; @@ -1971,6 +1979,9 @@ zvol_ioctl(dev_t dev, int cmd, intptr_t dkioc_free_t df; dmu_tx_t *tx; + if (!zvol_unmap_enabled) + break; + if (ddi_copyin((void *)arg, &df, sizeof (df), flag)) { error = SET_ERROR(EFAULT); break; @@ -2815,6 +2826,9 @@ zvol_d_ioctl(struct cdev *dev, u_long cm zil_commit(zv->zv_zilog, ZVOL_OBJ); break; case DIOCGDELETE: + if (!zvol_unmap_enabled) + break; + offset = ((off_t *)data)[0]; length = ((off_t *)data)[1]; if ((offset % DEV_BSIZE) != 0 || (length % DEV_BSIZE) != 0 || From owner-svn-src-all@FreeBSD.ORG Sat Oct 4 08:55:09 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0AF5EBF2; Sat, 4 Oct 2014 08:55:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EABD7794; Sat, 4 Oct 2014 08:55:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s948t8nC022563; Sat, 4 Oct 2014 08:55:08 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s948t84r022562; Sat, 4 Oct 2014 08:55:08 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201410040855.s948t84r022562@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 4 Oct 2014 08:55:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272511 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 08:55:09 -0000 Author: delphij Date: Sat Oct 4 08:55:08 2014 New Revision: 272511 URL: https://svnweb.freebsd.org/changeset/base/272511 Log: MFV r272499: Illumos issue: 5174 add sdt probe for blocked read in dbuf_read() MFC after: 2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Sat Oct 4 08:51:57 2014 (r272510) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Sat Oct 4 08:55:08 2014 (r272511) @@ -671,6 +671,8 @@ dbuf_read(dmu_buf_impl_t *db, zio_t *zio db->db_state == DB_FILL) { ASSERT(db->db_state == DB_READ || (flags & DB_RF_HAVESTRUCT) == 0); + DTRACE_PROBE2(blocked__read, dmu_buf_impl_t *, + db, zio_t *, zio); cv_wait(&db->db_changed, &db->db_mtx); } if (db->db_state == DB_UNCACHED) From owner-svn-src-all@FreeBSD.ORG Sat Oct 4 09:37:42 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 11ABC367; Sat, 4 Oct 2014 09:37:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F2573AFB; Sat, 4 Oct 2014 09:37:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s949bfBF041351; Sat, 4 Oct 2014 09:37:41 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s949bf0h041348; Sat, 4 Oct 2014 09:37:41 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201410040937.s949bf0h041348@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 4 Oct 2014 09:37:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272512 - head/sys/fs/autofs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 09:37:42 -0000 Author: trasz Date: Sat Oct 4 09:37:40 2014 New Revision: 272512 URL: https://svnweb.freebsd.org/changeset/base/272512 Log: Make autofs use shared vnode locks. Reviewed by: kib MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/sys/fs/autofs/autofs.h head/sys/fs/autofs/autofs_vfsops.c head/sys/fs/autofs/autofs_vnops.c Modified: head/sys/fs/autofs/autofs.h ============================================================================== --- head/sys/fs/autofs/autofs.h Sat Oct 4 08:55:08 2014 (r272511) +++ head/sys/fs/autofs/autofs.h Sat Oct 4 09:37:40 2014 (r272512) @@ -138,6 +138,6 @@ int autofs_node_find(struct autofs_node const char *name, int namelen, struct autofs_node **anpp); void autofs_node_delete(struct autofs_node *anp); int autofs_node_vn(struct autofs_node *anp, struct mount *mp, - struct vnode **vpp); + int flags, struct vnode **vpp); #endif /* !AUTOFS_H */ Modified: head/sys/fs/autofs/autofs_vfsops.c ============================================================================== --- head/sys/fs/autofs/autofs_vfsops.c Sat Oct 4 08:55:08 2014 (r272511) +++ head/sys/fs/autofs/autofs_vfsops.c Sat Oct 4 09:37:40 2014 (r272512) @@ -88,6 +88,10 @@ autofs_mount(struct mount *mp) vfs_getnewfsid(mp); + MNT_ILOCK(mp); + mp->mnt_kern_flag |= MNTK_LOOKUP_SHARED; + MNT_IUNLOCK(mp); + AUTOFS_XLOCK(amp); error = autofs_node_new(NULL, amp, ".", -1, &->am_root); if (error != 0) { @@ -177,7 +181,7 @@ autofs_root(struct mount *mp, int flags, amp = VFSTOAUTOFS(mp); - error = autofs_node_vn(amp->am_root, mp, vpp); + error = autofs_node_vn(amp->am_root, mp, flags, vpp); return (error); } Modified: head/sys/fs/autofs/autofs_vnops.c ============================================================================== --- head/sys/fs/autofs/autofs_vnops.c Sat Oct 4 08:55:08 2014 (r272511) +++ head/sys/fs/autofs/autofs_vnops.c Sat Oct 4 09:37:40 2014 (r272512) @@ -198,12 +198,12 @@ mounted: } static int -autofs_vget_callback(struct mount *mp, void *arg, int lkflags __unused, +autofs_vget_callback(struct mount *mp, void *arg, int flags, struct vnode **vpp) { - return (autofs_node_vn(arg, mp, vpp)); + return (autofs_node_vn(arg, mp, flags, vpp)); } static int @@ -233,7 +233,7 @@ autofs_lookup(struct vop_lookup_args *ap * use vn_vget_ino_gen() which takes care of all that. */ error = vn_vget_ino_gen(dvp, autofs_vget_callback, - anp->an_parent, 0, vpp); + anp->an_parent, cnp->cn_lkflags, vpp); if (error != 0) { AUTOFS_WARN("vn_vget_ino_gen() failed with error %d", error); @@ -294,7 +294,7 @@ autofs_lookup(struct vop_lookup_args *ap */ AUTOFS_SUNLOCK(amp); - error = autofs_node_vn(child, mp, vpp); + error = autofs_node_vn(child, mp, cnp->cn_lkflags, vpp); if (error != 0) { if ((cnp->cn_flags & ISLASTCN) && cnp->cn_nameiop == CREATE) return (EJUSTRETURN); @@ -334,7 +334,7 @@ autofs_mkdir(struct vop_mkdir_args *ap) } AUTOFS_XUNLOCK(amp); - error = autofs_node_vn(child, vp->v_mount, ap->a_vpp); + error = autofs_node_vn(child, vp->v_mount, LK_EXCLUSIVE, ap->a_vpp); return (error); } @@ -581,7 +581,8 @@ autofs_node_delete(struct autofs_node *a } int -autofs_node_vn(struct autofs_node *anp, struct mount *mp, struct vnode **vpp) +autofs_node_vn(struct autofs_node *anp, struct mount *mp, int flags, + struct vnode **vpp) { struct vnode *vp; int error; @@ -592,7 +593,7 @@ autofs_node_vn(struct autofs_node *anp, vp = anp->an_vnode; if (vp != NULL) { - error = vget(vp, LK_EXCLUSIVE | LK_RETRY, curthread); + error = vget(vp, flags | LK_RETRY, curthread); if (error != 0) { AUTOFS_WARN("vget failed with error %d", error); sx_xunlock(&anp->an_vnode_lock); @@ -632,6 +633,8 @@ autofs_node_vn(struct autofs_node *anp, vp->v_vflag |= VV_ROOT; vp->v_data = anp; + VN_LOCK_ASHARE(vp); + error = insmntque(vp, mp); if (error != 0) { AUTOFS_WARN("insmntque() failed with error %d", error); From owner-svn-src-all@FreeBSD.ORG Sat Oct 4 12:46:27 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 483CEA13; Sat, 4 Oct 2014 12:46:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 34D7BEC1; Sat, 4 Oct 2014 12:46:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s94CkRY2032089; Sat, 4 Oct 2014 12:46:27 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s94CkR5M032088; Sat, 4 Oct 2014 12:46:27 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201410041246.s94CkR5M032088@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Sat, 4 Oct 2014 12:46:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272518 - head/sys/netpfil/ipfw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 12:46:27 -0000 Author: melifaro Date: Sat Oct 4 12:46:26 2014 New Revision: 272518 URL: https://svnweb.freebsd.org/changeset/base/272518 Log: Bump max rule size to 512 opcodes. Modified: head/sys/netpfil/ipfw/ip_fw_sockopt.c Modified: head/sys/netpfil/ipfw/ip_fw_sockopt.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_sockopt.c Sat Oct 4 12:42:37 2014 (r272517) +++ head/sys/netpfil/ipfw/ip_fw_sockopt.c Sat Oct 4 12:46:26 2014 (r272518) @@ -940,7 +940,7 @@ ipfw_getrules(struct ip_fw_chain *chain, int ipfw_ctl(struct sockopt *sopt) { -#define RULE_MAXSIZE (256*sizeof(u_int32_t)) +#define RULE_MAXSIZE (512*sizeof(u_int32_t)) int error; size_t size, len, valsize; struct ip_fw *buf, *rule; From owner-svn-src-all@FreeBSD.ORG Sat Oct 4 13:14:37 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ECF48D03; Sat, 4 Oct 2014 13:14:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D9E47183; Sat, 4 Oct 2014 13:14:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s94DEbYA045806; Sat, 4 Oct 2014 13:14:37 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s94DEbrq045805; Sat, 4 Oct 2014 13:14:37 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201410041314.s94DEbrq045805@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 4 Oct 2014 13:14:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272519 - head/contrib/binutils/gas/config X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 13:14:38 -0000 Author: andrew Date: Sat Oct 4 13:14:37 2014 New Revision: 272519 URL: https://svnweb.freebsd.org/changeset/base/272519 Log: Add movw and movt relocations to the list of relocations against function names that must nnot be adjusted. This fixes a bug where code such as: movw r2, :lower16:symbol movt r2, :upper16:symbol It is common for clang to generate such code when targeting armv7. Modified: head/contrib/binutils/gas/config/tc-arm.c Modified: head/contrib/binutils/gas/config/tc-arm.c ============================================================================== --- head/contrib/binutils/gas/config/tc-arm.c Sat Oct 4 12:46:26 2014 (r272518) +++ head/contrib/binutils/gas/config/tc-arm.c Sat Oct 4 13:14:37 2014 (r272519) @@ -19395,6 +19395,12 @@ arm_fix_adjustable (fixS * fixP) || fixP->fx_r_type == BFD_RELOC_ARM_LDR_PC_G0) return 0; + if (fixP->fx_r_type == BFD_RELOC_ARM_MOVW + || fixP->fx_r_type == BFD_RELOC_ARM_MOVT + || fixP->fx_r_type == BFD_RELOC_ARM_THUMB_MOVW + || fixP->fx_r_type == BFD_RELOC_ARM_THUMB_MOVT) + return 0; + return 1; } #endif /* defined (OBJ_ELF) || defined (OBJ_COFF) */ From owner-svn-src-all@FreeBSD.ORG Sat Oct 4 14:00:26 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 94B736CD; Sat, 4 Oct 2014 14:00:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8211D755; Sat, 4 Oct 2014 14:00:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s94E0QGl065481; Sat, 4 Oct 2014 14:00:26 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s94E0QOY065480; Sat, 4 Oct 2014 14:00:26 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201410041400.s94E0QOY065480@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sat, 4 Oct 2014 14:00:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r272522 - svnadmin/conf X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 14:00:26 -0000 Author: gjb Date: Sat Oct 4 14:00:25 2014 New Revision: 272522 URL: https://svnweb.freebsd.org/changeset/base/272522 Log: The stable/10 branch no longer requires explicit re@ approval for commits. Committers are asked to please exercise caution when merging changes to stable/10 for the duration of the 10.1-RELEASE cycle. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: svnadmin/conf/approvers Modified: svnadmin/conf/approvers ============================================================================== --- svnadmin/conf/approvers Sat Oct 4 13:57:14 2014 (r272521) +++ svnadmin/conf/approvers Sat Oct 4 14:00:25 2014 (r272522) @@ -17,7 +17,7 @@ # $FreeBSD$ # #^head/ re -^stable/10/ re +#^stable/10/ re #^stable/9/ re #^stable/8/ re #^stable/7/ re From owner-svn-src-all@FreeBSD.ORG Sat Oct 4 14:17:31 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 84B13448; Sat, 4 Oct 2014 14:17:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 71B7092A; Sat, 4 Oct 2014 14:17:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s94EHVqo075442; Sat, 4 Oct 2014 14:17:31 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s94EHVos075441; Sat, 4 Oct 2014 14:17:31 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201410041417.s94EHVos075441@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Sat, 4 Oct 2014 14:17:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272523 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 14:17:31 -0000 Author: bz Date: Sat Oct 4 14:17:30 2014 New Revision: 272523 URL: https://svnweb.freebsd.org/changeset/base/272523 Log: Put and #ifdef _KERNEL around the #include for opt_capsicum.h to hopefully allow the build to finish after r272505. Modified: head/sys/sys/filedesc.h Modified: head/sys/sys/filedesc.h ============================================================================== --- head/sys/sys/filedesc.h Sat Oct 4 14:00:25 2014 (r272522) +++ head/sys/sys/filedesc.h Sat Oct 4 14:17:30 2014 (r272523) @@ -33,7 +33,9 @@ #ifndef _SYS_FILEDESC_H_ #define _SYS_FILEDESC_H_ +#ifdef _KERNEL #include "opt_capsicum.h" +#endif #include #include From owner-svn-src-all@FreeBSD.ORG Sat Oct 4 14:22:33 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 853B05BC; Sat, 4 Oct 2014 14:22:33 +0000 (UTC) Received: from mx1.sbone.de (bird.sbone.de [46.4.1.90]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 0D00B9D6; Sat, 4 Oct 2014 14:22:32 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 8B5DF25D3A97; Sat, 4 Oct 2014 14:22:23 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 9B4F1C770EF; Sat, 4 Oct 2014 14:22:22 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id oO0Ie_4HyLlh; Sat, 4 Oct 2014 14:22:20 +0000 (UTC) Received: from [IPv6:fde9:577b:c1a9:4410:e57f:1550:28b1:4a3] (unknown [IPv6:fde9:577b:c1a9:4410:e57f:1550:28b1:4a3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 2030EC770DA; Sat, 4 Oct 2014 14:22:17 +0000 (UTC) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r272505 - in head/sys: kern sys From: "Bjoern A. Zeeb" In-Reply-To: <201410040808.s9488uAI099166@svn.freebsd.org> Date: Sat, 4 Oct 2014 14:21:54 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <42180557-0119-4597-9492-662E1671A840@FreeBSD.org> References: <201410040808.s9488uAI099166@svn.freebsd.org> To: Mateusz Guzik , Konstantin Belousov X-Mailer: Apple Mail (2.1878.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 14:22:33 -0000 On 04 Oct 2014, at 08:08 , Mateusz Guzik wrote: > Author: mjg > Date: Sat Oct 4 08:08:56 2014 > New Revision: 272505 > URL: https://svnweb.freebsd.org/changeset/base/272505 >=20 > Log: > Plug capability races. >=20 > fp and appropriate capability lookups were not atomic, which could = result in > improper capabilities being checked. >=20 > This could result either in protection bypass or in a spurious = ENOTCAPABLE. >=20 > Make fp + capability check atomic with the help of sequence counters. >=20 > Reviewed by: kib > MFC after: 3 weeks >=20 > Modified: > head/sys/kern/kern_descrip.c > head/sys/sys/filedesc.h > =85 This file is included from user space. There is no opt_capsicum.h = there. Including an opt_* in the header file seems wrong in a lot of ways = usually. I tried to add a bandaid for the moment with r272523 which (to be = honest) makes it worse. This needs a better fix. I also wonder why the (conditional) fde_seq ended up at the beginning of = the structure rather than the end? > Modified: head/sys/sys/filedesc.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/sys/sys/filedesc.h Sat Oct 4 08:05:39 2014 = (r272504) > +++ head/sys/sys/filedesc.h Sat Oct 4 08:08:56 2014 = (r272505) > @@ -33,11 +33,14 @@ > #ifndef _SYS_FILEDESC_H_ > #define _SYS_FILEDESC_H_ >=20 > +#include "opt_capsicum.h" > + > #include > #include > #include > #include > #include > +#include > #include >=20 > #include > @@ -50,6 +53,9 @@ struct filecaps { > }; >=20 > struct filedescent { > +#ifdef CAPABILITIES > + seq_t fde_seq; /* if you need fde_file = and fde_caps in sync */ > +#endif > struct file *fde_file; /* file structure for = open file */ > struct filecaps fde_caps; /* per-descriptor rights = */ > uint8_t fde_flags; /* per-process open file = flags */ > @@ -58,6 +64,13 @@ struct filedescent { > #define fde_fcntls fde_caps.fc_fcntls > #define fde_ioctls fde_caps.fc_ioctls > #define fde_nioctls fde_caps.fc_nioctls > +#ifdef CAPABILITIES > +#define fde_change(fde) ((char *)(fde) + sizeof(seq_t)) > +#define fde_change_size (sizeof(struct filedescent) - = sizeof(seq_t)) > +#else > +#define fde_change(fde) ((fde)) > +#define fde_change_size (sizeof(struct filedescent)) > +#endif >=20 > /* > * This structure is used for the management of descriptors. It may = be > @@ -82,6 +95,9 @@ struct filedesc { > int fd_holdleaderscount; /* block fdfree() for shared = close() */ > int fd_holdleaderswakeup; /* fdfree() needs wakeup */ > }; > +#ifdef CAPABILITIES > +#define fd_seq(fdp, fd) (&(fdp)->fd_ofiles[(fd)].fde_seq) > +#endif >=20 > /* > * Structure to keep track of (process leader, struct fildedesc) = tuples. >=20 =97=20 Bjoern A. Zeeb "Come on. Learn, goddamn it.", WarGames, 1983 From owner-svn-src-all@FreeBSD.ORG Sat Oct 4 14:30:17 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B8D9880E; Sat, 4 Oct 2014 14:30:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A5A7AA17; Sat, 4 Oct 2014 14:30:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s94EUH7f080633; Sat, 4 Oct 2014 14:30:17 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s94EUHJe080631; Sat, 4 Oct 2014 14:30:17 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201410041430.s94EUHJe080631@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 4 Oct 2014 14:30:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272524 - in head/contrib/binutils: bfd include/elf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 14:30:17 -0000 Author: andrew Date: Sat Oct 4 14:30:16 2014 New Revision: 272524 URL: https://svnweb.freebsd.org/changeset/base/272524 Log: Silence a warning about Tag_Virtualization_use being unknown. We don't handle merging this tag correctly, however it's unused. Modified: head/contrib/binutils/bfd/elf32-arm.c head/contrib/binutils/include/elf/arm.h Modified: head/contrib/binutils/bfd/elf32-arm.c ============================================================================== --- head/contrib/binutils/bfd/elf32-arm.c Sat Oct 4 14:17:30 2014 (r272523) +++ head/contrib/binutils/bfd/elf32-arm.c Sat Oct 4 14:30:16 2014 (r272524) @@ -6965,7 +6965,8 @@ elf32_arm_merge_eabi_attributes (bfd *ib for (; in_list; in_list = in_list->next) { - if ((in_list->tag & 128) < 64) + if ((in_list->tag & 128) < 64 + && in_list->tag != Tag_Virtualization_use) { _bfd_error_handler (_("Warning: %B: Unknown EABI object attribute %d"), Modified: head/contrib/binutils/include/elf/arm.h ============================================================================== --- head/contrib/binutils/include/elf/arm.h Sat Oct 4 14:17:30 2014 (r272523) +++ head/contrib/binutils/include/elf/arm.h Sat Oct 4 14:30:16 2014 (r272524) @@ -271,6 +271,8 @@ enum Tag_ABI_optimization_goals, Tag_ABI_FP_optimization_goals, /* 32 is generic. */ + + Tag_Virtualization_use = 68, }; #endif From owner-svn-src-all@FreeBSD.ORG Sat Oct 4 14:32:48 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A4360968; Sat, 4 Oct 2014 14:32:48 +0000 (UTC) Received: from mho-01-ewr.mailhop.org (mho-03-ewr.mailhop.org [204.13.248.66]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 77ADFAEB; Sat, 4 Oct 2014 14:32:48 +0000 (UTC) Received: from [73.34.117.227] (helo=ilsoft.org) by mho-01-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1XaQO6-000Nx6-Go; Sat, 04 Oct 2014 14:32:46 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id s94EWj4T023931; Sat, 4 Oct 2014 08:32:45 -0600 (MDT) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1/LefhVMwvBRdUJDN18Dvei X-Authentication-Warning: paranoia.hippie.lan: Host revolution.hippie.lan [172.22.42.240] claimed to be [172.22.42.240] Subject: Re: svn commit: r272506 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs From: Ian Lepore To: Xin LI In-Reply-To: <201410040814.s948EBH0003546@svn.freebsd.org> References: <201410040814.s948EBH0003546@svn.freebsd.org> Content-Type: text/plain; charset="us-ascii" Date: Sat, 04 Oct 2014 08:32:45 -0600 Message-ID: <1412433165.12052.106.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 14:32:48 -0000 On Sat, 2014-10-04 at 08:14 +0000, Xin LI wrote: > Author: delphij > Date: Sat Oct 4 08:14:10 2014 > New Revision: 272506 > URL: https://svnweb.freebsd.org/changeset/base/272506 > > Log: > MFV r272495: > > In arc_kmem_reap_now(), reap range_seg_cache too to reclaim memory in > response of memory pressure. > > Illumos issue: > 5163 arc should reap range_seg_cache > > MFC after: 1 week > > Modified: > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/range_tree.c > Directory Properties: > head/sys/cddl/contrib/opensolaris/ (props changed) > > Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c > ============================================================================== > --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Sat Oct 4 08:08:56 2014 (r272505) > +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Sat Oct 4 08:14:10 2014 (r272506) > @@ -2591,6 +2591,7 @@ arc_kmem_reap_now(arc_reclaim_strategy_t > size_t i; > kmem_cache_t *prev_cache = NULL; > kmem_cache_t *prev_data_cache = NULL; > + extern kmem_cache_t *range_seg_cache; > I get this when compiling sparc64 GENERIC, must be different warnings enabled... cc1: warnings being treated as errors /local/build/staging/freebsd/head/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c: In function 'arc_kmem_reap_now': /local/build/staging/freebsd/head/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c:2594: warning: nested extern declaration of 'range_seg_cache' [-Wnested-externs] -- Ian > DTRACE_PROBE(arc__kmem_reap_start); > #ifdef _KERNEL > @@ -2628,6 +2629,7 @@ arc_kmem_reap_now(arc_reclaim_strategy_t > } > kmem_cache_reap_now(buf_cache); > kmem_cache_reap_now(hdr_cache); > + kmem_cache_reap_now(range_seg_cache); > > #ifdef sun > /* > > Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/range_tree.c > ============================================================================== > --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/range_tree.c Sat Oct 4 08:08:56 2014 (r272505) > +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/range_tree.c Sat Oct 4 08:14:10 2014 (r272506) > @@ -33,7 +33,7 @@ > #include > #include > > -static kmem_cache_t *range_seg_cache; > +kmem_cache_t *range_seg_cache; > > void > range_tree_init(void) > From owner-svn-src-all@FreeBSD.ORG Sat Oct 4 14:38:39 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B8BF8CBE; Sat, 4 Oct 2014 14:38:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A4860B0F; Sat, 4 Oct 2014 14:38:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s94EcdFm085102; Sat, 4 Oct 2014 14:38:39 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s94Ecde0085101; Sat, 4 Oct 2014 14:38:39 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201410041438.s94Ecde0085101@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 4 Oct 2014 14:38:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272525 - stable/10/share/man/man9 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 14:38:39 -0000 Author: trasz Date: Sat Oct 4 14:38:39 2014 New Revision: 272525 URL: https://svnweb.freebsd.org/changeset/base/272525 Log: MFC 271759: Add missing links to taskqueue(9). Sponsored by: The FreeBSD Foundation Modified: stable/10/share/man/man9/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man9/Makefile ============================================================================== --- stable/10/share/man/man9/Makefile Sat Oct 4 14:30:16 2014 (r272524) +++ stable/10/share/man/man9/Makefile Sat Oct 4 14:38:39 2014 (r272525) @@ -1345,6 +1345,7 @@ MLINKS+=taskqueue.9 TASK_INIT.9 \ taskqueue.9 TASK_INITIALIZER.9 \ taskqueue.9 taskqueue_block.9 \ taskqueue.9 taskqueue_cancel.9 \ + taskqueue.9 taskqueue_cancel_timeout.9 \ taskqueue.9 taskqueue_create.9 \ taskqueue.9 taskqueue_create_fast.9 \ taskqueue.9 TASKQUEUE_DECLARE.9 \ @@ -1352,13 +1353,18 @@ MLINKS+=taskqueue.9 TASK_INIT.9 \ taskqueue.9 TASKQUEUE_DEFINE_THREAD.9 \ taskqueue.9 taskqueue_drain.9 \ taskqueue.9 taskqueue_drain_all.9 \ + taskqueue.9 taskqueue_drain_timeout.9 \ taskqueue.9 taskqueue_enqueue.9 \ taskqueue.9 taskqueue_enqueue_fast.9 \ + taskqueue.9 taskqueue_enqueue_timeout.9 \ taskqueue.9 TASKQUEUE_FAST_DEFINE.9 \ taskqueue.9 TASKQUEUE_FAST_DEFINE_THREAD.9 \ taskqueue.9 taskqueue_free.9 \ taskqueue.9 taskqueue_member.9 \ taskqueue.9 taskqueue_run.9 \ + taskqueue.9 taskqueue_set_callback.9 \ + taskqueue.9 taskqueue_start_threads.9 \ + taskqueue.9 taskqueue_start_threads_pinned.9 \ taskqueue.9 taskqueue_unblock.9 MLINKS+=time.9 boottime.9 \ time.9 time_second.9 \ From owner-svn-src-all@FreeBSD.ORG Sat Oct 4 14:40:13 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2419FE11; Sat, 4 Oct 2014 14:40:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0C286B1E; Sat, 4 Oct 2014 14:40:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s94EeCsu085545; Sat, 4 Oct 2014 14:40:12 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s94EeCOr085544; Sat, 4 Oct 2014 14:40:12 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201410041440.s94EeCOr085544@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 4 Oct 2014 14:40:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272526 - stable/10/share/man/man9 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 14:40:13 -0000 Author: trasz Date: Sat Oct 4 14:40:12 2014 New Revision: 272526 URL: https://svnweb.freebsd.org/changeset/base/272526 Log: MFC 271761: Add missing link to TIMEOUT_TASK_INIT(9). Sponsored by: The FreeBSD Foundation Modified: stable/10/share/man/man9/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man9/Makefile ============================================================================== --- stable/10/share/man/man9/Makefile Sat Oct 4 14:38:39 2014 (r272525) +++ stable/10/share/man/man9/Makefile Sat Oct 4 14:40:12 2014 (r272526) @@ -1365,7 +1365,8 @@ MLINKS+=taskqueue.9 TASK_INIT.9 \ taskqueue.9 taskqueue_set_callback.9 \ taskqueue.9 taskqueue_start_threads.9 \ taskqueue.9 taskqueue_start_threads_pinned.9 \ - taskqueue.9 taskqueue_unblock.9 + taskqueue.9 taskqueue_unblock.9 \ + taskqueue.9 TIMEOUT_TASK_INIT.9 MLINKS+=time.9 boottime.9 \ time.9 time_second.9 \ time.9 time_uptime.9 From owner-svn-src-all@FreeBSD.ORG Sat Oct 4 14:45:05 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F35BFF8B; Sat, 4 Oct 2014 14:45:04 +0000 (UTC) Received: from smtp1.multiplay.co.uk (smtp1.multiplay.co.uk [85.236.96.35]) by mx1.freebsd.org (Postfix) with ESMTP id 65FE4BDA; Sat, 4 Oct 2014 14:45:04 +0000 (UTC) Received: by smtp1.multiplay.co.uk (Postfix, from userid 65534) id 6376620E7089B; Sat, 4 Oct 2014 14:45:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.multiplay.co.uk X-Spam-Level: * X-Spam-Status: No, score=2.0 required=8.0 tests=AWL,BAYES_00,DOS_OE_TO_MX, FSL_HELO_NON_FQDN_1,RDNS_DYNAMIC autolearn=no version=3.3.1 Received: from r2d2 (82-69-141-170.dsl.in-addr.zen.co.uk [82.69.141.170]) by smtp1.multiplay.co.uk (Postfix) with ESMTPS id C4CDD20E70899; Sat, 4 Oct 2014 14:45:00 +0000 (UTC) Message-ID: From: "Steven Hartland" To: "Ian Lepore" , "Xin LI" References: <201410040814.s948EBH0003546@svn.freebsd.org> <1412433165.12052.106.camel@revolution.hippie.lan> Subject: Re: svn commit: r272506 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Date: Sat, 4 Oct 2014 15:44:55 +0100 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_00D8_01CFDFEA.24FE9880" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 14:45:05 -0000 This is a multi-part message in MIME format. ------=_NextPart_000_00D8_01CFDFEA.24FE9880 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit Does the attached patch fix this for your Ian? Regards Steve ----- Original Message ----- From: "Ian Lepore" To: "Xin LI" Cc: ; ; Sent: Saturday, October 04, 2014 3:32 PM Subject: Re: svn commit: r272506 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs > On Sat, 2014-10-04 at 08:14 +0000, Xin LI wrote: >> Author: delphij >> Date: Sat Oct 4 08:14:10 2014 >> New Revision: 272506 >> URL: https://svnweb.freebsd.org/changeset/base/272506 >> >> Log: >> MFV r272495: >> >> In arc_kmem_reap_now(), reap range_seg_cache too to reclaim memory in >> response of memory pressure. >> >> Illumos issue: >> 5163 arc should reap range_seg_cache >> >> MFC after: 1 week >> >> Modified: >> head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c >> head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/range_tree.c >> Directory Properties: >> head/sys/cddl/contrib/opensolaris/ (props changed) >> >> Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c >> ============================================================================== >> --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Sat Oct 4 08:08:56 2014 (r272505) >> +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Sat Oct 4 08:14:10 2014 (r272506) >> @@ -2591,6 +2591,7 @@ arc_kmem_reap_now(arc_reclaim_strategy_t >> size_t i; >> kmem_cache_t *prev_cache = NULL; >> kmem_cache_t *prev_data_cache = NULL; >> + extern kmem_cache_t *range_seg_cache; >> > > I get this when compiling sparc64 GENERIC, must be different warnings > enabled... > > cc1: warnings being treated as errors > /local/build/staging/freebsd/head/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c: In function 'arc_kmem_reap_now': > /local/build/staging/freebsd/head/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c:2594: warning: nested extern > declaration of 'range_seg_cache' [-Wnested-externs] > > -- Ian > >> DTRACE_PROBE(arc__kmem_reap_start); >> #ifdef _KERNEL >> @@ -2628,6 +2629,7 @@ arc_kmem_reap_now(arc_reclaim_strategy_t >> } >> kmem_cache_reap_now(buf_cache); >> kmem_cache_reap_now(hdr_cache); >> + kmem_cache_reap_now(range_seg_cache); >> >> #ifdef sun >> /* >> >> Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/range_tree.c >> ============================================================================== >> --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/range_tree.c Sat Oct 4 08:08:56 2014 (r272505) >> +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/range_tree.c Sat Oct 4 08:14:10 2014 (r272506) >> @@ -33,7 +33,7 @@ >> #include >> #include >> >> -static kmem_cache_t *range_seg_cache; >> +kmem_cache_t *range_seg_cache; >> >> void >> range_tree_init(void) >> > > > > ------=_NextPart_000_00D8_01CFDFEA.24FE9880 Content-Type: application/octet-stream; name="range_seg.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="range_seg.patch" Index: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= --- sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c (revision = 272525)=0A= +++ sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c (working copy)=0A= @@ -2584,6 +2584,7 @@ arc_reclaim_needed(void)=0A= =0A= extern kmem_cache_t *zio_buf_cache[];=0A= extern kmem_cache_t *zio_data_buf_cache[];=0A= +extern kmem_cache_t *range_seg_cache;=0A= =0A= static void __noinline=0A= arc_kmem_reap_now(arc_reclaim_strategy_t strat)=0A= @@ -2591,7 +2592,6 @@ arc_kmem_reap_now(arc_reclaim_strategy_t strat)=0A= size_t i;=0A= kmem_cache_t *prev_cache =3D NULL;=0A= kmem_cache_t *prev_data_cache =3D NULL;=0A= - extern kmem_cache_t *range_seg_cache;=0A= =0A= DTRACE_PROBE(arc__kmem_reap_start);=0A= #ifdef _KERNEL=0A= ------=_NextPart_000_00D8_01CFDFEA.24FE9880-- From owner-svn-src-all@FreeBSD.ORG Sat Oct 4 15:42:53 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C3676A4; Sat, 4 Oct 2014 15:42:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AF5FA18F; Sat, 4 Oct 2014 15:42:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s94Fgrho018560; Sat, 4 Oct 2014 15:42:53 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s94Fgrhk018552; Sat, 4 Oct 2014 15:42:53 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201410041542.s94Fgrhk018552@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 4 Oct 2014 15:42:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272527 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 15:42:53 -0000 Author: delphij Date: Sat Oct 4 15:42:52 2014 New Revision: 272527 URL: https://svnweb.freebsd.org/changeset/base/272527 Log: Don't make nested definition for range_seg_cache. Reported by: ian MFC after: 1 week X-MFC-With: r272506 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Sat Oct 4 14:40:12 2014 (r272526) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Sat Oct 4 15:42:52 2014 (r272527) @@ -2584,6 +2584,7 @@ arc_reclaim_needed(void) extern kmem_cache_t *zio_buf_cache[]; extern kmem_cache_t *zio_data_buf_cache[]; +extern kmem_cache_t *range_seg_cache; static void __noinline arc_kmem_reap_now(arc_reclaim_strategy_t strat) @@ -2591,7 +2592,6 @@ arc_kmem_reap_now(arc_reclaim_strategy_t size_t i; kmem_cache_t *prev_cache = NULL; kmem_cache_t *prev_data_cache = NULL; - extern kmem_cache_t *range_seg_cache; DTRACE_PROBE(arc__kmem_reap_start); #ifdef _KERNEL From owner-svn-src-all@FreeBSD.ORG Sat Oct 4 15:59:16 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 955D99A5; Sat, 4 Oct 2014 15:59:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 765D72FA; Sat, 4 Oct 2014 15:59:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s94FxGlR024430; Sat, 4 Oct 2014 15:59:16 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s94FxGXn024427; Sat, 4 Oct 2014 15:59:16 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201410041559.s94FxGXn024427@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 4 Oct 2014 15:59:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272528 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 15:59:16 -0000 Author: ian Date: Sat Oct 4 15:59:15 2014 New Revision: 272528 URL: https://svnweb.freebsd.org/changeset/base/272528 Log: Make kevent(2) periodic timer events more reliably periodic. The event callout is now scheduled using the C_ABSOLUTE flag, and the absolute time of each event is calculated as the time the previous event was scheduled for plus the interval. This ensures that latency in processing a given event doesn't perturb the arrival time of any subsequent events. Reviewed by: jhb Modified: head/sys/kern/kern_event.c head/sys/sys/event.h Modified: head/sys/kern/kern_event.c ============================================================================== --- head/sys/kern/kern_event.c Sat Oct 4 15:42:52 2014 (r272527) +++ head/sys/kern/kern_event.c Sat Oct 4 15:59:15 2014 (r272528) @@ -569,9 +569,10 @@ filt_timerexpire(void *knx) if ((kn->kn_flags & EV_ONESHOT) != EV_ONESHOT) { calloutp = (struct callout *)kn->kn_hook; - callout_reset_sbt_on(calloutp, - timer2sbintime(kn->kn_sdata, kn->kn_sfflags), 0, - filt_timerexpire, kn, PCPU_GET(cpuid), 0); + *kn->kn_ptr.p_nexttime += timer2sbintime(kn->kn_sdata, + kn->kn_sfflags); + callout_reset_sbt_on(calloutp, *kn->kn_ptr.p_nexttime, 0, + filt_timerexpire, kn, PCPU_GET(cpuid), C_ABSOLUTE); } } @@ -607,11 +608,13 @@ filt_timerattach(struct knote *kn) kn->kn_flags |= EV_CLEAR; /* automatically set */ kn->kn_status &= ~KN_DETACHED; /* knlist_add clears it */ + kn->kn_ptr.p_nexttime = malloc(sizeof(sbintime_t), M_KQUEUE, M_WAITOK); calloutp = malloc(sizeof(*calloutp), M_KQUEUE, M_WAITOK); callout_init(calloutp, CALLOUT_MPSAFE); kn->kn_hook = calloutp; - callout_reset_sbt_on(calloutp, to, 0, - filt_timerexpire, kn, PCPU_GET(cpuid), 0); + *kn->kn_ptr.p_nexttime = to + sbinuptime(); + callout_reset_sbt_on(calloutp, *kn->kn_ptr.p_nexttime, 0, + filt_timerexpire, kn, PCPU_GET(cpuid), C_ABSOLUTE); return (0); } @@ -625,6 +628,7 @@ filt_timerdetach(struct knote *kn) calloutp = (struct callout *)kn->kn_hook; callout_drain(calloutp); free(calloutp, M_KQUEUE); + free(kn->kn_ptr.p_nexttime, M_KQUEUE); old = atomic_fetch_sub_explicit(&kq_ncallouts, 1, memory_order_relaxed); KASSERT(old > 0, ("Number of callouts cannot become negative")); kn->kn_status |= KN_DETACHED; /* knlist_remove sets it */ Modified: head/sys/sys/event.h ============================================================================== --- head/sys/sys/event.h Sat Oct 4 15:42:52 2014 (r272527) +++ head/sys/sys/event.h Sat Oct 4 15:59:15 2014 (r272528) @@ -221,6 +221,7 @@ struct knote { struct proc *p_proc; /* proc pointer */ struct aiocblist *p_aio; /* AIO job pointer */ struct aioliojob *p_lio; /* LIO job pointer */ + sbintime_t *p_nexttime; /* next timer event fires at */ void *p_v; /* generic other pointer */ } kn_ptr; struct filterops *kn_fop; From owner-svn-src-all@FreeBSD.ORG Sat Oct 4 16:36:39 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1FAD93FB; Sat, 4 Oct 2014 16:36:39 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 86FF18D6; Sat, 4 Oct 2014 16:36:38 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id s94GaXki043686 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 4 Oct 2014 19:36:33 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua s94GaXki043686 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id s94GaXvM043685; Sat, 4 Oct 2014 19:36:33 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 4 Oct 2014 19:36:33 +0300 From: Konstantin Belousov To: "Bjoern A. Zeeb" Subject: Re: svn commit: r272505 - in head/sys: kern sys Message-ID: <20141004163633.GT26076@kib.kiev.ua> References: <201410040808.s9488uAI099166@svn.freebsd.org> <42180557-0119-4597-9492-662E1671A840@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <42180557-0119-4597-9492-662E1671A840@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Mateusz Guzik X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 16:36:39 -0000 On Sat, Oct 04, 2014 at 02:21:54PM +0000, Bjoern A. Zeeb wrote: > > On 04 Oct 2014, at 08:08 , Mateusz Guzik wrote: > > > Author: mjg > > Date: Sat Oct 4 08:08:56 2014 > > New Revision: 272505 > > URL: https://svnweb.freebsd.org/changeset/base/272505 > > > > Log: > > Plug capability races. > > > > fp and appropriate capability lookups were not atomic, which could result in > > improper capabilities being checked. > > > > This could result either in protection bypass or in a spurious ENOTCAPABLE. > > > > Make fp + capability check atomic with the help of sequence counters. > > > > Reviewed by: kib > > MFC after: 3 weeks > > > > Modified: > > head/sys/kern/kern_descrip.c > > head/sys/sys/filedesc.h > > ? > > > This file is included from user space. There is no opt_capsicum.h there. > Including an opt_* in the header file seems wrong in a lot of ways usually. I think that easiest, and probably the most correct, fix is to include the fde_seq member unconditionally. > > I tried to add a bandaid for the moment with r272523 which (to be honest) makes it worse. > > This needs a better fix. Hm, I do see inclusion of sys/filedesc.h in the usermode programs, most worrying is libprocstat. But, there is nothing useful for usermode in the header, except possibly for the code with inspects KVA. > > > I also wonder why the (conditional) fde_seq ended up at the beginning of the structure rather than the end? > Why not ? From owner-svn-src-all@FreeBSD.ORG Sat Oct 4 17:46:05 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 579DD89D; Sat, 4 Oct 2014 17:46:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 28F2AF08; Sat, 4 Oct 2014 17:46:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s94Hk5hP077211; Sat, 4 Oct 2014 17:46:05 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s94Hk5Xn077210; Sat, 4 Oct 2014 17:46:05 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201410041746.s94Hk5Xn077210@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sat, 4 Oct 2014 17:46:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272531 - stable/10/sys/fs/ext2fs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 17:46:05 -0000 Author: pfg Date: Sat Oct 4 17:46:04 2014 New Revision: 272531 URL: https://svnweb.freebsd.org/changeset/base/272531 Log: MFC r271467, r271468: ext2fs: add ext2_getpages(). Literally copy/pasted from ffs_getpages(). Tested with: fsx Modified: stable/10/sys/fs/ext2fs/ext2_vnops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/ext2fs/ext2_vnops.c ============================================================================== --- stable/10/sys/fs/ext2fs/ext2_vnops.c Sat Oct 4 17:21:30 2014 (r272530) +++ stable/10/sys/fs/ext2fs/ext2_vnops.c Sat Oct 4 17:46:04 2014 (r272531) @@ -54,6 +54,7 @@ #include #include #include +#include #include #include #include @@ -65,9 +66,11 @@ #include #include -#include -#include +#include #include +#include +#include +#include #include #include "opt_directio.h" @@ -94,6 +97,7 @@ static int ext2_chown(struct vnode *, ui static vop_close_t ext2_close; static vop_create_t ext2_create; static vop_fsync_t ext2_fsync; +static vop_getpages_t ext2_getpages; static vop_getattr_t ext2_getattr; static vop_ioctl_t ext2_ioctl; static vop_link_t ext2_link; @@ -124,6 +128,7 @@ struct vop_vector ext2_vnodeops = { .vop_close = ext2_close, .vop_create = ext2_create, .vop_fsync = ext2_fsync, + .vop_getpages = ext2_getpages, .vop_getattr = ext2_getattr, .vop_inactive = ext2_inactive, .vop_ioctl = ext2_ioctl, @@ -2058,3 +2063,43 @@ ext2_write(struct vop_write_args *ap) } return (error); } + +/* + * get page routine + */ +static int +ext2_getpages(struct vop_getpages_args *ap) +{ + int i; + vm_page_t mreq; + int pcount; + + pcount = round_page(ap->a_count) / PAGE_SIZE; + mreq = ap->a_m[ap->a_reqpage]; + + /* + * if ANY DEV_BSIZE blocks are valid on a large filesystem block, + * then the entire page is valid. Since the page may be mapped, + * user programs might reference data beyond the actual end of file + * occuring within the page. We have to zero that data. + */ + VM_OBJECT_WLOCK(mreq->object); + if (mreq->valid) { + if (mreq->valid != VM_PAGE_BITS_ALL) + vm_page_zero_invalid(mreq, TRUE); + for (i = 0; i < pcount; i++) { + if (i != ap->a_reqpage) { + vm_page_lock(ap->a_m[i]); + vm_page_free(ap->a_m[i]); + vm_page_unlock(ap->a_m[i]); + } + } + VM_OBJECT_WUNLOCK(mreq->object); + return VM_PAGER_OK; + } + VM_OBJECT_WUNLOCK(mreq->object); + + return vnode_pager_generic_getpages(ap->a_vp, ap->a_m, + ap->a_count, + ap->a_reqpage); +} From owner-svn-src-all@FreeBSD.ORG Sat Oct 4 17:49:37 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C63A4CB8; Sat, 4 Oct 2014 17:49:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 97CAFF39; Sat, 4 Oct 2014 17:49:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s94Hnbqs077790; Sat, 4 Oct 2014 17:49:37 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s94Hnbb2077789; Sat, 4 Oct 2014 17:49:37 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201410041749.s94Hnbb2077789@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sat, 4 Oct 2014 17:49:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r272532 - stable/9/sys/fs/ext2fs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 17:49:37 -0000 Author: pfg Date: Sat Oct 4 17:49:36 2014 New Revision: 272532 URL: https://svnweb.freebsd.org/changeset/base/272532 Log: MFC r271467, r271468: ext2fs: add ext2_getpages(). Literally copy/pasted from ffs_getpages(). Tested with: fsx Modified: stable/9/sys/fs/ext2fs/ext2_vnops.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/ext2fs/ext2_vnops.c ============================================================================== --- stable/9/sys/fs/ext2fs/ext2_vnops.c Sat Oct 4 17:46:04 2014 (r272531) +++ stable/9/sys/fs/ext2fs/ext2_vnops.c Sat Oct 4 17:49:36 2014 (r272532) @@ -54,6 +54,7 @@ #include #include #include +#include #include #include #include @@ -65,9 +66,11 @@ #include #include -#include -#include +#include #include +#include +#include +#include #include #include "opt_directio.h" @@ -96,6 +99,7 @@ static int ext2_chown(struct vnode *, ui static vop_close_t ext2_close; static vop_create_t ext2_create; static vop_fsync_t ext2_fsync; +static vop_getpages_t ext2_getpages; static vop_getattr_t ext2_getattr; static vop_ioctl_t ext2_ioctl; static vop_link_t ext2_link; @@ -126,6 +130,7 @@ struct vop_vector ext2_vnodeops = { .vop_close = ext2_close, .vop_create = ext2_create, .vop_fsync = ext2_fsync, + .vop_getpages = ext2_getpages, .vop_getattr = ext2_getattr, .vop_inactive = ext2_inactive, .vop_ioctl = ext2_ioctl, @@ -2067,3 +2072,43 @@ ext2_write(struct vop_write_args *ap) } return (error); } + +/* + * get page routine + */ +static int +ext2_getpages(struct vop_getpages_args *ap) +{ + int i; + vm_page_t mreq; + int pcount; + + pcount = round_page(ap->a_count) / PAGE_SIZE; + mreq = ap->a_m[ap->a_reqpage]; + + /* + * if ANY DEV_BSIZE blocks are valid on a large filesystem block, + * then the entire page is valid. Since the page may be mapped, + * user programs might reference data beyond the actual end of file + * occuring within the page. We have to zero that data. + */ + VM_OBJECT_WLOCK(mreq->object); + if (mreq->valid) { + if (mreq->valid != VM_PAGE_BITS_ALL) + vm_page_zero_invalid(mreq, TRUE); + for (i = 0; i < pcount; i++) { + if (i != ap->a_reqpage) { + vm_page_lock(ap->a_m[i]); + vm_page_free(ap->a_m[i]); + vm_page_unlock(ap->a_m[i]); + } + } + VM_OBJECT_WUNLOCK(mreq->object); + return VM_PAGER_OK; + } + VM_OBJECT_WUNLOCK(mreq->object); + + return vnode_pager_generic_getpages(ap->a_vp, ap->a_m, + ap->a_count, + ap->a_reqpage); +} From owner-svn-src-all@FreeBSD.ORG Sat Oct 4 18:00:16 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BD088F2C; Sat, 4 Oct 2014 18:00:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A8E95D4; Sat, 4 Oct 2014 18:00:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s94I0Gj5083587; Sat, 4 Oct 2014 18:00:16 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s94I0G9O083586; Sat, 4 Oct 2014 18:00:16 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201410041800.s94I0G9O083586@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sat, 4 Oct 2014 18:00:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272533 - head/lib/libc/stdtime X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 18:00:16 -0000 Author: pfg Date: Sat Oct 4 18:00:15 2014 New Revision: 272533 URL: https://svnweb.freebsd.org/changeset/base/272533 Log: Minor doc format fix. Submitted by: Yonghyeon PYUN Modified: head/lib/libc/stdtime/strptime.3 Modified: head/lib/libc/stdtime/strptime.3 ============================================================================== --- head/lib/libc/stdtime/strptime.3 Sat Oct 4 17:49:36 2014 (r272532) +++ head/lib/libc/stdtime/strptime.3 Sat Oct 4 18:00:15 2014 (r272533) @@ -79,7 +79,8 @@ and .Fa \&%D , are now interpreted as beginning at 1969 per POSIX requirements. Years 69-00 are interpreted in the 20th century (1969-2000), years -01-68 in the 21st century (2001-2068). The +01-68 in the 21st century (2001-2068). +The .Fa \&%U and .Fa %W From owner-svn-src-all@FreeBSD.ORG Sat Oct 4 18:28:29 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 15A0866D; Sat, 4 Oct 2014 18:28:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0175F390; Sat, 4 Oct 2014 18:28:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s94ISSI8099604; Sat, 4 Oct 2014 18:28:28 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s94ISSaf099602; Sat, 4 Oct 2014 18:28:28 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201410041828.s94ISSaf099602@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 4 Oct 2014 18:28:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272534 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 18:28:29 -0000 Author: kib Date: Sat Oct 4 18:28:27 2014 New Revision: 272534 URL: https://svnweb.freebsd.org/changeset/base/272534 Log: Add IO_RANGELOCKED flag for vn_rdwr(9), which specifies that vnode is not locked, but range is. Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Modified: head/sys/kern/vfs_vnops.c head/sys/sys/vnode.h Modified: head/sys/kern/vfs_vnops.c ============================================================================== --- head/sys/kern/vfs_vnops.c Sat Oct 4 18:00:15 2014 (r272533) +++ head/sys/kern/vfs_vnops.c Sat Oct 4 18:28:27 2014 (r272534) @@ -504,13 +504,16 @@ vn_rdwr(enum uio_rw rw, struct vnode *vp error = 0; if ((ioflg & IO_NODELOCKED) == 0) { - if (rw == UIO_READ) { - rl_cookie = vn_rangelock_rlock(vp, offset, - offset + len); - } else { - rl_cookie = vn_rangelock_wlock(vp, offset, - offset + len); - } + if ((ioflg & IO_RANGELOCKED) == 0) { + if (rw == UIO_READ) { + rl_cookie = vn_rangelock_rlock(vp, offset, + offset + len); + } else { + rl_cookie = vn_rangelock_wlock(vp, offset, + offset + len); + } + } else + rl_cookie = NULL; mp = NULL; if (rw == UIO_WRITE) { if (vp->v_type != VCHR && Modified: head/sys/sys/vnode.h ============================================================================== --- head/sys/sys/vnode.h Sat Oct 4 18:00:15 2014 (r272533) +++ head/sys/sys/vnode.h Sat Oct 4 18:28:27 2014 (r272534) @@ -305,6 +305,7 @@ struct vattr { #define IO_NORMAL 0x0800 /* operate on regular data */ #define IO_NOMACCHECK 0x1000 /* MAC checks unnecessary */ #define IO_BUFLOCKED 0x2000 /* ffs flag; indir buf is locked */ +#define IO_RANGELOCKED 0x4000 /* range locked */ #define IO_SEQMAX 0x7F /* seq heuristic max value */ #define IO_SEQSHIFT 16 /* seq heuristic in upper 16 bits */ From owner-svn-src-all@FreeBSD.ORG Sat Oct 4 18:35:01 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7B182A09; Sat, 4 Oct 2014 18:35:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 67068637; Sat, 4 Oct 2014 18:35:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s94IZ1XU004061; Sat, 4 Oct 2014 18:35:01 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s94IZ1Pd004053; Sat, 4 Oct 2014 18:35:01 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201410041835.s94IZ1Pd004053@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 4 Oct 2014 18:35:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272535 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 18:35:01 -0000 Author: kib Date: Sat Oct 4 18:35:00 2014 New Revision: 272535 URL: https://svnweb.freebsd.org/changeset/base/272535 Log: Fixes for i/o during coredumping: - Do not dump into system files. - Do not acquire write reference to the mount point where img.core is written, in the coredump(). The vn_rdwr() calls from ELF imgact request the write ref from vn_rdwr(). Recursive acqusition of the write ref deadlocks with the unmount. - Instead, take the range lock for the whole core file. This prevents parallel dumping from two processes executing the same image, converting the useless interleaved dump into sequential dumping, with second core overwriting the first. Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Modified: head/sys/kern/imgact_elf.c head/sys/kern/kern_sig.c Modified: head/sys/kern/imgact_elf.c ============================================================================== --- head/sys/kern/imgact_elf.c Sat Oct 4 18:28:27 2014 (r272534) +++ head/sys/kern/imgact_elf.c Sat Oct 4 18:35:00 2014 (r272535) @@ -1112,8 +1112,8 @@ core_output(struct vnode *vp, void *base #endif } else { error = vn_rdwr_inchunks(UIO_WRITE, vp, base, len, offset, - UIO_USERSPACE, IO_UNIT | IO_DIRECT, active_cred, file_cred, - NULL, td); + UIO_USERSPACE, IO_UNIT | IO_DIRECT | IO_RANGELOCKED, + active_cred, file_cred, NULL, td); } return (error); } @@ -1160,8 +1160,8 @@ sbuf_drain_core_output(void *arg, const #endif error = vn_rdwr_inchunks(UIO_WRITE, p->vp, __DECONST(void *, data), len, p->offset, UIO_SYSSPACE, - IO_UNIT | IO_DIRECT, p->active_cred, p->file_cred, NULL, - p->td); + IO_UNIT | IO_DIRECT | IO_RANGELOCKED, p->active_cred, + p->file_cred, NULL, p->td); if (locked) PROC_LOCK(p->td->td_proc); if (error != 0) Modified: head/sys/kern/kern_sig.c ============================================================================== --- head/sys/kern/kern_sig.c Sat Oct 4 18:28:27 2014 (r272534) +++ head/sys/kern/kern_sig.c Sat Oct 4 18:35:00 2014 (r272535) @@ -3214,8 +3214,8 @@ coredump(struct thread *td) struct flock lf; struct vattr vattr; int error, error1, locked; - struct mount *mp; char *name; /* name of corefile */ + void *rl_cookie; off_t limit; int compress; @@ -3248,39 +3248,33 @@ coredump(struct thread *td) } PROC_UNLOCK(p); -restart: error = corefile_open(p->p_comm, cred->cr_uid, p->p_pid, td, compress, &vp, &name); if (error != 0) return (error); - /* Don't dump to non-regular files or files with links. */ + /* + * Don't dump to non-regular files or files with links. + * Do not dump into system files. + */ if (vp->v_type != VREG || VOP_GETATTR(vp, &vattr, cred) != 0 || - vattr.va_nlink != 1) { + vattr.va_nlink != 1 || (vp->v_vflag & VV_SYSTEM) != 0) { VOP_UNLOCK(vp, 0); error = EFAULT; goto close; } VOP_UNLOCK(vp, 0); + + /* Postpone other writers, including core dumps of other processes. */ + rl_cookie = vn_rangelock_wlock(vp, 0, OFF_MAX); + lf.l_whence = SEEK_SET; lf.l_start = 0; lf.l_len = 0; lf.l_type = F_WRLCK; locked = (VOP_ADVLOCK(vp, (caddr_t)p, F_SETLK, &lf, F_FLOCK) == 0); - if (vn_start_write(vp, &mp, V_NOWAIT) != 0) { - lf.l_type = F_UNLCK; - if (locked) - VOP_ADVLOCK(vp, (caddr_t)p, F_UNLCK, &lf, F_FLOCK); - if ((error = vn_close(vp, FWRITE, cred, td)) != 0) - goto out; - if ((error = vn_start_write(NULL, &mp, V_XSLEEP | PCATCH)) != 0) - goto out; - free(name, M_TEMP); - goto restart; - } - VATTR_NULL(&vattr); vattr.va_size = 0; if (set_core_nodump_flag) @@ -3288,7 +3282,6 @@ restart: vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); VOP_SETATTR(vp, &vattr, cred); VOP_UNLOCK(vp, 0); - vn_finished_write(mp); PROC_LOCK(p); p->p_acflag |= ACORE; PROC_UNLOCK(p); @@ -3304,11 +3297,11 @@ restart: lf.l_type = F_UNLCK; VOP_ADVLOCK(vp, (caddr_t)p, F_UNLCK, &lf, F_FLOCK); } + vn_rangelock_unlock(vp, rl_cookie); close: error1 = vn_close(vp, FWRITE, cred, td); if (error == 0) error = error1; -out: #ifdef AUDIT audit_proc_coredump(td, name, error); #endif From owner-svn-src-all@FreeBSD.ORG Sat Oct 4 18:38:16 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 47158C61; Sat, 4 Oct 2014 18:38:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 272F566B; Sat, 4 Oct 2014 18:38:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s94IcGKc004494; Sat, 4 Oct 2014 18:38:16 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s94IcEYm004488; Sat, 4 Oct 2014 18:38:14 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201410041838.s94IcEYm004488@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 4 Oct 2014 18:38:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272536 - in head/sys: conf kern 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 18:38:16 -0000 Author: kib Date: Sat Oct 4 18:38:14 2014 New Revision: 272536 URL: https://svnweb.freebsd.org/changeset/base/272536 Log: Add kernel option KSTACK_USAGE_PROF to sample the stack depth on interrupts and report the largest value seen as sysctl debug.max_kstack_used. Useful to estimate how close the kernel stack size is to overflow. In collaboration with: Larry Baird Sponsored by: The FreeBSD Foundation (kib) MFC after: 1 week Modified: head/sys/conf/NOTES head/sys/conf/options head/sys/kern/kern_intr.c head/sys/sys/systm.h head/sys/vm/vm_glue.c Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Sat Oct 4 18:35:00 2014 (r272535) +++ head/sys/conf/NOTES Sat Oct 4 18:38:14 2014 (r272536) @@ -2958,6 +2958,7 @@ options SC_RENDER_DEBUG # syscons rende options VFS_BIO_DEBUG # VFS buffer I/O debugging options KSTACK_MAX_PAGES=32 # Maximum pages to give the kernel stack +options KSTACK_USAGE_PROF # Adaptec Array Controller driver options options AAC_DEBUG # Debugging levels: Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Sat Oct 4 18:35:00 2014 (r272535) +++ head/sys/conf/options Sat Oct 4 18:38:14 2014 (r272536) @@ -136,6 +136,7 @@ KDTRACE_FRAME opt_kdtrace.h KN_HASHSIZE opt_kqueue.h KSTACK_MAX_PAGES KSTACK_PAGES +KSTACK_USAGE_PROF KTRACE KTRACE_REQUEST_POOL opt_ktrace.h LIBICONV Modified: head/sys/kern/kern_intr.c ============================================================================== --- head/sys/kern/kern_intr.c Sat Oct 4 18:35:00 2014 (r272535) +++ head/sys/kern/kern_intr.c Sat Oct 4 18:38:14 2014 (r272536) @@ -28,6 +28,7 @@ __FBSDID("$FreeBSD$"); #include "opt_ddb.h" +#include "opt_kstack_usage_prof.h" #include #include @@ -1396,6 +1397,10 @@ intr_event_handle(struct intr_event *ie, td = curthread; +#ifdef KSTACK_USAGE_PROF + intr_prof_stack_use(td, frame); +#endif + /* An interrupt with no event or handlers is a stray interrupt. */ if (ie == NULL || TAILQ_EMPTY(&ie->ie_handlers)) return (EINVAL); Modified: head/sys/sys/systm.h ============================================================================== --- head/sys/sys/systm.h Sat Oct 4 18:35:00 2014 (r272535) +++ head/sys/sys/systm.h Sat Oct 4 18:38:14 2014 (r272536) @@ -443,4 +443,6 @@ bitcount16(uint32_t x) return (x); } +void intr_prof_stack_use(struct thread *td, struct trapframe *frame); + #endif /* !_SYS_SYSTM_H_ */ Modified: head/sys/vm/vm_glue.c ============================================================================== --- head/sys/vm/vm_glue.c Sat Oct 4 18:35:00 2014 (r272535) +++ head/sys/vm/vm_glue.c Sat Oct 4 18:38:14 2014 (r272536) @@ -62,6 +62,7 @@ __FBSDID("$FreeBSD$"); #include "opt_vm.h" #include "opt_kstack_pages.h" #include "opt_kstack_max_pages.h" +#include "opt_kstack_usage_prof.h" #include #include @@ -98,6 +99,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + #ifndef NO_SWAPPING static int swapout(struct proc *); static void swapclear(struct proc *); @@ -486,6 +489,52 @@ kstack_cache_init(void *nulll) SYSINIT(vm_kstacks, SI_SUB_KTHREAD_INIT, SI_ORDER_ANY, kstack_cache_init, NULL); +#ifdef KSTACK_USAGE_PROF +/* + * Track maximum stack used by a thread in kernel. + */ +static int max_kstack_used; + +SYSCTL_INT(_debug, OID_AUTO, max_kstack_used, CTLFLAG_RD, + &max_kstack_used, 0, + "Maxiumum stack depth used by a thread in kernel"); + +void +intr_prof_stack_use(struct thread *td, struct trapframe *frame) +{ + vm_offset_t stack_top; + vm_offset_t current; + int used, prev_used; + + /* + * Testing for interrupted kernel mode isn't strictly + * needed. It optimizes the execution, since interrupts from + * usermode will have only the trap frame on the stack. + */ + if (TRAPF_USERMODE(frame)) + return; + + stack_top = td->td_kstack + td->td_kstack_pages * PAGE_SIZE; + current = (vm_offset_t)(uintptr_t)&stack_top; + + /* + * Try to detect if interrupt is using kernel thread stack. + * Hardware could use a dedicated stack for interrupt handling. + */ + if (stack_top <= current || current < td->td_kstack) + return; + + used = stack_top - current; + for (;;) { + prev_used = max_kstack_used; + if (prev_used >= used) + break; + if (atomic_cmpset_int(&max_kstack_used, prev_used, used)) + break; + } +} +#endif /* KSTACK_USAGE_PROF */ + #ifndef NO_SWAPPING /* * Allow a thread's kernel stack to be paged out. From owner-svn-src-all@FreeBSD.ORG Sat Oct 4 18:40:41 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2A038DC0; Sat, 4 Oct 2014 18:40:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BC842679; Sat, 4 Oct 2014 18:40:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s94Ieees005485; Sat, 4 Oct 2014 18:40:40 GMT (envelope-from dumbbell@FreeBSD.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s94IeeQD005484; Sat, 4 Oct 2014 18:40:40 GMT (envelope-from dumbbell@FreeBSD.org) Message-Id: <201410041840.s94IeeQD005484@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dumbbell set sender to dumbbell@FreeBSD.org using -f From: Jean-Sebastien Pedron Date: Sat, 4 Oct 2014 18:40:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272537 - head/sys/dev/vt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 18:40:41 -0000 Author: dumbbell Date: Sat Oct 4 18:40:40 2014 New Revision: 272537 URL: https://svnweb.freebsd.org/changeset/base/272537 Log: vt(4): Don't recalculate buffer size if we don't know screen size When the screen size is unknown, it's set to 0x0. We can't use that as the buffer size, otherwise, functions such as vtbuf_fill() will fail. This fixes a panic on RaspberryPi, where there's no vt(4) backend configured early in boot. PR: 193981 Tested by: danilo@ MFC after: 3 days Modified: head/sys/dev/vt/vt_core.c Modified: head/sys/dev/vt/vt_core.c ============================================================================== --- head/sys/dev/vt/vt_core.c Sat Oct 4 18:38:14 2014 (r272536) +++ head/sys/dev/vt/vt_core.c Sat Oct 4 18:40:40 2014 (r272537) @@ -1269,7 +1269,8 @@ vtterm_cnprobe(struct terminal *tm, stru * that we have the real viewable size, fix it in the static * buffer. */ - vt_termsize(vd, vw->vw_font, &vw->vw_buf.vb_scr_size); + if (vd->vd_width != 0 && vd->vd_height != 0) + vt_termsize(vd, vw->vw_font, &vw->vw_buf.vb_scr_size); vtbuf_init_early(&vw->vw_buf); vt_winsize(vd, vw->vw_font, &wsz); From owner-svn-src-all@FreeBSD.ORG Sat Oct 4 18:51:56 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9DF6EFA2; Sat, 4 Oct 2014 18:51:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 89E79829; Sat, 4 Oct 2014 18:51:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s94Ipu4S013039; Sat, 4 Oct 2014 18:51:56 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s94Ipu56013038; Sat, 4 Oct 2014 18:51:56 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201410041851.s94Ipu56013038@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 4 Oct 2014 18:51:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272538 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 18:51:56 -0000 Author: kib Date: Sat Oct 4 18:51:55 2014 New Revision: 272538 URL: https://svnweb.freebsd.org/changeset/base/272538 Log: Slightly reword comment. Move code, which is described by the comment, after it. Discussed with: bde Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/kern/vfs_vnops.c Modified: head/sys/kern/vfs_vnops.c ============================================================================== --- head/sys/kern/vfs_vnops.c Sat Oct 4 18:40:40 2014 (r272537) +++ head/sys/kern/vfs_vnops.c Sat Oct 4 18:51:55 2014 (r272538) @@ -2237,12 +2237,10 @@ vn_utimes_perm(struct vnode *vp, struct { int error; - error = VOP_ACCESSX(vp, VWRITE_ATTRIBUTES, cred, td); - /* - * From utimes(2): - * Grant permission if the caller is the owner of the file or - * the super-user. If the time pointer is null, then write + * Grant permission if the caller is the owner of the file, or + * the super-user, or has ACL_WRITE_ATTRIBUTES permission on + * on the file. If the time pointer is null, then write * permission on the file is also sufficient. * * From NFSv4.1, draft 21, 6.2.1.3.1, Discussion of Mask Attributes: @@ -2250,6 +2248,7 @@ vn_utimes_perm(struct vnode *vp, struct * will be allowed to set the times [..] to the current * server time. */ + error = VOP_ACCESSX(vp, VWRITE_ATTRIBUTES, cred, td); if (error != 0 && (vap->va_vaflags & VA_UTIMES_NULL) != 0) error = VOP_ACCESS(vp, VWRITE, cred, td); return (error); From owner-svn-src-all@FreeBSD.ORG Sat Oct 4 19:25:56 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5DB57658; Sat, 4 Oct 2014 19:25:56 +0000 (UTC) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 110C2B1C; Sat, 4 Oct 2014 19:25:56 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 9069125D3892; Sat, 4 Oct 2014 19:25:52 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id ABD73C770DA; Sat, 4 Oct 2014 19:25:51 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id SNa-xSBPHaF6; Sat, 4 Oct 2014 19:25:50 +0000 (UTC) Received: from [IPv6:fde9:577b:c1a9:4410:e57f:1550:28b1:4a3] (unknown [IPv6:fde9:577b:c1a9:4410:e57f:1550:28b1:4a3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 92D5DC770F0; Sat, 4 Oct 2014 19:25:47 +0000 (UTC) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r272505 - in head/sys: kern sys From: "Bjoern A. Zeeb" In-Reply-To: <20141004163633.GT26076@kib.kiev.ua> Date: Sat, 4 Oct 2014 19:25:23 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <23D87C79-1101-4E37-AA49-1C7FA8AC5C0F@FreeBSD.org> References: <201410040808.s9488uAI099166@svn.freebsd.org> <42180557-0119-4597-9492-662E1671A840@FreeBSD.org> <20141004163633.GT26076@kib.kiev.ua> To: Konstantin Belousov X-Mailer: Apple Mail (2.1878.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Mateusz Guzik X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 19:25:56 -0000 On 04 Oct 2014, at 16:36 , Konstantin Belousov = wrote: > On Sat, Oct 04, 2014 at 02:21:54PM +0000, Bjoern A. Zeeb wrote: >>=20 >> On 04 Oct 2014, at 08:08 , Mateusz Guzik wrote: >>=20 >>> Author: mjg >>> Date: Sat Oct 4 08:08:56 2014 >>> New Revision: 272505 >>> URL: https://svnweb.freebsd.org/changeset/base/272505 >>>=20 >>> Log: >>> Plug capability races. >>>=20 >>> fp and appropriate capability lookups were not atomic, which could = result in >>> improper capabilities being checked. >>>=20 >>> This could result either in protection bypass or in a spurious = ENOTCAPABLE. >>>=20 >>> Make fp + capability check atomic with the help of sequence = counters. >>>=20 >>> Reviewed by: kib >>> MFC after: 3 weeks >>>=20 >>> Modified: >>> head/sys/kern/kern_descrip.c >>> head/sys/sys/filedesc.h >>> ? >>=20 >>=20 >> This file is included from user space. There is no opt_capsicum.h = there. >> Including an opt_* in the header file seems wrong in a lot of ways = usually. > I think that easiest, and probably the most correct, fix is to include > the fde_seq member unconditionally. >=20 >>=20 >> I tried to add a bandaid for the moment with r272523 which (to be = honest) makes it worse. >>=20 >> This needs a better fix. > Hm, I do see inclusion of sys/filedesc.h in the usermode programs, = most > worrying is libprocstat. But, there is nothing useful for usermode in = the > header, except possibly for the code with inspects KVA. It=92s included indirectly imho through other sys/* header files if I = am not mistaken. >=20 >>=20 >>=20 >> I also wonder why the (conditional) fde_seq ended up at the beginning = of the structure rather than the end? >>=20 > Why not ? Because it guarantees the structure layout (offsets) to change for = either way, where-as at the end things would at least be deterministic = for the beginning; it might not make a change in reality, but it=92s = nice anyway (also for debugging). =97=20 Bjoern A. Zeeb "Come on. Learn, goddamn it.", WarGames, 1983 From owner-svn-src-all@FreeBSD.ORG Sat Oct 4 19:34:00 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F1F1496F; Sat, 4 Oct 2014 19:33:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DD82DBEB; Sat, 4 Oct 2014 19:33:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s94JXxl7032243; Sat, 4 Oct 2014 19:33:59 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s94JXxGa032241; Sat, 4 Oct 2014 19:33:59 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201410041933.s94JXxGa032241@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 4 Oct 2014 19:33:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272540 - stable/10/sys/amd64/amd64 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 19:34:00 -0000 Author: kib Date: Sat Oct 4 19:33:58 2014 New Revision: 272540 URL: https://svnweb.freebsd.org/changeset/base/272540 Log: MFC r271747: - Use NULL instead of 0 for fpcurthread. - Note the quirk with the interrupt enabled state of the dna handler. - Use just panic() instead of printf() and panic(). Print tid instead of pid, the fpu state is per-thread. MFC r271924: Update and clarify comments. Remove the useless counter for impossible, but seen in wild situation (on buggy hypervisors). Modified: stable/10/sys/amd64/amd64/fpu.c stable/10/sys/amd64/amd64/trap.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/amd64/fpu.c ============================================================================== --- stable/10/sys/amd64/amd64/fpu.c Sat Oct 4 19:32:46 2014 (r272539) +++ stable/10/sys/amd64/amd64/fpu.c Sat Oct 4 19:33:58 2014 (r272540) @@ -362,7 +362,7 @@ fpuexit(struct thread *td) stop_emulating(); fpusave(curpcb->pcb_save); start_emulating(); - PCPU_SET(fpcurthread, 0); + PCPU_SET(fpcurthread, NULL); } critical_exit(); } @@ -603,33 +603,37 @@ fputrap_sse(void) } /* - * Implement device not available (DNA) exception + * Device Not Available (DNA, #NM) exception handler. * - * It would be better to switch FP context here (if curthread != fpcurthread) - * and not necessarily for every context switch, but it is too hard to - * access foreign pcb's. + * It would be better to switch FP context here (if curthread != + * fpcurthread) and not necessarily for every context switch, but it + * is too hard to access foreign pcb's. */ - -static int err_count = 0; - void fpudna(void) { + /* + * This handler is entered with interrupts enabled, so context + * switches may occur before critical_enter() is executed. If + * a context switch occurs, then when we regain control, our + * state will have been completely restored. The CPU may + * change underneath us, but the only part of our context that + * lives in the CPU is CR0.TS and that will be "restored" by + * setting it on the new CPU. + */ critical_enter(); + if (PCPU_GET(fpcurthread) == curthread) { - printf("fpudna: fpcurthread == curthread %d times\n", - ++err_count); + printf("fpudna: fpcurthread == curthread\n"); stop_emulating(); critical_exit(); return; } if (PCPU_GET(fpcurthread) != NULL) { - printf("fpudna: fpcurthread = %p (%d), curthread = %p (%d)\n", - PCPU_GET(fpcurthread), - PCPU_GET(fpcurthread)->td_proc->p_pid, - curthread, curthread->td_proc->p_pid); - panic("fpudna"); + panic("fpudna: fpcurthread = %p (%d), curthread = %p (%d)\n", + PCPU_GET(fpcurthread), PCPU_GET(fpcurthread)->td_tid, + curthread, curthread->td_tid); } stop_emulating(); /* Modified: stable/10/sys/amd64/amd64/trap.c ============================================================================== --- stable/10/sys/amd64/amd64/trap.c Sat Oct 4 19:32:46 2014 (r272539) +++ stable/10/sys/amd64/amd64/trap.c Sat Oct 4 19:33:58 2014 (r272540) @@ -450,8 +450,8 @@ trap(struct trapframe *frame) case T_XMMFLT: /* SIMD floating-point exception */ case T_FPOPFLT: /* FPU operand fetch fault */ /* - * XXXKIB for now disable any FPU traps in kernel - * handler registration seems to be overkill + * For now, supporting kernel handler + * registration for FPU traps is overkill. */ trap_fatal(frame, 0); goto out; From owner-svn-src-all@FreeBSD.ORG Sat Oct 4 19:37:45 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1E6F1B42; Sat, 4 Oct 2014 19:37:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 002DBC18; Sat, 4 Oct 2014 19:37:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s94JbiB2032784; Sat, 4 Oct 2014 19:37:44 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s94Jbiq5032783; Sat, 4 Oct 2014 19:37:44 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201410041937.s94Jbiq5032783@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 4 Oct 2014 19:37:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272541 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 19:37:45 -0000 Author: kib Date: Sat Oct 4 19:37:44 2014 New Revision: 272541 URL: https://svnweb.freebsd.org/changeset/base/272541 Log: MFC r272130: In kern_linkat() and kern_renameat(), do not call namei(9) while holding a write reference on the filesystem. Try to get write reference in unblocked way after all vnodes are resolved; if failed, drop all locks and retry after waiting for suspension end. Modified: stable/10/sys/kern/vfs_syscalls.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/vfs_syscalls.c ============================================================================== --- stable/10/sys/kern/vfs_syscalls.c Sat Oct 4 19:33:58 2014 (r272540) +++ stable/10/sys/kern/vfs_syscalls.c Sat Oct 4 19:37:44 2014 (r272541) @@ -1552,10 +1552,10 @@ kern_linkat(struct thread *td, int fd1, cap_rights_t rights; int error; +again: bwillwrite(); NDINIT_AT(&nd, LOOKUP, follow | AUDITVNODE1, segflg, path1, fd1, td); -again: if ((error = namei(&nd)) != 0) return (error); NDFREE(&nd, NDF_ONLY_PNBUF); @@ -1564,50 +1564,65 @@ again: vrele(vp); return (EPERM); /* POSIX */ } - if ((error = vn_start_write(vp, &mp, V_WAIT | PCATCH)) != 0) { - vrele(vp); - return (error); - } NDINIT_ATRIGHTS(&nd, CREATE, LOCKPARENT | SAVENAME | AUDITVNODE2, segflg, path2, fd2, cap_rights_init(&rights, CAP_LINKAT), td); if ((error = namei(&nd)) == 0) { if (nd.ni_vp != NULL) { + NDFREE(&nd, NDF_ONLY_PNBUF); if (nd.ni_dvp == nd.ni_vp) vrele(nd.ni_dvp); else vput(nd.ni_dvp); vrele(nd.ni_vp); - error = EEXIST; - } else if ((error = vn_lock(vp, LK_EXCLUSIVE)) == 0) { + vrele(vp); + return (EEXIST); + } else if (nd.ni_dvp->v_mount != vp->v_mount) { /* - * Check for cross-device links. No need to - * recheck vp->v_type, since it cannot change - * for non-doomed vnode. + * Cross-device link. No need to recheck + * vp->v_type, since it cannot change, except + * to VBAD. */ - if (nd.ni_dvp->v_mount != vp->v_mount) - error = EXDEV; - else - error = can_hardlink(vp, td->td_ucred); - if (error == 0) + NDFREE(&nd, NDF_ONLY_PNBUF); + vput(nd.ni_dvp); + vrele(vp); + return (EXDEV); + } else if ((error = vn_lock(vp, LK_EXCLUSIVE)) == 0) { + error = can_hardlink(vp, td->td_ucred); #ifdef MAC + if (error == 0) error = mac_vnode_check_link(td->td_ucred, nd.ni_dvp, vp, &nd.ni_cnd); - if (error == 0) #endif - error = VOP_LINK(nd.ni_dvp, vp, &nd.ni_cnd); + if (error != 0) { + vput(vp); + vput(nd.ni_dvp); + NDFREE(&nd, NDF_ONLY_PNBUF); + return (error); + } + error = vn_start_write(vp, &mp, V_NOWAIT); + if (error != 0) { + vput(vp); + vput(nd.ni_dvp); + NDFREE(&nd, NDF_ONLY_PNBUF); + error = vn_start_write(NULL, &mp, + V_XSLEEP | PCATCH); + if (error != 0) + return (error); + goto again; + } + error = VOP_LINK(nd.ni_dvp, vp, &nd.ni_cnd); VOP_UNLOCK(vp, 0); vput(nd.ni_dvp); + vn_finished_write(mp); + NDFREE(&nd, NDF_ONLY_PNBUF); } else { vput(nd.ni_dvp); NDFREE(&nd, NDF_ONLY_PNBUF); vrele(vp); - vn_finished_write(mp); goto again; } - NDFREE(&nd, NDF_ONLY_PNBUF); } vrele(vp); - vn_finished_write(mp); return (error); } @@ -3517,6 +3532,7 @@ kern_renameat(struct thread *td, int old cap_rights_t rights; int error; +again: bwillwrite(); #ifdef MAC NDINIT_ATRIGHTS(&fromnd, DELETE, LOCKPARENT | LOCKLEAF | SAVESTART | @@ -3537,14 +3553,6 @@ kern_renameat(struct thread *td, int old VOP_UNLOCK(fromnd.ni_vp, 0); #endif fvp = fromnd.ni_vp; - if (error == 0) - error = vn_start_write(fvp, &mp, V_WAIT | PCATCH); - if (error != 0) { - NDFREE(&fromnd, NDF_ONLY_PNBUF); - vrele(fromnd.ni_dvp); - vrele(fvp); - goto out1; - } NDINIT_ATRIGHTS(&tond, RENAME, LOCKPARENT | LOCKLEAF | NOCACHE | SAVESTART | AUDITVNODE2, pathseg, new, newfd, cap_rights_init(&rights, CAP_LINKAT), td); @@ -3557,11 +3565,30 @@ kern_renameat(struct thread *td, int old NDFREE(&fromnd, NDF_ONLY_PNBUF); vrele(fromnd.ni_dvp); vrele(fvp); - vn_finished_write(mp); goto out1; } tdvp = tond.ni_dvp; tvp = tond.ni_vp; + error = vn_start_write(fvp, &mp, V_NOWAIT); + if (error != 0) { + NDFREE(&fromnd, NDF_ONLY_PNBUF); + NDFREE(&tond, NDF_ONLY_PNBUF); + if (tvp != NULL) + vput(tvp); + if (tdvp == tvp) + vrele(tdvp); + else + vput(tdvp); + vrele(fromnd.ni_dvp); + vrele(fvp); + vrele(tond.ni_startdir); + if (fromnd.ni_startdir != NULL) + vrele(fromnd.ni_startdir); + error = vn_start_write(NULL, &mp, V_XSLEEP | PCATCH); + if (error != 0) + return (error); + goto again; + } if (tvp != NULL) { if (fvp->v_type == VDIR && tvp->v_type != VDIR) { error = ENOTDIR; From owner-svn-src-all@FreeBSD.ORG Sat Oct 4 20:35:08 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6D43969E; Sat, 4 Oct 2014 20:35:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3F457192; Sat, 4 Oct 2014 20:35:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s94KZ8HH060555; Sat, 4 Oct 2014 20:35:08 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s94KZ8RL060554; Sat, 4 Oct 2014 20:35:08 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201410042035.s94KZ8RL060554@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sat, 4 Oct 2014 20:35:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r272542 - stable/9/sys/fs/ext2fs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 20:35:08 -0000 Author: pfg Date: Sat Oct 4 20:35:07 2014 New Revision: 272542 URL: https://svnweb.freebsd.org/changeset/base/272542 Log: Revert r272532, It broke the build. Pointyhat: me Modified: stable/9/sys/fs/ext2fs/ext2_vnops.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/ext2fs/ext2_vnops.c ============================================================================== --- stable/9/sys/fs/ext2fs/ext2_vnops.c Sat Oct 4 19:37:44 2014 (r272541) +++ stable/9/sys/fs/ext2fs/ext2_vnops.c Sat Oct 4 20:35:07 2014 (r272542) @@ -54,7 +54,6 @@ #include #include #include -#include #include #include #include @@ -66,11 +65,9 @@ #include #include -#include -#include -#include #include -#include +#include +#include #include #include "opt_directio.h" @@ -99,7 +96,6 @@ static int ext2_chown(struct vnode *, ui static vop_close_t ext2_close; static vop_create_t ext2_create; static vop_fsync_t ext2_fsync; -static vop_getpages_t ext2_getpages; static vop_getattr_t ext2_getattr; static vop_ioctl_t ext2_ioctl; static vop_link_t ext2_link; @@ -130,7 +126,6 @@ struct vop_vector ext2_vnodeops = { .vop_close = ext2_close, .vop_create = ext2_create, .vop_fsync = ext2_fsync, - .vop_getpages = ext2_getpages, .vop_getattr = ext2_getattr, .vop_inactive = ext2_inactive, .vop_ioctl = ext2_ioctl, @@ -2072,43 +2067,3 @@ ext2_write(struct vop_write_args *ap) } return (error); } - -/* - * get page routine - */ -static int -ext2_getpages(struct vop_getpages_args *ap) -{ - int i; - vm_page_t mreq; - int pcount; - - pcount = round_page(ap->a_count) / PAGE_SIZE; - mreq = ap->a_m[ap->a_reqpage]; - - /* - * if ANY DEV_BSIZE blocks are valid on a large filesystem block, - * then the entire page is valid. Since the page may be mapped, - * user programs might reference data beyond the actual end of file - * occuring within the page. We have to zero that data. - */ - VM_OBJECT_WLOCK(mreq->object); - if (mreq->valid) { - if (mreq->valid != VM_PAGE_BITS_ALL) - vm_page_zero_invalid(mreq, TRUE); - for (i = 0; i < pcount; i++) { - if (i != ap->a_reqpage) { - vm_page_lock(ap->a_m[i]); - vm_page_free(ap->a_m[i]); - vm_page_unlock(ap->a_m[i]); - } - } - VM_OBJECT_WUNLOCK(mreq->object); - return VM_PAGER_OK; - } - VM_OBJECT_WUNLOCK(mreq->object); - - return vnode_pager_generic_getpages(ap->a_vp, ap->a_m, - ap->a_count, - ap->a_reqpage); -} From owner-svn-src-all@FreeBSD.ORG Sat Oct 4 21:50:35 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A7E5653E; Sat, 4 Oct 2014 21:50:35 +0000 (UTC) Received: from mail.ipfw.ru (mail.ipfw.ru [IPv6:2a01:4f8:120:6141::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 686EEA5F; Sat, 4 Oct 2014 21:50:35 +0000 (UTC) Received: from v6.mpls.in ([2a02:978:2::5] helo=ws.su29.net) by mail.ipfw.ru with esmtpsa (TLSv1:DHE-RSA-AES128-SHA:128) (Exim 4.82 (FreeBSD)) (envelope-from ) id 1XaTEN-00051r-OW; Sat, 04 Oct 2014 21:34:55 +0400 Message-ID: <54306B2A.2040702@FreeBSD.org> Date: Sun, 05 Oct 2014 01:48:26 +0400 From: "Alexander V. Chernikov" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Alexander Motin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r271207 - head/sys/dev/ahci References: <201409061943.s86JhmK4084402@svn.freebsd.org> In-Reply-To: <201409061943.s86JhmK4084402@svn.freebsd.org> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 21:50:35 -0000 On 06.09.2014 23:43, Alexander Motin wrote: > Author: mav > Date: Sat Sep 6 19:43:48 2014 > New Revision: 271207 > URL: http://svnweb.freebsd.org/changeset/base/271207 > > Log: > Save one register read (AHCI_IS) for AHCI controllers with only one port. > > For controllers with only one port (like PCIe or M.2 SSDs) interrupt can > come from only one source, and skipping read saves few percents of CPU time. > > MFC after: 1 month > H/W donated by: I/O Switch This one causes tons of "Interrupt storm" messages (and inability to boot) for SATA AHCI VirtualBox disk controller. > > Modified: > head/sys/dev/ahci/ahci.c > > Modified: head/sys/dev/ahci/ahci.c > ============================================================================== > --- head/sys/dev/ahci/ahci.c Sat Sep 6 19:39:12 2014 (r271206) > +++ head/sys/dev/ahci/ahci.c Sat Sep 6 19:43:48 2014 (r271207) > @@ -359,7 +359,9 @@ ahci_setup_interrupt(device_t dev) > for (i = 0; i < ctlr->numirqs; i++) { > ctlr->irqs[i].ctlr = ctlr; > ctlr->irqs[i].r_irq_rid = i + (ctlr->msi ? 1 : 0); > - if (ctlr->numirqs == 1 || i >= ctlr->channels || > + if (ctlr->channels == 1 && !ctlr->ccc) > + ctlr->irqs[i].mode = AHCI_IRQ_MODE_ONE; > + else if (ctlr->numirqs == 1 || i >= ctlr->channels || > (ctlr->ccc && i == ctlr->cccv)) > ctlr->irqs[i].mode = AHCI_IRQ_MODE_ALL; > else if (i == ctlr->numirqs - 1) > > From owner-svn-src-all@FreeBSD.ORG Sat Oct 4 22:52:22 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 35F20928; Sat, 4 Oct 2014 22:52:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 21E64115; Sat, 4 Oct 2014 22:52:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s94MqM2H027814; Sat, 4 Oct 2014 22:52:22 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s94MqLiD027813; Sat, 4 Oct 2014 22:52:21 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201410042252.s94MqLiD027813@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Sat, 4 Oct 2014 22:52:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272543 - stable/10/sys/vm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 22:52:22 -0000 Author: alc Date: Sat Oct 4 22:52:21 2014 New Revision: 272543 URL: https://svnweb.freebsd.org/changeset/base/272543 Log: MFC r271351 Fix a boundary case error in vm_reserv_alloc_contig(). Modified: stable/10/sys/vm/vm_reserv.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/vm_reserv.c ============================================================================== --- stable/10/sys/vm/vm_reserv.c Sat Oct 4 20:35:07 2014 (r272542) +++ stable/10/sys/vm/vm_reserv.c Sat Oct 4 22:52:21 2014 (r272543) @@ -299,7 +299,7 @@ vm_reserv_populate(vm_reserv_t rv) /* * Allocates a contiguous set of physical pages of the given size "npages" - * from an existing or newly-created reservation. All of the physical pages + * from existing or newly created reservations. All of the physical pages * must be at or above the given physical address "low" and below the given * physical address "high". The given value "alignment" determines the * alignment of the first physical page in the set. If the given value @@ -371,8 +371,8 @@ vm_reserv_alloc_contig(vm_object_t objec /* * Could at least one reservation fit between the first index to the - * left that can be used and the first index to the right that cannot - * be used? + * left that can be used ("leftcap") and the first index to the right + * that cannot be used ("rightcap")? */ first = pindex - VM_RESERV_INDEX(object, pindex); if (mpred != NULL) { @@ -394,6 +394,13 @@ vm_reserv_alloc_contig(vm_object_t objec if (first + maxpages > rightcap) { if (maxpages == VM_LEVEL_0_NPAGES) return (NULL); + + /* + * At least one reservation will fit between "leftcap" + * and "rightcap". However, a reservation for the + * last of the requested pages will not fit. Reduce + * the size of the upcoming allocation accordingly. + */ allocpages = minpages; } } @@ -417,16 +424,23 @@ vm_reserv_alloc_contig(vm_object_t objec } /* - * Allocate and populate the new reservations. The alignment and - * boundary specified for this allocation may be different from the - * alignment and boundary specified for the requested pages. For - * instance, the specified index may not be the first page within the - * first new reservation. + * Allocate the physical pages. The alignment and boundary specified + * for this allocation may be different from the alignment and + * boundary specified for the requested pages. For instance, the + * specified index may not be the first page within the first new + * reservation. */ m = vm_phys_alloc_contig(allocpages, low, high, ulmax(alignment, VM_LEVEL_0_SIZE), boundary > VM_LEVEL_0_SIZE ? boundary : 0); if (m == NULL) return (NULL); + + /* + * The allocated physical pages always begin at a reservation + * boundary, but they do not always end at a reservation boundary. + * Initialize every reservation that is completely covered by the + * allocated physical pages. + */ m_ret = NULL; index = VM_RESERV_INDEX(object, pindex); do { @@ -456,7 +470,7 @@ vm_reserv_alloc_contig(vm_object_t objec m += VM_LEVEL_0_NPAGES; first += VM_LEVEL_0_NPAGES; allocpages -= VM_LEVEL_0_NPAGES; - } while (allocpages > 0); + } while (allocpages >= VM_LEVEL_0_NPAGES); return (m_ret); /*