From owner-svn-src-all@FreeBSD.ORG Sun Mar 29 00:05:47 2015 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 C70E8B01; Sun, 29 Mar 2015 00:05:47 +0000 (UTC) Received: from vps.rulingia.com (vps.rulingia.com [103.243.244.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps.rulingia.com", Issuer "CAcert Class 3 Root" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 53AEEE87; Sun, 29 Mar 2015 00:05:46 +0000 (UTC) Received: from server.rulingia.com (c220-239-242-83.belrs5.nsw.optusnet.com.au [220.239.242.83]) by vps.rulingia.com (8.14.9/8.14.9) with ESMTP id t2T05R34013789 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 29 Mar 2015 11:05:36 +1100 (AEDT) (envelope-from peter@rulingia.com) X-Bogosity: Ham, spamicity=0.000000 Received: from server.rulingia.com (localhost.rulingia.com [127.0.0.1]) by server.rulingia.com (8.14.9/8.14.9) with ESMTP id t2T05IRT024088 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 29 Mar 2015 11:05:18 +1100 (AEDT) (envelope-from peter@server.rulingia.com) Received: (from peter@localhost) by server.rulingia.com (8.14.9/8.14.9/Submit) id t2T05Hc1024087; Sun, 29 Mar 2015 11:05:17 +1100 (AEDT) (envelope-from peter) Date: Sun, 29 Mar 2015 11:05:17 +1100 From: Peter Jeremy To: Slawa Olhovchenkov Subject: Re: svn commit: r280727 - in head: share/mk sys/conf Message-ID: <20150329000517.GE41630@server.rulingia.com> References: <201503270235.t2R2ZCwp047154@svn.freebsd.org> <20150327100014.GA74532@zxy.spb.ru> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="ADZbWkCsHQ7r3kzd" Content-Disposition: inline In-Reply-To: <20150327100014.GA74532@zxy.spb.ru> X-PGP-Key: http://www.rulingia.com/keys/peter.pgp User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Warner Losh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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, 29 Mar 2015 00:05:48 -0000 --ADZbWkCsHQ7r3kzd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2015-Mar-27 13:00:14 +0300, Slawa Olhovchenkov wrote: >On Fri, Mar 27, 2015 at 02:35:12AM +0000, Warner Losh wrote: > >> Author: imp >> Date: Fri Mar 27 02:35:11 2015 >> New Revision: 280727 >> URL: https://svnweb.freebsd.org/changeset/base/280727 >>=20 >> Log: >> Add support for specifying unsupported / broken options that override >> any defaults or user specified actions on the command line. This would >> be useful for specifying features that are always broken or that >> cannot make sense on a specific architecture, like ACPI on pc98 or >> EISA on !i386 (!x86 usage of EISA is broken and there's no supported >> hardware that could have it in any event). Any items in >> __ALWAYS_NO_OPTIONS are forced to "no" regardless of other settings. > >Alpha 21064 support EISA. As linimon pointed out, FreeBSD no longer supports Alpha. >FreeBSD support Digi EISA card. The digi(4) driver was removed from FreeBSD because it wasn't adapted for TTYng. I had some patches for PCI digi cards (see pr/152253 and pr/158086) but no longer have access to the hardware. I don't recall seeing any references to EISA support and can only find PCA and ISA code. --=20 Peter Jeremy --ADZbWkCsHQ7r3kzd Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQJ8BAEBCgBmBQJVF0G9XxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRFRUIyOTg2QzMwNjcxRTc0RTY1QzIyN0Ux NkE1OTdBMEU0QTIwQjM0AAoJEBall6Dkogs0KewP/jhhQNRz6ZpxgJKYGSx4JYU2 fk0N1Y8UBmBosKp7K/Bxc4WYnFFjVgW17Zl2Jx1wfUdJX0p40p5wei1PI7k8Or7B UnKvekc+FuKSABtOeo3iBPNG+YQcKqoQ5MUAbzQTXexmjtd2gQRUQS0751JcUIcd vfrywgYQLhNQPyhFXu73Dd/V4PyVp5B9nptXmrq06w0p734K6l7zyG8fza4v9iA+ Sh9cP6yhWD1mlYF0+Chp1ObdXJrhmiAiL6oEP8dg5ghjJ0P3qAIg1iqPZw8BFan5 o/RI2gO//nfDwm8qzityp5W65GBnrmH7BJ7KFeRlQunqKVZEzwuTp7h41ZVibLAm OKwHo3MqZP28qBTT/RPJ6ju3GcXflhmweceiSiX8GP+M4EBXxdlUedleI9D8u5ez neIRfh95/8xAwF5lBPfFatYwNINlkLxNp5utrjS4ra8EjqAlpT9jWnGz8HtPS6Py isIvZiD7lJrAajz4z46riNIM6Wyah1fNcaxdu9qUbllEciZVqqDR8vriHMbXxvN3 8ul3h08CmZIFpyX8pHeU51VZWJxlo5vnaoVimyZYhylY6UVarJLdTmnb282Zo+pm +j7Q/nN5Gj+vcuynC28eK3qF+scELyyikuv3lczWrfcgMNXFzd+mwPphldShdQYh ttLFeZwUJvV6zVZyG0Z0 =TUeV -----END PGP SIGNATURE----- --ADZbWkCsHQ7r3kzd-- From owner-svn-src-all@FreeBSD.ORG Sun Mar 29 00:41:43 2015 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 AEC1616A; Sun, 29 Mar 2015 00:41:43 +0000 (UTC) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 649A024B; Sun, 29 Mar 2015 00:41:43 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1Yc1IH-0005NQ-K0; Sun, 29 Mar 2015 03:41:37 +0300 Date: Sun, 29 Mar 2015 03:41:37 +0300 From: Slawa Olhovchenkov To: Peter Jeremy Subject: Re: svn commit: r280727 - in head: share/mk sys/conf Message-ID: <20150329004136.GL23643@zxy.spb.ru> References: <201503270235.t2R2ZCwp047154@svn.freebsd.org> <20150327100014.GA74532@zxy.spb.ru> <20150329000517.GE41630@server.rulingia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150329000517.GE41630@server.rulingia.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Warner Losh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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, 29 Mar 2015 00:41:43 -0000 On Sun, Mar 29, 2015 at 11:05:17AM +1100, Peter Jeremy wrote: > On 2015-Mar-27 13:00:14 +0300, Slawa Olhovchenkov wrote: > >On Fri, Mar 27, 2015 at 02:35:12AM +0000, Warner Losh wrote: > > > >> Author: imp > >> Date: Fri Mar 27 02:35:11 2015 > >> New Revision: 280727 > >> URL: https://svnweb.freebsd.org/changeset/base/280727 > >> > >> Log: > >> Add support for specifying unsupported / broken options that override > >> any defaults or user specified actions on the command line. This would > >> be useful for specifying features that are always broken or that > >> cannot make sense on a specific architecture, like ACPI on pc98 or > >> EISA on !i386 (!x86 usage of EISA is broken and there's no supported > >> hardware that could have it in any event). Any items in > >> __ALWAYS_NO_OPTIONS are forced to "no" regardless of other settings. > > > >Alpha 21064 support EISA. > > As linimon pointed out, FreeBSD no longer supports Alpha. > > >FreeBSD support Digi EISA card. > > The digi(4) driver was removed from FreeBSD because it wasn't adapted > for TTYng. I had some patches for PCI digi cards (see pr/152253 and > pr/158086) but no longer have access to the hardware. I don't recall > seeing any references to EISA support and can only find PCA and ISA > code. Digi don't have EISA specific configuration (different from generic bus configuration). Some cards don't exist in ISA version. EISA version of card have wide window (may be window width to all RAM). All difference between all Digi cards in initial configurations and handling firmware load request to exnedend box. From owner-svn-src-all@FreeBSD.ORG Sun Mar 29 01:15:37 2015 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 9D3984C9; Sun, 29 Mar 2015 01:15:37 +0000 (UTC) Received: from gold.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "gold.funkthat.com", Issuer "gold.funkthat.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 596B36CD; Sun, 29 Mar 2015 01:15:36 +0000 (UTC) Received: from gold.funkthat.com (localhost [127.0.0.1]) by gold.funkthat.com (8.14.5/8.14.5) with ESMTP id t2T1FZVi043271 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 28 Mar 2015 18:15:35 -0700 (PDT) (envelope-from jmg@gold.funkthat.com) Received: (from jmg@localhost) by gold.funkthat.com (8.14.5/8.14.5/Submit) id t2T1FZID043270; Sat, 28 Mar 2015 18:15:35 -0700 (PDT) (envelope-from jmg) Date: Sat, 28 Mar 2015 18:15:35 -0700 From: John-Mark Gurney To: Slawa Olhovchenkov Subject: Re: svn commit: r280759 - head/sys/netinet Message-ID: <20150329011534.GH51048@funkthat.com> References: <201503271326.t2RDQxd3056112@svn.freebsd.org> <20150328083443.GV64665@FreeBSD.org> <20150328172313.GC51048@funkthat.com> <20150328181833.GX64665@FreeBSD.org> <20150328204333.GF51048@funkthat.com> <20150328213403.GB74532@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150328213403.GB74532@zxy.spb.ru> X-Operating-System: FreeBSD 9.1-PRERELEASE amd64 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? User-Agent: Mutt/1.5.21 (2010-09-15) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (gold.funkthat.com [127.0.0.1]); Sat, 28 Mar 2015 18:15:36 -0700 (PDT) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, Gleb Smirnoff , src-committers@FreeBSD.org, Fabien Thomas X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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, 29 Mar 2015 01:15:37 -0000 Slawa Olhovchenkov wrote this message on Sun, Mar 29, 2015 at 00:34 +0300: > On Sat, Mar 28, 2015 at 01:43:33PM -0700, John-Mark Gurney wrote: > > > > On Sat, Mar 28, 2015 at 10:23:13AM -0700, John-Mark Gurney wrote: > > > J> Please read: > > > J> https://tools.ietf.org/html/rfc6864 > > > > Anyways, are we really sending so many fragments that we are thrashing > > the cache line? I'd imagine a much lower hanging fruit is only provide > > ip_id when a non-atomic packet is being sent... > > In this case may be do range allocation of ID (per-CPU)? > For example, allocate 128 ID, not one ID? Do you mean what to do in the case of an atomic packet? Per RFC: In atomic datagrams, the IPv4 ID field has no meaning; thus, it can be set to an arbitrary value, i.e., the requirement for non-repeating IDs within the source address/destination address/protocol tuple is no longer required for atomic datagrams: You can just set it to 0, or any value we feel like. -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-svn-src-all@FreeBSD.ORG Sun Mar 29 03:16:53 2015 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 4BA5A4F3; Sun, 29 Mar 2015 03:16: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 36D7F227; Sun, 29 Mar 2015 03:16: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 t2T3GqNf032349; Sun, 29 Mar 2015 03:16:52 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2T3GqNP032348; Sun, 29 Mar 2015 03:16:52 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201503290316.t2T3GqNP032348@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sun, 29 Mar 2015 03:16:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280801 - 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: Sun, 29 Mar 2015 03:16:53 -0000 Author: pfg Date: Sun Mar 29 03:16:52 2015 New Revision: 280801 URL: https://svnweb.freebsd.org/changeset/base/280801 Log: cdefs.h: Fix macros for pre-C99 compilers. Older compilers, and compatibility modes, may not support variadic macros. I normally wouldn't go out of my way to support those old compilers but there is a prescendent in other system headers for using the same macro multiple times, and the solution (although non-elegant IMHO) works. Requested by: bde Solution by: tijl Modified: head/sys/sys/cdefs.h Modified: head/sys/sys/cdefs.h ============================================================================== --- head/sys/sys/cdefs.h Sat Mar 28 23:42:59 2015 (r280800) +++ head/sys/sys/cdefs.h Sun Mar 29 03:16:52 2015 (r280801) @@ -359,9 +359,11 @@ #endif #if __GNUC_PREREQ__(3, 3) -#define __nonnull(...) __attribute__((__nonnull__(__VA_ARGS__))) +#define __nonnull(x) __attribute__((__nonnull__(x))) +#define __nonnull_all __attribute__((__nonnull__)) #else -#define __nonnull(...) +#define __nonnull(x) +#define __nonnull_all #endif #if __GNUC_PREREQ__(3, 4) @@ -379,9 +381,9 @@ #endif #if __has_attribute(alloc_size) || __GNUC_PREREQ__(4, 3) -#define __alloc_size(...) __attribute__((__alloc_size__(__VA_ARGS__))) +#define __alloc_size(x) __attribute__((__alloc_size__(x))) #else -#define __alloc_size(...) +#define __alloc_size(x) #endif /* XXX: should use `#if __STDC_VERSION__ < 199901'. */ From owner-svn-src-all@FreeBSD.ORG Sun Mar 29 03:22:18 2015 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 488A56D1; Sun, 29 Mar 2015 03:22:18 +0000 (UTC) Received: from mail-wi0-x22b.google.com (mail-wi0-x22b.google.com [IPv6:2a00:1450:400c:c05::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CA18130F; Sun, 29 Mar 2015 03:22:17 +0000 (UTC) Received: by wiaa2 with SMTP id a2so80695653wia.0; Sat, 28 Mar 2015 20:22:16 -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=WiGfKKt3bQEJUMRqq06TKUDQam9b1ls4z4MjSg5QHzU=; b=AHjC5QLlNlhFHk2pnM+lTt7LIZb2byigRr5qEe9NzN9Ktp7lKhBAZDy6vwg6dgoGL+ eB9A1a9Txyk85K9cHxn5k6jmHoeeqI5Zehk8qARYjY3XugClQ+FLV6x76a4z3vho+r3/ YtKNuiyHxnXH1gMUbt5bRGIE+x5ana59VuuwH+39B2CY8PQgUG6yi9sK5jXouc65WrlE B24+a3UbOzQuDVnM4jme+moRWCZrt3qqmYCZnU7VZrOaks2v9dtD3Uo0v5I0qB/ghvIr blZNaorDCHiyzZrpSVlDuTymj/wQMdPCtQS+z7X3wd44Q8EpKes4zqsY32X0PFBCTe3/ uvYQ== MIME-Version: 1.0 X-Received: by 10.194.47.201 with SMTP id f9mr49488265wjn.17.1427599336412; Sat, 28 Mar 2015 20:22:16 -0700 (PDT) Received: by 10.27.77.215 with HTTP; Sat, 28 Mar 2015 20:22:16 -0700 (PDT) In-Reply-To: <20150329011534.GH51048@funkthat.com> References: <201503271326.t2RDQxd3056112@svn.freebsd.org> <20150328083443.GV64665@FreeBSD.org> <20150328172313.GC51048@funkthat.com> <20150328181833.GX64665@FreeBSD.org> <20150328204333.GF51048@funkthat.com> <20150328213403.GB74532@zxy.spb.ru> <20150329011534.GH51048@funkthat.com> Date: Sat, 28 Mar 2015 23:22:16 -0400 Message-ID: Subject: Re: svn commit: r280759 - head/sys/netinet From: Benjamin Kaduk To: John-Mark Gurney Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , Gleb Smirnoff , Slawa Olhovchenkov , "svn-src-head@freebsd.org" , Fabien Thomas X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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, 29 Mar 2015 03:22:18 -0000 On Sat, Mar 28, 2015 at 9:15 PM, John-Mark Gurney wrote: > Slawa Olhovchenkov wrote this message on Sun, Mar 29, 2015 at 00:34 +0300: > > On Sat, Mar 28, 2015 at 01:43:33PM -0700, John-Mark Gurney wrote: > > > > In this case may be do range allocation of ID (per-CPU)? > > For example, allocate 128 ID, not one ID? > > Do you mean what to do in the case of an atomic packet? > > Per RFC: > In atomic datagrams, the IPv4 ID field has no meaning; thus, it can > be set to an arbitrary value, i.e., the requirement for non-repeating > IDs within the source address/destination address/protocol tuple is > no longer required for atomic datagrams: > > You can just set it to 0, or any value we feel like. > My reading was to give each CPU its own range from which to allocate IDs, to guarantee that there are no collisions between CPUs. -Ben From owner-svn-src-all@FreeBSD.ORG Sun Mar 29 05:46:07 2015 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 3EA234C4; Sun, 29 Mar 2015 05:46:07 +0000 (UTC) Received: from gw.catspoiler.org (cl-1657.chi-02.us.sixxs.net [IPv6:2001:4978:f:678::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 DF1FFAB; Sun, 29 Mar 2015 05:46:06 +0000 (UTC) Received: from FreeBSD.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.13.3/8.13.3) with ESMTP id t2T5jpDI083944; Sat, 28 Mar 2015 21:45:55 -0800 (PST) (envelope-from truckman@FreeBSD.org) Message-Id: <201503290545.t2T5jpDI083944@gw.catspoiler.org> Date: Sat, 28 Mar 2015 22:45:51 -0700 (PDT) From: Don Lewis Subject: Re: svn commit: r280327 - in head/sys: kern vm To: bdrewery@FreeBSD.org In-Reply-To: <5516E4EA.60201@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii Cc: src-committers@FreeBSD.org, alc@FreeBSD.org, svn-src-all@FreeBSD.org, portmgr@FreeBSD.org, svn-src-head@FreeBSD.org, clusteradm@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, 29 Mar 2015 05:46:07 -0000 On 28 Mar, Bryan Drewery wrote: > On 3/27/2015 9:41 PM, Don Lewis wrote: >> ../generated/adfiles/ad_x86_64_clone.cpp:1: fatal error: had to relocate PCH >> compilation terminated. >> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makefiles/rules.make:149: recipe for target 'accessFlags.o' failed >> gmake[6]: *** [accessFlags.o] Error 1 >> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makefiles/rules.make:149: recipe for target 'ad_x86_64_clone.o' failed >> gmake[6]: *** [ad_x86_64_clone.o] Error 1 >> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makefiles/rules.make:149: recipe for target 'ad_x86_64.o' failed >> gmake[6]: *** [ad_x86_64.o] Error 1 >> ../generated/adfiles/ad_x86_64_expand.cpp:1: fatal error: had to relocate PCH >> compilation terminated. >> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makefiles/rules.make:149: recipe for target 'ad_x86_64_expand.o' failed >> gmake[6]: *** [ad_x86_64_expand.o] Error 1 >> ../generated/adfiles/ad_x86_64_gen.cpp:1: fatal error: had to relocate PCH >> compilation terminated. >> ../generated/adfiles/ad_x86_64_misc.cpp:1: fatal error: had to relocate PCH >> compilation terminated. >> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makefiles/rules.make:149: recipe for target 'ad_x86_64_gen.o' failed >> gmake[6]: *** [ad_x86_64_gen.o] Error 1 >> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makefiles/rules.make:149: recipe for target 'ad_x86_64_misc.o' failed >> gmake[6]: *** [ad_x86_64_misc.o] Error 1 >> ../generated/adfiles/ad_x86_64_format.cpp:1: fatal error: had to relocate PCH >> compilation terminated. >> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makefiles/rules.make:149: recipe for target 'ad_x86_64_format.o' failed >> gmake[6]: *** [ad_x86_64_format.o] Error 1 >> gmake[6]: Leaving directory '/wrkdirs/usr/ports/java/openjdk7/work/openjdk/build/bsd-amd64/hotspot/outputdir/bsd_amd64_compiler2/product' >> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makefiles/top.make:128: recipe for target 'the_vm' failed >> gmake[5]: *** [the_vm] Error 2 >> gmake[5]: Leaving directory '/wrkdirs/usr/ports/java/openjdk7/work/openjdk/build/bsd-amd64/hotspot/outputdir/bsd_amd64_compiler2/product' >> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/Makefile:292: recipe for target 'product' failed >> gmake[4]: *** [product] Error 2 >> gmake[4]: Leaving directory '/wrkdirs/usr/ports/java/openjdk7/work/openjdk/build/bsd-amd64/hotspot/outputdir' >> Makefile:191: recipe for target 'generic_build2' failed >> gmake[3]: *** [generic_build2] Error 2 >> gmake[3]: Leaving directory '/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make' >> Makefile:151: recipe for target 'product' failed >> gmake[2]: *** [product] Error 2 >> gmake[2]: Leaving directory '/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make' >> make/hotspot-rules.gmk:111: recipe for target 'hotspot-build' failed >> gmake[1]: *** [hotspot-build] Error 2 >> gmake[1]: Leaving directory '/wrkdirs/usr/ports/java/openjdk7/work/openjdk' >> Makefile:251: recipe for target 'build_product_image' failed >> gmake: *** [build_product_image] Error 2 >> ===> Compilation failed unexpectedly. > Is it 100% for you before and after? I've seen this error come up > randomly where a rebuild will succeed. or fail. I checked the logs and of the ~1100 ports that I build, openjdk7 is the only one affected. From owner-svn-src-all@FreeBSD.ORG Sun Mar 29 06:00:26 2015 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 E0CCEA33; Sun, 29 Mar 2015 06:00:26 +0000 (UTC) Received: from mail.strugglingcoder.info (strugglingcoder.info [65.19.130.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C9F86197; Sun, 29 Mar 2015 06:00:26 +0000 (UTC) Received: from localhost (unknown [10.1.1.3]) (Authenticated sender: hiren@strugglingcoder.info) by mail.strugglingcoder.info (Postfix) with ESMTPSA id 94B5310B2B9; Sat, 28 Mar 2015 22:51:19 -0700 (PDT) Date: Sat, 28 Mar 2015 22:51:19 -0700 From: hiren panchasara To: Jeff Roberson Subject: Re: svn commit: r280774 - head/sys/vm Message-ID: <20150329055119.GB71584@strugglingcoder.info> References: <201503280236.t2S2aoeI032743@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="DKU6Jbt7q3WqK7+M" Content-Disposition: inline In-Reply-To: <201503280236.t2S2aoeI032743@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, 29 Mar 2015 06:00:27 -0000 --DKU6Jbt7q3WqK7+M Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 03/28/15 at 02:36P, Jeff Roberson wrote: > Author: jeff > Date: Sat Mar 28 02:36:49 2015 > New Revision: 280774 > URL: https://svnweb.freebsd.org/changeset/base/280774 >=20 > Log: > - Eliminate pagequeue locking in the dirty code in vm_pageout_scan(). > - Use a more precise series of tests to see if the page changed while = we > were locking the vnode. > =20 > Reviewed by: alc > Sponsored by: EMC / Isilon >=20 > Modified: > head/sys/vm/vm_pageout.c Jeff, Is this something that can be MFC'd to stable10? Cheers, Hiren --DKU6Jbt7q3WqK7+M Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQF8BAEBCgBmBQJVF5LXXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRBNEUyMEZBMUQ4Nzg4RjNGMTdFNjZGMDI4 QjkyNTBFMTU2M0VERkU1AAoJEIuSUOFWPt/lr1AIAIKaRnI5CkZaXz3yMeHWXyxV hT1NdCehUURJ8oT/rUxGXn5n1lxsW2CQgJsvNnpMqBHz2FPIq3i3IrDC/GffRm+R d2qbrKKSC3UhV7I+6jZy9afhU04FxyqJ0wNUgp6oOQO4g4HryPE8jByF8JgA9b2p dBWr6++BpzHQXB0tQEv1FE1cXRq/eel2BgskW9MxdQ7kY/ilq3VEgCEBo7/xCCA0 IfrrPSsasLpTMkvfOy1bKKMr0Tg6P/ggAkXkwn5GWi+5iN8xHrZq3Q3iEwGtdn8B Z078XndB/KKdeIRbNQwvAO3m8VE4TjGDYqyYX58XZdMKCOfSBrO3ejCRv1E9a+k= =Edzp -----END PGP SIGNATURE----- --DKU6Jbt7q3WqK7+M-- From owner-svn-src-all@FreeBSD.ORG Sun Mar 29 06:05:01 2015 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 BAD82D65; Sun, 29 Mar 2015 06: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 A68A8259; Sun, 29 Mar 2015 06: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 t2T651CW010878; Sun, 29 Mar 2015 06:05:01 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2T6513V010877; Sun, 29 Mar 2015 06:05:01 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503290605.t2T6513V010877@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 29 Mar 2015 06:05:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280802 - 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: Sun, 29 Mar 2015 06:05:01 -0000 Author: adrian Date: Sun Mar 29 06:05:00 2015 New Revision: 280802 URL: https://svnweb.freebsd.org/changeset/base/280802 Log: Fix a long-standing bug with the early MAC address initialisation path, which showed up after I started changing addresses this early. It turns out that there's some other malarky going on behind the scenes in the HAL and merely setting the net80211/ifp mac address this early isn't enough. If the MAC is set from kenv at attach time, the HAL also needs to be programmed early. Without this, the VAP wouldn't work enough for finishing association - probe requests would be fine as they're broadcast, but association request would fail. Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Sun Mar 29 03:16:52 2015 (r280801) +++ head/sys/dev/ath/if_ath.c Sun Mar 29 06:05:00 2015 (r280802) @@ -1204,8 +1204,12 @@ ath_attach(u_int16_t devid, struct ath_s sc->sc_hasveol = ath_hal_hasveol(ah); /* get mac address from kenv first, then hardware */ - if (ath_fetch_mac_kenv(sc, macaddr) < 0) + if (ath_fetch_mac_kenv(sc, macaddr) == 0) { + /* Tell the HAL now about the new MAC */ + ath_hal_setmac(ah, macaddr); + } else { ath_hal_getmac(ah, macaddr); + } if (sc->sc_hasbmask) ath_hal_getbssidmask(ah, sc->sc_hwbssidmask); From owner-svn-src-all@FreeBSD.ORG Sun Mar 29 07:47:00 2015 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 4B2AC9E2; Sun, 29 Mar 2015 07:47: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 3641AD0C; Sun, 29 Mar 2015 07:47: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 t2T7l0Np056631; Sun, 29 Mar 2015 07:47:00 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2T7l0A1056625; Sun, 29 Mar 2015 07:47:00 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201503290747.t2T7l0A1056625@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 29 Mar 2015 07:47:00 +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: r280803 - stable/10/sys/dev/virtio/pci 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, 29 Mar 2015 07:47:00 -0000 Author: mav Date: Sun Mar 29 07:46:59 2015 New Revision: 280803 URL: https://svnweb.freebsd.org/changeset/base/280803 Log: MFC r280090: Hide virtio features negotiation messages under bootverbose. Those messages are noisy, but useless for average user. Modified: stable/10/sys/dev/virtio/pci/virtio_pci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/virtio/pci/virtio_pci.c ============================================================================== --- stable/10/sys/dev/virtio/pci/virtio_pci.c Sun Mar 29 06:05:00 2015 (r280802) +++ stable/10/sys/dev/virtio/pci/virtio_pci.c Sun Mar 29 07:46:59 2015 (r280803) @@ -730,7 +730,7 @@ vtpci_describe_features(struct vtpci_sof dev = sc->vtpci_dev; child = sc->vtpci_child_dev; - if (device_is_attached(child) && bootverbose == 0) + if (device_is_attached(child) || bootverbose == 0) return; virtio_describe(dev, msg, features, sc->vtpci_child_feat_desc); From owner-svn-src-all@FreeBSD.ORG Sun Mar 29 07:48:03 2015 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 312A4B1D; Sun, 29 Mar 2015 07:48: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 1BC84D1B; Sun, 29 Mar 2015 07:48: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 t2T7m2Fc056877; Sun, 29 Mar 2015 07:48:02 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2T7m2UC056876; Sun, 29 Mar 2015 07:48:02 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201503290748.t2T7m2UC056876@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 29 Mar 2015 07:48:02 +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: r280804 - stable/9/sys/dev/virtio/pci 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, 29 Mar 2015 07:48:03 -0000 Author: mav Date: Sun Mar 29 07:48:02 2015 New Revision: 280804 URL: https://svnweb.freebsd.org/changeset/base/280804 Log: MFC r280090: Hide virtio features negotiation messages under bootverbose. Those messages are noisy, but useless for average user. Modified: stable/9/sys/dev/virtio/pci/virtio_pci.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/virtio/pci/virtio_pci.c ============================================================================== --- stable/9/sys/dev/virtio/pci/virtio_pci.c Sun Mar 29 07:46:59 2015 (r280803) +++ stable/9/sys/dev/virtio/pci/virtio_pci.c Sun Mar 29 07:48:02 2015 (r280804) @@ -727,7 +727,7 @@ vtpci_describe_features(struct vtpci_sof dev = sc->vtpci_dev; child = sc->vtpci_child_dev; - if (device_is_attached(child) && bootverbose == 0) + if (device_is_attached(child) || bootverbose == 0) return; virtio_describe(dev, msg, features, sc->vtpci_child_feat_desc); From owner-svn-src-all@FreeBSD.ORG Sun Mar 29 08:07:05 2015 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 811BCE4A; Sun, 29 Mar 2015 08:07:05 +0000 (UTC) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 326E7EBB; Sun, 29 Mar 2015 08:07:05 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1Yc8FI-0008Zf-Lt; Sun, 29 Mar 2015 11:07:00 +0300 Date: Sun, 29 Mar 2015 11:07:00 +0300 From: Slawa Olhovchenkov To: Benjamin Kaduk Subject: Re: svn commit: r280759 - head/sys/netinet Message-ID: <20150329080700.GM23643@zxy.spb.ru> References: <201503271326.t2RDQxd3056112@svn.freebsd.org> <20150328083443.GV64665@FreeBSD.org> <20150328172313.GC51048@funkthat.com> <20150328181833.GX64665@FreeBSD.org> <20150328204333.GF51048@funkthat.com> <20150328213403.GB74532@zxy.spb.ru> <20150329011534.GH51048@funkthat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: "src-committers@freebsd.org" , John-Mark Gurney , Fabien Thomas , Gleb Smirnoff , "svn-src-head@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: Sun, 29 Mar 2015 08:07:05 -0000 On Sat, Mar 28, 2015 at 11:22:16PM -0400, Benjamin Kaduk wrote: > On Sat, Mar 28, 2015 at 9:15 PM, John-Mark Gurney wrote: > > > Slawa Olhovchenkov wrote this message on Sun, Mar 29, 2015 at 00:34 +0300: > > > On Sat, Mar 28, 2015 at 01:43:33PM -0700, John-Mark Gurney wrote: > > > > > > In this case may be do range allocation of ID (per-CPU)? > > > For example, allocate 128 ID, not one ID? > > > > Do you mean what to do in the case of an atomic packet? > > > > Per RFC: > > In atomic datagrams, the IPv4 ID field has no meaning; thus, it can > > be set to an arbitrary value, i.e., the requirement for non-repeating > > IDs within the source address/destination address/protocol tuple is > > no longer required for atomic datagrams: > > > > You can just set it to 0, or any value we feel like. > > > > My reading was to give each CPU its own range from which to allocate IDs, > to guarantee that there are no collisions between CPUs. Yes. From owner-svn-src-all@FreeBSD.ORG Sun Mar 29 08:12:56 2015 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 C3510218; Sun, 29 Mar 2015 08:12:56 +0000 (UTC) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7AF02F72; Sun, 29 Mar 2015 08:12:56 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id E0D6A1FE023; Sun, 29 Mar 2015 10:12:53 +0200 (CEST) Message-ID: <5517B433.5010508@selasky.org> Date: Sun, 29 Mar 2015 10:13:39 +0200 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Gleb Smirnoff , Fabien Thomas Subject: Re: svn commit: r280759 - head/sys/netinet References: <201503271326.t2RDQxd3056112@svn.freebsd.org> <20150328083443.GV64665@FreeBSD.org> <20150328191629.GY64665@FreeBSD.org> In-Reply-To: <20150328191629.GY64665@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, 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, 29 Mar 2015 08:12:56 -0000 On 03/28/15 20:16, Gleb Smirnoff wrote: > +uint16_t > +ip_newid(void) > +{ > + > + counter_u64_add(V_ip_id, 1); > + return (htons((*(uint64_t *)zpcpu_get(V_ip_id)) & 0xffff)); > +} Technically you would need to enter a critical section here, so that the current process doesn't get swapped to a different CPU between the counter add and the zpcpu_get. --HPS From owner-svn-src-all@FreeBSD.ORG Sun Mar 29 10:02:30 2015 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 4FEC74E5; Sun, 29 Mar 2015 10:02: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 30739BDA; Sun, 29 Mar 2015 10:02: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 t2TA2Tfr021926; Sun, 29 Mar 2015 10:02:29 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2TA2TbM021925; Sun, 29 Mar 2015 10:02:29 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201503291002.t2TA2TbM021925@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 29 Mar 2015 10:02:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280805 - 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, 29 Mar 2015 10:02:30 -0000 Author: mav Date: Sun Mar 29 10:02:29 2015 New Revision: 280805 URL: https://svnweb.freebsd.org/changeset/base/280805 Log: Add four new DDB commands to display vmem(9) statistics. In particular, such DDB commands were added: show vmem show all vmem show vmemdump show all vmemdump As possible usage, that allows to see KVA usage and fragmentation. Modified: head/sys/kern/subr_vmem.c Modified: head/sys/kern/subr_vmem.c ============================================================================== --- head/sys/kern/subr_vmem.c Sun Mar 29 07:48:02 2015 (r280804) +++ head/sys/kern/subr_vmem.c Sun Mar 29 10:02:29 2015 (r280805) @@ -1390,6 +1390,8 @@ vmem_dump(const vmem_t *vm , int (*pr)(c #endif /* defined(DDB) || defined(DIAGNOSTIC) */ #if defined(DDB) +#include + static bt_t * vmem_whatis_lookup(vmem_t *vm, vmem_addr_t addr) { @@ -1443,6 +1445,78 @@ vmem_print(vmem_addr_t addr, const char vmem_dump(vm, pr); } + +DB_SHOW_COMMAND(vmemdump, vmemdump) +{ + + if (!have_addr) { + db_printf("usage: show vmemdump \n"); + return; + } + + vmem_dump((const vmem_t *)addr, db_printf); +} + +DB_SHOW_ALL_COMMAND(vmemdump, vmemdumpall) +{ + const vmem_t *vm; + + LIST_FOREACH(vm, &vmem_list, vm_alllist) + vmem_dump(vm, db_printf); +} + +DB_SHOW_COMMAND(vmem, vmem_summ) +{ + const vmem_t *vm = (const void *)addr; + const bt_t *bt; + size_t ft[VMEM_MAXORDER], ut[VMEM_MAXORDER]; + size_t fs[VMEM_MAXORDER], us[VMEM_MAXORDER]; + int ord; + + if (!have_addr) { + db_printf("usage: show vmem \n"); + return; + } + + db_printf("vmem %p '%s'\n", vm, vm->vm_name); + db_printf("\tquantum:\t%zu\n", vm->vm_quantum_mask + 1); + db_printf("\tsize:\t%zu\n", vm->vm_size); + db_printf("\tinuse:\t%zu\n", vm->vm_inuse); + db_printf("\tfree:\t%zu\n", vm->vm_size - vm->vm_inuse); + db_printf("\tbusy tags:\t%d\n", vm->vm_nbusytag); + db_printf("\tfree tags:\t%d\n", vm->vm_nfreetags); + + memset(&ft, 0, sizeof(ft)); + memset(&ut, 0, sizeof(ut)); + memset(&fs, 0, sizeof(fs)); + memset(&us, 0, sizeof(us)); + TAILQ_FOREACH(bt, &vm->vm_seglist, bt_seglist) { + ord = SIZE2ORDER(bt->bt_size >> vm->vm_quantum_shift); + if (bt->bt_type == BT_TYPE_BUSY) { + ut[ord]++; + us[ord] += bt->bt_size; + } else if (bt->bt_type == BT_TYPE_FREE) { + ft[ord]++; + fs[ord] += bt->bt_size; + } + } + db_printf("\t\t\tinuse\tsize\t\tfree\tsize\n"); + for (ord = 0; ord < VMEM_MAXORDER; ord++) { + if (ut[ord] == 0 && ft[ord] == 0) + continue; + db_printf("\t%-15zu %zu\t%-15zu %zu\t%-16zu\n", + ORDER2SIZE(ord) << vm->vm_quantum_shift, + ut[ord], us[ord], ft[ord], fs[ord]); + } +} + +DB_SHOW_ALL_COMMAND(vmem, vmem_summall) +{ + const vmem_t *vm; + + LIST_FOREACH(vm, &vmem_list, vm_alllist) + vmem_summ((db_expr_t)vm, TRUE, count, modif); +} #endif /* defined(DDB) */ #define vmem_printf printf From owner-svn-src-all@FreeBSD.ORG Sun Mar 29 15:16:47 2015 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 EDEE1990; Sun, 29 Mar 2015 15:16:46 +0000 (UTC) Received: from mail-ie0-x22e.google.com (mail-ie0-x22e.google.com [IPv6:2607:f8b0:4001:c03::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B1548EDE; Sun, 29 Mar 2015 15:16:46 +0000 (UTC) Received: by iecvj10 with SMTP id vj10so100550073iec.0; Sun, 29 Mar 2015 08:16:46 -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=v8zucYXHENYq9WUsDZxKmnQzZVkFtWjZhjNAMHJTd24=; b=hPIfhKUPY+vOnbaNi78sm5fnyldyChzaY3ayGvqjarj0g/gkK/In28ASSP6mMaQsV8 xwMLb7XBd89v+2hmWHedKPr74XURaCtNVzHaXgLhAdM8IDRbEa35/SA1vvQDjdxAeCFQ by6RyvgGgh4WATjM2SoNkOo9T7JG/jQtj2z9eZnvDculI7kjx4otMyXJFJYcQAvEAMBT yaCxtc8e6ebu5rALXdIxkKyQEOpTdB8/6I4itx11Ea7t0lR6DrrCMwzDcbj0b0ll1EVq cnTim77aa2afHie5eiAskI1Al+9UED6EH0kTtElGUA21ACizmHJ2QMZS0FNm6of33hHI 2LRQ== MIME-Version: 1.0 X-Received: by 10.50.132.66 with SMTP id os2mr11951301igb.6.1427642206088; Sun, 29 Mar 2015 08:16:46 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.36.17.194 with HTTP; Sun, 29 Mar 2015 08:16:46 -0700 (PDT) In-Reply-To: <5517B433.5010508@selasky.org> References: <201503271326.t2RDQxd3056112@svn.freebsd.org> <20150328083443.GV64665@FreeBSD.org> <20150328191629.GY64665@FreeBSD.org> <5517B433.5010508@selasky.org> Date: Sun, 29 Mar 2015 08:16:46 -0700 X-Google-Sender-Auth: VtMCYWNw3_-2-ibEX7835d7UVqQ Message-ID: Subject: Re: svn commit: r280759 - head/sys/netinet From: Adrian Chadd To: Hans Petter Selasky Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , Gleb Smirnoff , "src-committers@freebsd.org" , Fabien Thomas X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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, 29 Mar 2015 15:16:47 -0000 On 29 March 2015 at 01:13, Hans Petter Selasky wrote: > On 03/28/15 20:16, Gleb Smirnoff wrote: >> >> +uint16_t >> +ip_newid(void) >> +{ >> + >> + counter_u64_add(V_ip_id, 1); >> + return (htons((*(uint64_t *)zpcpu_get(V_ip_id)) & 0xffff)); >> +} > > > Technically you would need to enter a critical section here, so that the > current process doesn't get swapped to a different CPU between the counter > add and the zpcpu_get. +10000 here. You can get preempted and shifted to another CPU at almost any point in time you're not explicitly asking not to be. It's.. frustrating. -adrian From owner-svn-src-all@FreeBSD.ORG Sun Mar 29 15:17:53 2015 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 AFE30AD2; Sun, 29 Mar 2015 15:17:53 +0000 (UTC) Received: from mail-ie0-x232.google.com (mail-ie0-x232.google.com [IPv6:2607:f8b0:4001:c03::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 75A35EE4; Sun, 29 Mar 2015 15:17:53 +0000 (UTC) Received: by ierf6 with SMTP id f6so33450794ier.2; Sun, 29 Mar 2015 08:17:53 -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=n2/mk/ehpKtXZloMl/gDfggpuvytJouD+3boZruiMoQ=; b=X47nfCwhpHzTUWRE70nS//A/GZwVZn7fFPotEpwpeGAh/ywIgweXXjOWBoLew0lQtI fhdoM++wuv9z0yFf/3UV63rPnF1dDvKsSuJJCLchcYUKFwv3B49mXRK9sAhvnJt1jCOc vhek+Qd8+OUEtscvbYy2bem9DQhMhSeJ5DCkjVAMJTJ2Bll264OIe1tO+iAgDaD7FJ8z jFTmKqaRmdIaIQNXUdK129j2swUddge55xt1zZm9B36yA6B5Ups4XYKOsJVeInjM22Pq PMyovcOf9h2V6anUpQB3wkIAtu4tGE5JLXIY6U7cMu3DTn5HwZh1gEgCnQXNLPE2UJOU CJvw== MIME-Version: 1.0 X-Received: by 10.50.143.42 with SMTP id sb10mr11932831igb.49.1427642272992; Sun, 29 Mar 2015 08:17:52 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.36.17.194 with HTTP; Sun, 29 Mar 2015 08:17:52 -0700 (PDT) In-Reply-To: <201503291002.t2TA2TbM021925@svn.freebsd.org> References: <201503291002.t2TA2TbM021925@svn.freebsd.org> Date: Sun, 29 Mar 2015 08:17:52 -0700 X-Google-Sender-Auth: dLQfrbtA_YsGNqzFdXhm6Tg3dFk Message-ID: Subject: Re: svn commit: r280805 - head/sys/kern From: Adrian Chadd To: Alexander Motin 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: Sun, 29 Mar 2015 15:17:53 -0000 You know, I exactly wanted this about two days ago, but from userland. Do we expose this to userland? -a On 29 March 2015 at 03:02, Alexander Motin wrote: > Author: mav > Date: Sun Mar 29 10:02:29 2015 > New Revision: 280805 > URL: https://svnweb.freebsd.org/changeset/base/280805 > > Log: > Add four new DDB commands to display vmem(9) statistics. > > In particular, such DDB commands were added: > show vmem > show all vmem > show vmemdump > show all vmemdump > > As possible usage, that allows to see KVA usage and fragmentation. > > Modified: > head/sys/kern/subr_vmem.c > > Modified: head/sys/kern/subr_vmem.c > ============================================================================== > --- head/sys/kern/subr_vmem.c Sun Mar 29 07:48:02 2015 (r280804) > +++ head/sys/kern/subr_vmem.c Sun Mar 29 10:02:29 2015 (r280805) > @@ -1390,6 +1390,8 @@ vmem_dump(const vmem_t *vm , int (*pr)(c > #endif /* defined(DDB) || defined(DIAGNOSTIC) */ > > #if defined(DDB) > +#include > + > static bt_t * > vmem_whatis_lookup(vmem_t *vm, vmem_addr_t addr) > { > @@ -1443,6 +1445,78 @@ vmem_print(vmem_addr_t addr, const char > > vmem_dump(vm, pr); > } > + > +DB_SHOW_COMMAND(vmemdump, vmemdump) > +{ > + > + if (!have_addr) { > + db_printf("usage: show vmemdump \n"); > + return; > + } > + > + vmem_dump((const vmem_t *)addr, db_printf); > +} > + > +DB_SHOW_ALL_COMMAND(vmemdump, vmemdumpall) > +{ > + const vmem_t *vm; > + > + LIST_FOREACH(vm, &vmem_list, vm_alllist) > + vmem_dump(vm, db_printf); > +} > + > +DB_SHOW_COMMAND(vmem, vmem_summ) > +{ > + const vmem_t *vm = (const void *)addr; > + const bt_t *bt; > + size_t ft[VMEM_MAXORDER], ut[VMEM_MAXORDER]; > + size_t fs[VMEM_MAXORDER], us[VMEM_MAXORDER]; > + int ord; > + > + if (!have_addr) { > + db_printf("usage: show vmem \n"); > + return; > + } > + > + db_printf("vmem %p '%s'\n", vm, vm->vm_name); > + db_printf("\tquantum:\t%zu\n", vm->vm_quantum_mask + 1); > + db_printf("\tsize:\t%zu\n", vm->vm_size); > + db_printf("\tinuse:\t%zu\n", vm->vm_inuse); > + db_printf("\tfree:\t%zu\n", vm->vm_size - vm->vm_inuse); > + db_printf("\tbusy tags:\t%d\n", vm->vm_nbusytag); > + db_printf("\tfree tags:\t%d\n", vm->vm_nfreetags); > + > + memset(&ft, 0, sizeof(ft)); > + memset(&ut, 0, sizeof(ut)); > + memset(&fs, 0, sizeof(fs)); > + memset(&us, 0, sizeof(us)); > + TAILQ_FOREACH(bt, &vm->vm_seglist, bt_seglist) { > + ord = SIZE2ORDER(bt->bt_size >> vm->vm_quantum_shift); > + if (bt->bt_type == BT_TYPE_BUSY) { > + ut[ord]++; > + us[ord] += bt->bt_size; > + } else if (bt->bt_type == BT_TYPE_FREE) { > + ft[ord]++; > + fs[ord] += bt->bt_size; > + } > + } > + db_printf("\t\t\tinuse\tsize\t\tfree\tsize\n"); > + for (ord = 0; ord < VMEM_MAXORDER; ord++) { > + if (ut[ord] == 0 && ft[ord] == 0) > + continue; > + db_printf("\t%-15zu %zu\t%-15zu %zu\t%-16zu\n", > + ORDER2SIZE(ord) << vm->vm_quantum_shift, > + ut[ord], us[ord], ft[ord], fs[ord]); > + } > +} > + > +DB_SHOW_ALL_COMMAND(vmem, vmem_summall) > +{ > + const vmem_t *vm; > + > + LIST_FOREACH(vm, &vmem_list, vm_alllist) > + vmem_summ((db_expr_t)vm, TRUE, count, modif); > +} > #endif /* defined(DDB) */ > > #define vmem_printf printf > From owner-svn-src-all@FreeBSD.ORG Sun Mar 29 15:18:06 2015 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 11135C11; Sun, 29 Mar 2015 15:18: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 F13F4EEC; Sun, 29 Mar 2015 15:18: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 t2TFI5tC068808; Sun, 29 Mar 2015 15:18:05 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2TFI5o1068807; Sun, 29 Mar 2015 15:18:05 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503291518.t2TFI5o1068807@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Sun, 29 Mar 2015 15:18:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280807 - 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: Sun, 29 Mar 2015 15:18:06 -0000 Author: arybchik Date: Sun Mar 29 15:18:04 2015 New Revision: 280807 URL: https://svnweb.freebsd.org/changeset/base/280807 Log: sfxge: fix bug in TSO when a DMA segment has both header and data Reviewed by: gnn Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D2163 Modified: head/sys/dev/sfxge/sfxge_tx.c Modified: head/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- head/sys/dev/sfxge/sfxge_tx.c Sun Mar 29 12:00:51 2015 (r280806) +++ head/sys/dev/sfxge/sfxge_tx.c Sun Mar 29 15:18:04 2015 (r280807) @@ -1025,7 +1025,7 @@ sfxge_tx_queue_tso(struct sfxge_txq *txq KASSERT(n_dma_seg, ("no payload found in TSO packet")); ++dma_seg; } - tso.in_len = dma_seg->ds_len + (tso.header_len - skipped); + tso.in_len = dma_seg->ds_len - (tso.header_len - skipped); tso.dma_addr = dma_seg->ds_addr + (tso.header_len - skipped); id = txq->added & txq->ptr_mask; From owner-svn-src-all@FreeBSD.ORG Sun Mar 29 15:21:19 2015 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 184D6EBF; Sun, 29 Mar 2015 15:21:19 +0000 (UTC) Received: from mail-wi0-x22c.google.com (mail-wi0-x22c.google.com [IPv6:2a00:1450:400c:c05::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9B234F24; Sun, 29 Mar 2015 15:21:18 +0000 (UTC) Received: by wicne17 with SMTP id ne17so3350267wic.0; Sun, 29 Mar 2015 08:21:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=WY0Ug544D5b6Op6zG1HUTOx/bOvnHbG5IHAF9h2djtA=; b=Zr8NUi5wlPjtPZMQCj3D/3TbLW/cxRQ3pnB/uHOrIKz2Iry2+ZrnVy36uy1jxJypec MgQMi18g+2eIGXjmSwG1M1oBrr8EEqtXecdsqna1EM0wx+D3eZa67YWAS1M3sIu0r0SK rDZ3uH4lkdouK/UPljsMjaw590Rm5nENKWoKTSOi6jzpKcVtOOrJmLyO/waxV6qVDcUP UnZFTNvHqNSyshkd8NtRWTrn0MWEe1SEKP8n28rpE66ABStP1rtU+7+KdjSecXEgtUaQ IhMgk1yokGrWMMWW7ZAbc4xm8gfSlJoK+7pZXWibYTLgnkUuWAE+N0c3Rz/CJYIbykgN Xciw== X-Received: by 10.194.63.16 with SMTP id c16mr55369951wjs.117.1427642477187; Sun, 29 Mar 2015 08:21:17 -0700 (PDT) Received: from mavbook.mavhome.dp.ua ([134.249.139.101]) by mx.google.com with ESMTPSA id a13sm11608167wjx.30.2015.03.29.08.21.15 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 29 Mar 2015 08:21:16 -0700 (PDT) Sender: Alexander Motin Message-ID: <5518186A.7060602@FreeBSD.org> Date: Sun, 29 Mar 2015 18:21:14 +0300 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Adrian Chadd Subject: Re: svn commit: r280805 - head/sys/kern References: <201503291002.t2TA2TbM021925@svn.freebsd.org> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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, 29 Mar 2015 15:21:19 -0000 On 29.03.2015 18:17, Adrian Chadd wrote: > You know, I exactly wanted this about two days ago, but from userland. > > Do we expose this to userland? Actually my first attempt was to make a tool alike to umastat, but appeared that all vmem(9) structures are internal in C file, so I had to do it this way. > On 29 March 2015 at 03:02, Alexander Motin wrote: >> Author: mav >> Date: Sun Mar 29 10:02:29 2015 >> New Revision: 280805 >> URL: https://svnweb.freebsd.org/changeset/base/280805 >> >> Log: >> Add four new DDB commands to display vmem(9) statistics. >> >> In particular, such DDB commands were added: >> show vmem >> show all vmem >> show vmemdump >> show all vmemdump >> >> As possible usage, that allows to see KVA usage and fragmentation. >> >> Modified: >> head/sys/kern/subr_vmem.c >> >> Modified: head/sys/kern/subr_vmem.c >> ============================================================================== >> --- head/sys/kern/subr_vmem.c Sun Mar 29 07:48:02 2015 (r280804) >> +++ head/sys/kern/subr_vmem.c Sun Mar 29 10:02:29 2015 (r280805) >> @@ -1390,6 +1390,8 @@ vmem_dump(const vmem_t *vm , int (*pr)(c >> #endif /* defined(DDB) || defined(DIAGNOSTIC) */ >> >> #if defined(DDB) >> +#include >> + >> static bt_t * >> vmem_whatis_lookup(vmem_t *vm, vmem_addr_t addr) >> { >> @@ -1443,6 +1445,78 @@ vmem_print(vmem_addr_t addr, const char >> >> vmem_dump(vm, pr); >> } >> + >> +DB_SHOW_COMMAND(vmemdump, vmemdump) >> +{ >> + >> + if (!have_addr) { >> + db_printf("usage: show vmemdump \n"); >> + return; >> + } >> + >> + vmem_dump((const vmem_t *)addr, db_printf); >> +} >> + >> +DB_SHOW_ALL_COMMAND(vmemdump, vmemdumpall) >> +{ >> + const vmem_t *vm; >> + >> + LIST_FOREACH(vm, &vmem_list, vm_alllist) >> + vmem_dump(vm, db_printf); >> +} >> + >> +DB_SHOW_COMMAND(vmem, vmem_summ) >> +{ >> + const vmem_t *vm = (const void *)addr; >> + const bt_t *bt; >> + size_t ft[VMEM_MAXORDER], ut[VMEM_MAXORDER]; >> + size_t fs[VMEM_MAXORDER], us[VMEM_MAXORDER]; >> + int ord; >> + >> + if (!have_addr) { >> + db_printf("usage: show vmem \n"); >> + return; >> + } >> + >> + db_printf("vmem %p '%s'\n", vm, vm->vm_name); >> + db_printf("\tquantum:\t%zu\n", vm->vm_quantum_mask + 1); >> + db_printf("\tsize:\t%zu\n", vm->vm_size); >> + db_printf("\tinuse:\t%zu\n", vm->vm_inuse); >> + db_printf("\tfree:\t%zu\n", vm->vm_size - vm->vm_inuse); >> + db_printf("\tbusy tags:\t%d\n", vm->vm_nbusytag); >> + db_printf("\tfree tags:\t%d\n", vm->vm_nfreetags); >> + >> + memset(&ft, 0, sizeof(ft)); >> + memset(&ut, 0, sizeof(ut)); >> + memset(&fs, 0, sizeof(fs)); >> + memset(&us, 0, sizeof(us)); >> + TAILQ_FOREACH(bt, &vm->vm_seglist, bt_seglist) { >> + ord = SIZE2ORDER(bt->bt_size >> vm->vm_quantum_shift); >> + if (bt->bt_type == BT_TYPE_BUSY) { >> + ut[ord]++; >> + us[ord] += bt->bt_size; >> + } else if (bt->bt_type == BT_TYPE_FREE) { >> + ft[ord]++; >> + fs[ord] += bt->bt_size; >> + } >> + } >> + db_printf("\t\t\tinuse\tsize\t\tfree\tsize\n"); >> + for (ord = 0; ord < VMEM_MAXORDER; ord++) { >> + if (ut[ord] == 0 && ft[ord] == 0) >> + continue; >> + db_printf("\t%-15zu %zu\t%-15zu %zu\t%-16zu\n", >> + ORDER2SIZE(ord) << vm->vm_quantum_shift, >> + ut[ord], us[ord], ft[ord], fs[ord]); >> + } >> +} >> + >> +DB_SHOW_ALL_COMMAND(vmem, vmem_summall) >> +{ >> + const vmem_t *vm; >> + >> + LIST_FOREACH(vm, &vmem_list, vm_alllist) >> + vmem_summ((db_expr_t)vm, TRUE, count, modif); >> +} >> #endif /* defined(DDB) */ >> >> #define vmem_printf printf >> -- Alexander Motin From owner-svn-src-all@FreeBSD.ORG Sun Mar 29 15:43:25 2015 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 9B6223AF; Sun, 29 Mar 2015 15:43: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 878E51BC; Sun, 29 Mar 2015 15:43: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 t2TFhPt9082254; Sun, 29 Mar 2015 15:43:25 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2TFhPrL082252; Sun, 29 Mar 2015 15:43:25 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201503291543.t2TFhPrL082252@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 29 Mar 2015 15:43:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280808 - head/sys/boot 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, 29 Mar 2015 15:43:25 -0000 Author: andrew Date: Sun Mar 29 15:43:24 2015 New Revision: 280808 URL: https://svnweb.freebsd.org/changeset/base/280808 Log: Reorder to help with moving the efi loader parts to sys/boot/efi. As these will depend on ficl having been built, and are set via bsd.arch.inc.mk we need to place this after ficl. As Makefile.amd64 is now late enough we can add the i386 directory to this. Modified: head/sys/boot/Makefile head/sys/boot/Makefile.amd64 Modified: head/sys/boot/Makefile ============================================================================== --- head/sys/boot/Makefile Sun Mar 29 15:18:04 2015 (r280807) +++ head/sys/boot/Makefile Sun Mar 29 15:43:24 2015 (r280808) @@ -1,20 +1,18 @@ # $FreeBSD$ .include -.include .if ${MK_FORTH} != "no" # Build the add-in FORTH interpreter. SUBDIR+= ficl .endif +.include + # Pick the machine-dependent subdir based on the target architecture. ADIR= ${MACHINE:S/powerpc64/powerpc/} .if exists(${.CURDIR}/${ADIR}/.) SUBDIR+= ${ADIR} .endif -.if ${MACHINE} == "amd64" -SUBDIR+= i386 -.endif .include Modified: head/sys/boot/Makefile.amd64 ============================================================================== --- head/sys/boot/Makefile.amd64 Sun Mar 29 15:18:04 2015 (r280807) +++ head/sys/boot/Makefile.amd64 Sun Mar 29 15:43:24 2015 (r280808) @@ -8,3 +8,5 @@ SUBDIR+= userboot .if ${MK_FORTH} != "no" SUBDIR+= ficl32 .endif + +SUBDIR+= i386 From owner-svn-src-all@FreeBSD.ORG Sun Mar 29 17:13:46 2015 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 CE30CE4; Sun, 29 Mar 2015 17:13: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 B943FCFE; Sun, 29 Mar 2015 17:13: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 t2THDkFk026054; Sun, 29 Mar 2015 17:13:46 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2THDjrU026047; Sun, 29 Mar 2015 17:13:45 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201503291713.t2THDjrU026047@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 29 Mar 2015 17:13:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280809 - in head/sys/arm: 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: Sun, 29 Mar 2015 17:13:46 -0000 Author: andrew Date: Sun Mar 29 17:13:44 2015 New Revision: 280809 URL: https://svnweb.freebsd.org/changeset/base/280809 Log: Remove support for CPU_ARM10. No kernel configs could possibly use this as it's not an available option. Along with this we will never support this cpu type as very few arm10 chips were made. Modified: head/sys/arm/arm/cpufunc.c head/sys/arm/arm/elf_trampoline.c head/sys/arm/arm/pmap.c head/sys/arm/include/cpufunc.h head/sys/arm/include/pmap.h Modified: head/sys/arm/arm/cpufunc.c ============================================================================== --- head/sys/arm/arm/cpufunc.c Sun Mar 29 15:43:24 2015 (r280808) +++ head/sys/arm/arm/cpufunc.c Sun Mar 29 17:13:44 2015 (r280809) @@ -173,7 +173,7 @@ struct cpu_functions arm9_cpufuncs = { }; #endif /* CPU_ARM9 */ -#if defined(CPU_ARM9E) || defined(CPU_ARM10) +#if defined(CPU_ARM9E) struct cpu_functions armv5_ec_cpufuncs = { /* CPU functions */ @@ -298,71 +298,7 @@ struct cpu_functions sheeva_cpufuncs = { arm10_setup /* cpu setup */ }; -#endif /* CPU_ARM9E || CPU_ARM10 */ - -#ifdef CPU_ARM10 -struct cpu_functions arm10_cpufuncs = { - /* CPU functions */ - - cpufunc_id, /* id */ - cpufunc_nullop, /* cpwait */ - - /* MMU functions */ - - cpufunc_control, /* control */ - cpufunc_domains, /* Domain */ - arm10_setttb, /* Setttb */ - cpufunc_faultstatus, /* Faultstatus */ - cpufunc_faultaddress, /* Faultaddress */ - - /* TLB functions */ - - armv4_tlb_flushID, /* tlb_flushID */ - arm10_tlb_flushID_SE, /* tlb_flushID_SE */ - armv4_tlb_flushI, /* tlb_flushI */ - arm10_tlb_flushI_SE, /* tlb_flushI_SE */ - armv4_tlb_flushD, /* tlb_flushD */ - armv4_tlb_flushD_SE, /* tlb_flushD_SE */ - - /* Cache operations */ - - arm10_icache_sync_all, /* icache_sync_all */ - arm10_icache_sync_range, /* icache_sync_range */ - - arm10_dcache_wbinv_all, /* dcache_wbinv_all */ - arm10_dcache_wbinv_range, /* dcache_wbinv_range */ - arm10_dcache_inv_range, /* dcache_inv_range */ - arm10_dcache_wb_range, /* dcache_wb_range */ - - armv4_idcache_inv_all, /* idcache_inv_all */ - arm10_idcache_wbinv_all, /* idcache_wbinv_all */ - arm10_idcache_wbinv_range, /* idcache_wbinv_range */ - cpufunc_nullop, /* l2cache_wbinv_all */ - (void *)cpufunc_nullop, /* l2cache_wbinv_range */ - (void *)cpufunc_nullop, /* l2cache_inv_range */ - (void *)cpufunc_nullop, /* l2cache_wb_range */ - (void *)cpufunc_nullop, /* l2cache_drain_writebuf */ - - /* Other functions */ - - cpufunc_nullop, /* flush_prefetchbuf */ - armv4_drain_writebuf, /* drain_writebuf */ - cpufunc_nullop, /* flush_brnchtgt_C */ - (void *)cpufunc_nullop, /* flush_brnchtgt_E */ - - (void *)cpufunc_nullop, /* sleep */ - - /* Soft functions */ - - cpufunc_null_fixup, /* dataabt_fixup */ - cpufunc_null_fixup, /* prefetchabt_fixup */ - - arm10_context_switch, /* context_switch */ - - arm10_setup /* cpu setup */ - -}; -#endif /* CPU_ARM10 */ +#endif /* CPU_ARM9E */ #ifdef CPU_MV_PJ4B struct cpu_functions pj4bv7_cpufuncs = { @@ -830,7 +766,7 @@ u_int cputype; u_int cpu_reset_needs_v4_MMU_disable; /* flag used in locore.s */ #if defined(CPU_ARM9) || \ - defined (CPU_ARM9E) || defined (CPU_ARM10) || defined (CPU_ARM1136) || \ + defined (CPU_ARM9E) || defined (CPU_ARM1136) || \ defined(CPU_ARM1176) || defined(CPU_XSCALE_80200) || defined(CPU_XSCALE_80321) || \ defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_IXP425) || \ defined(CPU_FA526) || defined(CPU_FA626TE) || defined(CPU_MV_PJ4B) || \ @@ -996,7 +932,7 @@ set_cpufuncs() goto out; } #endif /* CPU_ARM9 */ -#if defined(CPU_ARM9E) || defined(CPU_ARM10) +#if defined(CPU_ARM9E) if (cputype == CPU_ID_MV88FR131 || cputype == CPU_ID_MV88FR571_VD || cputype == CPU_ID_MV88FR571_41) { uint32_t sheeva_ctrl; @@ -1021,33 +957,13 @@ set_cpufuncs() get_cachetype_cp15(); pmap_pte_init_generic(); goto out; - } else if (cputype == CPU_ID_ARM926EJS || cputype == CPU_ID_ARM1026EJS) { + } else if (cputype == CPU_ID_ARM926EJS) { cpufuncs = armv5_ec_cpufuncs; get_cachetype_cp15(); pmap_pte_init_generic(); goto out; } -#endif /* CPU_ARM9E || CPU_ARM10 */ -#ifdef CPU_ARM10 - if (/* cputype == CPU_ID_ARM1020T || */ - cputype == CPU_ID_ARM1020E) { - /* - * Select write-through cacheing (this isn't really an - * option on ARM1020T). - */ - cpufuncs = arm10_cpufuncs; - cpu_reset_needs_v4_MMU_disable = 1; /* V4 or higher */ - get_cachetype_cp15(); - arm10_dcache_sets_inc = 1U << arm_dcache_l2_linesize; - arm10_dcache_sets_max = - (1U << (arm_dcache_l2_linesize + arm_dcache_l2_nsets)) - - arm10_dcache_sets_inc; - arm10_dcache_index_inc = 1U << (32 - arm_dcache_l2_assoc); - arm10_dcache_index_max = 0U - arm10_dcache_index_inc; - pmap_pte_init_generic(); - goto out; - } -#endif /* CPU_ARM10 */ +#endif /* CPU_ARM9E */ #if defined(CPU_ARM1136) || defined(CPU_ARM1176) if (cputype == CPU_ID_ARM1136JS || cputype == CPU_ID_ARM1136JSR1 @@ -1251,7 +1167,7 @@ cpufunc_null_fixup(arg) defined(CPU_XSCALE_80200) || defined(CPU_XSCALE_80321) || \ defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_IXP425) || \ defined(CPU_XSCALE_80219) || defined(CPU_XSCALE_81342) || \ - defined(CPU_ARM10) || defined(CPU_ARM1136) || defined(CPU_ARM1176) ||\ + defined(CPU_ARM1136) || defined(CPU_ARM1176) ||\ defined(CPU_FA526) || defined(CPU_FA626TE) #define IGN 0 @@ -1353,7 +1269,7 @@ arm9_setup(args) } #endif /* CPU_ARM9 */ -#if defined(CPU_ARM9E) || defined(CPU_ARM10) +#if defined(CPU_ARM9E) struct cpu_option arm10_options[] = { { "cpu.cache", BIC, OR, (CPU_CONTROL_IC_ENABLE | CPU_CONTROL_DC_ENABLE) }, { "cpu.nocache", OR, BIC, (CPU_CONTROL_IC_ENABLE | CPU_CONTROL_DC_ENABLE) }, Modified: head/sys/arm/arm/elf_trampoline.c ============================================================================== --- head/sys/arm/arm/elf_trampoline.c Sun Mar 29 15:43:24 2015 (r280808) +++ head/sys/arm/arm/elf_trampoline.c Sun Mar 29 17:13:44 2015 (r280809) @@ -65,9 +65,6 @@ extern void fa526_idcache_wbinv_all(void #elif defined(CPU_ARM9E) #define cpu_idcache_wbinv_all armv5_ec_idcache_wbinv_all extern void armv5_ec_idcache_wbinv_all(void); -#elif defined(CPU_ARM10) -#define cpu_idcache_wbinv_all arm10_idcache_wbinv_all -extern void arm10_idcache_wbinv_all(void); #elif defined(CPU_ARM1136) || defined(CPU_ARM1176) #define cpu_idcache_wbinv_all armv6_idcache_wbinv_all #elif defined(CPU_XSCALE_80200) || defined(CPU_XSCALE_80321) || \ Modified: head/sys/arm/arm/pmap.c ============================================================================== --- head/sys/arm/arm/pmap.c Sun Mar 29 15:43:24 2015 (r280808) +++ head/sys/arm/arm/pmap.c Sun Mar 29 17:13:44 2015 (r280809) @@ -522,28 +522,6 @@ pmap_pte_init_arm9(void) #endif /* CPU_ARM9 */ #endif /* ARM_MMU_GENERIC != 0 */ -#if defined(CPU_ARM10) -void -pmap_pte_init_arm10(void) -{ - - /* - * ARM10 is compatible with generic, but we want to use - * write-through caching for now. - */ - pmap_pte_init_generic(); - - pte_l1_s_cache_mode = L1_S_B | L1_S_C; - pte_l2_l_cache_mode = L2_B | L2_C; - pte_l2_s_cache_mode = L2_B | L2_C; - - pte_l1_s_cache_mode_pt = L1_S_C; - pte_l2_l_cache_mode_pt = L2_C; - pte_l2_s_cache_mode_pt = L2_C; - -} -#endif /* CPU_ARM10 */ - #if ARM_MMU_XSCALE == 1 #if (ARM_NMMUS > 1) || defined (CPU_XSCALE_CORE3) static u_int xscale_use_minidata; Modified: head/sys/arm/include/cpufunc.h ============================================================================== --- head/sys/arm/include/cpufunc.h Sun Mar 29 15:43:24 2015 (r280808) +++ head/sys/arm/include/cpufunc.h Sun Mar 29 17:13:44 2015 (r280809) @@ -333,7 +333,7 @@ extern unsigned arm9_dcache_index_max; extern unsigned arm9_dcache_index_inc; #endif -#if defined(CPU_ARM9E) || defined(CPU_ARM10) +#if defined(CPU_ARM9E) void arm10_setttb (u_int); void arm10_tlb_flushID_SE (u_int); @@ -445,7 +445,7 @@ void arm11x6_sleep void arm1136_sleep_rev0 (int); /* for errata 336501 */ #endif -#if defined(CPU_ARM9E) || defined (CPU_ARM10) +#if defined(CPU_ARM9E) void armv5_ec_setttb(u_int); void armv5_ec_icache_sync_all(void); @@ -460,27 +460,7 @@ void armv5_ec_idcache_wbinv_all(void); void armv5_ec_idcache_wbinv_range(vm_offset_t, vm_size_t); #endif -#if defined (CPU_ARM10) -void armv5_setttb(u_int); - -void armv5_icache_sync_all(void); -void armv5_icache_sync_range(vm_offset_t, vm_size_t); - -void armv5_dcache_wbinv_all(void); -void armv5_dcache_wbinv_range(vm_offset_t, vm_size_t); -void armv5_dcache_inv_range(vm_offset_t, vm_size_t); -void armv5_dcache_wb_range(vm_offset_t, vm_size_t); - -void armv5_idcache_wbinv_all(void); -void armv5_idcache_wbinv_range(vm_offset_t, vm_size_t); - -extern unsigned armv5_dcache_sets_max; -extern unsigned armv5_dcache_sets_inc; -extern unsigned armv5_dcache_index_max; -extern unsigned armv5_dcache_index_inc; -#endif - -#if defined(CPU_ARM9) || defined(CPU_ARM9E) || defined(CPU_ARM10) || \ +#if defined(CPU_ARM9) || defined(CPU_ARM9E) || \ defined(CPU_XSCALE_80200) || defined(CPU_XSCALE_80321) || \ defined(CPU_FA526) || defined(CPU_FA626TE) || \ defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_IXP425) || \ Modified: head/sys/arm/include/pmap.h ============================================================================== --- head/sys/arm/include/pmap.h Sun Mar 29 15:43:24 2015 (r280808) +++ head/sys/arm/include/pmap.h Sun Mar 29 17:13:44 2015 (r280809) @@ -625,9 +625,6 @@ void pmap_pte_init_generic(void); #if defined(CPU_ARM9) void pmap_pte_init_arm9(void); #endif /* CPU_ARM9 */ -#if defined(CPU_ARM10) -void pmap_pte_init_arm10(void); -#endif /* CPU_ARM10 */ #if (ARM_MMU_V6 + ARM_MMU_V7) != 0 void pmap_pte_init_mmu_v6(void); #endif /* (ARM_MMU_V6 + ARM_MMU_V7) != 0 */ From owner-svn-src-all@FreeBSD.ORG Sun Mar 29 17:33:06 2015 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 E7D05777; Sun, 29 Mar 2015 17:33: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 CA179EAE; Sun, 29 Mar 2015 17:33: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 t2THX6i8035564; Sun, 29 Mar 2015 17:33:06 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2THX3u0035552; Sun, 29 Mar 2015 17:33:03 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201503291733.t2THX3u0035552@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 29 Mar 2015 17:33:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280810 - in head/sys/arm: allwinner allwinner/a20 altera/socfpga freescale/vybrid rockchip samsung/exynos ti xilinx 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, 29 Mar 2015 17:33:07 -0000 Author: andrew Date: Sun Mar 29 17:33:03 2015 New Revision: 280810 URL: https://svnweb.freebsd.org/changeset/base/280810 Log: Stop building unused cpuvunc_* files, we don't need anything from these. Modified: head/sys/arm/allwinner/a20/files.a20 head/sys/arm/allwinner/files.a10 head/sys/arm/altera/socfpga/files.socfpga head/sys/arm/freescale/vybrid/files.vybrid head/sys/arm/rockchip/files.rk30xx head/sys/arm/samsung/exynos/files.exynos5 head/sys/arm/ti/files.ti head/sys/arm/xilinx/files.zynq7 Modified: head/sys/arm/allwinner/a20/files.a20 ============================================================================== --- head/sys/arm/allwinner/a20/files.a20 Sun Mar 29 17:13:44 2015 (r280809) +++ head/sys/arm/allwinner/a20/files.a20 Sun Mar 29 17:33:03 2015 (r280810) @@ -3,8 +3,6 @@ kern/kern_clocksource.c standard arm/arm/bus_space_asm_generic.S standard arm/arm/bus_space_generic.c standard -arm/arm/cpufunc_asm_armv5.S standard -arm/arm/cpufunc_asm_arm10.S standard arm/arm/cpufunc_asm_arm11.S standard arm/arm/cpufunc_asm_armv7.S standard arm/arm/gic.c standard Modified: head/sys/arm/allwinner/files.a10 ============================================================================== --- head/sys/arm/allwinner/files.a10 Sun Mar 29 17:13:44 2015 (r280809) +++ head/sys/arm/allwinner/files.a10 Sun Mar 29 17:33:03 2015 (r280810) @@ -3,8 +3,6 @@ kern/kern_clocksource.c standard arm/arm/bus_space_asm_generic.S standard arm/arm/bus_space_generic.c standard -arm/arm/cpufunc_asm_armv5.S standard -arm/arm/cpufunc_asm_arm10.S standard arm/arm/cpufunc_asm_arm11.S standard arm/arm/cpufunc_asm_armv7.S standard Modified: head/sys/arm/altera/socfpga/files.socfpga ============================================================================== --- head/sys/arm/altera/socfpga/files.socfpga Sun Mar 29 17:13:44 2015 (r280809) +++ head/sys/arm/altera/socfpga/files.socfpga Sun Mar 29 17:33:03 2015 (r280810) @@ -4,8 +4,6 @@ kern/kern_clocksource.c standard arm/arm/bus_space_generic.c standard arm/arm/bus_space_asm_generic.S standard -arm/arm/cpufunc_asm_armv5.S standard -arm/arm/cpufunc_asm_arm10.S standard arm/arm/cpufunc_asm_arm11.S standard arm/arm/cpufunc_asm_armv7.S standard Modified: head/sys/arm/freescale/vybrid/files.vybrid ============================================================================== --- head/sys/arm/freescale/vybrid/files.vybrid Sun Mar 29 17:13:44 2015 (r280809) +++ head/sys/arm/freescale/vybrid/files.vybrid Sun Mar 29 17:33:03 2015 (r280810) @@ -4,8 +4,6 @@ kern/kern_clocksource.c standard arm/arm/bus_space_generic.c standard arm/arm/bus_space_asm_generic.S standard -arm/arm/cpufunc_asm_armv5.S standard -arm/arm/cpufunc_asm_arm10.S standard arm/arm/cpufunc_asm_arm11.S standard arm/arm/cpufunc_asm_armv7.S standard Modified: head/sys/arm/rockchip/files.rk30xx ============================================================================== --- head/sys/arm/rockchip/files.rk30xx Sun Mar 29 17:13:44 2015 (r280809) +++ head/sys/arm/rockchip/files.rk30xx Sun Mar 29 17:33:03 2015 (r280810) @@ -3,8 +3,6 @@ kern/kern_clocksource.c standard arm/arm/bus_space_asm_generic.S standard arm/arm/bus_space_generic.c standard -arm/arm/cpufunc_asm_armv5.S standard -arm/arm/cpufunc_asm_arm10.S standard arm/arm/cpufunc_asm_arm11.S standard arm/arm/cpufunc_asm_armv7.S standard Modified: head/sys/arm/samsung/exynos/files.exynos5 ============================================================================== --- head/sys/arm/samsung/exynos/files.exynos5 Sun Mar 29 17:13:44 2015 (r280809) +++ head/sys/arm/samsung/exynos/files.exynos5 Sun Mar 29 17:33:03 2015 (r280810) @@ -4,8 +4,6 @@ kern/kern_clocksource.c standard arm/arm/bus_space_generic.c standard arm/arm/bus_space_asm_generic.S standard -arm/arm/cpufunc_asm_armv5.S standard -arm/arm/cpufunc_asm_arm10.S standard arm/arm/cpufunc_asm_arm11.S standard arm/arm/cpufunc_asm_armv7.S standard Modified: head/sys/arm/ti/files.ti ============================================================================== --- head/sys/arm/ti/files.ti Sun Mar 29 17:13:44 2015 (r280809) +++ head/sys/arm/ti/files.ti Sun Mar 29 17:33:03 2015 (r280810) @@ -5,8 +5,6 @@ kern/kern_clocksource.c standard arm/arm/bus_space_base.c standard arm/arm/bus_space_generic.c standard arm/arm/bus_space_asm_generic.S standard -arm/arm/cpufunc_asm_armv5.S standard -arm/arm/cpufunc_asm_arm10.S standard arm/arm/cpufunc_asm_arm11.S standard arm/arm/cpufunc_asm_armv7.S standard arm/arm/pmu.c optional hwpmc Modified: head/sys/arm/xilinx/files.zynq7 ============================================================================== --- head/sys/arm/xilinx/files.zynq7 Sun Mar 29 17:13:44 2015 (r280809) +++ head/sys/arm/xilinx/files.zynq7 Sun Mar 29 17:33:03 2015 (r280810) @@ -8,8 +8,6 @@ kern/kern_clocksource.c standard arm/arm/bus_space_base.c standard arm/arm/bus_space_generic.c standard arm/arm/bus_space_asm_generic.S standard -arm/arm/cpufunc_asm_armv5.S standard -arm/arm/cpufunc_asm_arm10.S standard arm/arm/cpufunc_asm_arm11.S standard arm/arm/cpufunc_asm_armv7.S standard From owner-svn-src-all@FreeBSD.ORG Sun Mar 29 17:42:34 2015 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 659DDACC; Sun, 29 Mar 2015 17:42: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 4FD9DF9C; Sun, 29 Mar 2015 17:42: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 t2THgYTQ040263; Sun, 29 Mar 2015 17:42:34 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2THgX1k040261; Sun, 29 Mar 2015 17:42:33 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201503291742.t2THgX1k040261@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 29 Mar 2015 17:42:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280811 - in head/sys/arm: 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: Sun, 29 Mar 2015 17:42:34 -0000 Author: andrew Date: Sun Mar 29 17:42:32 2015 New Revision: 280811 URL: https://svnweb.freebsd.org/changeset/base/280811 Log: Remove unused arm10_* functions. The remaining functions are only used in mv configs. Modified: head/sys/arm/arm/cpufunc_asm_arm10.S head/sys/arm/include/cpufunc.h Modified: head/sys/arm/arm/cpufunc_asm_arm10.S ============================================================================== --- head/sys/arm/arm/cpufunc_asm_arm10.S Sun Mar 29 17:33:03 2015 (r280810) +++ head/sys/arm/arm/cpufunc_asm_arm10.S Sun Mar 29 17:42:32 2015 (r280811) @@ -36,23 +36,6 @@ __FBSDID("$FreeBSD$"); /* - * Functions to set the MMU Translation Table Base register - * - * We need to clean and flush the cache as it uses virtual - * addresses that are about to change. - */ -ENTRY(arm10_setttb) - stmfd sp!, {r0, lr} - bl _C_LABEL(arm10_idcache_wbinv_all) - ldmfd sp!, {r0, lr} - - mcr p15, 0, r0, c2, c0, 0 /* load new TTB */ - - mcr p15, 0, r0, c8, c7, 0 /* invalidate I+D TLBs */ - bx lr -END(arm10_setttb) - -/* * TLB functions */ ENTRY(arm10_tlb_flushID_SE) @@ -66,168 +49,6 @@ ENTRY(arm10_tlb_flushI_SE) bx lr END(arm10_tlb_flushI_SE) -/* - * Cache operations. For the entire cache we use the set/index - * operations. - */ - s_max .req r0 - i_max .req r1 - s_inc .req r2 - i_inc .req r3 - -ENTRY_NP(arm10_icache_sync_range) - ldr ip, .Larm10_line_size - cmp r1, #0x4000 - bcs .Larm10_icache_sync_all - ldr ip, [ip] - sub r3, ip, #1 - and r2, r0, r3 - add r1, r1, r2 - bic r0, r0, r3 -.Larm10_sync_next: - mcr p15, 0, r0, c7, c5, 1 /* Invalidate I cache SE with VA */ - mcr p15, 0, r0, c7, c10, 1 /* Clean D cache SE with VA */ - add r0, r0, ip - subs r1, r1, ip - bhi .Larm10_sync_next - mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ - bx lr -END(arm10_icache_sync_range) - -ENTRY_NP(arm10_icache_sync_all) -.Larm10_icache_sync_all: - /* - * We assume that the code here can never be out of sync with the - * dcache, so that we can safely flush the Icache and fall through - * into the Dcache cleaning code. - */ - mcr p15, 0, r0, c7, c5, 0 /* Flush I cache */ - /* Fall through to clean Dcache. */ - -.Larm10_dcache_wb: - ldr ip, .Larm10_cache_data - ldmia ip, {s_max, i_max, s_inc, i_inc} -.Lnext_set: - orr ip, s_max, i_max -.Lnext_index: - mcr p15, 0, ip, c7, c10, 2 /* Clean D cache SE with Set/Index */ - subs ip, ip, i_inc - bhs .Lnext_index /* Next index */ - subs s_max, s_max, s_inc - bhs .Lnext_set /* Next set */ - mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ - bx lr -END(arm10_icache_sync_all) - -.Larm10_line_size: - .word _C_LABEL(arm_pdcache_line_size) - -ENTRY(arm10_dcache_wb_range) - ldr ip, .Larm10_line_size - cmp r1, #0x4000 - bcs .Larm10_dcache_wb - ldr ip, [ip] - sub r3, ip, #1 - and r2, r0, r3 - add r1, r1, r2 - bic r0, r0, r3 -.Larm10_wb_next: - mcr p15, 0, r0, c7, c10, 1 /* Clean D cache SE with VA */ - add r0, r0, ip - subs r1, r1, ip - bhi .Larm10_wb_next - mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ - bx lr -END(arm10_dcache_wb_range) - -ENTRY(arm10_dcache_wbinv_range) - ldr ip, .Larm10_line_size - cmp r1, #0x4000 - bcs .Larm10_dcache_wbinv_all - ldr ip, [ip] - sub r3, ip, #1 - and r2, r0, r3 - add r1, r1, r2 - bic r0, r0, r3 -.Larm10_wbinv_next: - mcr p15, 0, r0, c7, c14, 1 /* Purge D cache SE with VA */ - add r0, r0, ip - subs r1, r1, ip - bhi .Larm10_wbinv_next - mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ - bx lr -END(arm10_dcache_wbinv_range) - -/* - * Note, we must not invalidate everything. If the range is too big we - * must use wb-inv of the entire cache. - */ -ENTRY(arm10_dcache_inv_range) - ldr ip, .Larm10_line_size - cmp r1, #0x4000 - bcs .Larm10_dcache_wbinv_all - ldr ip, [ip] - sub r3, ip, #1 - and r2, r0, r3 - add r1, r1, r2 - bic r0, r0, r3 -.Larm10_inv_next: - mcr p15, 0, r0, c7, c6, 1 /* Invalidate D cache SE with VA */ - add r0, r0, ip - subs r1, r1, ip - bhi .Larm10_inv_next - mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ - bx lr -END(arm10_dcache_inv_range) - -ENTRY(arm10_idcache_wbinv_range) - ldr ip, .Larm10_line_size - cmp r1, #0x4000 - bcs .Larm10_idcache_wbinv_all - ldr ip, [ip] - sub r3, ip, #1 - and r2, r0, r3 - add r1, r1, r2 - bic r0, r0, r3 -.Larm10_id_wbinv_next: - mcr p15, 0, r0, c7, c5, 1 /* Invalidate I cache SE with VA */ - mcr p15, 0, r0, c7, c14, 1 /* Purge D cache SE with VA */ - add r0, r0, ip - subs r1, r1, ip - bhi .Larm10_id_wbinv_next - mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ - bx lr -END(arm10_idcache_wbinv_range) - -ENTRY_NP(arm10_idcache_wbinv_all) -.Larm10_idcache_wbinv_all: - /* - * We assume that the code here can never be out of sync with the - * dcache, so that we can safely flush the Icache and fall through - * into the Dcache purging code. - */ - mcr p15, 0, r0, c7, c5, 0 /* Flush I cache */ - /* Fall through to purge Dcache. */ - -EENTRY(arm10_dcache_wbinv_all) -.Larm10_dcache_wbinv_all: - ldr ip, .Larm10_cache_data - ldmia ip, {s_max, i_max, s_inc, i_inc} -.Lnext_set_inv: - orr ip, s_max, i_max -.Lnext_index_inv: - mcr p15, 0, ip, c7, c14, 2 /* Purge D cache SE with Set/Index */ - subs ip, ip, i_inc - bhs .Lnext_index_inv /* Next index */ - subs s_max, s_max, s_inc - bhs .Lnext_set_inv /* Next set */ - mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ - bx lr -EEND(arm10_dcache_wbinv_all) -END(arm10_idcache_wbinv_all) - -.Larm10_cache_data: - .word _C_LABEL(arm10_dcache_sets_max) /* * Context switch. @@ -253,24 +74,3 @@ ENTRY(arm10_context_switch) nop bx lr END(arm10_context_switch) - - .bss - -/* XXX The following macros should probably be moved to asm.h */ -#define _DATA_OBJECT(x) .globl x; .type x,_ASM_TYPE_OBJECT; x: -#define C_OBJECT(x) _DATA_OBJECT(_C_LABEL(x)) - -/* - * Parameters for the cache cleaning code. Note that the order of these - * four variables is assumed in the code above. Hence the reason for - * declaring them in the assembler file. - */ - .align 2 -C_OBJECT(arm10_dcache_sets_max) - .space 4 -C_OBJECT(arm10_dcache_index_max) - .space 4 -C_OBJECT(arm10_dcache_sets_inc) - .space 4 -C_OBJECT(arm10_dcache_index_inc) - .space 4 Modified: head/sys/arm/include/cpufunc.h ============================================================================== --- head/sys/arm/include/cpufunc.h Sun Mar 29 17:33:03 2015 (r280810) +++ head/sys/arm/include/cpufunc.h Sun Mar 29 17:42:32 2015 (r280811) @@ -334,31 +334,13 @@ extern unsigned arm9_dcache_index_inc; #endif #if defined(CPU_ARM9E) -void arm10_setttb (u_int); - void arm10_tlb_flushID_SE (u_int); void arm10_tlb_flushI_SE (u_int); -void arm10_icache_sync_all (void); -void arm10_icache_sync_range (vm_offset_t, vm_size_t); - -void arm10_dcache_wbinv_all (void); -void arm10_dcache_wbinv_range (vm_offset_t, vm_size_t); -void arm10_dcache_inv_range (vm_offset_t, vm_size_t); -void arm10_dcache_wb_range (vm_offset_t, vm_size_t); - -void arm10_idcache_wbinv_all (void); -void arm10_idcache_wbinv_range (vm_offset_t, vm_size_t); - void arm10_context_switch (void); void arm10_setup (char *string); -extern unsigned arm10_dcache_sets_max; -extern unsigned arm10_dcache_sets_inc; -extern unsigned arm10_dcache_index_max; -extern unsigned arm10_dcache_index_inc; - u_int sheeva_control_ext (u_int, u_int); void sheeva_cpu_sleep (int); void sheeva_setttb (u_int); From owner-svn-src-all@FreeBSD.ORG Sun Mar 29 17:51:42 2015 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 96D4ECBB; Sun, 29 Mar 2015 17:51:42 +0000 (UTC) Received: from mx1.stack.nl (relay02.stack.nl [IPv6:2001:610:1108:5010::104]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mailhost.stack.nl", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 55451CF; Sun, 29 Mar 2015 17:51:42 +0000 (UTC) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id CBE46358C5A; Sun, 29 Mar 2015 19:51:37 +0200 (CEST) Received: by snail.stack.nl (Postfix, from userid 1677) id B126128494; Sun, 29 Mar 2015 19:51:37 +0200 (CEST) Date: Sun, 29 Mar 2015 19:51:37 +0200 From: Jilles Tjoelker To: Don Lewis Subject: Re: svn commit: r280308 - head/sys/fs/devfs Message-ID: <20150329175137.GD95224@stack.nl> References: <20150322162507.GD2379@kib.kiev.ua> <201503221825.t2MIP7jv096531@gw.catspoiler.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201503221825.t2MIP7jv096531@gw.catspoiler.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org, delphij@FreeBSD.org, brde@optusnet.com.au, kostikbel@gmail.com X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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, 29 Mar 2015 17:51:42 -0000 On Sun, Mar 22, 2015 at 11:25:07AM -0700, Don Lewis wrote: > It's not totally worthless. I think the mtime on tty devices is used to > calculate the idle time that is printed by the w command. We just don't > need nanosecond accuracy for that. Hmm. The idle time on tty devices breaking is a clear POLA violation, but I'm not sure what's the best way to fix it. By the way, w uses atime and who -u uses mtime. Some options are: * Bypass vfs_timestamp() and hard-code second accuracy in devfs; futimens() will still set timestamps to the nanosecond, even with UTIME_NOW. A timestamp update after UTIME_NOW setting may set back the timestamp to an older value. * Make vfs.timestamp_precision filesystem-specific. Since this does not affect futimens() with explicit timestamps, it will not cause strange situations with cp -p. * Restrict file times on devfs to seconds. * Somehow add a special case for TTY devices so they will always keep timestamps. * Somehow add a special case for "performance-critical" devices so they will not keep timestamps. * Change the default for vfs.timestamp_precision to 1, which still provides non-zero nanoseconds (so much of the same bugs) but is not so slow. The file server people won't like this though. My proposal for delayed updates as in UFS clearly does not work for TTY idle times, so there is no point in that. -- Jilles Tjoelker From owner-svn-src-all@FreeBSD.ORG Sun Mar 29 18:41:46 2015 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 E5101737; Sun, 29 Mar 2015 18:41: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 CE3367F9; Sun, 29 Mar 2015 18:41: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 t2TIfk0W065722; Sun, 29 Mar 2015 18:41:46 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2TIfibs065707; Sun, 29 Mar 2015 18:41:44 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201503291841.t2TIfibs065707@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 29 Mar 2015 18:41:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280812 - in head/sys/arm: broadcom/bcm2835 freescale/imx lpc mv versatile 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, 29 Mar 2015 18:41:47 -0000 Author: andrew Date: Sun Mar 29 18:41:43 2015 New Revision: 280812 URL: https://svnweb.freebsd.org/changeset/base/280812 Log: We don't use cpufunc_asm_armv5.S in any of these configs, remove it. Modified: head/sys/arm/broadcom/bcm2835/files.bcm283x head/sys/arm/freescale/imx/files.imx51 head/sys/arm/freescale/imx/files.imx53 head/sys/arm/freescale/imx/files.imx6 head/sys/arm/lpc/files.lpc head/sys/arm/mv/files.mv head/sys/arm/versatile/files.versatile Modified: head/sys/arm/broadcom/bcm2835/files.bcm283x ============================================================================== --- head/sys/arm/broadcom/bcm2835/files.bcm283x Sun Mar 29 17:42:32 2015 (r280811) +++ head/sys/arm/broadcom/bcm2835/files.bcm283x Sun Mar 29 18:41:43 2015 (r280812) @@ -19,7 +19,6 @@ arm/arm/bus_space_base.c standard arm/arm/bus_space_generic.c standard arm/arm/bus_space_asm_generic.S standard arm/arm/cpufunc_asm_arm11.S standard -arm/arm/cpufunc_asm_armv5.S standard arm/arm/cpufunc_asm_armv6.S standard kern/kern_clocksource.c standard Modified: head/sys/arm/freescale/imx/files.imx51 ============================================================================== --- head/sys/arm/freescale/imx/files.imx51 Sun Mar 29 17:42:32 2015 (r280811) +++ head/sys/arm/freescale/imx/files.imx51 Sun Mar 29 18:41:43 2015 (r280812) @@ -1,7 +1,6 @@ # $FreeBSD$ arm/arm/bus_space_asm_generic.S standard arm/arm/bus_space_generic.c standard -arm/arm/cpufunc_asm_armv5.S standard arm/arm/cpufunc_asm_arm11.S standard arm/arm/cpufunc_asm_armv7.S standard kern/kern_clocksource.c standard Modified: head/sys/arm/freescale/imx/files.imx53 ============================================================================== --- head/sys/arm/freescale/imx/files.imx53 Sun Mar 29 17:42:32 2015 (r280811) +++ head/sys/arm/freescale/imx/files.imx53 Sun Mar 29 18:41:43 2015 (r280812) @@ -1,7 +1,6 @@ # $FreeBSD$ arm/arm/bus_space_asm_generic.S standard arm/arm/bus_space_generic.c standard -arm/arm/cpufunc_asm_armv5.S standard arm/arm/cpufunc_asm_arm11.S standard arm/arm/cpufunc_asm_armv7.S standard kern/kern_clocksource.c standard Modified: head/sys/arm/freescale/imx/files.imx6 ============================================================================== --- head/sys/arm/freescale/imx/files.imx6 Sun Mar 29 17:42:32 2015 (r280811) +++ head/sys/arm/freescale/imx/files.imx6 Sun Mar 29 18:41:43 2015 (r280812) @@ -6,7 +6,6 @@ arm/arm/bus_space_asm_generic.S standard arm/arm/bus_space_generic.c standard arm/arm/cpufunc_asm_arm11.S standard -arm/arm/cpufunc_asm_armv5.S standard arm/arm/cpufunc_asm_armv7.S standard kern/kern_clocksource.c standard Modified: head/sys/arm/lpc/files.lpc ============================================================================== --- head/sys/arm/lpc/files.lpc Sun Mar 29 17:42:32 2015 (r280811) +++ head/sys/arm/lpc/files.lpc Sun Mar 29 18:41:43 2015 (r280812) @@ -2,7 +2,6 @@ arm/arm/bus_space_base.c standard arm/arm/bus_space_generic.c standard arm/arm/cpufunc_asm_arm9.S standard -arm/arm/cpufunc_asm_armv5.S standard arm/lpc/lpc_machdep.c standard arm/lpc/lpc_pwr.c standard arm/lpc/lpc_intc.c standard Modified: head/sys/arm/mv/files.mv ============================================================================== --- head/sys/arm/mv/files.mv Sun Mar 29 17:42:32 2015 (r280811) +++ head/sys/arm/mv/files.mv Sun Mar 29 18:41:43 2015 (r280812) @@ -16,7 +16,6 @@ arm/arm/bus_space_base.c standard arm/arm/bus_space_generic.c standard arm/arm/cpufunc_asm_arm10.S standard arm/arm/cpufunc_asm_arm11.S standard -arm/arm/cpufunc_asm_armv5.S standard arm/arm/cpufunc_asm_armv5_ec.S standard arm/arm/cpufunc_asm_armv7.S standard arm/arm/cpufunc_asm_sheeva.S standard Modified: head/sys/arm/versatile/files.versatile ============================================================================== --- head/sys/arm/versatile/files.versatile Sun Mar 29 17:42:32 2015 (r280811) +++ head/sys/arm/versatile/files.versatile Sun Mar 29 18:41:43 2015 (r280812) @@ -5,7 +5,6 @@ arm/arm/bus_space_asm_generic.S standa arm/arm/bus_space_generic.c standard arm/arm/cpufunc_asm_arm11.S standard arm/arm/cpufunc_asm_arm11x6.S standard -arm/arm/cpufunc_asm_armv5.S standard arm/arm/cpufunc_asm_armv6.S standard arm/versatile/pl050.c optional sc From owner-svn-src-all@FreeBSD.ORG Sun Mar 29 18:42:44 2015 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 56AC488A; Sun, 29 Mar 2015 18:42:44 +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 D2552802; Sun, 29 Mar 2015 18:42:43 +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 t2TIgcIo036561 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sun, 29 Mar 2015 21:42:38 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t2TIgcIo036561 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t2TIgcmZ036560; Sun, 29 Mar 2015 21:42:38 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 29 Mar 2015 21:42:38 +0300 From: Konstantin Belousov To: Jilles Tjoelker Subject: Re: svn commit: r280308 - head/sys/fs/devfs Message-ID: <20150329184238.GB2379@kib.kiev.ua> References: <20150322162507.GD2379@kib.kiev.ua> <201503221825.t2MIP7jv096531@gw.catspoiler.org> <20150329175137.GD95224@stack.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150329175137.GD95224@stack.nl> 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: src-committers@FreeBSD.org, Don Lewis , delphij@FreeBSD.org, brde@optusnet.com.au, svn-src-head@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: Sun, 29 Mar 2015 18:42:44 -0000 On Sun, Mar 29, 2015 at 07:51:37PM +0200, Jilles Tjoelker wrote: > On Sun, Mar 22, 2015 at 11:25:07AM -0700, Don Lewis wrote: > > It's not totally worthless. I think the mtime on tty devices is used to > > calculate the idle time that is printed by the w command. We just don't > > need nanosecond accuracy for that. > > Hmm. The idle time on tty devices breaking is a clear POLA violation, > but I'm not sure what's the best way to fix it. By the way, w uses atime > and who -u uses mtime. > > Some options are: > > * Bypass vfs_timestamp() and hard-code second accuracy in devfs; > futimens() will still set timestamps to the nanosecond, even with > UTIME_NOW. A timestamp update after UTIME_NOW setting may set back the > timestamp to an older value. > > * Make vfs.timestamp_precision filesystem-specific. Since this does not > affect futimens() with explicit timestamps, it will not cause strange > situations with cp -p. > > * Restrict file times on devfs to seconds. > > * Somehow add a special case for TTY devices so they will always keep > timestamps. > > * Somehow add a special case for "performance-critical" devices so they > will not keep timestamps. > > * Change the default for vfs.timestamp_precision to 1, which still > provides non-zero nanoseconds (so much of the same bugs) but is not so > slow. The file server people won't like this though. > > My proposal for delayed updates as in UFS clearly does not work for TTY > idle times, so there is no point in that. > Interesting complication with the devfs timestamp update is that devfs_read_f() and devfs_write_f() do not lock the vnode. So whatever update method is used, stat(2) on devfs might return inconsistent value, since tv_src/tv_nsec cannot be updated or read by single op, without locking. That said, we could either: - ignore the race. Then the patch below might be good enough. - Trim the precision of futimens() for devfs to always set tv_nsec to 0. Then, the race can be handled satisfactory with atomics. - Add a lock (IMO this does not make sense). diff --git a/sys/fs/devfs/devfs_vnops.c b/sys/fs/devfs/devfs_vnops.c index 941f92c..e199d52 100644 --- a/sys/fs/devfs/devfs_vnops.c +++ b/sys/fs/devfs/devfs_vnops.c @@ -83,8 +83,24 @@ MTX_SYSINIT(cdevpriv_mtx, &cdevpriv_mtx, "cdevpriv lock", MTX_DEF); SYSCTL_DECL(_vfs_devfs); static int devfs_dotimes; -SYSCTL_INT(_vfs_devfs, OID_AUTO, dotimes, CTLFLAG_RW, - &devfs_dotimes, 0, "Update timestamps on DEVFS"); +SYSCTL_INT(_vfs_devfs, OID_AUTO, dotimes, CTLFLAG_RW, &devfs_dotimes, 0, + "Update timestamps on DEVFS with default precision"); + +static void +devfs_timestamp(struct timespec *tsp) +{ + time_t ts; + + if (devfs_dotimes) { + vfs_timestamp(tsp); + } else { + ts = time_second; + if (tsp->tv_sec < ts) { + tsp->tv_sec = ts; + tsp->tv_nsec = 0; + } + } +} static int devfs_fp_check(struct file *fp, struct cdev **devp, struct cdevsw **dswp, @@ -1228,9 +1244,8 @@ devfs_read_f(struct file *fp, struct uio *uio, struct ucred *cred, foffset_lock_uio(fp, uio, flags | FOF_NOLOCK); error = dsw->d_read(dev, uio, ioflag); - if (devfs_dotimes && - (uio->uio_resid != resid || (error == 0 && resid != 0))) - vfs_timestamp(&dev->si_atime); + if (uio->uio_resid != resid || (error == 0 && resid != 0)) + devfs_timestamp(&dev->si_atime); td->td_fpop = fpop; dev_relthread(dev, ref); @@ -1708,9 +1723,8 @@ devfs_write_f(struct file *fp, struct uio *uio, struct ucred *cred, resid = uio->uio_resid; error = dsw->d_write(dev, uio, ioflag); - if (devfs_dotimes && - (uio->uio_resid != resid || (error == 0 && resid != 0))) { - vfs_timestamp(&dev->si_ctime); + if (uio->uio_resid != resid || (error == 0 && resid != 0)) { + devfs_timestamp(&dev->si_ctime); dev->si_mtime = dev->si_ctime; } td->td_fpop = fpop; From owner-svn-src-all@FreeBSD.ORG Sun Mar 29 18:44:17 2015 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 5953B9E5; Sun, 29 Mar 2015 18: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 3985D812; Sun, 29 Mar 2015 18: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 t2TIiHLU068388; Sun, 29 Mar 2015 18:44:17 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2TIiGHx068385; Sun, 29 Mar 2015 18:44:16 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201503291844.t2TIiGHx068385@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 29 Mar 2015 18:44:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280813 - in head/sys/arm: 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: Sun, 29 Mar 2015 18:44:17 -0000 Author: andrew Date: Sun Mar 29 18:44:15 2015 New Revision: 280813 URL: https://svnweb.freebsd.org/changeset/base/280813 Log: Remove unused cpufunc arm11 and armv6 code. While here only define the remaining functions in the context we use them in. Modified: head/sys/arm/arm/cpufunc_asm_arm11.S head/sys/arm/arm/cpufunc_asm_armv6.S head/sys/arm/include/cpufunc.h Modified: head/sys/arm/arm/cpufunc_asm_arm11.S ============================================================================== --- head/sys/arm/arm/cpufunc_asm_arm11.S Sun Mar 29 18:41:43 2015 (r280812) +++ head/sys/arm/arm/cpufunc_asm_arm11.S Sun Mar 29 18:44:15 2015 (r280813) @@ -38,20 +38,6 @@ __FBSDID("$FreeBSD$"); /* - * Functions to set the MMU Translation Table Base register - * - * We need to clean and flush the cache as it uses virtual - * addresses that are about to change. - */ -ENTRY(arm11_setttb) - mcr p15, 0, r0, c2, c0, 0 /* load new TTB */ - - mcr p15, 0, r0, c8, c7, 0 /* invalidate I+D TLBs */ - mcr p15, 0, r0, c7, c10, 4 /* drain write buffer */ - RET -END(arm11_setttb) - -/* * TLB functions */ ENTRY(arm11_tlb_flushID_SE) Modified: head/sys/arm/arm/cpufunc_asm_armv6.S ============================================================================== --- head/sys/arm/arm/cpufunc_asm_armv6.S Sun Mar 29 18:41:43 2015 (r280812) +++ head/sys/arm/arm/cpufunc_asm_armv6.S Sun Mar 29 18:44:15 2015 (r280813) @@ -61,29 +61,6 @@ END(armv6_setttb) * Cache operations. */ -/* LINTSTUB: void armv6_icache_sync_range(vaddr_t, vsize_t); */ -ENTRY_NP(armv6_icache_sync_range) - add r1, r1, r0 - sub r1, r1, #1 - mcrr p15, 0, r1, r0, c5 /* invalidate I cache range */ - mcrr p15, 0, r1, r0, c12 /* clean D cache range */ - mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ - RET -END(armv6_icache_sync_range) - -/* LINTSTUB: void armv6_icache_sync_all(void); */ -ENTRY_NP(armv6_icache_sync_all) - /* - * We assume that the code here can never be out of sync with the - * dcache, so that we can safely flush the Icache and fall through - * into the Dcache cleaning code. - */ - mcr p15, 0, r0, c7, c5, 0 /* Flush I cache */ - mcr p15, 0, r0, c7, c10, 0 /* Clean D cache */ - mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ - RET -END(armv6_icache_sync_all) - /* LINTSTUB: void armv6_dcache_wb_range(vaddr_t, vsize_t); */ ENTRY(armv6_dcache_wb_range) add r1, r1, r0 @@ -116,16 +93,6 @@ ENTRY(armv6_dcache_inv_range) RET END(armv6_dcache_inv_range) -/* LINTSTUB: void armv6_idcache_wbinv_range(vaddr_t, vsize_t); */ -ENTRY(armv6_idcache_wbinv_range) - add r1, r1, r0 - sub r1, r1, #1 - mcrr p15, 0, r1, r0, c5 /* invaliate I cache range */ - mcrr p15, 0, r1, r0, c14 /* clean & invaliate D cache range */ - mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ - RET -END(armv6_idcache_wbinv_range) - /* LINTSTUB: void armv6_idcache_wbinv_all(void); */ ENTRY_NP(armv6_idcache_wbinv_all) /* @@ -134,14 +101,11 @@ ENTRY_NP(armv6_idcache_wbinv_all) * into the Dcache purging code. */ mcr p15, 0, r0, c7, c5, 0 /* Flush I cache */ - /* Fall through to purge Dcache. */ -/* LINTSTUB: void armv6_dcache_wbinv_all(void); */ -EENTRY(armv6_dcache_wbinv_all) + /* Purge Dcache. */ mcr p15, 0, r0, c7, c14, 0 /* clean & invalidate D cache */ mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ RET -EEND(armv6_dcache_wbinv_all) END(armv6_idcache_wbinv_all) ENTRY(armv6_idcache_inv_all) Modified: head/sys/arm/include/cpufunc.h ============================================================================== --- head/sys/arm/include/cpufunc.h Sun Mar 29 18:41:43 2015 (r280812) +++ head/sys/arm/include/cpufunc.h Sun Mar 29 18:44:15 2015 (r280813) @@ -355,36 +355,10 @@ void sheeva_l2cache_wb_range (vm_offset void sheeva_l2cache_wbinv_all (void); #endif -#if defined(CPU_ARM1136) || defined(CPU_ARM1176) || \ - defined(CPU_MV_PJ4B) || defined(CPU_CORTEXA) || defined(CPU_KRAIT) -void arm11_setttb (u_int); -void arm11_sleep (int); - -void arm11_tlb_flushID_SE (u_int); -void arm11_tlb_flushI_SE (u_int); - -void arm11_context_switch (void); - -void arm11_setup (char *string); -void arm11_tlb_flushID (void); -void arm11_tlb_flushI (void); -void arm11_tlb_flushD (void); -void arm11_tlb_flushD_SE (u_int va); - -void arm11_drain_writebuf (void); - -void armv6_icache_sync_all (void); -void armv6_icache_sync_range (vm_offset_t, vm_size_t); - -void armv6_dcache_wbinv_all (void); -void armv6_dcache_wbinv_range (vm_offset_t, vm_size_t); -void armv6_dcache_inv_range (vm_offset_t, vm_size_t); -void armv6_dcache_wb_range (vm_offset_t, vm_size_t); - -void armv6_idcache_inv_all (void); +#if defined(CPU_MV_PJ4B) void armv6_idcache_wbinv_all (void); -void armv6_idcache_wbinv_range (vm_offset_t, vm_size_t); - +#endif +#if defined(CPU_MV_PJ4B) || defined(CPU_CORTEXA) || defined(CPU_KRAIT) void armv7_setttb (u_int); void armv7_tlb_flushID (void); void armv7_tlb_flushID_SE (u_int); @@ -413,6 +387,23 @@ void cortexa_setup (char *); #endif #if defined(CPU_ARM1136) || defined(CPU_ARM1176) +void arm11_tlb_flushID (void); +void arm11_tlb_flushID_SE (u_int); +void arm11_tlb_flushI (void); +void arm11_tlb_flushI_SE (u_int); +void arm11_tlb_flushD (void); +void arm11_tlb_flushD_SE (u_int va); + +void arm11_context_switch (void); + +void arm11_drain_writebuf (void); + +void armv6_dcache_wbinv_range (vm_offset_t, vm_size_t); +void armv6_dcache_inv_range (vm_offset_t, vm_size_t); +void armv6_dcache_wb_range (vm_offset_t, vm_size_t); + +void armv6_idcache_inv_all (void); + void arm11x6_setttb (u_int); void arm11x6_idcache_wbinv_all (void); void arm11x6_dcache_wbinv_all (void); @@ -424,6 +415,7 @@ void arm11x6_setup void arm11x6_sleep (int); /* no ref. for errata */ #endif #if defined(CPU_ARM1136) +void arm11_sleep (int); void arm1136_sleep_rev0 (int); /* for errata 336501 */ #endif From owner-svn-src-all@FreeBSD.ORG Sun Mar 29 18:45:52 2015 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 C7A2BBD8; Sun, 29 Mar 2015 18:45: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 984FD839; Sun, 29 Mar 2015 18:45: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 t2TIjqQb068660; Sun, 29 Mar 2015 18:45:52 GMT (envelope-from dumbbell@FreeBSD.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2TIjqvv068658; Sun, 29 Mar 2015 18:45:52 GMT (envelope-from dumbbell@FreeBSD.org) Message-Id: <201503291845.t2TIjqvv068658@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dumbbell set sender to dumbbell@FreeBSD.org using -f From: Jean-Sebastien Pedron Date: Sun, 29 Mar 2015 18:45:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280814 - head/sys/dev/drm2 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, 29 Mar 2015 18:45:52 -0000 Author: dumbbell Date: Sun Mar 29 18:45:51 2015 New Revision: 280814 URL: https://svnweb.freebsd.org/changeset/base/280814 Log: drm: Import Linux commit 9bc3cd5673d84d29272fa7181a4dfca83cbb48c1 Author: Ville Syrjälä Date: Fri May 31 12:17:08 2013 +0000 drm: Sort connector modes based on vrefresh Keeping the modes sorted by vrefresh before the pixel clock makes the mode list somehow more pleasing to the eye. Signed-off-by: Ville Syrjälä Reviewed-by: Alex Deucher Signed-off-by: Dave Airlie PR: 198936 Obtained from: Linux MFC after: 1 month MFC with: r280183 Modified: head/sys/dev/drm2/drm_crtc_helper.c head/sys/dev/drm2/drm_modes.c Modified: head/sys/dev/drm2/drm_crtc_helper.c ============================================================================== --- head/sys/dev/drm2/drm_crtc_helper.c Sun Mar 29 18:44:15 2015 (r280813) +++ head/sys/dev/drm2/drm_crtc_helper.c Sun Mar 29 18:45:51 2015 (r280814) @@ -189,13 +189,14 @@ prune: if (list_empty(&connector->modes)) return 0; + list_for_each_entry(mode, &connector->modes, head) + mode->vrefresh = drm_mode_vrefresh(mode); + drm_mode_sort(&connector->modes); DRM_DEBUG_KMS("[CONNECTOR:%d:%s] probed modes :\n", connector->base.id, drm_get_connector_name(connector)); list_for_each_entry(mode, &connector->modes, head) { - mode->vrefresh = drm_mode_vrefresh(mode); - drm_mode_set_crtcinfo(mode, CRTC_INTERLACE_HALVE_V); drm_mode_debug_printmodeline(mode); } Modified: head/sys/dev/drm2/drm_modes.c ============================================================================== --- head/sys/dev/drm2/drm_modes.c Sun Mar 29 18:44:15 2015 (r280813) +++ head/sys/dev/drm2/drm_modes.c Sun Mar 29 18:45:51 2015 (r280814) @@ -927,6 +927,11 @@ static int drm_mode_compare(void *priv, diff = b->hdisplay * b->vdisplay - a->hdisplay * a->vdisplay; if (diff) return diff; + + diff = b->vrefresh - a->vrefresh; + if (diff) + return diff; + diff = b->clock - a->clock; return diff; } From owner-svn-src-all@FreeBSD.ORG Sun Mar 29 18:46:13 2015 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 DAA5DD19; Sun, 29 Mar 2015 18:46: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 AB77E845; Sun, 29 Mar 2015 18:46: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 t2TIkD9u068784; Sun, 29 Mar 2015 18:46:13 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2TIkDov068783; Sun, 29 Mar 2015 18:46:13 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201503291846.t2TIkDov068783@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 29 Mar 2015 18:46:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280815 - 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: Sun, 29 Mar 2015 18:46:14 -0000 Author: andrew Date: Sun Mar 29 18:46:12 2015 New Revision: 280815 URL: https://svnweb.freebsd.org/changeset/base/280815 Log: Remove the unused armv5 cpufunc code. Deleted: head/sys/arm/arm/cpufunc_asm_armv5.S From owner-svn-src-all@FreeBSD.ORG Sun Mar 29 18:53:26 2015 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 C8EB2F4A; Sun, 29 Mar 2015 18:53: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 AA57D913; Sun, 29 Mar 2015 18:53: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 t2TIrQsE073077; Sun, 29 Mar 2015 18:53:26 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2TIrMSE073059; Sun, 29 Mar 2015 18:53:22 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201503291853.t2TIrMSE073059@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 29 Mar 2015 18:53:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280816 - in head/libexec/rtld-elf: . amd64 i386 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, 29 Mar 2015 18:53:26 -0000 Author: kib Date: Sun Mar 29 18:53:21 2015 New Revision: 280816 URL: https://svnweb.freebsd.org/changeset/base/280816 Log: Change compiler setting to make default visibility of the symbols for rtld on x86 to be hidden. This is a micro-optimization, which allows intrinsic references inside rtld to be handled without indirection through PLT. The visibility of rtld symbols for other objects in the symbol namespace is controlled by a version script. Reviewed by: kan, jilles Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Modified: head/libexec/rtld-elf/Makefile head/libexec/rtld-elf/amd64/reloc.c head/libexec/rtld-elf/amd64/rtld_machdep.h head/libexec/rtld-elf/amd64/rtld_start.S head/libexec/rtld-elf/i386/reloc.c head/libexec/rtld-elf/i386/rtld_machdep.h head/libexec/rtld-elf/i386/rtld_start.S head/libexec/rtld-elf/rtld.c head/libexec/rtld-elf/rtld.h head/libexec/rtld-elf/rtld_lock.c head/libexec/rtld-elf/rtld_lock.h head/libexec/rtld-elf/rtld_tls.h Modified: head/libexec/rtld-elf/Makefile ============================================================================== --- head/libexec/rtld-elf/Makefile Sun Mar 29 18:46:12 2015 (r280815) +++ head/libexec/rtld-elf/Makefile Sun Mar 29 18:53:21 2015 (r280816) @@ -42,6 +42,9 @@ CFLAGS+= -fPIC CFLAGS+= -fpic .endif CFLAGS+= -DPIC $(DEBUG) +.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" +CFLAGS+= -fvisibility=hidden +.endif LDFLAGS+= -shared -Wl,-Bsymbolic LIBADD= c_pic Modified: head/libexec/rtld-elf/amd64/reloc.c ============================================================================== --- head/libexec/rtld-elf/amd64/reloc.c Sun Mar 29 18:46:12 2015 (r280815) +++ head/libexec/rtld-elf/amd64/reloc.c Sun Mar 29 18:53:21 2015 (r280816) @@ -47,6 +47,7 @@ #include "debug.h" #include "rtld.h" +#include "rtld_tls.h" /* * Process the special R_X86_64_COPY relocations in the main program. These Modified: head/libexec/rtld-elf/amd64/rtld_machdep.h ============================================================================== --- head/libexec/rtld-elf/amd64/rtld_machdep.h Sun Mar 29 18:46:12 2015 (r280815) +++ head/libexec/rtld-elf/amd64/rtld_machdep.h Sun Mar 29 18:53:21 2015 (r280816) @@ -74,7 +74,7 @@ typedef struct { unsigned long ti_offset; } tls_index; -extern void *__tls_get_addr(tls_index *ti); +void *__tls_get_addr(tls_index *ti) __exported; #define RTLD_DEFAULT_STACK_PF_EXEC PF_X #define RTLD_DEFAULT_STACK_EXEC PROT_EXEC Modified: head/libexec/rtld-elf/amd64/rtld_start.S ============================================================================== --- head/libexec/rtld-elf/amd64/rtld_start.S Sun Mar 29 18:46:12 2015 (r280815) +++ head/libexec/rtld-elf/amd64/rtld_start.S Sun Mar 29 18:53:21 2015 (r280816) @@ -36,7 +36,7 @@ movq %rsp,%rsi # save address of exit proc movq %rsp,%rdx # construct address of obj_main addq $8,%rdx - call _rtld@PLT # Call rtld(sp); returns entry point + call _rtld # Call rtld(sp); returns entry point popq %rsi # Get exit procedure address movq %r12,%rdi # *ap /* @@ -118,7 +118,7 @@ _rtld_bind_start: leaq (%rsi,%rsi,2),%rsi # multiply by 3 leaq (,%rsi,8),%rsi # now 8, for 24 (sizeof Elf_Rela) - call _rtld_bind@PLT # Transfer control to the binder + call _rtld_bind # Transfer control to the binder /* Now %rax contains the entry point of the function being called. */ movq %rax,0x60(%rsp) # Store target over reloff argument Modified: head/libexec/rtld-elf/i386/reloc.c ============================================================================== --- head/libexec/rtld-elf/i386/reloc.c Sun Mar 29 18:46:12 2015 (r280815) +++ head/libexec/rtld-elf/i386/reloc.c Sun Mar 29 18:53:21 2015 (r280816) @@ -48,6 +48,7 @@ #include "debug.h" #include "rtld.h" +#include "rtld_tls.h" /* * Process the special R_386_COPY relocations in the main program. These Modified: head/libexec/rtld-elf/i386/rtld_machdep.h ============================================================================== --- head/libexec/rtld-elf/i386/rtld_machdep.h Sun Mar 29 18:46:12 2015 (r280815) +++ head/libexec/rtld-elf/i386/rtld_machdep.h Sun Mar 29 18:53:21 2015 (r280816) @@ -74,8 +74,8 @@ typedef struct { unsigned long ti_offset; } tls_index; -extern void *___tls_get_addr(tls_index *ti) __attribute__((__regparm__(1))); -extern void *__tls_get_addr(tls_index *ti); +void *___tls_get_addr(tls_index *ti) __attribute__((__regparm__(1))) __exported; +void *__tls_get_addr(tls_index *ti) __exported; #define RTLD_DEFAULT_STACK_PF_EXEC PF_X #define RTLD_DEFAULT_STACK_EXEC PROT_EXEC Modified: head/libexec/rtld-elf/i386/rtld_start.S ============================================================================== --- head/libexec/rtld-elf/i386/rtld_start.S Sun Mar 29 18:46:12 2015 (r280815) +++ head/libexec/rtld-elf/i386/rtld_start.S Sun Mar 29 18:53:21 2015 (r280816) @@ -42,7 +42,7 @@ pushl %ecx # Pass address of obj_main pushl %ebx # Pass address of exit proc pushl %eax # Pass initial stack pointer to rtld - call _rtld@PLT # Call rtld(sp); returns entry point + call _rtld # Call rtld(sp); returns entry point addl $16,%esp # Remove arguments from stack popl %edx # Get exit procedure address movl %esi,%esp # Ignore obj_main @@ -78,7 +78,7 @@ _rtld_bind_start: pushl 20(%esp) # Copy reloff argument pushl 20(%esp) # Copy obj argument - call _rtld_bind@PLT # Transfer control to the binder + call _rtld_bind # Transfer control to the binder /* Now %eax contains the entry point of the function being called. */ addl $8,%esp # Discard binder arguments Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Sun Mar 29 18:46:12 2015 (r280815) +++ head/libexec/rtld-elf/rtld.c Sun Mar 29 18:53:21 2015 (r280816) @@ -163,8 +163,8 @@ static uint32_t gnu_hash(const char *); static bool matched_symbol(SymLook *, const Obj_Entry *, Sym_Match_Result *, const unsigned long); -void r_debug_state(struct r_debug *, struct link_map *) __noinline; -void _r_debug_postinit(struct link_map *) __noinline; +void r_debug_state(struct r_debug *, struct link_map *) __noinline __exported; +void _r_debug_postinit(struct link_map *) __noinline __exported; int __sys_openat(int, const char *, int, ...); @@ -172,7 +172,7 @@ int __sys_openat(int, const char *, int, * Data declarations. */ static char *error_message; /* Message for dlerror(), or NULL */ -struct r_debug r_debug; /* for GDB; */ +struct r_debug r_debug __exported; /* for GDB; */ static bool libmap_disable; /* Disable libmap */ static bool ld_loadfltr; /* Immediate filters processing */ static char *libmap_override; /* Maps to use in addition to libmap.conf */ @@ -212,6 +212,23 @@ extern Elf_Dyn _DYNAMIC; #define RTLD_IS_DYNAMIC() (&_DYNAMIC != NULL) #endif +int dlclose(void *) __exported; +char *dlerror(void) __exported; +void *dlopen(const char *, int) __exported; +void *fdlopen(int, int) __exported; +void *dlsym(void *, const char *) __exported; +dlfunc_t dlfunc(void *, const char *) __exported; +void *dlvsym(void *, const char *, const char *) __exported; +int dladdr(const void *, Dl_info *) __exported; +void dllockinit(void *, void *(*)(void *), void (*)(void *), void (*)(void *), + void (*)(void *), void (*)(void *), void (*)(void *)) __exported; +int dlinfo(void *, int , void *) __exported; +int dl_iterate_phdr(__dl_iterate_hdr_callback, void *) __exported; +int _rtld_addr_phdr(const void *, struct dl_phdr_info *) __exported; +int _rtld_get_stack_prot(void) __exported; +int _rtld_is_dlopened(void *) __exported; +void _rtld_error(const char *, ...) __exported; + int npagesizes, osreldate; size_t *pagesizes; Modified: head/libexec/rtld-elf/rtld.h ============================================================================== --- head/libexec/rtld-elf/rtld.h Sun Mar 29 18:46:12 2015 (r280815) +++ head/libexec/rtld-elf/rtld.h Sun Mar 29 18:53:21 2015 (r280816) @@ -353,7 +353,7 @@ typedef struct Struct_SymLook { struct Struct_RtldLockState *lockstate; } SymLook; -void _rtld_error(const char *, ...) __printflike(1, 2); +void _rtld_error(const char *, ...) __printflike(1, 2) __exported; const char *rtld_strerror(int); Obj_Entry *map_object(int, const char *, const struct stat *); void *xcalloc(size_t, size_t); Modified: head/libexec/rtld-elf/rtld_lock.c ============================================================================== --- head/libexec/rtld-elf/rtld_lock.c Sun Mar 29 18:46:12 2015 (r280815) +++ head/libexec/rtld-elf/rtld_lock.c Sun Mar 29 18:53:21 2015 (r280816) @@ -51,6 +51,10 @@ #include "rtld.h" #include "rtld_machdep.h" +void _rtld_thread_init(struct RtldLockInfo *) __exported; +void _rtld_atfork_pre(int *) __exported; +void _rtld_atfork_post(int *) __exported; + #define WAFLAG 0x1 /* A writer holds the lock */ #define RC_INCR 0x2 /* Adjusts count of readers desiring lock */ Modified: head/libexec/rtld-elf/rtld_lock.h ============================================================================== --- head/libexec/rtld-elf/rtld_lock.h Sun Mar 29 18:46:12 2015 (r280815) +++ head/libexec/rtld-elf/rtld_lock.h Sun Mar 29 18:53:21 2015 (r280816) @@ -44,9 +44,9 @@ struct RtldLockInfo void (*at_fork)(void); }; -extern void _rtld_thread_init(struct RtldLockInfo *); -extern void _rtld_atfork_pre(int *); -extern void _rtld_atfork_post(int *); +extern void _rtld_thread_init(struct RtldLockInfo *) __exported; +extern void _rtld_atfork_pre(int *) __exported; +extern void _rtld_atfork_post(int *) __exported; #ifdef IN_RTLD Modified: head/libexec/rtld-elf/rtld_tls.h ============================================================================== --- head/libexec/rtld-elf/rtld_tls.h Sun Mar 29 18:46:12 2015 (r280815) +++ head/libexec/rtld-elf/rtld_tls.h Sun Mar 29 18:53:21 2015 (r280816) @@ -57,13 +57,14 @@ * The value returned from this function is suitable for installing * directly into the thread pointer register. */ -extern void *_rtld_allocate_tls(void* oldtls, size_t tcbsize, size_t tcbalign); +void *_rtld_allocate_tls(void* oldtls, size_t tcbsize, size_t tcbalign) + __exported; /* * Free a TLS block allocated using _rtld_allocate_tls(). The tcbsize * and tcbalign parameters must be the same as those used to allocate * the block. */ -extern void _rtld_free_tls(void *tcb, size_t tcbsize, size_t tcbalign); +void _rtld_free_tls(void *tcb, size_t tcbsize, size_t tcbalign) __exported; #endif From owner-svn-src-all@FreeBSD.ORG Sun Mar 29 18:59:07 2015 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 D718719B; Sun, 29 Mar 2015 18:59: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 B7831947; Sun, 29 Mar 2015 18:59: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 t2TIx6ak073882; Sun, 29 Mar 2015 18:59:06 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2TIx5t3073875; Sun, 29 Mar 2015 18:59:05 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201503291859.t2TIx5t3073875@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 29 Mar 2015 18:59:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280817 - in head/sys: arm/arm arm/include 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, 29 Mar 2015 18:59:07 -0000 Author: andrew Date: Sun Mar 29 18:59:04 2015 New Revision: 280817 URL: https://svnweb.freebsd.org/changeset/base/280817 Log: Remove ARM9_CACHE_WRITE_THROUGH, none of our configs define it. Modified: head/sys/arm/arm/cpufunc.c head/sys/arm/arm/pmap.c head/sys/arm/include/pmap.h head/sys/conf/options.arm Modified: head/sys/arm/arm/cpufunc.c ============================================================================== --- head/sys/arm/arm/cpufunc.c Sun Mar 29 18:53:21 2015 (r280816) +++ head/sys/arm/arm/cpufunc.c Sun Mar 29 18:59:04 2015 (r280817) @@ -924,11 +924,7 @@ set_cpufuncs() arm_dcache_l2_nsets)) - arm9_dcache_sets_inc; arm9_dcache_index_inc = 1U << (32 - arm_dcache_l2_assoc); arm9_dcache_index_max = 0U - arm9_dcache_index_inc; -#ifdef ARM9_CACHE_WRITE_THROUGH - pmap_pte_init_arm9(); -#else pmap_pte_init_generic(); -#endif goto out; } #endif /* CPU_ARM9 */ Modified: head/sys/arm/arm/pmap.c ============================================================================== --- head/sys/arm/arm/pmap.c Sun Mar 29 18:53:21 2015 (r280816) +++ head/sys/arm/arm/pmap.c Sun Mar 29 18:59:04 2015 (r280817) @@ -500,26 +500,6 @@ pmap_pte_init_generic(void) pmap_zero_page_func = pmap_zero_page_generic; } -#if defined(CPU_ARM9) && defined(ARM9_CACHE_WRITE_THROUGH) -void -pmap_pte_init_arm9(void) -{ - - /* - * ARM9 is compatible with generic, but we want to use - * write-through caching for now. - */ - pmap_pte_init_generic(); - - pte_l1_s_cache_mode = L1_S_C; - pte_l2_l_cache_mode = L2_C; - pte_l2_s_cache_mode = L2_C; - - pte_l1_s_cache_mode_pt = L1_S_C; - pte_l2_l_cache_mode_pt = L2_C; - pte_l2_s_cache_mode_pt = L2_C; -} -#endif /* CPU_ARM9 */ #endif /* ARM_MMU_GENERIC != 0 */ #if ARM_MMU_XSCALE == 1 Modified: head/sys/arm/include/pmap.h ============================================================================== --- head/sys/arm/include/pmap.h Sun Mar 29 18:53:21 2015 (r280816) +++ head/sys/arm/include/pmap.h Sun Mar 29 18:59:04 2015 (r280817) @@ -622,9 +622,6 @@ void pmap_copy_page_generic(vm_paddr_t, void pmap_zero_page_generic(vm_paddr_t, int, int); void pmap_pte_init_generic(void); -#if defined(CPU_ARM9) -void pmap_pte_init_arm9(void); -#endif /* CPU_ARM9 */ #if (ARM_MMU_V6 + ARM_MMU_V7) != 0 void pmap_pte_init_mmu_v6(void); #endif /* (ARM_MMU_V6 + ARM_MMU_V7) != 0 */ @@ -706,4 +703,4 @@ extern vm_paddr_t dump_avail[]; #endif /* !LOCORE */ #endif /* !_MACHINE_PMAP_H_ */ -#endif /* !ARM_NEW_PMAP */ \ No newline at end of file +#endif /* !ARM_NEW_PMAP */ Modified: head/sys/conf/options.arm ============================================================================== --- head/sys/conf/options.arm Sun Mar 29 18:53:21 2015 (r280816) +++ head/sys/conf/options.arm Sun Mar 29 18:59:04 2015 (r280817) @@ -1,5 +1,4 @@ #$FreeBSD$ -ARM9_CACHE_WRITE_THROUGH opt_global.h ARMV6 opt_global.h ARM_CACHE_LOCK_ENABLE opt_global.h ARM_KERN_DIRECTMAP opt_vm.h From owner-svn-src-all@FreeBSD.ORG Sun Mar 29 19:14:45 2015 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 26560693; Sun, 29 Mar 2015 19:14: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 0F019B77; Sun, 29 Mar 2015 19:14: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 t2TJEisS082853; Sun, 29 Mar 2015 19:14:44 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2TJEgZN082841; Sun, 29 Mar 2015 19:14:42 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201503291914.t2TJEgZN082841@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 29 Mar 2015 19:14:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280818 - in head: lib/libc/include lib/libc/sys lib/libthr/thread share/man/man3 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, 29 Mar 2015 19:14:45 -0000 Author: kib Date: Sun Mar 29 19:14:41 2015 New Revision: 280818 URL: https://svnweb.freebsd.org/changeset/base/280818 Log: Make kevent(2) a cancellation point. Note that to cancel blocked kevent(2) call, changelist must be empty, since we cannot cancel a call which already made changes to the process state. And in reverse, call which only makes changes to the kqueue state, without waiting for an event, is not cancellable. This makes a natural usage model to migrate kqueue loop to support cancellation, where existing single kevent(2) call must be split into two: first uncancellable update of kqueue, then cancellable wait for events. Note that this is ABI-incompatible change, but it is believed that there is no cancel-safe code that relies on kevent(2) not being a cancellation point. Option to preserve the ABI would be to keep kevent(2) as is, but add new call with flags to specify cancellation behaviour, which only value seems to add complications. Suggested and reviewed by: jilles Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Added: head/lib/libc/sys/kevent.c (contents, props changed) Modified: head/lib/libc/include/libc_private.h head/lib/libc/sys/Makefile.inc head/lib/libc/sys/interposing_table.c head/lib/libc/sys/kqueue.2 head/lib/libthr/thread/thr_syscalls.c head/share/man/man3/pthread_testcancel.3 Modified: head/lib/libc/include/libc_private.h ============================================================================== --- head/lib/libc/include/libc_private.h Sun Mar 29 18:59:04 2015 (r280817) +++ head/lib/libc/include/libc_private.h Sun Mar 29 19:14:41 2015 (r280818) @@ -221,6 +221,7 @@ enum { INTERPOS__pthread_mutex_init_calloc_cb, INTERPOS_spinlock, INTERPOS_spinunlock, + INTERPOS_kevent, INTERPOS_MAX }; @@ -293,6 +294,7 @@ void * __sys_freebsd6_mmap(void *, __siz struct aiocb; struct fd_set; struct iovec; +struct kevent; struct msghdr; struct pollfd; struct rusage; @@ -315,6 +317,8 @@ int __sys_fsync(int); __pid_t __sys_fork(void); int __sys_ftruncate(int, __off_t); int __sys_gettimeofday(struct timeval *, struct timezone *); +int __sys_kevent(int, const struct kevent *, int, struct kevent *, + int, const struct timespec *); __off_t __sys_lseek(int, __off_t, int); void *__sys_mmap(void *, __size_t, int, int, int, __off_t); int __sys_msync(void *, __size_t, int); Modified: head/lib/libc/sys/Makefile.inc ============================================================================== --- head/lib/libc/sys/Makefile.inc Sun Mar 29 18:59:04 2015 (r280817) +++ head/lib/libc/sys/Makefile.inc Sun Mar 29 19:14:41 2015 (r280818) @@ -51,6 +51,7 @@ INTERPOSED = \ fcntl \ fsync \ fork \ + kevent \ msync \ nanosleep \ open \ Modified: head/lib/libc/sys/interposing_table.c ============================================================================== --- head/lib/libc/sys/interposing_table.c Sun Mar 29 18:59:04 2015 (r280817) +++ head/lib/libc/sys/interposing_table.c Sun Mar 29 19:14:41 2015 (r280818) @@ -75,6 +75,7 @@ interpos_func_t __libc_interposing[INTER SLOT(_pthread_mutex_init_calloc_cb, _pthread_mutex_init_calloc_cb_stub), SLOT(spinlock, __libc_spinlock_stub), SLOT(spinunlock, __libc_spinunlock_stub), + SLOT(kevent, __sys_kevent), }; #undef SLOT Added: head/lib/libc/sys/kevent.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/sys/kevent.c Sun Mar 29 19:14:41 2015 (r280818) @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2015 The FreeBSD Foundation. + * All rights reserved. + * + * Portions of this software were developed by Konstantin Belousov + * under sponsorship from the FreeBSD Foundation. + * + * 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(s), this list of conditions and the following disclaimer as + * the first lines of this file unmodified other than the possible + * addition of one or more copyright notices. + * 2. Redistributions in binary form must reproduce the above copyright + * notice(s), 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 COPYRIGHT HOLDER(S) ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) 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 "libc_private.h" + +__weak_reference(__sys_kevent, __kevent); + +#pragma weak kevent +int +kevent(int kq, const struct kevent *changelist, int nchanges, + struct kevent *eventlist, int nevents, const struct timespec *timeout) +{ + + return (((int (*)(int, const struct kevent *, int, + struct kevent *, int, const struct timespec *)) + __libc_interposing[INTERPOS_kevent])(kq, changelist, nchanges, + eventlist, nevents, timeout)); +} Modified: head/lib/libc/sys/kqueue.2 ============================================================================== --- head/lib/libc/sys/kqueue.2 Sun Mar 29 18:59:04 2015 (r280817) +++ head/lib/libc/sys/kqueue.2 Sun Mar 29 19:14:41 2015 (r280818) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 18, 2014 +.Dd March 29, 2015 .Dt KQUEUE 2 .Os .Sh NAME @@ -41,7 +41,7 @@ .Fn kqueue "void" .Ft int .Fn kevent "int kq" "const struct kevent *changelist" "int nchanges" "struct kevent *eventlist" "int nevents" "const struct timespec *timeout" -.Fn EV_SET "&kev" ident filter flags fflags data udata +.Fn EV_SET "kev" ident filter flags fflags data udata .Sh DESCRIPTION The .Fn kqueue @@ -550,6 +550,16 @@ On return, .Va fflags contains the users defined flags in the lower 24 bits. .El +.Sh CANCELLATION BEHAVIOUR +If +.Fa nevents +is non-zero, i.e. the function is potentially blocking, the call +is a cancellation point. +Otherwise, i.e. if +.Fa nevents +is zero, the call is not cancellable. +Cancellation can only occur before any changes are made to the kqueue, +or when the call was blocked and no changes to the queue were requested. .Sh RETURN VALUES The .Fn kqueue @@ -620,6 +630,8 @@ The specified descriptor is invalid. .It Bq Er EINTR A signal was delivered before the timeout expired and before any events were placed on the kqueue for return. +.It Bq Er EINTR +A cancellation request was delivered to the thread, but not yet handled. .It Bq Er EINVAL The specified time limit or filter is invalid. .It Bq Er ENOENT @@ -634,6 +646,14 @@ sysctl. .It Bq Er ESRCH The specified process to attach to does not exist. .El +.Pp +When +.Fn kevent +call fails with +.Er EINTR +error, all changes in the +.Fa changelist +have been applied. .Sh SEE ALSO .Xr aio_error 2 , .Xr aio_read 2 , @@ -643,6 +663,7 @@ The specified process to attach to does .Xr select 2 , .Xr sigaction 2 , .Xr write 2 , +.Xr pthread_setcancelstate 3 , .Xr signal 3 .Sh HISTORY The Modified: head/lib/libthr/thread/thr_syscalls.c ============================================================================== --- head/lib/libthr/thread/thr_syscalls.c Sun Mar 29 18:59:04 2015 (r280817) +++ head/lib/libthr/thread/thr_syscalls.c Sun Mar 29 19:14:41 2015 (r280818) @@ -341,6 +341,29 @@ __thr_pselect(int count, fd_set *rfds, f return (ret); } +static int +__thr_kevent(int kq, const struct kevent *changelist, int nchanges, + struct kevent *eventlist, int nevents, const struct timespec *timeout) +{ + struct pthread *curthread; + int ret; + + if (nevents == 0) { + /* + * No blocking, do not make the call cancellable. + */ + return (__sys_kevent(kq, changelist, nchanges, eventlist, + nevents, timeout)); + } + curthread = _get_curthread(); + _thr_cancel_enter(curthread); + ret = __sys_kevent(kq, changelist, nchanges, eventlist, nevents, + timeout); + _thr_cancel_leave(curthread, ret == -1 && nchanges == 0); + + return (ret); +} + /* * Cancellation behavior: * Thread may be canceled at start, but if the system call got some data, @@ -599,6 +622,7 @@ __thr_interpose_libc(void) SLOT(writev); SLOT(spinlock); SLOT(spinunlock); + SLOT(kevent); #undef SLOT *(__libc_interposing_slot( INTERPOS__pthread_mutex_init_calloc_cb)) = Modified: head/share/man/man3/pthread_testcancel.3 ============================================================================== --- head/share/man/man3/pthread_testcancel.3 Sun Mar 29 18:59:04 2015 (r280817) +++ head/share/man/man3/pthread_testcancel.3 Sun Mar 29 19:14:41 2015 (r280818) @@ -1,5 +1,5 @@ .\" $FreeBSD$ -.Dd June 11, 2013 +.Dd March 29, 2015 .Dt PTHREAD_TESTCANCEL 3 .Os .Sh NAME @@ -107,6 +107,7 @@ functions: .Fn close , .Fn creat , .Fn fsync , +.Fn kevent , .Fn mq_receive , .Fn mq_send , .Fn mq_timedreceive , @@ -147,12 +148,20 @@ functions: .Fn waitpid , .Fn write , .Fn writev . +.Pp The .Fn fcntl function is a cancellation point if .Fa cmd is .Dv F_SETLKW . +.Pp +The +.Fn kevent +function is a cancellation point if it is potentially blocking, +i.e. when the +.Fa nevents +argument is non-zero. .Sh RETURN VALUES If successful, the .Fn pthread_setcancelstate From owner-svn-src-all@FreeBSD.ORG Sun Mar 29 19:37:42 2015 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 9B207C37; Sun, 29 Mar 2015 19: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 8564FD73; Sun, 29 Mar 2015 19:37: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 t2TJbgX8092630; Sun, 29 Mar 2015 19:37:42 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2TJbgGx092629; Sun, 29 Mar 2015 19:37:42 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201503291937.t2TJbgGx092629@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 29 Mar 2015 19:37:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280819 - head/share/man/man3 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, 29 Mar 2015 19:37:42 -0000 Author: kib Date: Sun Mar 29 19:37:41 2015 New Revision: 280819 URL: https://svnweb.freebsd.org/changeset/base/280819 Log: Formatting changes to the pthread_testcancel(3). Use list for the cancellation points enumeration. Move notes about functions into the list inline. The discussion of the idiomatic use of cancellation facilities does not belong to RETURN VALUES section, move it to NOTES. Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Modified: head/share/man/man3/pthread_testcancel.3 Modified: head/share/man/man3/pthread_testcancel.3 ============================================================================== --- head/share/man/man3/pthread_testcancel.3 Sun Mar 29 19:14:41 2015 (r280818) +++ head/share/man/man3/pthread_testcancel.3 Sun Mar 29 19:37:41 2015 (r280819) @@ -100,77 +100,70 @@ type will be in effect. .Ss Cancellation Points Cancellation points will occur when a thread is executing the following functions: -.Fn accept , -.Fn accept4 , -.Fn aio_suspend , -.Fn connect , -.Fn close , -.Fn creat , -.Fn fsync , -.Fn kevent , -.Fn mq_receive , -.Fn mq_send , -.Fn mq_timedreceive , -.Fn mq_timedsend , -.Fn msync , -.Fn nanosleep , -.Fn open , -.Fn openat , -.Fn pause , -.Fn poll , -.Fn pselect , -.Fn pthread_cond_timedwait , -.Fn pthread_cond_wait , -.Fn pthread_join , -.Fn pthread_testcancel , -.Fn read , -.Fn readv , -.Fn recv , -.Fn recvfrom , -.Fn recvmsg , -.Fn select , -.Fn sem_timedwait , -.Fn sem_wait , -.Fn send , -.Fn sendmsg , -.Fn sendto , -.Fn sigsuspend , -.Fn sigtimedwait , -.Fn sigwaitinfo , -.Fn sigwait , -.Fn sleep , -.Fn system , -.Fn tcdrain , -.Fn usleep , -.Fn wait , -.Fn wait3 , -.Fn wait4 , -.Fn waitpid , -.Fn write , -.Fn writev . -.Pp +.Bl -tag -width "Fn pthread_cond_timedwait" -compact +.It Fn accept +.It Fn accept4 +.It Fn aio_suspend +.It Fn connect +.It Fn close +.It Fn creat +.It Fn fcntl The .Fn fcntl function is a cancellation point if .Fa cmd is .Dv F_SETLKW . -.Pp +.It Fn fsync +.It Fn kevent The .Fn kevent function is a cancellation point if it is potentially blocking, i.e. when the .Fa nevents argument is non-zero. -.Sh RETURN VALUES -If successful, the -.Fn pthread_setcancelstate -and -.Fn pthread_setcanceltype -functions will return zero. -Otherwise, an error number shall be returned to -indicate the error. -.Pp +.It Fn mq_receive +.It Fn mq_send +.It Fn mq_timedreceive +.It Fn mq_timedsend +.It Fn msync +.It Fn nanosleep +.It Fn open +.It Fn openat +.It Fn pause +.It Fn poll +.It Fn pselect +.It Fn pthread_cond_timedwait +.It Fn pthread_cond_wait +.It Fn pthread_join +.It Fn pthread_testcancel +.It Fn read +.It Fn readv +.It Fn recv +.It Fn recvfrom +.It Fn recvmsg +.It Fn select +.It Fn sem_timedwait +.It Fn sem_wait +.It Fn send +.It Fn sendmsg +.It Fn sendto +.It Fn sigsuspend +.It Fn sigtimedwait +.It Fn sigwaitinfo +.It Fn sigwait +.It Fn sleep +.It Fn system +.It Fn tcdrain +.It Fn usleep +.It Fn wait +.It Fn wait3 +.It Fn wait4 +.It Fn waitpid +.It Fn write +.It Fn writev +.El +.Sh NOTES The .Fn pthread_setcancelstate and @@ -212,6 +205,14 @@ entry to the object. .Pp Finally, only functions that are cancel-safe may be called from a thread that is asynchronously cancelable. +.Sh RETURN VALUES +If successful, the +.Fn pthread_setcancelstate +and +.Fn pthread_setcanceltype +functions will return zero. +Otherwise, an error number shall be returned to +indicate the error. .Sh ERRORS The function .Fn pthread_setcancelstate From owner-svn-src-all@FreeBSD.ORG Sun Mar 29 20:04:17 2015 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 D94A84E9; Sun, 29 Mar 2015 20:04:17 +0000 (UTC) Received: from gw.catspoiler.org (cl-1657.chi-02.us.sixxs.net [IPv6:2001:4978:f:678::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 639F89B; Sun, 29 Mar 2015 20:04:17 +0000 (UTC) Received: from FreeBSD.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.13.3/8.13.3) with ESMTP id t2TK41q4091900; Sun, 29 Mar 2015 12:04:05 -0800 (PST) (envelope-from truckman@FreeBSD.org) Message-Id: <201503292004.t2TK41q4091900@gw.catspoiler.org> Date: Sun, 29 Mar 2015 13:04:01 -0700 (PDT) From: Don Lewis Subject: Re: svn commit: r280308 - head/sys/fs/devfs To: jilles@stack.nl In-Reply-To: <20150329175137.GD95224@stack.nl> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii Cc: src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org, delphij@FreeBSD.org, brde@optusnet.com.au, kostikbel@gmail.com X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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, 29 Mar 2015 20:04:18 -0000 On 29 Mar, Jilles Tjoelker wrote: > On Sun, Mar 22, 2015 at 11:25:07AM -0700, Don Lewis wrote: >> It's not totally worthless. I think the mtime on tty devices is used to >> calculate the idle time that is printed by the w command. We just don't >> need nanosecond accuracy for that. > > Hmm. The idle time on tty devices breaking is a clear POLA violation, > but I'm not sure what's the best way to fix it. By the way, w uses atime > and who -u uses mtime. > > Some options are: > > * Bypass vfs_timestamp() and hard-code second accuracy in devfs; > futimens() will still set timestamps to the nanosecond, even with > UTIME_NOW. A timestamp update after UTIME_NOW setting may set back the > timestamp to an older value. I'm ok with this. I'd even be ok with forbidding futimens(). > * Make vfs.timestamp_precision filesystem-specific. Since this does not > affect futimens() with explicit timestamps, it will not cause strange > situations with cp -p. I think this might be unnecessarily complex. > * Restrict file times on devfs to seconds. > > * Somehow add a special case for TTY devices so they will always keep > timestamps. Also a possibility, though I don't see the need for better than one second accuracy. > * Somehow add a special case for "performance-critical" devices so they > will not keep timestamps. Maybe, but if we can make timestamps cheap enough, it might not matter. > * Change the default for vfs.timestamp_precision to 1, which still > provides non-zero nanoseconds (so much of the same bugs) but is not so > slow. The file server people won't like this though. And it doesn't solve the problem if the system has mixed usage. > My proposal for delayed updates as in UFS clearly does not work for TTY > idle times, so there is no point in that. Yeah. The reason for delayed updates is that it reduces the writeback traffic to the underlying filesystem. That's not a concert for devfs even if it would work. I think it would just add extra complexity. From owner-svn-src-all@FreeBSD.ORG Sun Mar 29 20:20:46 2015 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 46401C00; Sun, 29 Mar 2015 20:20: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 312F51DB; Sun, 29 Mar 2015 20:20: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 t2TKKktB014857; Sun, 29 Mar 2015 20:20:46 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2TKKjgO014856; Sun, 29 Mar 2015 20:20:45 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201503292020.t2TKKjgO014856@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sun, 29 Mar 2015 20:20:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280820 - head/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: Sun, 29 Mar 2015 20:20:46 -0000 Author: pfg Date: Sun Mar 29 20:20:45 2015 New Revision: 280820 URL: https://svnweb.freebsd.org/changeset/base/280820 Log: Clean some spaces vs tabs. No, this file doesn't conform with KNF at all. Modified: head/include/pthread.h Modified: head/include/pthread.h ============================================================================== --- head/include/pthread.h Sun Mar 29 19:37:41 2015 (r280819) +++ head/include/pthread.h Sun Mar 29 20:20:45 2015 (r280820) @@ -33,7 +33,7 @@ * $FreeBSD$ */ #ifndef _PTHREAD_H_ -#define _PTHREAD_H_ +#define _PTHREAD_H_ /* * Header files. @@ -49,71 +49,71 @@ /* * Run-time invariant values: */ -#define PTHREAD_DESTRUCTOR_ITERATIONS 4 -#define PTHREAD_KEYS_MAX 256 -#define PTHREAD_STACK_MIN __MINSIGSTKSZ -#define PTHREAD_THREADS_MAX __ULONG_MAX -#define PTHREAD_BARRIER_SERIAL_THREAD -1 +#define PTHREAD_DESTRUCTOR_ITERATIONS 4 +#define PTHREAD_KEYS_MAX 256 +#define PTHREAD_STACK_MIN __MINSIGSTKSZ +#define PTHREAD_THREADS_MAX __ULONG_MAX +#define PTHREAD_BARRIER_SERIAL_THREAD -1 /* * Flags for threads and thread attributes. */ -#define PTHREAD_DETACHED 0x1 -#define PTHREAD_SCOPE_SYSTEM 0x2 -#define PTHREAD_INHERIT_SCHED 0x4 -#define PTHREAD_NOFLOAT 0x8 - -#define PTHREAD_CREATE_DETACHED PTHREAD_DETACHED -#define PTHREAD_CREATE_JOINABLE 0 -#define PTHREAD_SCOPE_PROCESS 0 -#define PTHREAD_EXPLICIT_SCHED 0 +#define PTHREAD_DETACHED 0x1 +#define PTHREAD_SCOPE_SYSTEM 0x2 +#define PTHREAD_INHERIT_SCHED 0x4 +#define PTHREAD_NOFLOAT 0x8 + +#define PTHREAD_CREATE_DETACHED PTHREAD_DETACHED +#define PTHREAD_CREATE_JOINABLE 0 +#define PTHREAD_SCOPE_PROCESS 0 +#define PTHREAD_EXPLICIT_SCHED 0 /* * Flags for read/write lock attributes */ -#define PTHREAD_PROCESS_PRIVATE 0 -#define PTHREAD_PROCESS_SHARED 1 +#define PTHREAD_PROCESS_PRIVATE 0 +#define PTHREAD_PROCESS_SHARED 1 /* * Flags for cancelling threads */ -#define PTHREAD_CANCEL_ENABLE 0 -#define PTHREAD_CANCEL_DISABLE 1 -#define PTHREAD_CANCEL_DEFERRED 0 -#define PTHREAD_CANCEL_ASYNCHRONOUS 2 -#define PTHREAD_CANCELED ((void *) 1) +#define PTHREAD_CANCEL_ENABLE 0 +#define PTHREAD_CANCEL_DISABLE 1 +#define PTHREAD_CANCEL_DEFERRED 0 +#define PTHREAD_CANCEL_ASYNCHRONOUS 2 +#define PTHREAD_CANCELED ((void *) 1) /* * Flags for once initialization. */ -#define PTHREAD_NEEDS_INIT 0 -#define PTHREAD_DONE_INIT 1 +#define PTHREAD_NEEDS_INIT 0 +#define PTHREAD_DONE_INIT 1 /* - * Static once initialization values. + * Static once initialization values. */ -#define PTHREAD_ONCE_INIT { PTHREAD_NEEDS_INIT, NULL } +#define PTHREAD_ONCE_INIT { PTHREAD_NEEDS_INIT, NULL } /* - * Static initialization values. + * Static initialization values. */ -#define PTHREAD_MUTEX_INITIALIZER NULL -#define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP ((pthread_mutex_t)1) -#define PTHREAD_COND_INITIALIZER NULL -#define PTHREAD_RWLOCK_INITIALIZER NULL +#define PTHREAD_MUTEX_INITIALIZER NULL +#define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP ((pthread_mutex_t)1) +#define PTHREAD_COND_INITIALIZER NULL +#define PTHREAD_RWLOCK_INITIALIZER NULL /* * Default attribute arguments (draft 4, deprecated). */ #ifndef PTHREAD_KERNEL -#define pthread_condattr_default NULL -#define pthread_mutexattr_default NULL -#define pthread_attr_default NULL +#define pthread_condattr_default NULL +#define pthread_mutexattr_default NULL +#define pthread_attr_default NULL #endif -#define PTHREAD_PRIO_NONE 0 -#define PTHREAD_PRIO_INHERIT 1 -#define PTHREAD_PRIO_PROTECT 2 +#define PTHREAD_PRIO_NONE 0 +#define PTHREAD_PRIO_INHERIT 1 +#define PTHREAD_PRIO_PROTECT 2 /* * Mutex types (Single UNIX Specification, Version 2, 1997). @@ -133,7 +133,7 @@ enum pthread_mutextype { PTHREAD_MUTEX_TYPE_MAX }; -#define PTHREAD_MUTEX_DEFAULT PTHREAD_MUTEX_ERRORCHECK +#define PTHREAD_MUTEX_DEFAULT PTHREAD_MUTEX_ERRORCHECK struct _pthread_cleanup_info { __uintptr_t pthread_cleanup_pad[8]; From owner-svn-src-all@FreeBSD.ORG Sun Mar 29 20:22:01 2015 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 276DAD46; Sun, 29 Mar 2015 20:22: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 1295427F; Sun, 29 Mar 2015 20:22: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 t2TKM000015994; Sun, 29 Mar 2015 20:22:00 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2TKM01D015989; Sun, 29 Mar 2015 20:22:00 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201503292022.t2TKM01D015989@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 29 Mar 2015 20:22:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280821 - head/sys/arm/broadcom/bcm2835 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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, 29 Mar 2015 20:22:01 -0000 Author: andrew Date: Sun Mar 29 20:21:59 2015 New Revision: 280821 URL: https://svnweb.freebsd.org/changeset/base/280821 Log: We only need cpufunc_asm_arm11.S on bcm2835, not bcm2836 Modified: head/sys/arm/broadcom/bcm2835/files.bcm2835 head/sys/arm/broadcom/bcm2835/files.bcm283x Modified: head/sys/arm/broadcom/bcm2835/files.bcm2835 ============================================================================== --- head/sys/arm/broadcom/bcm2835/files.bcm2835 Sun Mar 29 20:20:45 2015 (r280820) +++ head/sys/arm/broadcom/bcm2835/files.bcm2835 Sun Mar 29 20:21:59 2015 (r280821) @@ -2,4 +2,5 @@ arm/broadcom/bcm2835/bcm2835_systimer.c standard +arm/arm/cpufunc_asm_arm11.S standard arm/arm/cpufunc_asm_arm11x6.S standard Modified: head/sys/arm/broadcom/bcm2835/files.bcm283x ============================================================================== --- head/sys/arm/broadcom/bcm2835/files.bcm283x Sun Mar 29 20:20:45 2015 (r280820) +++ head/sys/arm/broadcom/bcm2835/files.bcm283x Sun Mar 29 20:21:59 2015 (r280821) @@ -18,7 +18,6 @@ arm/broadcom/bcm2835/bcm283x_dwc_fdt.c arm/arm/bus_space_base.c standard arm/arm/bus_space_generic.c standard arm/arm/bus_space_asm_generic.S standard -arm/arm/cpufunc_asm_arm11.S standard arm/arm/cpufunc_asm_armv6.S standard kern/kern_clocksource.c standard From owner-svn-src-all@FreeBSD.ORG Sun Mar 29 20:28:19 2015 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 CA37F7E; Sun, 29 Mar 2015 20:28: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 B4D902FA; Sun, 29 Mar 2015 20:28: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 t2TKSJ3A016959; Sun, 29 Mar 2015 20:28:19 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2TKSJ9E016958; Sun, 29 Mar 2015 20:28:19 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201503292028.t2TKSJ9E016958@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 29 Mar 2015 20:28:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280822 - 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: Sun, 29 Mar 2015 20:28:19 -0000 Author: mav Date: Sun Mar 29 20:28:18 2015 New Revision: 280822 URL: https://svnweb.freebsd.org/changeset/base/280822 Log: Some cosmetic polishing. No functional change. MFC after: 1 week 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 Sun Mar 29 20:21:59 2015 (r280821) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Sun Mar 29 20:28:18 2015 (r280822) @@ -4194,10 +4194,10 @@ arc_init(void) #endif #endif /* illumos */ /* set min cache to 1/32 of all memory, or 16MB, whichever is more */ - arc_c_min = MAX(arc_c / 4, 64<<18); + arc_c_min = MAX(arc_c / 4, 16 << 20); /* set max to 1/2 of all memory, or all but 1GB, whichever is more */ - if (arc_c * 8 >= 1<<30) - arc_c_max = (arc_c * 8) - (1<<30); + if (arc_c * 8 >= 1 << 30) + arc_c_max = (arc_c * 8) - (1 << 30); else arc_c_max = arc_c_min; arc_c_max = MAX(arc_c * 5, arc_c_max); @@ -4207,9 +4207,9 @@ arc_init(void) * Allow the tunables to override our calculations if they are * reasonable (ie. over 16MB) */ - if (zfs_arc_max > 64<<18 && zfs_arc_max < kmem_size()) + if (zfs_arc_max > 16 << 20 && zfs_arc_max < kmem_size()) arc_c_max = zfs_arc_max; - if (zfs_arc_min > 64<<18 && zfs_arc_min <= arc_c_max) + if (zfs_arc_min > 16 << 20 && zfs_arc_min <= arc_c_max) arc_c_min = zfs_arc_min; #endif From owner-svn-src-all@FreeBSD.ORG Sun Mar 29 20:37:34 2015 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 5403D337; Sun, 29 Mar 2015 20:37: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 3B1EC3F1; Sun, 29 Mar 2015 20:37: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 t2TKbYjk021560; Sun, 29 Mar 2015 20:37:34 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2TKbSjO021540; Sun, 29 Mar 2015 20:37:28 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201503292037.t2TKbSjO021540@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 29 Mar 2015 20:37:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280823 - in head: . sys/arm/arm sys/arm/at91 sys/arm/cavium/cns11xx sys/arm/include sys/arm/samsung/s3c2xx0 sys/arm/xscale/i80321 sys/arm/xscale/i8134x sys/arm/xscale/ixp425 sys/arm/xs... 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, 29 Mar 2015 20:37:34 -0000 Author: andrew Date: Sun Mar 29 20:37:28 2015 New Revision: 280823 URL: https://svnweb.freebsd.org/changeset/base/280823 Log: Remove the bootconfig parsing. We never used it and always passed either an empty string or NULL to the setup functions that called into it. Deleted: head/sys/arm/arm/bootconfig.c head/sys/arm/include/bootconfig.h Modified: head/ObsoleteFiles.inc head/sys/arm/arm/cpufunc.c head/sys/arm/arm/machdep.c head/sys/arm/arm/mp_machdep.c head/sys/arm/at91/at91_machdep.c head/sys/arm/cavium/cns11xx/econa_machdep.c head/sys/arm/include/cpufunc.h head/sys/arm/samsung/s3c2xx0/s3c24x0_machdep.c head/sys/arm/xscale/i80321/ep80219_machdep.c head/sys/arm/xscale/i80321/iq31244_machdep.c head/sys/arm/xscale/i8134x/crb_machdep.c head/sys/arm/xscale/ixp425/avila_machdep.c head/sys/arm/xscale/pxa/pxa_machdep.c head/sys/conf/files.arm Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Sun Mar 29 20:28:18 2015 (r280822) +++ head/ObsoleteFiles.inc Sun Mar 29 20:37:28 2015 (r280823) @@ -38,6 +38,10 @@ # xargs -n1 | sort | uniq -d; # done +# 20150329 +.if ${TARGET_ARCH} == "arm" +OLD_FILES+=usr/include/bootconfig.h +.endif # 20150326 OLD_FILES+=usr/share/man/man1/pmcstudy.1.gz # 20150315: new clang import which bumps version from 3.5.1 to 3.6.0. Modified: head/sys/arm/arm/cpufunc.c ============================================================================== --- head/sys/arm/arm/cpufunc.c Sun Mar 29 20:28:18 2015 (r280822) +++ head/sys/arm/arm/cpufunc.c Sun Mar 29 20:37:28 2015 (r280823) @@ -59,7 +59,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #ifdef CPU_XSCALE_80200 #include @@ -1158,75 +1157,9 @@ cpufunc_null_fixup(arg) * CPU Setup code */ -#if defined (CPU_ARM9) || \ - defined(CPU_ARM9E) || \ - defined(CPU_XSCALE_80200) || defined(CPU_XSCALE_80321) || \ - defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_IXP425) || \ - defined(CPU_XSCALE_80219) || defined(CPU_XSCALE_81342) || \ - defined(CPU_ARM1136) || defined(CPU_ARM1176) ||\ - defined(CPU_FA526) || defined(CPU_FA626TE) - -#define IGN 0 -#define OR 1 -#define BIC 2 - -struct cpu_option { - char *co_name; - int co_falseop; - int co_trueop; - int co_value; -}; - -static u_int parse_cpu_options(char *, struct cpu_option *, u_int); - -static u_int -parse_cpu_options(args, optlist, cpuctrl) - char *args; - struct cpu_option *optlist; - u_int cpuctrl; -{ - int integer; - - if (args == NULL) - return(cpuctrl); - - while (optlist->co_name) { - if (get_bootconf_option(args, optlist->co_name, - BOOTOPT_TYPE_BOOLEAN, &integer)) { - if (integer) { - if (optlist->co_trueop == OR) - cpuctrl |= optlist->co_value; - else if (optlist->co_trueop == BIC) - cpuctrl &= ~optlist->co_value; - } else { - if (optlist->co_falseop == OR) - cpuctrl |= optlist->co_value; - else if (optlist->co_falseop == BIC) - cpuctrl &= ~optlist->co_value; - } - } - ++optlist; - } - return(cpuctrl); -} -#endif /* CPU_ARM9 || XSCALE*/ - #ifdef CPU_ARM9 -struct cpu_option arm9_options[] = { - { "cpu.cache", BIC, OR, (CPU_CONTROL_IC_ENABLE | CPU_CONTROL_DC_ENABLE) }, - { "cpu.nocache", OR, BIC, (CPU_CONTROL_IC_ENABLE | CPU_CONTROL_DC_ENABLE) }, - { "arm9.cache", BIC, OR, (CPU_CONTROL_IC_ENABLE | CPU_CONTROL_DC_ENABLE) }, - { "arm9.icache", BIC, OR, CPU_CONTROL_IC_ENABLE }, - { "arm9.dcache", BIC, OR, CPU_CONTROL_DC_ENABLE }, - { "cpu.writebuf", BIC, OR, CPU_CONTROL_WBUF_ENABLE }, - { "cpu.nowritebuf", OR, BIC, CPU_CONTROL_WBUF_ENABLE }, - { "arm9.writebuf", BIC, OR, CPU_CONTROL_WBUF_ENABLE }, - { NULL, IGN, IGN, 0 } -}; - void -arm9_setup(args) - char *args; +arm9_setup(void) { int cpuctrl, cpuctrlmask; @@ -1247,8 +1180,6 @@ arm9_setup(args) cpuctrl |= CPU_CONTROL_AFLT_ENABLE; #endif - cpuctrl = parse_cpu_options(args, arm9_options, cpuctrl); - #ifdef __ARMEB__ cpuctrl |= CPU_CONTROL_BEND_ENABLE; #endif @@ -1266,21 +1197,8 @@ arm9_setup(args) #endif /* CPU_ARM9 */ #if defined(CPU_ARM9E) -struct cpu_option arm10_options[] = { - { "cpu.cache", BIC, OR, (CPU_CONTROL_IC_ENABLE | CPU_CONTROL_DC_ENABLE) }, - { "cpu.nocache", OR, BIC, (CPU_CONTROL_IC_ENABLE | CPU_CONTROL_DC_ENABLE) }, - { "arm10.cache", BIC, OR, (CPU_CONTROL_IC_ENABLE | CPU_CONTROL_DC_ENABLE) }, - { "arm10.icache", BIC, OR, CPU_CONTROL_IC_ENABLE }, - { "arm10.dcache", BIC, OR, CPU_CONTROL_DC_ENABLE }, - { "cpu.writebuf", BIC, OR, CPU_CONTROL_WBUF_ENABLE }, - { "cpu.nowritebuf", OR, BIC, CPU_CONTROL_WBUF_ENABLE }, - { "arm10.writebuf", BIC, OR, CPU_CONTROL_WBUF_ENABLE }, - { NULL, IGN, IGN, 0 } -}; - void -arm10_setup(args) - char *args; +arm10_setup(void) { int cpuctrl, cpuctrlmask; @@ -1298,8 +1216,6 @@ arm10_setup(args) cpuctrl |= CPU_CONTROL_AFLT_ENABLE; #endif - cpuctrl = parse_cpu_options(args, arm10_options, cpuctrl); - #ifdef __ARMEB__ cpuctrl |= CPU_CONTROL_BEND_ENABLE; #endif @@ -1370,17 +1286,8 @@ cpu_scc_setup_ccnt(void) #endif #if defined(CPU_ARM1136) || defined(CPU_ARM1176) -struct cpu_option arm11_options[] = { - { "cpu.cache", BIC, OR, (CPU_CONTROL_IC_ENABLE | CPU_CONTROL_DC_ENABLE) }, - { "cpu.nocache", OR, BIC, (CPU_CONTROL_IC_ENABLE | CPU_CONTROL_DC_ENABLE) }, - { "arm11.cache", BIC, OR, (CPU_CONTROL_IC_ENABLE | CPU_CONTROL_DC_ENABLE) }, - { "arm11.icache", BIC, OR, CPU_CONTROL_IC_ENABLE }, - { "arm11.dcache", BIC, OR, CPU_CONTROL_DC_ENABLE }, - { NULL, IGN, IGN, 0 } -}; - void -arm11x6_setup(char *args) +arm11x6_setup(void) { int cpuctrl, cpuctrl_wax; uint32_t auxctrl, auxctrl_wax; @@ -1415,8 +1322,6 @@ arm11x6_setup(char *args) cpuctrl |= CPU_CONTROL_BPRD_ENABLE; cpuctrl |= CPU_CONTROL_V6_EXTPAGE; - cpuctrl = parse_cpu_options(args, arm11_options, cpuctrl); - #ifdef __ARMEB__ cpuctrl |= CPU_CONTROL_BEND_ENABLE; #endif @@ -1479,8 +1384,7 @@ arm11x6_setup(char *args) #ifdef CPU_MV_PJ4B void -pj4bv7_setup(args) - char *args; +pj4bv7_setup(void) { int cpuctrl; @@ -1516,7 +1420,7 @@ pj4bv7_setup(args) #if defined(CPU_CORTEXA) || defined(CPU_KRAIT) void -cortexa_setup(char *args) +cortexa_setup(void) { int cpuctrl, cpuctrlmask; @@ -1563,23 +1467,8 @@ cortexa_setup(char *args) #endif /* CPU_CORTEXA */ #if defined(CPU_FA526) || defined(CPU_FA626TE) -struct cpu_option fa526_options[] = { -#ifdef COMPAT_12 - { "nocache", IGN, BIC, (CPU_CONTROL_IC_ENABLE | - CPU_CONTROL_DC_ENABLE) }, - { "nowritebuf", IGN, BIC, CPU_CONTROL_WBUF_ENABLE }, -#endif /* COMPAT_12 */ - { "cpu.cache", BIC, OR, (CPU_CONTROL_IC_ENABLE | - CPU_CONTROL_DC_ENABLE) }, - { "cpu.nocache", OR, BIC, (CPU_CONTROL_IC_ENABLE | - CPU_CONTROL_DC_ENABLE) }, - { "cpu.writebuf", BIC, OR, CPU_CONTROL_WBUF_ENABLE }, - { "cpu.nowritebuf", OR, BIC, CPU_CONTROL_WBUF_ENABLE }, - { NULL, IGN, IGN, 0 } -}; - void -fa526_setup(char *args) +fa526_setup(void) { int cpuctrl, cpuctrlmask; @@ -1600,8 +1489,6 @@ fa526_setup(char *args) cpuctrl |= CPU_CONTROL_AFLT_ENABLE; #endif - cpuctrl = parse_cpu_options(args, fa526_options, cpuctrl); - #ifdef __ARMEB__ cpuctrl |= CPU_CONTROL_BEND_ENABLE; #endif @@ -1621,24 +1508,8 @@ fa526_setup(char *args) #if defined(CPU_XSCALE_80200) || defined(CPU_XSCALE_80321) || \ defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_IXP425) || \ defined(CPU_XSCALE_80219) || defined(CPU_XSCALE_81342) -struct cpu_option xscale_options[] = { -#ifdef COMPAT_12 - { "branchpredict", BIC, OR, CPU_CONTROL_BPRD_ENABLE }, - { "nocache", IGN, BIC, (CPU_CONTROL_IC_ENABLE | CPU_CONTROL_DC_ENABLE) }, -#endif /* COMPAT_12 */ - { "cpu.branchpredict", BIC, OR, CPU_CONTROL_BPRD_ENABLE }, - { "cpu.cache", BIC, OR, (CPU_CONTROL_IC_ENABLE | CPU_CONTROL_DC_ENABLE) }, - { "cpu.nocache", OR, BIC, (CPU_CONTROL_IC_ENABLE | CPU_CONTROL_DC_ENABLE) }, - { "xscale.branchpredict", BIC, OR, CPU_CONTROL_BPRD_ENABLE }, - { "xscale.cache", BIC, OR, (CPU_CONTROL_IC_ENABLE | CPU_CONTROL_DC_ENABLE) }, - { "xscale.icache", BIC, OR, CPU_CONTROL_IC_ENABLE }, - { "xscale.dcache", BIC, OR, CPU_CONTROL_DC_ENABLE }, - { NULL, IGN, IGN, 0 } -}; - void -xscale_setup(args) - char *args; +xscale_setup(void) { uint32_t auxctl; int cpuctrl, cpuctrlmask; @@ -1667,8 +1538,6 @@ xscale_setup(args) cpuctrl |= CPU_CONTROL_AFLT_ENABLE; #endif - cpuctrl = parse_cpu_options(args, xscale_options, cpuctrl); - #ifdef __ARMEB__ cpuctrl |= CPU_CONTROL_BEND_ENABLE; #endif Modified: head/sys/arm/arm/machdep.c ============================================================================== --- head/sys/arm/arm/machdep.c Sun Mar 29 20:28:18 2015 (r280822) +++ head/sys/arm/arm/machdep.c Sun Mar 29 20:37:28 2015 (r280823) @@ -1257,7 +1257,7 @@ initarm(struct arm_boot_params *abp) * Now that proper page tables are installed, call cpu_setup() to enable * instruction and data caches and other chip-specific features. */ - cpu_setup(""); + cpu_setup(); /* * Only after the SOC registers block is mapped we can perform device @@ -1403,7 +1403,7 @@ initarm(struct arm_boot_params *abp) * Now that proper page tables are installed, call cpu_setup() to enable * instruction and data caches and other chip-specific features. */ - cpu_setup(""); + cpu_setup(); /* Platform-specific initialisation */ platform_probe_and_attach(); Modified: head/sys/arm/arm/mp_machdep.c ============================================================================== --- head/sys/arm/arm/mp_machdep.c Sun Mar 29 20:28:18 2015 (r280822) +++ head/sys/arm/arm/mp_machdep.c Sun Mar 29 20:37:28 2015 (r280823) @@ -155,14 +155,14 @@ init_secondary(int cpu) #ifdef ARM_NEW_PMAP pmap_set_tex(); reinit_mmu(pmap_kern_ttb, (1<<6) | (1<< 0), (1<<6) | (1<< 0)); - cpu_setup(""); + cpu_setup(); /* Provide stack pointers for other processor modes. */ set_stackptrs(cpu); enable_interrupts(PSR_A); #else /* ARM_NEW_PMAP */ - cpu_setup(NULL); + cpu_setup(); setttb(pmap_pa); cpu_tlb_flushID(); #endif /* ARM_NEW_PMAP */ Modified: head/sys/arm/at91/at91_machdep.c ============================================================================== --- head/sys/arm/at91/at91_machdep.c Sun Mar 29 20:28:18 2015 (r280822) +++ head/sys/arm/at91/at91_machdep.c Sun Mar 29 20:37:28 2015 (r280823) @@ -606,7 +606,7 @@ initarm(struct arm_boot_params *abp) * of the stack memory. */ cpu_control(CPU_CONTROL_MMU_ENABLE, CPU_CONTROL_MMU_ENABLE); - cpu_setup(""); + cpu_setup(); set_stackptrs(0); Modified: head/sys/arm/cavium/cns11xx/econa_machdep.c ============================================================================== --- head/sys/arm/cavium/cns11xx/econa_machdep.c Sun Mar 29 20:28:18 2015 (r280822) +++ head/sys/arm/cavium/cns11xx/econa_machdep.c Sun Mar 29 20:37:28 2015 (r280823) @@ -303,7 +303,7 @@ initarm(struct arm_boot_params *abp) * this problem will not occur after initarm(). */ cpu_idcache_wbinv_all(); - cpu_setup(""); + cpu_setup(); undefined_init(); Modified: head/sys/arm/include/cpufunc.h ============================================================================== --- head/sys/arm/include/cpufunc.h Sun Mar 29 20:28:18 2015 (r280822) +++ head/sys/arm/include/cpufunc.h Sun Mar 29 20:37:28 2015 (r280823) @@ -169,7 +169,7 @@ struct cpu_functions { void (*cf_context_switch) (void); - void (*cf_setup) (char *string); + void (*cf_setup) (void); }; extern struct cpu_functions cpufuncs; @@ -268,7 +268,7 @@ void tlb_broadcast(int); #define ABORT_FIXUP_FAILED 1 /* fixup failed */ #define ABORT_FIXUP_RETURN 2 /* abort handler should return */ -#define cpu_setup(a) cpufuncs.cf_setup(a) +#define cpu_setup() cpufuncs.cf_setup() int set_cpufuncs (void); #define ARCHITECTURE_NOT_PRESENT 1 /* known but not configured */ @@ -287,7 +287,7 @@ u_int cpufunc_faultaddress (void); u_int cpu_pfr (int); #if defined(CPU_FA526) || defined(CPU_FA626TE) -void fa526_setup (char *arg); +void fa526_setup (void); void fa526_setttb (u_int ttb); void fa526_context_switch (void); void fa526_cpu_sleep (int); @@ -325,7 +325,7 @@ void arm9_idcache_wbinv_range (vm_offset void arm9_context_switch (void); -void arm9_setup (char *string); +void arm9_setup (void); extern unsigned arm9_dcache_sets_max; extern unsigned arm9_dcache_sets_inc; @@ -339,7 +339,7 @@ void arm10_tlb_flushI_SE (u_int); void arm10_context_switch (void); -void arm10_setup (char *string); +void arm10_setup (void); u_int sheeva_control_ext (u_int, u_int); void sheeva_cpu_sleep (int); @@ -372,18 +372,18 @@ void armv7_dcache_wbinv_range (vm_offset void armv7_dcache_inv_range (vm_offset_t, vm_size_t); void armv7_dcache_wb_range (vm_offset_t, vm_size_t); void armv7_cpu_sleep (int); -void armv7_setup (char *string); +void armv7_setup (void); void armv7_context_switch (void); void armv7_drain_writebuf (void); void armv7_sev (void); void armv7_sleep (int unused); u_int armv7_auxctrl (u_int, u_int); -void pj4bv7_setup (char *string); +void pj4bv7_setup (void); void pj4b_config (void); void armadaxp_idcache_wbinv_all (void); -void cortexa_setup (char *); +void cortexa_setup (void); #endif #if defined(CPU_ARM1136) || defined(CPU_ARM1176) @@ -411,7 +411,7 @@ void arm11x6_icache_sync_all void arm11x6_flush_prefetchbuf (void); void arm11x6_icache_sync_range (vm_offset_t, vm_size_t); void arm11x6_idcache_wbinv_range (vm_offset_t, vm_size_t); -void arm11x6_setup (char *string); +void arm11x6_setup (void); void arm11x6_sleep (int); /* no ref. for errata */ #endif #if defined(CPU_ARM1136) @@ -488,7 +488,7 @@ void xscale_cache_flushD_rng (vm_offset_ void xscale_context_switch (void); -void xscale_setup (char *string); +void xscale_setup (void); #endif /* CPU_XSCALE_80200 || CPU_XSCALE_80321 || CPU_XSCALE_PXA2X0 || CPU_XSCALE_IXP425 CPU_XSCALE_80219 */ Modified: head/sys/arm/samsung/s3c2xx0/s3c24x0_machdep.c ============================================================================== --- head/sys/arm/samsung/s3c2xx0/s3c24x0_machdep.c Sun Mar 29 20:28:18 2015 (r280822) +++ head/sys/arm/samsung/s3c2xx0/s3c24x0_machdep.c Sun Mar 29 20:37:28 2015 (r280823) @@ -350,7 +350,7 @@ initarm(struct arm_boot_params *abp) * this problem will not occur after initarm(). */ cpu_idcache_wbinv_all(); - cpu_setup(""); + cpu_setup(); /* Disable all peripheral interrupts */ ioreg_write32(S3C24X0_INTCTL_BASE + INTCTL_INTMSK, ~0); Modified: head/sys/arm/xscale/i80321/ep80219_machdep.c ============================================================================== --- head/sys/arm/xscale/i80321/ep80219_machdep.c Sun Mar 29 20:28:18 2015 (r280822) +++ head/sys/arm/xscale/i80321/ep80219_machdep.c Sun Mar 29 20:37:28 2015 (r280823) @@ -305,7 +305,7 @@ initarm(struct arm_boot_params *abp) * this problem will not occur after initarm(). */ cpu_idcache_wbinv_all(); - cpu_setup(""); + cpu_setup(); /* * Fetch the SDRAM start/size from the i80321 SDRAM configration Modified: head/sys/arm/xscale/i80321/iq31244_machdep.c ============================================================================== --- head/sys/arm/xscale/i80321/iq31244_machdep.c Sun Mar 29 20:28:18 2015 (r280822) +++ head/sys/arm/xscale/i80321/iq31244_machdep.c Sun Mar 29 20:37:28 2015 (r280823) @@ -306,7 +306,7 @@ initarm(struct arm_boot_params *abp) * this problem will not occur after initarm(). */ cpu_idcache_wbinv_all(); - cpu_setup(""); + cpu_setup(); /* * Fetch the SDRAM start/size from the i80321 SDRAM configration Modified: head/sys/arm/xscale/i8134x/crb_machdep.c ============================================================================== --- head/sys/arm/xscale/i8134x/crb_machdep.c Sun Mar 29 20:28:18 2015 (r280822) +++ head/sys/arm/xscale/i8134x/crb_machdep.c Sun Mar 29 20:37:28 2015 (r280823) @@ -290,7 +290,7 @@ initarm(struct arm_boot_params *abp) * this problem will not occur after initarm(). */ cpu_idcache_wbinv_all(); - cpu_setup(""); + cpu_setup(); i80321_calibrate_delay(); i81342_sdram_bounds(obio_bs_tag, IOP34X_VADDR, &memstart, &memsize); Modified: head/sys/arm/xscale/ixp425/avila_machdep.c ============================================================================== --- head/sys/arm/xscale/ixp425/avila_machdep.c Sun Mar 29 20:28:18 2015 (r280822) +++ head/sys/arm/xscale/ixp425/avila_machdep.c Sun Mar 29 20:37:28 2015 (r280823) @@ -376,7 +376,7 @@ initarm(struct arm_boot_params *abp) * this problem will not occur after initarm(). */ cpu_idcache_wbinv_all(); - cpu_setup(""); + cpu_setup(); /* ready to setup the console (XXX move earlier if possible) */ cninit(); Modified: head/sys/arm/xscale/pxa/pxa_machdep.c ============================================================================== --- head/sys/arm/xscale/pxa/pxa_machdep.c Sun Mar 29 20:28:18 2015 (r280822) +++ head/sys/arm/xscale/pxa/pxa_machdep.c Sun Mar 29 20:37:28 2015 (r280823) @@ -291,7 +291,7 @@ initarm(struct arm_boot_params *abp) * this problem will not occur after initarm(). */ cpu_idcache_wbinv_all(); - cpu_setup(""); + cpu_setup(); /* * Sort out bus_space for on-board devices. Modified: head/sys/conf/files.arm ============================================================================== --- head/sys/conf/files.arm Sun Mar 29 20:28:18 2015 (r280822) +++ head/sys/conf/files.arm Sun Mar 29 20:37:28 2015 (r280823) @@ -3,7 +3,6 @@ arm/arm/autoconf.c standard arm/arm/bcopy_page.S standard arm/arm/bcopyinout.S standard arm/arm/blockio.S standard -arm/arm/bootconfig.c standard arm/arm/bus_space_asm_generic.S standard arm/arm/busdma_machdep.c optional !armv6 arm/arm/busdma_machdep-v6.c optional armv6 From owner-svn-src-all@FreeBSD.ORG Sun Mar 29 21:08:09 2015 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 16D14DEA; Sun, 29 Mar 2015 21:08:09 +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 728249DE; Sun, 29 Mar 2015 21:08:07 +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 t2TL7vR2039693 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 30 Mar 2015 00:07:57 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t2TL7vFk039692; Mon, 30 Mar 2015 00:07:57 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 30 Mar 2015 00:07:57 +0300 From: Gleb Smirnoff To: Adrian Chadd Subject: Re: svn commit: r280759 - head/sys/netinet Message-ID: <20150329210757.GA64665@FreeBSD.org> References: <201503271326.t2RDQxd3056112@svn.freebsd.org> <20150328083443.GV64665@FreeBSD.org> <20150328191629.GY64665@FreeBSD.org> <5517B433.5010508@selasky.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Cc: Hans Petter Selasky , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Fabien Thomas X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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, 29 Mar 2015 21:08:09 -0000 On Sun, Mar 29, 2015 at 08:16:46AM -0700, Adrian Chadd wrote: A> On 29 March 2015 at 01:13, Hans Petter Selasky wrote: A> > On 03/28/15 20:16, Gleb Smirnoff wrote: A> >> A> >> +uint16_t A> >> +ip_newid(void) A> >> +{ A> >> + A> >> + counter_u64_add(V_ip_id, 1); A> >> + return (htons((*(uint64_t *)zpcpu_get(V_ip_id)) & 0xffff)); A> >> +} A> > A> > A> > Technically you would need to enter a critical section here, so that the A> > current process doesn't get swapped to a different CPU between the counter A> > add and the zpcpu_get. A> A> +10000 here. A> A> You can get preempted and shifted to another CPU at almost any point A> in time you're not explicitly asking not to be. It's.. frustrating. What happens in case of the race is that one CPU will use counter of the other CPU, reusing the ID that was just used by the other CPU. And this isn't a fatal race, it is just reuse of ID. The probability of such event is much lower than probability of a collision due to overflowing uint16_t. For example, if we emit 1 Mpps, then we overflow the ID counter 15 times per second. Every ID is reused 15 times within this small interval of time, which of course is larger than TTL. And we find this kinda acceptable. To illustrate the probability of 1 instruction race, I would suggest to look at PCPU_ADD() implementation for all arches except amd64/i386 and find out that it is prone to this race. Hitting the race in PCPU_ADD() will usually lead to mangling vm_meter statistics. Did we ever observe this in practice? No. So, to conclude: yes, there is a race. Its probability is extremely low, and hitting the race leads to an event that already happens orders of magnitude more enough, than the race would happen. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Sun Mar 29 21:13:02 2015 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 1B32EF83; Sun, 29 Mar 2015 21:13: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 053B5A9A; Sun, 29 Mar 2015 21:13: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 t2TLD1hn039565; Sun, 29 Mar 2015 21:13:01 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2TLCxO5039544; Sun, 29 Mar 2015 21:12:59 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201503292112.t2TLCxO5039544@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 29 Mar 2015 21:12:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280824 - in head/sys: arm/arm arm/include 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, 29 Mar 2015 21:13:02 -0000 Author: andrew Date: Sun Mar 29 21:12:59 2015 New Revision: 280824 URL: https://svnweb.freebsd.org/changeset/base/280824 Log: Remove arm1136 support. We don't have any configs that use it, and I don't expect us to add support for any more arm11 SoCs. Modified: head/sys/arm/arm/cpufunc.c head/sys/arm/arm/elf_trampoline.c head/sys/arm/include/cpuconf.h head/sys/arm/include/cpufunc.h head/sys/arm/include/intr.h head/sys/conf/options.arm Modified: head/sys/arm/arm/cpufunc.c ============================================================================== --- head/sys/arm/arm/cpufunc.c Sun Mar 29 20:37:28 2015 (r280823) +++ head/sys/arm/arm/cpufunc.c Sun Mar 29 21:12:59 2015 (r280824) @@ -557,69 +557,6 @@ struct cpu_functions fa526_cpufuncs = { }; #endif /* CPU_FA526 || CPU_FA626TE */ -#if defined(CPU_ARM1136) -struct cpu_functions arm1136_cpufuncs = { - /* CPU functions */ - - cpufunc_id, /* id */ - cpufunc_nullop, /* cpwait */ - - /* MMU functions */ - - cpufunc_control, /* control */ - cpufunc_domains, /* Domain */ - arm11x6_setttb, /* Setttb */ - cpufunc_faultstatus, /* Faultstatus */ - cpufunc_faultaddress, /* Faultaddress */ - - /* TLB functions */ - - arm11_tlb_flushID, /* tlb_flushID */ - arm11_tlb_flushID_SE, /* tlb_flushID_SE */ - arm11_tlb_flushI, /* tlb_flushI */ - arm11_tlb_flushI_SE, /* tlb_flushI_SE */ - arm11_tlb_flushD, /* tlb_flushD */ - arm11_tlb_flushD_SE, /* tlb_flushD_SE */ - - /* Cache operations */ - - arm11x6_icache_sync_all, /* icache_sync_all */ - arm11x6_icache_sync_range, /* icache_sync_range */ - - arm11x6_dcache_wbinv_all, /* dcache_wbinv_all */ - armv6_dcache_wbinv_range, /* dcache_wbinv_range */ - armv6_dcache_inv_range, /* dcache_inv_range */ - armv6_dcache_wb_range, /* dcache_wb_range */ - - armv6_idcache_inv_all, /* idcache_inv_all */ - arm11x6_idcache_wbinv_all, /* idcache_wbinv_all */ - arm11x6_idcache_wbinv_range, /* idcache_wbinv_range */ - - (void *)cpufunc_nullop, /* l2cache_wbinv_all */ - (void *)cpufunc_nullop, /* l2cache_wbinv_range */ - (void *)cpufunc_nullop, /* l2cache_inv_range */ - (void *)cpufunc_nullop, /* l2cache_wb_range */ - (void *)cpufunc_nullop, /* l2cache_drain_writebuf */ - - /* Other functions */ - - arm11x6_flush_prefetchbuf, /* flush_prefetchbuf */ - arm11_drain_writebuf, /* drain_writebuf */ - cpufunc_nullop, /* flush_brnchtgt_C */ - (void *)cpufunc_nullop, /* flush_brnchtgt_E */ - - arm11_sleep, /* sleep */ - - /* Soft functions */ - - cpufunc_null_fixup, /* dataabt_fixup */ - cpufunc_null_fixup, /* prefetchabt_fixup */ - - arm11_context_switch, /* context_switch */ - - arm11x6_setup /* cpu setup */ -}; -#endif /* CPU_ARM1136 */ #if defined(CPU_ARM1176) struct cpu_functions arm1176_cpufuncs = { /* CPU functions */ @@ -765,7 +702,7 @@ u_int cputype; u_int cpu_reset_needs_v4_MMU_disable; /* flag used in locore.s */ #if defined(CPU_ARM9) || \ - defined (CPU_ARM9E) || defined (CPU_ARM1136) || \ + defined (CPU_ARM9E) || \ defined(CPU_ARM1176) || defined(CPU_XSCALE_80200) || defined(CPU_XSCALE_80321) || \ defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_IXP425) || \ defined(CPU_FA526) || defined(CPU_FA626TE) || defined(CPU_MV_PJ4B) || \ @@ -959,19 +896,8 @@ set_cpufuncs() goto out; } #endif /* CPU_ARM9E */ -#if defined(CPU_ARM1136) || defined(CPU_ARM1176) - if (cputype == CPU_ID_ARM1136JS - || cputype == CPU_ID_ARM1136JSR1 - || cputype == CPU_ID_ARM1176JZS) { -#ifdef CPU_ARM1136 - if (cputype == CPU_ID_ARM1136JS - || cputype == CPU_ID_ARM1136JSR1) - cpufuncs = arm1136_cpufuncs; -#endif -#ifdef CPU_ARM1176 - if (cputype == CPU_ID_ARM1176JZS) - cpufuncs = arm1176_cpufuncs; -#endif +#if defined(CPU_ARM1176) + if (cputype == CPU_ID_ARM1176JZS) { cpu_reset_needs_v4_MMU_disable = 1; /* V4 or higher */ get_cachetype_cp15(); @@ -979,7 +905,7 @@ set_cpufuncs() goto out; } -#endif /* CPU_ARM1136 || CPU_ARM1176 */ +#endif /* CPU_ARM1176 */ #if defined(CPU_CORTEXA) || defined(CPU_KRAIT) if (cputype == CPU_ID_CORTEXA5 || cputype == CPU_ID_CORTEXA7 || @@ -1238,7 +1164,7 @@ arm10_setup(void) } #endif /* CPU_ARM9E || CPU_ARM10 */ -#if defined(CPU_ARM1136) || defined(CPU_ARM1176) \ +#if defined(CPU_ARM1176) \ || defined(CPU_MV_PJ4B) \ || defined(CPU_CORTEXA) || defined(CPU_KRAIT) static __inline void @@ -1250,7 +1176,7 @@ cpu_scc_setup_ccnt(void) * you want! */ #ifdef _PMC_USER_READ_WRITE_ -#if defined(CPU_ARM1136) || defined(CPU_ARM1176) +#if defined(CPU_ARM1176) /* Use the Secure User and Non-secure Access Validation Control Register * to allow userland access */ @@ -1264,7 +1190,7 @@ cpu_scc_setup_ccnt(void) : "r"(0x00000001)); #endif #endif -#if defined(CPU_ARM1136) || defined(CPU_ARM1176) +#if defined(CPU_ARM1176) /* Set PMCR[2,0] to enable counters and reset CCNT */ __asm volatile ("mcr p15, 0, %0, c15, c12, 0\n\t" : @@ -1285,7 +1211,7 @@ cpu_scc_setup_ccnt(void) } #endif -#if defined(CPU_ARM1136) || defined(CPU_ARM1176) +#if defined(CPU_ARM1176) void arm11x6_setup(void) { @@ -1331,20 +1257,6 @@ arm11x6_setup(void) auxctrl = 0; auxctrl_wax = ~0; - /* - * This options enables the workaround for the 364296 ARM1136 - * r0pX errata (possible cache data corruption with - * hit-under-miss enabled). It sets the undocumented bit 31 in - * the auxiliary control register and the FI bit in the control - * register, thus disabling hit-under-miss without putting the - * processor into full low interrupt latency mode. ARM11MPCore - * is not affected. - */ - if ((cpuid & CPU_ID_CPU_MASK) == CPU_ID_ARM1136JS) { /* ARM1136JSr0pX */ - cpuctrl |= CPU_CONTROL_FI_ENABLE; - auxctrl = ARM1136_AUXCTL_PFI; - auxctrl_wax = ~ARM1136_AUXCTL_PFI; - } /* * Enable an errata workaround @@ -1380,7 +1292,7 @@ arm11x6_setup(void) cpu_scc_setup_ccnt(); } -#endif /* CPU_ARM1136 || CPU_ARM1176 */ +#endif /* CPU_ARM1176 */ #ifdef CPU_MV_PJ4B void Modified: head/sys/arm/arm/elf_trampoline.c ============================================================================== --- head/sys/arm/arm/elf_trampoline.c Sun Mar 29 20:37:28 2015 (r280823) +++ head/sys/arm/arm/elf_trampoline.c Sun Mar 29 21:12:59 2015 (r280824) @@ -65,7 +65,7 @@ extern void fa526_idcache_wbinv_all(void #elif defined(CPU_ARM9E) #define cpu_idcache_wbinv_all armv5_ec_idcache_wbinv_all extern void armv5_ec_idcache_wbinv_all(void); -#elif defined(CPU_ARM1136) || defined(CPU_ARM1176) +#elif defined(CPU_ARM1176) #define cpu_idcache_wbinv_all armv6_idcache_wbinv_all #elif defined(CPU_XSCALE_80200) || defined(CPU_XSCALE_80321) || \ defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_IXP425) || \ Modified: head/sys/arm/include/cpuconf.h ============================================================================== --- head/sys/arm/include/cpuconf.h Sun Mar 29 20:37:28 2015 (r280823) +++ head/sys/arm/include/cpuconf.h Sun Mar 29 21:12:59 2015 (r280824) @@ -52,8 +52,6 @@ */ #define CPU_NTYPES (defined(CPU_ARM9) + \ defined(CPU_ARM9E) + \ - defined(CPU_ARM10) + \ - defined(CPU_ARM1136) + \ defined(CPU_ARM1176) + \ defined(CPU_XSCALE_80200) + \ defined(CPU_XSCALE_80321) + \ @@ -85,7 +83,7 @@ #endif #if !defined(ARM_ARCH_6) -#if defined(CPU_ARM1136) || defined(CPU_ARM1176) +#if defined(CPU_ARM1176) #define ARM_ARCH_6 1 #else #define ARM_ARCH_6 0 @@ -158,7 +156,7 @@ #define ARM_MMU_GENERIC 0 #endif -#if defined(CPU_ARM1136) || defined(CPU_ARM1176) +#if defined(CPU_ARM1176) #define ARM_MMU_V6 1 #else #define ARM_MMU_V6 0 Modified: head/sys/arm/include/cpufunc.h ============================================================================== --- head/sys/arm/include/cpufunc.h Sun Mar 29 20:37:28 2015 (r280823) +++ head/sys/arm/include/cpufunc.h Sun Mar 29 21:12:59 2015 (r280824) @@ -386,7 +386,7 @@ void armadaxp_idcache_wbinv_all (void); void cortexa_setup (void); #endif -#if defined(CPU_ARM1136) || defined(CPU_ARM1176) +#if defined(CPU_ARM1176) void arm11_tlb_flushID (void); void arm11_tlb_flushID_SE (u_int); void arm11_tlb_flushI (void); @@ -414,10 +414,6 @@ void arm11x6_idcache_wbinv_range void arm11x6_setup (void); void arm11x6_sleep (int); /* no ref. for errata */ #endif -#if defined(CPU_ARM1136) -void arm11_sleep (int); -void arm1136_sleep_rev0 (int); /* for errata 336501 */ -#endif #if defined(CPU_ARM9E) void armv5_ec_setttb(u_int); Modified: head/sys/arm/include/intr.h ============================================================================== --- head/sys/arm/include/intr.h Sun Mar 29 20:37:28 2015 (r280823) +++ head/sys/arm/include/intr.h Sun Mar 29 21:12:59 2015 (r280824) @@ -58,7 +58,7 @@ #define NIRQ 1020 #elif defined(CPU_KRAIT) #define NIRQ 288 -#elif defined(CPU_ARM1136) || defined(CPU_ARM1176) +#elif defined(CPU_ARM1176) #define NIRQ 128 #elif defined(SOC_MV_ARMADAXP) #define MAIN_IRQ_NUM 116 Modified: head/sys/conf/options.arm ============================================================================== --- head/sys/conf/options.arm Sun Mar 29 20:37:28 2015 (r280823) +++ head/sys/conf/options.arm Sun Mar 29 21:12:59 2015 (r280824) @@ -10,7 +10,6 @@ ARM_WANT_TP_ADDRESS opt_global.h COUNTS_PER_SEC opt_timer.h CPU_ARM9 opt_global.h CPU_ARM9E opt_global.h -CPU_ARM1136 opt_global.h CPU_ARM1176 opt_global.h CPU_CORTEXA opt_global.h CPU_KRAIT opt_global.h From owner-svn-src-all@FreeBSD.ORG Sun Mar 29 21:15:37 2015 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 7D21F195; Sun, 29 Mar 2015 21:15:37 +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 75A76AC1; Sun, 29 Mar 2015 21:15:36 +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 t2TLFYQm039744 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 30 Mar 2015 00:15:34 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t2TLFXCd039743; Mon, 30 Mar 2015 00:15:33 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 30 Mar 2015 00:15:33 +0300 From: Gleb Smirnoff To: John-Mark Gurney Subject: Re: svn commit: r280759 - head/sys/netinet Message-ID: <20150329211533.GB64665@FreeBSD.org> References: <201503271326.t2RDQxd3056112@svn.freebsd.org> <20150328083443.GV64665@FreeBSD.org> <20150328172313.GC51048@funkthat.com> <20150328181833.GX64665@FreeBSD.org> <20150328204333.GF51048@funkthat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150328204333.GF51048@funkthat.com> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Fabien Thomas X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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, 29 Mar 2015 21:15:37 -0000 On Sat, Mar 28, 2015 at 01:43:33PM -0700, John-Mark Gurney wrote: J> > J> > I think we can use per-cpu ID counters, each CPU incrementing its J> > J> > own. If we start with random values, then probability of two packets with J> > J> > the same ID emitting at the allowed timeframe will be acceptably small. J> > J> J> > J> Please do not use per-cpu id counters.. That will just push the J> > J> duplicate ids to being more rare, but just as much of a problem... J> > J> J> > J> Please read: J> > J> https://tools.ietf.org/html/rfc6864 J> > J> J> > J> And then implement one hased upon source/dest/protocol... J> > J> > I know about this RFC, but using per-cpu ID counter if a low hanging J> > fruit and is improvement. What is important not only improvement in J> > terms of lowering probability of collision, but also easy improvement in J> > performance, since now global ip_id increment is a cache line thrasher. J> > J> > So, I don't see how existense of the RFC blocks introducing an easy J> > improvement. And if anyone works on implementing the RFC, he shouldn't J> > care what is in head before his work, either global or per-cpu counter. J> J> Your comment: "fix the race", to me reads that it was a final solution, J> not simply a stop gap... J> J> If you had simply said that this is a stop gap till someone properly J> implements RFC6864, that would make it obvious that you were aware of J> it.. Nothing in your commit message said that you were aware that this J> wasn't the correct final solution... Information like that should be J> included in the commit message so people don't assume that this is the J> final solution... J> J> Anyways, are we really sending so many fragments that we are thrashing J> the cache line? I'd imagine a much lower hanging fruit is only provide J> ip_id when a non-atomic packet is being sent... I didn't do a commit that enables discussed feature. What commit message do you refer to? Well, if you are sure that implementing RFC6864 is a much lower hanging fruit than the patch, that I submitted to the list, then you are welcome to implement it. :) As for me, it requires to examine the stack a bit to be sure that we aren't missing anything important. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Sun Mar 29 21:15:44 2015 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 6D4A92CF; Sun, 29 Mar 2015 21:15:44 +0000 (UTC) Received: from mail-ig0-x229.google.com (mail-ig0-x229.google.com [IPv6:2607:f8b0:4001:c05::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2E452AC3; Sun, 29 Mar 2015 21:15:44 +0000 (UTC) Received: by igbud6 with SMTP id ud6so58411783igb.1; Sun, 29 Mar 2015 14:15:43 -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=0e8lI/A0F8Hv6WZNdHEKDWa5uzQjrcSrGcnRVdGTQuw=; b=YBZyNEJkL3krtOReuqym85sw4JFl58920FAyBx3cvhScOhMdkGZSH5J/EKnGtSS8ph Yq8R5IsUTJqbTiGiVDB5wfL89HjIqAVHAMhIHG1+mZUiiYEowDD6Weu6ldFnDVjt0j7d pwSaNEdZkQYy0kePd/YRDvAJxc1qok1YmfRGNh0LQ3eGGXx+ibkEATtgWDTm6mQOKKrH BhnWZFLe6PDN7P9Hq1CTlsMvFIvubknLj0cjShET3rOEk7KNmv5+qPa7XsnQ5vm8dksJ N2SXjdyaNHphblSEbDn7D5pXIbnGmKfCbZERICItBwvpP1kBcFCdflZ3k/VEOA0DFE7h sYag== MIME-Version: 1.0 X-Received: by 10.107.155.13 with SMTP id d13mr43883951ioe.29.1427663743514; Sun, 29 Mar 2015 14:15:43 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.36.17.194 with HTTP; Sun, 29 Mar 2015 14:15:43 -0700 (PDT) In-Reply-To: <20150329210757.GA64665@FreeBSD.org> References: <201503271326.t2RDQxd3056112@svn.freebsd.org> <20150328083443.GV64665@FreeBSD.org> <20150328191629.GY64665@FreeBSD.org> <5517B433.5010508@selasky.org> <20150329210757.GA64665@FreeBSD.org> Date: Sun, 29 Mar 2015 14:15:43 -0700 X-Google-Sender-Auth: 8_pQOhRozONIOuNR0Ae5RmozCcM Message-ID: Subject: Re: svn commit: r280759 - head/sys/netinet From: Adrian Chadd To: Gleb Smirnoff Content-Type: text/plain; charset=UTF-8 Cc: Hans Petter Selasky , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Fabien Thomas X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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, 29 Mar 2015 21:15:44 -0000 > To illustrate the probability of 1 instruction race, I would suggest to > look at PCPU_ADD() implementation for all arches except amd64/i386 and > find out that it is prone to this race. Hitting the race in PCPU_ADD() > will usually lead to mangling vm_meter statistics. Did we ever observe > this in practice? No. I dunno. Has anyone actually looked at that? :) On a busy system you may find those small race windows exist enough to be annoying. Case in point - the recent callout code race. The race between "read" "modify" "write" was tiny, but enough to break things. -adrian From owner-svn-src-all@FreeBSD.ORG Sun Mar 29 21:21:48 2015 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 C908C6C9; Sun, 29 Mar 2015 21:21:48 +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 4A3C3C0B; Sun, 29 Mar 2015 21:21:47 +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 t2TLLjxI039849 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 30 Mar 2015 00:21:45 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t2TLLjZY039848; Mon, 30 Mar 2015 00:21:45 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 30 Mar 2015 00:21:45 +0300 From: Gleb Smirnoff To: Adrian Chadd Subject: Re: svn commit: r280759 - head/sys/netinet Message-ID: <20150329212145.GC64665@FreeBSD.org> References: <201503271326.t2RDQxd3056112@svn.freebsd.org> <20150328083443.GV64665@FreeBSD.org> <20150328191629.GY64665@FreeBSD.org> <5517B433.5010508@selasky.org> <20150329210757.GA64665@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Cc: Hans Petter Selasky , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Fabien Thomas X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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, 29 Mar 2015 21:21:48 -0000 On Sun, Mar 29, 2015 at 02:15:43PM -0700, Adrian Chadd wrote: A> > To illustrate the probability of 1 instruction race, I would suggest to A> > look at PCPU_ADD() implementation for all arches except amd64/i386 and A> > find out that it is prone to this race. Hitting the race in PCPU_ADD() A> > will usually lead to mangling vm_meter statistics. Did we ever observe A> > this in practice? No. A> A> I dunno. Has anyone actually looked at that? :) A> A> On a busy system you may find those small race windows exist enough to A> be annoying. Case in point - the recent callout code race. The race A> between "read" "modify" "write" was tiny, but enough to break things. The difference is that in callout it lead to an endless loop, and in discussed case it leads to IP ID reuse, which already is happening all the time. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Sun Mar 29 21:41:06 2015 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 54DB6AE0; Sun, 29 Mar 2015 21:41: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 40089D60; Sun, 29 Mar 2015 21:41: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 t2TLf6re050383; Sun, 29 Mar 2015 21:41:06 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2TLf6Ko050382; Sun, 29 Mar 2015 21:41:06 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503292141.t2TLf6Ko050382@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 29 Mar 2015 21:41:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280825 - 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: Sun, 29 Mar 2015 21:41:06 -0000 Author: adrian Date: Sun Mar 29 21:41:05 2015 New Revision: 280825 URL: https://svnweb.freebsd.org/changeset/base/280825 Log: Fix more ticks wrapping bugs exposed by the ticks wrapping bug check. This symptom is "calibrations don't ever run", which may cause some pretty spectacularly bad behaviour in noisy environments or with longer uptimes. Thanks to dtrace to make it easy to check if specific non-inlined functions are getting called by things like the ANI and calibration HAL methods. Grr. Tested: * AR9380, STA mode Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Sun Mar 29 21:12:59 2015 (r280824) +++ head/sys/dev/ath/if_ath.c Sun Mar 29 21:41:05 2015 (r280825) @@ -2546,11 +2546,11 @@ ath_init(void *arg) * state cached in the driver. */ sc->sc_diversity = ath_hal_getdiversity(ah); - sc->sc_lastlongcal = 0; + sc->sc_lastlongcal = ticks; sc->sc_resetcal = 1; sc->sc_lastcalreset = 0; - sc->sc_lastani = 0; - sc->sc_lastshortcal = 0; + sc->sc_lastani = ticks; + sc->sc_lastshortcal = ticks; sc->sc_doresetcal = AH_FALSE; /* * Beacon timers were cleared here; give ath_newstate() From owner-svn-src-all@FreeBSD.ORG Sun Mar 29 21:44:34 2015 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 DA598D83 for ; Sun, 29 Mar 2015 21:44:33 +0000 (UTC) Received: from mail-wg0-f53.google.com (mail-wg0-f53.google.com [74.125.82.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7CAFAE1B for ; Sun, 29 Mar 2015 21:44:33 +0000 (UTC) Received: by wgdm6 with SMTP id m6so151299406wgd.2 for ; Sun, 29 Mar 2015 14:44:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=+tdtkyqWCU1BoZrITPO2MqD6joq1J6++XYnh7+/Cgc4=; b=f/j+HPWrDcY7RbVGM4foMpQAoWC2P2Zj+xMKmenaOvxTo4N6sw5NyiEg5e2lluTnzA Oc9Z4bVlArp30VpU8zg0IEyhlqIuF096cp5GlTD1Yi3pgf+4X2WwK8v1TbsuY3Pon2yO iuKxAkcozUNS11+NO3UtM1cj1tylaYAkAN19L+2GUYFl5gpnT3vzOc6hKDIB0v1t2LUH T5CXMDpz3qi81DUAvN2D4AkjtVN8to6bFF2KhZCXAE7zQthFZfUAgYSasRq72WZu9cQv h+9AVVMxveNymclN4u2IFAVExQSo8Zbq4Ff/Cd0YGab+td8EErFDEbBqGt1wJmV/cEqB VUbQ== X-Gm-Message-State: ALoCoQkn2qUzG4lcIRlQlmn7o1xQjtz9ko+BBUfoKNZpyjYB8MfbGR/ZzX3bgpyz8Znc/Qmv9P5j X-Received: by 10.194.47.201 with SMTP id f9mr55734740wjn.17.1427665465692; Sun, 29 Mar 2015 14:44:25 -0700 (PDT) Received: from [10.10.1.68] (82-69-141-170.dsl.in-addr.zen.co.uk. [82.69.141.170]) by mx.google.com with ESMTPSA id pm6sm13434891wic.20.2015.03.29.14.44.24 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 29 Mar 2015 14:44:24 -0700 (PDT) From: Steven Hartland X-Google-Original-From: Steven Hartland Message-ID: <55187240.4050007@freebsd.org> Date: Sun, 29 Mar 2015 22:44:32 +0100 User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:31.0) Gecko/20100101 Thunderbird/31.5.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: r280822 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs References: <201503292028.t2TKSJ9E016958@svn.freebsd.org> In-Reply-To: <201503292028.t2TKSJ9E016958@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: Sun, 29 Mar 2015 21:44:34 -0000 Given the upstream nature of this code it may be better to not do cosmetic changes like unless they are first upstreamed as it makes comparing with the upstream when bringing update harder. On 29/03/2015 21:28, Alexander Motin wrote: > Author: mav > Date: Sun Mar 29 20:28:18 2015 > New Revision: 280822 > URL: https://svnweb.freebsd.org/changeset/base/280822 > > Log: > Some cosmetic polishing. No functional change. > > MFC after: 1 week > > 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 Sun Mar 29 20:21:59 2015 (r280821) > +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Sun Mar 29 20:28:18 2015 (r280822) > @@ -4194,10 +4194,10 @@ arc_init(void) > #endif > #endif /* illumos */ > /* set min cache to 1/32 of all memory, or 16MB, whichever is more */ > - arc_c_min = MAX(arc_c / 4, 64<<18); > + arc_c_min = MAX(arc_c / 4, 16 << 20); > /* set max to 1/2 of all memory, or all but 1GB, whichever is more */ > - if (arc_c * 8 >= 1<<30) > - arc_c_max = (arc_c * 8) - (1<<30); > + if (arc_c * 8 >= 1 << 30) > + arc_c_max = (arc_c * 8) - (1 << 30); > else > arc_c_max = arc_c_min; > arc_c_max = MAX(arc_c * 5, arc_c_max); > @@ -4207,9 +4207,9 @@ arc_init(void) > * Allow the tunables to override our calculations if they are > * reasonable (ie. over 16MB) > */ > - if (zfs_arc_max > 64<<18 && zfs_arc_max < kmem_size()) > + if (zfs_arc_max > 16 << 20 && zfs_arc_max < kmem_size()) > arc_c_max = zfs_arc_max; > - if (zfs_arc_min > 64<<18 && zfs_arc_min <= arc_c_max) > + if (zfs_arc_min > 16 << 20 && zfs_arc_min <= arc_c_max) > arc_c_min = zfs_arc_min; > #endif > > From owner-svn-src-all@FreeBSD.ORG Sun Mar 29 21:45:33 2015 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 90369ED7; Sun, 29 Mar 2015 21:45: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 78DC3E2A; Sun, 29 Mar 2015 21:45: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 t2TLjX2b053893; Sun, 29 Mar 2015 21:45:33 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2TLjT5A053875; Sun, 29 Mar 2015 21:45:29 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201503292145.t2TLjT5A053875@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 29 Mar 2015 21:45:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280826 - in head/sys/arm: allwinner allwinner/a20 altera/socfpga freescale/imx freescale/vybrid rockchip samsung/exynos ti xilinx 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, 29 Mar 2015 21:45:33 -0000 Author: andrew Date: Sun Mar 29 21:45:28 2015 New Revision: 280826 URL: https://svnweb.freebsd.org/changeset/base/280826 Log: Remove cpufunc_asm_arm11.S from the ARMv7 configs, it's not used. Modified: head/sys/arm/allwinner/a20/files.a20 head/sys/arm/allwinner/files.a10 head/sys/arm/altera/socfpga/files.socfpga head/sys/arm/freescale/imx/files.imx51 head/sys/arm/freescale/imx/files.imx53 head/sys/arm/freescale/imx/files.imx6 head/sys/arm/freescale/vybrid/files.vybrid head/sys/arm/rockchip/files.rk30xx head/sys/arm/samsung/exynos/files.exynos5 head/sys/arm/ti/files.ti head/sys/arm/xilinx/files.zynq7 Modified: head/sys/arm/allwinner/a20/files.a20 ============================================================================== --- head/sys/arm/allwinner/a20/files.a20 Sun Mar 29 21:41:05 2015 (r280825) +++ head/sys/arm/allwinner/a20/files.a20 Sun Mar 29 21:45:28 2015 (r280826) @@ -3,7 +3,6 @@ kern/kern_clocksource.c standard arm/arm/bus_space_asm_generic.S standard arm/arm/bus_space_generic.c standard -arm/arm/cpufunc_asm_arm11.S standard arm/arm/cpufunc_asm_armv7.S standard arm/arm/gic.c standard Modified: head/sys/arm/allwinner/files.a10 ============================================================================== --- head/sys/arm/allwinner/files.a10 Sun Mar 29 21:41:05 2015 (r280825) +++ head/sys/arm/allwinner/files.a10 Sun Mar 29 21:45:28 2015 (r280826) @@ -3,7 +3,6 @@ kern/kern_clocksource.c standard arm/arm/bus_space_asm_generic.S standard arm/arm/bus_space_generic.c standard -arm/arm/cpufunc_asm_arm11.S standard arm/arm/cpufunc_asm_armv7.S standard arm/allwinner/a10_clk.c standard Modified: head/sys/arm/altera/socfpga/files.socfpga ============================================================================== --- head/sys/arm/altera/socfpga/files.socfpga Sun Mar 29 21:41:05 2015 (r280825) +++ head/sys/arm/altera/socfpga/files.socfpga Sun Mar 29 21:45:28 2015 (r280826) @@ -4,7 +4,6 @@ kern/kern_clocksource.c standard arm/arm/bus_space_generic.c standard arm/arm/bus_space_asm_generic.S standard -arm/arm/cpufunc_asm_arm11.S standard arm/arm/cpufunc_asm_armv7.S standard arm/arm/bus_space_base.c standard Modified: head/sys/arm/freescale/imx/files.imx51 ============================================================================== --- head/sys/arm/freescale/imx/files.imx51 Sun Mar 29 21:41:05 2015 (r280825) +++ head/sys/arm/freescale/imx/files.imx51 Sun Mar 29 21:45:28 2015 (r280826) @@ -1,7 +1,6 @@ # $FreeBSD$ arm/arm/bus_space_asm_generic.S standard arm/arm/bus_space_generic.c standard -arm/arm/cpufunc_asm_arm11.S standard arm/arm/cpufunc_asm_armv7.S standard kern/kern_clocksource.c standard Modified: head/sys/arm/freescale/imx/files.imx53 ============================================================================== --- head/sys/arm/freescale/imx/files.imx53 Sun Mar 29 21:41:05 2015 (r280825) +++ head/sys/arm/freescale/imx/files.imx53 Sun Mar 29 21:45:28 2015 (r280826) @@ -1,7 +1,6 @@ # $FreeBSD$ arm/arm/bus_space_asm_generic.S standard arm/arm/bus_space_generic.c standard -arm/arm/cpufunc_asm_arm11.S standard arm/arm/cpufunc_asm_armv7.S standard kern/kern_clocksource.c standard Modified: head/sys/arm/freescale/imx/files.imx6 ============================================================================== --- head/sys/arm/freescale/imx/files.imx6 Sun Mar 29 21:41:05 2015 (r280825) +++ head/sys/arm/freescale/imx/files.imx6 Sun Mar 29 21:45:28 2015 (r280826) @@ -5,7 +5,6 @@ # arm/arm/bus_space_asm_generic.S standard arm/arm/bus_space_generic.c standard -arm/arm/cpufunc_asm_arm11.S standard arm/arm/cpufunc_asm_armv7.S standard kern/kern_clocksource.c standard Modified: head/sys/arm/freescale/vybrid/files.vybrid ============================================================================== --- head/sys/arm/freescale/vybrid/files.vybrid Sun Mar 29 21:41:05 2015 (r280825) +++ head/sys/arm/freescale/vybrid/files.vybrid Sun Mar 29 21:45:28 2015 (r280826) @@ -4,7 +4,6 @@ kern/kern_clocksource.c standard arm/arm/bus_space_generic.c standard arm/arm/bus_space_asm_generic.S standard -arm/arm/cpufunc_asm_arm11.S standard arm/arm/cpufunc_asm_armv7.S standard arm/arm/bus_space_base.c standard Modified: head/sys/arm/rockchip/files.rk30xx ============================================================================== --- head/sys/arm/rockchip/files.rk30xx Sun Mar 29 21:41:05 2015 (r280825) +++ head/sys/arm/rockchip/files.rk30xx Sun Mar 29 21:45:28 2015 (r280826) @@ -3,7 +3,6 @@ kern/kern_clocksource.c standard arm/arm/bus_space_asm_generic.S standard arm/arm/bus_space_generic.c standard -arm/arm/cpufunc_asm_arm11.S standard arm/arm/cpufunc_asm_armv7.S standard arm/arm/gic.c standard Modified: head/sys/arm/samsung/exynos/files.exynos5 ============================================================================== --- head/sys/arm/samsung/exynos/files.exynos5 Sun Mar 29 21:41:05 2015 (r280825) +++ head/sys/arm/samsung/exynos/files.exynos5 Sun Mar 29 21:45:28 2015 (r280826) @@ -4,7 +4,6 @@ kern/kern_clocksource.c standard arm/arm/bus_space_generic.c standard arm/arm/bus_space_asm_generic.S standard -arm/arm/cpufunc_asm_arm11.S standard arm/arm/cpufunc_asm_armv7.S standard arm/arm/bus_space_base.c standard Modified: head/sys/arm/ti/files.ti ============================================================================== --- head/sys/arm/ti/files.ti Sun Mar 29 21:41:05 2015 (r280825) +++ head/sys/arm/ti/files.ti Sun Mar 29 21:45:28 2015 (r280826) @@ -5,7 +5,6 @@ kern/kern_clocksource.c standard arm/arm/bus_space_base.c standard arm/arm/bus_space_generic.c standard arm/arm/bus_space_asm_generic.S standard -arm/arm/cpufunc_asm_arm11.S standard arm/arm/cpufunc_asm_armv7.S standard arm/arm/pmu.c optional hwpmc Modified: head/sys/arm/xilinx/files.zynq7 ============================================================================== --- head/sys/arm/xilinx/files.zynq7 Sun Mar 29 21:41:05 2015 (r280825) +++ head/sys/arm/xilinx/files.zynq7 Sun Mar 29 21:45:28 2015 (r280826) @@ -8,7 +8,6 @@ kern/kern_clocksource.c standard arm/arm/bus_space_base.c standard arm/arm/bus_space_generic.c standard arm/arm/bus_space_asm_generic.S standard -arm/arm/cpufunc_asm_arm11.S standard arm/arm/cpufunc_asm_armv7.S standard arm/arm/gic.c standard From owner-svn-src-all@FreeBSD.ORG Sun Mar 29 21:45:50 2015 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 08879D0; Sun, 29 Mar 2015 21:45: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 E8033E31; Sun, 29 Mar 2015 21:45: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 t2TLjn9C053975; Sun, 29 Mar 2015 21:45:49 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2TLjn7g053974; Sun, 29 Mar 2015 21:45:49 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503292145.t2TLjn7g053974@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 29 Mar 2015 21:45:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280827 - head/sys/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: Sun, 29 Mar 2015 21:45:50 -0000 Author: adrian Date: Sun Mar 29 21:45:48 2015 New Revision: 280827 URL: https://svnweb.freebsd.org/changeset/base/280827 Log: Add a new field to HAL_ANISTATS - the extension channel busy count. This is only used by the AR9300 HAL for now - but just be careful if you decide to recompile the kernel with NO_CLEAN=1. Modified: head/sys/dev/ath/ath_hal/ah.h Modified: head/sys/dev/ath/ath_hal/ah.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah.h Sun Mar 29 21:45:28 2015 (r280826) +++ head/sys/dev/ath/ath_hal/ah.h Sun Mar 29 21:45:48 2015 (r280827) @@ -540,6 +540,7 @@ typedef enum { typedef struct { u_int32_t cyclecnt_diff; /* delta cycle count */ u_int32_t rxclr_cnt; /* rx clear count */ + u_int32_t extrxclr_cnt; /* ext chan rx clear count */ u_int32_t txframecnt_diff; /* delta tx frame count */ u_int32_t rxframecnt_diff; /* delta rx frame count */ u_int32_t listen_time; /* listen time in msec - time for which ch is free */ From owner-svn-src-all@FreeBSD.ORG Sun Mar 29 21:50:25 2015 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 22DB6403; Sun, 29 Mar 2015 21:50: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 03A42E57; Sun, 29 Mar 2015 21:50: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 t2TLoOsC055069; Sun, 29 Mar 2015 21:50:24 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2TLoLI9055055; Sun, 29 Mar 2015 21:50:21 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503292150.t2TLoLI9055055@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 29 Mar 2015 21:50:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280828 - in head/sys/dev/ath/ath_hal: . ar5212 ar5416 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, 29 Mar 2015 21:50:25 -0000 Author: adrian Date: Sun Mar 29 21:50:21 2015 New Revision: 280828 URL: https://svnweb.freebsd.org/changeset/base/280828 Log: Move the HAL channel survey support out to be in the top-level HAL, rathe than private in each HAL module. Whilst here, modify ath_hal_private to always have the per-channel noisefloor stats, rather than conditionally. This just makes life easier in general (no strange ABI differences between different HAL compile options.) Add a couple of methods (clear/reset, add) rather than using hand-rolled versions of things. Modified: head/sys/dev/ath/ath_hal/ah.c head/sys/dev/ath/ath_hal/ah_internal.h head/sys/dev/ath/ath_hal/ar5212/ar5212.h head/sys/dev/ath/ath_hal/ar5212/ar5212_ani.c head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c head/sys/dev/ath/ath_hal/ar5212/ar5212_reset.c head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Modified: head/sys/dev/ath/ath_hal/ah.c ============================================================================== --- head/sys/dev/ath/ath_hal/ah.c Sun Mar 29 21:45:48 2015 (r280827) +++ head/sys/dev/ath/ath_hal/ah.c Sun Mar 29 21:50:21 2015 (r280828) @@ -881,6 +881,7 @@ ath_hal_getdiagstate(struct ath_hal *ah, const void *args, uint32_t argsize, void **result, uint32_t *resultsize) { + switch (request) { case HAL_DIAG_REVS: *result = &AH_PRIVATE(ah)->ah_devid; @@ -938,6 +939,10 @@ ath_hal_getdiagstate(struct ath_hal *ah, } else return AH_FALSE; return AH_TRUE; + case HAL_DIAG_CHANSURVEY: + *result = &AH_PRIVATE(ah)->ah_chansurvey; + *resultsize = sizeof(HAL_CHANNEL_SURVEY); + return AH_TRUE; } return AH_FALSE; } @@ -1433,3 +1438,32 @@ ath_hal_mhz2ieee_2ghz(struct ath_hal *ah else return 15 + ((ichan->channel - 2512) / 20); } + +/* + * Clear the current survey data. + * + * This should be done during a channel change. + */ +void +ath_hal_survey_clear(struct ath_hal *ah) +{ + + OS_MEMZERO(&AH_PRIVATE(ah)->ah_chansurvey, + sizeof(AH_PRIVATE(ah)->ah_chansurvey)); +} + +/* + * Add a sample to the channel survey. + */ +void +ath_hal_survey_add_sample(struct ath_hal *ah, HAL_SURVEY_SAMPLE *hs) +{ + HAL_CHANNEL_SURVEY *cs; + + cs = &AH_PRIVATE(ah)->ah_chansurvey; + + OS_MEMCPY(&cs->samples[cs->cur_sample], hs, sizeof(*hs)); + cs->samples[cs->cur_sample].seq_num = cs->cur_seq; + cs->cur_sample = (cs->cur_sample + 1) % CHANNEL_SURVEY_SAMPLE_COUNT; + cs->cur_seq++; +} Modified: head/sys/dev/ath/ath_hal/ah_internal.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_internal.h Sun Mar 29 21:45:48 2015 (r280827) +++ head/sys/dev/ath/ath_hal/ah_internal.h Sun Mar 29 21:50:21 2015 (r280828) @@ -422,9 +422,13 @@ struct ath_hal_private { uint32_t ah_fatalState[6]; /* AR_ISR+shadow regs */ int ah_rxornIsFatal; /* how to treat HAL_INT_RXORN */ -#ifndef ATH_NF_PER_CHAN + /* Only used if ATH_NF_PER_CHAN is defined */ HAL_NFCAL_HIST_FULL nf_cal_hist; -#endif /* ! ATH_NF_PER_CHAN */ + + /* + * Channel survey history - current channel only. + */ + HAL_CHANNEL_SURVEY ah_chansurvey; /* channel survey */ }; #define AH_PRIVATE(_ah) ((struct ath_hal_private *)(_ah)) @@ -1029,4 +1033,15 @@ ath_hal_getantennaallowed(struct ath_hal */ extern int ath_hal_mhz2ieee_2ghz(struct ath_hal *, HAL_CHANNEL_INTERNAL *); +/* + * Clear the channel survey data. + */ +extern void ath_hal_survey_clear(struct ath_hal *ah); + +/* + * Add a sample to the channel survey data. + */ +extern void ath_hal_survey_add_sample(struct ath_hal *ah, + HAL_SURVEY_SAMPLE *hs); + #endif /* _ATH_AH_INTERAL_H_ */ Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5212/ar5212.h Sun Mar 29 21:45:48 2015 (r280827) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212.h Sun Mar 29 21:50:21 2015 (r280828) @@ -319,7 +319,6 @@ struct ath_hal_5212 { struct ar5212AniParams ah_aniParams5; /* 5GHz parameters */ struct ar5212AniState *ah_curani; /* cached last reference */ struct ar5212AniState ah_ani[AH_MAXCHAN]; /* per-channel state */ - HAL_CHANNEL_SURVEY ah_chansurvey; /* channel survey */ /* AR5416 uses some of the AR5212 ANI code; these are the ANI methods */ HAL_BOOL (*ah_aniControl) (struct ath_hal *, HAL_ANI_CMD cmd, int param); Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_ani.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5212/ar5212_ani.c Sun Mar 29 21:45:48 2015 (r280827) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212_ani.c Sun Mar 29 21:50:21 2015 (r280828) @@ -869,7 +869,6 @@ ar5212AniGetListenTime(struct ath_hal *a int32_t listenTime = 0; int good; HAL_SURVEY_SAMPLE hs; - HAL_CHANNEL_SURVEY *cs = AH_NULL; /* * We shouldn't see ah_curchan be NULL, but just in case.. @@ -879,21 +878,13 @@ ar5212AniGetListenTime(struct ath_hal *a return (0); } - cs = &ahp->ah_chansurvey; - /* * Fetch the current statistics, squirrel away the current * sample, bump the sequence/sample counter. */ OS_MEMZERO(&hs, sizeof(hs)); good = ar5212GetMibCycleCounts(ah, &hs); - if (cs != AH_NULL) { - OS_MEMCPY(&cs->samples[cs->cur_sample], &hs, sizeof(hs)); - cs->samples[cs->cur_sample].seq_num = cs->cur_seq; - cs->cur_sample = - (cs->cur_sample + 1) % CHANNEL_SURVEY_SAMPLE_COUNT; - cs->cur_seq++; - } + ath_hal_survey_add_sample(ah, &hs); if (ANI_ENA(ah)) aniState = ahp->ah_curani; Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c Sun Mar 29 21:45:48 2015 (r280827) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c Sun Mar 29 21:50:21 2015 (r280828) @@ -1113,10 +1113,6 @@ ar5212GetDiagState(struct ath_hal *ah, i return ar5212AniSetParams(ah, args, args); } break; - case HAL_DIAG_CHANSURVEY: - *result = &ahp->ah_chansurvey; - *resultsize = sizeof(HAL_CHANNEL_SURVEY); - return AH_TRUE; } return AH_FALSE; } Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_reset.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5212/ar5212_reset.c Sun Mar 29 21:45:48 2015 (r280827) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212_reset.c Sun Mar 29 21:50:21 2015 (r280828) @@ -197,7 +197,8 @@ ar5212Reset(struct ath_hal *ah, HAL_OPMO saveFrameSeqCount = 0; /* NB: silence compiler */ /* Blank the channel survey statistics */ - OS_MEMZERO(&ahp->ah_chansurvey, sizeof(ahp->ah_chansurvey)); + ath_hal_survey_clear(ah); + #if 0 /* * XXX disable for now; this appears to sometimes cause OFDM Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c Sun Mar 29 21:45:48 2015 (r280827) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c Sun Mar 29 21:50:21 2015 (r280828) @@ -818,7 +818,6 @@ ar5416AniGetListenTime(struct ath_hal *a int32_t listenTime = 0; int good; HAL_SURVEY_SAMPLE hs; - HAL_CHANNEL_SURVEY *cs = AH_NULL; /* * We shouldn't see ah_curchan be NULL, but just in case.. @@ -828,21 +827,13 @@ ar5416AniGetListenTime(struct ath_hal *a return (0); } - cs = &ahp->ah_chansurvey; - /* * Fetch the current statistics, squirrel away the current - * sample, bump the sequence/sample counter. + * sample. */ OS_MEMZERO(&hs, sizeof(hs)); good = ar5416GetMibCycleCounts(ah, &hs); - if (cs != AH_NULL) { - OS_MEMCPY(&cs->samples[cs->cur_sample], &hs, sizeof(hs)); - cs->samples[cs->cur_sample].seq_num = cs->cur_seq; - cs->cur_sample = - (cs->cur_sample + 1) % CHANNEL_SURVEY_SAMPLE_COUNT; - cs->cur_seq++; - } + ath_hal_survey_add_sample(ah, &hs); if (ANI_ENA(ah)) aniState = ahp->ah_curani; Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Sun Mar 29 21:45:48 2015 (r280827) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Sun Mar 29 21:50:21 2015 (r280828) @@ -120,9 +120,10 @@ ar5416Reset(struct ath_hal *ah, HAL_OPMO HALASSERT(AH_PRIVATE(ah)->ah_eeversion >= AR_EEPROM_VER14_1); /* Blank the channel survey statistics */ - OS_MEMZERO(&ahp->ah_chansurvey, sizeof(ahp->ah_chansurvey)); + ath_hal_survey_clear(ah); /* XXX Turn on fast channel change for 5416 */ + /* * Preserve the bmiss rssi threshold and count threshold * across resets From owner-svn-src-all@FreeBSD.ORG Sun Mar 29 21:52:16 2015 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 03D67571; Sun, 29 Mar 2015 21:52:16 +0000 (UTC) Received: from mail-wg0-x230.google.com (mail-wg0-x230.google.com [IPv6:2a00:1450:400c:c00::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9E163F0C; Sun, 29 Mar 2015 21:52:15 +0000 (UTC) Received: by wgdm6 with SMTP id m6so151396501wgd.2; Sun, 29 Mar 2015 14:52:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=GyjpkFqNN0hi/q9qDy95UPEUA5+ajCveIXYlA8HKrD0=; b=OESCiaKSLdjxf2j5h1in5UAeQNh0Gy/EZra9eqMp9diQDEqgGfWdmPVBeWQuvHWcq2 sBnoHqhPtdBMWsovmyG31o/HHtk+yuB5/vX4Pft2vDefKTa8ibNcyeqaP8lBIwR9YnIG KKjrgbQO6hQkdL1v+O0BGdlt6Rm6DEBL9AqgVuL6iSEgxytHI+v3JY+LG295lpA6cxXs pZOyS6t8IzP+1iOlfO/ib2JR5zbSKuD1xwBzBqpmPut88vLw8EmZz0Ed2LPSFuLsuMWd hyC5Z1PZ3ohLC1x/Tp/L4+RMYqTkw0wwHggBSbHxFFoJ9FuYnU+AipDhkdDcKymL54it ZhCA== X-Received: by 10.194.75.193 with SMTP id e1mr55587176wjw.126.1427665933949; Sun, 29 Mar 2015 14:52:13 -0700 (PDT) Received: from mavbook.mavhome.dp.ua ([134.249.139.101]) by mx.google.com with ESMTPSA id q10sm12860401wjr.41.2015.03.29.14.52.12 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 29 Mar 2015 14:52:12 -0700 (PDT) Sender: Alexander Motin Message-ID: <5518740A.1050806@FreeBSD.org> Date: Mon, 30 Mar 2015 00:52:10 +0300 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Steven Hartland , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r280822 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs References: <201503292028.t2TKSJ9E016958@svn.freebsd.org> <55187240.4050007@freebsd.org> In-Reply-To: <55187240.4050007@freebsd.org> Content-Type: text/plain; charset=utf-8 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: Sun, 29 Mar 2015 21:52:16 -0000 On 30.03.2015 00:44, Steven Hartland wrote: > Given the upstream nature of this code it may be better to not do > cosmetic changes like unless they are first upstreamed as it makes > comparing with the upstream when bringing update harder. My changes didn't move the code away from the upstream, may be even made it a bit closer. In places where upstream code has "64 << 20", I changed our code from "64<<18" to "16 << 20", which I believe both more correct and closer to upstream. > On 29/03/2015 21:28, Alexander Motin wrote: >> Author: mav >> Date: Sun Mar 29 20:28:18 2015 >> New Revision: 280822 >> URL: https://svnweb.freebsd.org/changeset/base/280822 >> >> Log: >> Some cosmetic polishing. No functional change. >> MFC after: 1 week >> >> 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 Sun >> Mar 29 20:21:59 2015 (r280821) >> +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Sun >> Mar 29 20:28:18 2015 (r280822) >> @@ -4194,10 +4194,10 @@ arc_init(void) >> #endif >> #endif /* illumos */ >> /* set min cache to 1/32 of all memory, or 16MB, whichever is >> more */ >> - arc_c_min = MAX(arc_c / 4, 64<<18); >> + arc_c_min = MAX(arc_c / 4, 16 << 20); >> /* set max to 1/2 of all memory, or all but 1GB, whichever is >> more */ >> - if (arc_c * 8 >= 1<<30) >> - arc_c_max = (arc_c * 8) - (1<<30); >> + if (arc_c * 8 >= 1 << 30) >> + arc_c_max = (arc_c * 8) - (1 << 30); >> else >> arc_c_max = arc_c_min; >> arc_c_max = MAX(arc_c * 5, arc_c_max); >> @@ -4207,9 +4207,9 @@ arc_init(void) >> * Allow the tunables to override our calculations if they are >> * reasonable (ie. over 16MB) >> */ >> - if (zfs_arc_max > 64<<18 && zfs_arc_max < kmem_size()) >> + if (zfs_arc_max > 16 << 20 && zfs_arc_max < kmem_size()) >> arc_c_max = zfs_arc_max; >> - if (zfs_arc_min > 64<<18 && zfs_arc_min <= arc_c_max) >> + if (zfs_arc_min > 16 << 20 && zfs_arc_min <= arc_c_max) >> arc_c_min = zfs_arc_min; >> #endif >> > -- Alexander Motin From owner-svn-src-all@FreeBSD.ORG Sun Mar 29 21:53:11 2015 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 082546C1; Sun, 29 Mar 2015 21:53: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 E6A62F18; Sun, 29 Mar 2015 21:53: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 t2TLrA9x058348; Sun, 29 Mar 2015 21:53:10 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2TLr9bn058343; Sun, 29 Mar 2015 21:53:09 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503292153.t2TLr9bn058343@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 29 Mar 2015 21:53:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280829 - 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: Sun, 29 Mar 2015 21:53:11 -0000 Author: adrian Date: Sun Mar 29 21:53:08 2015 New Revision: 280829 URL: https://svnweb.freebsd.org/changeset/base/280829 Log: Add initial support for the HAL channel survey support to the AR9300 HAL. This is used by the 'athsurvey' command to print out channel survey statistics - % busy times transmit, receive and airtime. It's as buggy and incomplete as the rest of the HAL survey support - notably, tying into the ANI code to read channel stats and occasionally getting garbage counters isn't very nice. It also doesn't (yet!) get channel survey information during a scan. But it's good enough for basic air-time debugging, which is why I'm committing it in this state. Tested: * AR9380, STA mode Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300.h head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_ani.c head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_reset.c Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300.h ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300.h Sun Mar 29 21:50:21 2015 (r280828) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300.h Sun Mar 29 21:53:08 2015 (r280829) @@ -185,6 +185,8 @@ struct ar9300_ani_state { int32_t rssi; /* The current RSSI */ u_int32_t tx_frame_count; /* Last tx_frame_count */ u_int32_t rx_frame_count; /* Last rx Frame count */ + u_int32_t rx_busy_count; /* Last rx busy count */ + u_int32_t rx_ext_busy_count; /* Last rx busy count; extension channel */ u_int32_t cycle_count; /* Last cycle_count (can detect wrap-around) */ u_int32_t ofdm_phy_err_count;/* OFDM err count since last reset */ u_int32_t cck_phy_err_count; /* CCK err count since last reset */ Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_ani.c ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_ani.c Sun Mar 29 21:50:21 2015 (r280828) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_ani.c Sun Mar 29 21:53:08 2015 (r280829) @@ -1061,10 +1061,13 @@ ar9300_ani_get_listen_time(struct ath_ha struct ath_hal_9300 *ahp = AH9300(ah); struct ar9300_ani_state *ani_state; u_int32_t tx_frame_count, rx_frame_count, cycle_count; + u_int32_t rx_busy_count, rx_ext_busy_count; int32_t listen_time; tx_frame_count = OS_REG_READ(ah, AR_TFCNT); rx_frame_count = OS_REG_READ(ah, AR_RFCNT); + rx_busy_count = OS_REG_READ(ah, AR_RCCNT); + rx_ext_busy_count = OS_REG_READ(ah, AR_EXTRCCNT); cycle_count = OS_REG_READ(ah, AR_CCCNT); ani_state = ahp->ah_curani; @@ -1085,17 +1088,30 @@ ar9300_ani_get_listen_time(struct ath_ha int32_t ccdelta = cycle_count - ani_state->cycle_count; int32_t rfdelta = rx_frame_count - ani_state->rx_frame_count; int32_t tfdelta = tx_frame_count - ani_state->tx_frame_count; + int32_t rcdelta = rx_busy_count - ani_state->rx_busy_count; + int32_t extrcdelta = rx_ext_busy_count - ani_state->rx_ext_busy_count; listen_time = (ccdelta - rfdelta - tfdelta) / CLOCK_RATE(ah); -#if HAL_ANI_DEBUG +//#if HAL_ANI_DEBUG HALDEBUG(ah, HAL_DEBUG_ANI, - "%s: cyclecount=%d, rfcount=%d, tfcount=%d, listen_time=%d " + "%s: cyclecount=%d, rfcount=%d, tfcount=%d, rcdelta=%d, extrcdelta=%d, listen_time=%d " "CLOCK_RATE=%d\n", - __func__, ccdelta, rfdelta, tfdelta, listen_time, CLOCK_RATE(ah)); -#endif + __func__, ccdelta, rfdelta, tfdelta, rcdelta, extrcdelta, + listen_time, CLOCK_RATE(ah)); +//#endif + /* Populate as appropriate */ + ani_stats->cyclecnt_diff = ccdelta; + ani_stats->rxclr_cnt = rcdelta; + ani_stats->txframecnt_diff = tfdelta; + ani_stats->rxframecnt_diff = rfdelta; + ani_stats->extrxclr_cnt = extrcdelta; + ani_stats->listen_time = listen_time; + ani_stats->valid = AH_TRUE; } ani_state->cycle_count = cycle_count; ani_state->tx_frame_count = tx_frame_count; ani_state->rx_frame_count = rx_frame_count; + ani_state->rx_busy_count = rx_busy_count; + ani_state->rx_ext_busy_count = rx_ext_busy_count; return listen_time; } @@ -1155,7 +1171,13 @@ ar9300_ani_ar_poll(struct ath_hal *ah, c ofdm_phy_err_cnt = OS_REG_READ(ah, AR_PHY_ERR_1); cck_phy_err_cnt = OS_REG_READ(ah, AR_PHY_ERR_2); - + /* Populate HAL_ANISTATS */ + if (ani_stats) { + ani_stats->cckphyerr_cnt = + cck_phy_err_cnt - ani_state->cck_phy_err_count; + ani_stats->ofdmphyerrcnt_diff = + ofdm_phy_err_cnt - ani_state->ofdm_phy_err_count; + } /* NB: only use ast_ani_*errs with AH_PRIVATE_DIAG */ ahp->ah_stats.ast_ani_ofdmerrs += Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c Sun Mar 29 21:50:21 2015 (r280828) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c Sun Mar 29 21:53:08 2015 (r280829) @@ -366,11 +366,26 @@ ar9300_ani_poll_freebsd(struct ath_hal * HAL_NODE_STATS stats; HAL_ANISTATS anistats; + HAL_SURVEY_SAMPLE survey; OS_MEMZERO(&stats, sizeof(stats)); OS_MEMZERO(&anistats, sizeof(anistats)); + OS_MEMZERO(&survey, sizeof(survey)); ar9300_ani_ar_poll(ah, &stats, chan, &anistats); + + /* + * If ANI stats are valid, use them to update the + * channel survey. + */ + if (anistats.valid) { + survey.cycle_count = anistats.cyclecnt_diff; + survey.chan_busy = anistats.rxclr_cnt; + survey.ext_chan_busy = anistats.extrxclr_cnt; + survey.tx_busy = anistats.txframecnt_diff; + survey.rx_busy = anistats.rxframecnt_diff; + ath_hal_survey_add_sample(ah, &survey); + } } /* Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_reset.c ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_reset.c Sun Mar 29 21:50:21 2015 (r280828) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_reset.c Sun Mar 29 21:53:08 2015 (r280829) @@ -4666,7 +4666,10 @@ ar9300_reset(struct ath_hal *ah, HAL_OPM #endif ahp->ah_skip_rx_iq_cal = AH_FALSE; } - + + /* FreeBSD: clear the channel survey data */ + ath_hal_survey_clear(ah); + /* * Fast channel change (Change synthesizer based on channel freq * without resetting chip) @@ -6400,5 +6403,7 @@ ar9300_ant_ctrl_set_lna_div_use_bt_ant(s } else { return AH_TRUE; } + + /* XXX TODO: Add AR9565 support? */ } #endif /* ATH_ANT_DIV_COMB */ From owner-svn-src-all@FreeBSD.ORG Sun Mar 29 21:56:36 2015 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 24397855; Sun, 29 Mar 2015 21:56:36 +0000 (UTC) Received: from relay.mailchannels.net (tkt-001-i354.relay.mailchannels.net [174.136.5.215]) by mx1.freebsd.org (Postfix) with ESMTP id 28826F35; Sun, 29 Mar 2015 21:56:32 +0000 (UTC) X-Sender-Id: duocircle|x-authuser|hippie Received: from smtp4.ore.mailhop.org (ip-10-220-9-73.us-west-2.compute.internal [10.220.9.73]) by relay.mailchannels.net (Postfix) with ESMTPA id BA3011002A0; Sun, 29 Mar 2015 21:56:24 +0000 (UTC) X-Sender-Id: duocircle|x-authuser|hippie Received: from smtp4.ore.mailhop.org (smtp4.ore.mailhop.org [10.21.145.197]) (using TLSv1 with cipher DHE-RSA-AES256-SHA) by 0.0.0.0:2500 (trex/5.4.8); Sun, 29 Mar 2015 21:56:25 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: duocircle|x-authuser|hippie X-MailChannels-Auth-Id: duocircle X-MC-Loop-Signature: 1427666184886:1697215896 X-MC-Ingress-Time: 1427666184886 Received: from c-73-34-117-227.hsd1.co.comcast.net ([73.34.117.227] helo=ilsoft.org) by smtp4.ore.mailhop.org with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.82) (envelope-from ) id 1YcLBu-0001nl-QB; Sun, 29 Mar 2015 21:56:23 +0000 Received: from revolution.hippie.lan (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t2TLuM2G055133; Sun, 29 Mar 2015 15:56:22 -0600 (MDT) (envelope-from ian@freebsd.org) X-Mail-Handler: DuoCircle Outbound SMTP X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@duocircle.com (see https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information for abuse reporting information) X-MHO-User: U2FsdGVkX19v53RfpMtik2/g8FfWUhod Message-ID: <1427666182.82583.4.camel@freebsd.org> Subject: Re: svn commit: r280759 - head/sys/netinet From: Ian Lepore To: Gleb Smirnoff Date: Sun, 29 Mar 2015 15:56:22 -0600 In-Reply-To: <20150329210757.GA64665@FreeBSD.org> References: <201503271326.t2RDQxd3056112@svn.freebsd.org> <20150328083443.GV64665@FreeBSD.org> <20150328191629.GY64665@FreeBSD.org> <5517B433.5010508@selasky.org> <20150329210757.GA64665@FreeBSD.org> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.12.10 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-AuthUser: hippie Cc: Hans Petter Selasky , Adrian Chadd , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Fabien Thomas X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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, 29 Mar 2015 21:56:36 -0000 On Mon, 2015-03-30 at 00:07 +0300, Gleb Smirnoff wrote: > On Sun, Mar 29, 2015 at 08:16:46AM -0700, Adrian Chadd wrote: > A> On 29 March 2015 at 01:13, Hans Petter Selasky wrote: > A> > On 03/28/15 20:16, Gleb Smirnoff wrote: > A> >> > A> >> +uint16_t > A> >> +ip_newid(void) > A> >> +{ > A> >> + > A> >> + counter_u64_add(V_ip_id, 1); > A> >> + return (htons((*(uint64_t *)zpcpu_get(V_ip_id)) & 0xffff)); > A> >> +} > A> > > A> > > A> > Technically you would need to enter a critical section here, so that the > A> > current process doesn't get swapped to a different CPU between the counter > A> > add and the zpcpu_get. > A> > A> +10000 here. > A> > A> You can get preempted and shifted to another CPU at almost any point > A> in time you're not explicitly asking not to be. It's.. frustrating. > > What happens in case of the race is that one CPU will use counter of the > other CPU, reusing the ID that was just used by the other CPU. And this > isn't a fatal race, it is just reuse of ID. The probability of such event > is much lower than probability of a collision due to overflowing uint16_t. > > For example, if we emit 1 Mpps, then we overflow the ID counter 15 times > per second. Every ID is reused 15 times within this small interval of time, > which of course is larger than TTL. And we find this kinda acceptable. > > To illustrate the probability of 1 instruction race, I would suggest to > look at PCPU_ADD() implementation for all arches except amd64/i386 and > find out that it is prone to this race. Hitting the race in PCPU_ADD() > will usually lead to mangling vm_meter statistics. Did we ever observe > this in practice? No. > I was under the impression that PCPU_ADD(), like all pcpu r-m-w accesses, requires the calling code to have taken steps to ensure the code doesn't migrate during the sequence. If callers aren't doing so, that seems like a bug in the calling code, not the PCPU_ADD() code. -- Ian From owner-svn-src-all@FreeBSD.ORG Sun Mar 29 22:00:25 2015 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 975299FB; Sun, 29 Mar 2015 22:00: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 8213AF68; Sun, 29 Mar 2015 22:00: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 t2TM0PZn059420; Sun, 29 Mar 2015 22:00:25 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2TM0Png059419; Sun, 29 Mar 2015 22:00:25 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201503292200.t2TM0Png059419@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 29 Mar 2015 22:00:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280830 - head/tools/regression/lib/libc/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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, 29 Mar 2015 22:00:25 -0000 Author: jilles Date: Sun Mar 29 22:00:24 2015 New Revision: 280830 URL: https://svnweb.freebsd.org/changeset/base/280830 Log: wordexp(): Add testcase for non-default IFS in environment. The non-default IFS is expected to be used. MFC after: 1 week Modified: head/tools/regression/lib/libc/gen/test-wordexp.c Modified: head/tools/regression/lib/libc/gen/test-wordexp.c ============================================================================== --- head/tools/regression/lib/libc/gen/test-wordexp.c Sun Mar 29 21:53:08 2015 (r280829) +++ head/tools/regression/lib/libc/gen/test-wordexp.c Sun Mar 29 22:00:24 2015 (r280830) @@ -240,6 +240,21 @@ main(int argc, char *argv[]) r = unsetenv("IFS"); assert(r == 0); + /* + * With IFS set to a non-default value, and using it. + */ + r = setenv("IFS", ":", 1); + assert(r == 0); + r = wordexp("${IFS+hello:world}", &we, 0); + assert(r == 0); + assert(we.we_wordc == 2); + assert(strcmp(we.we_wordv[0], "hello") == 0); + assert(strcmp(we.we_wordv[1], "world") == 0); + assert(we.we_wordv[2] == NULL); + wordfree(&we); + r = unsetenv("IFS"); + assert(r == 0); + printf("PASS wordexp()\n"); printf("PASS wordfree()\n"); From owner-svn-src-all@FreeBSD.ORG Sun Mar 29 22:43:50 2015 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 CDF5632B; Sun, 29 Mar 2015 22:43: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 B4D3F6D0; Sun, 29 Mar 2015 22:43: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 t2TMhoJt081710; Sun, 29 Mar 2015 22:43:50 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2TMhemK081667; Sun, 29 Mar 2015 22:43:40 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201503292243.t2TMhemK081667@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 29 Mar 2015 22:43:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280831 - in head/sys: arm/allwinner arm/allwinner/a20 arm/altera/socfpga arm/at91 arm/broadcom/bcm2835 arm/cavium/cns11xx arm/freescale/imx arm/freescale/vybrid arm/lpc arm/mv arm/rock... 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, 29 Mar 2015 22:43:50 -0000 Author: andrew Date: Sun Mar 29 22:43:39 2015 New Revision: 280831 URL: https://svnweb.freebsd.org/changeset/base/280831 Log: Build the cpufunc_asm_* files based on the cpu type, not which config file we happen to be building. Modified: head/sys/arm/allwinner/a20/files.a20 head/sys/arm/allwinner/files.a10 head/sys/arm/altera/socfpga/files.socfpga head/sys/arm/at91/files.at91 head/sys/arm/broadcom/bcm2835/files.bcm2835 head/sys/arm/broadcom/bcm2835/files.bcm2836 head/sys/arm/broadcom/bcm2835/files.bcm283x head/sys/arm/cavium/cns11xx/files.econa head/sys/arm/freescale/imx/files.imx51 head/sys/arm/freescale/imx/files.imx53 head/sys/arm/freescale/imx/files.imx6 head/sys/arm/freescale/vybrid/files.vybrid head/sys/arm/lpc/files.lpc head/sys/arm/mv/files.mv head/sys/arm/rockchip/files.rk30xx head/sys/arm/samsung/exynos/files.exynos5 head/sys/arm/samsung/s3c2xx0/files.s3c2xx0 head/sys/arm/ti/files.ti head/sys/arm/versatile/files.versatile head/sys/arm/xilinx/files.zynq7 head/sys/arm/xscale/i80321/files.i80219 head/sys/arm/xscale/i80321/files.i80321 head/sys/arm/xscale/i8134x/files.i81342 head/sys/arm/xscale/ixp425/files.ixp425 head/sys/arm/xscale/pxa/files.pxa head/sys/conf/files.arm Modified: head/sys/arm/allwinner/a20/files.a20 ============================================================================== --- head/sys/arm/allwinner/a20/files.a20 Sun Mar 29 22:00:24 2015 (r280830) +++ head/sys/arm/allwinner/a20/files.a20 Sun Mar 29 22:43:39 2015 (r280831) @@ -3,7 +3,6 @@ kern/kern_clocksource.c standard arm/arm/bus_space_asm_generic.S standard arm/arm/bus_space_generic.c standard -arm/arm/cpufunc_asm_armv7.S standard arm/arm/gic.c standard arm/allwinner/a20/a20_cpu_cfg.c standard Modified: head/sys/arm/allwinner/files.a10 ============================================================================== --- head/sys/arm/allwinner/files.a10 Sun Mar 29 22:00:24 2015 (r280830) +++ head/sys/arm/allwinner/files.a10 Sun Mar 29 22:43:39 2015 (r280831) @@ -3,7 +3,6 @@ kern/kern_clocksource.c standard arm/arm/bus_space_asm_generic.S standard arm/arm/bus_space_generic.c standard -arm/arm/cpufunc_asm_armv7.S standard arm/allwinner/a10_clk.c standard arm/allwinner/a10_common.c standard Modified: head/sys/arm/altera/socfpga/files.socfpga ============================================================================== --- head/sys/arm/altera/socfpga/files.socfpga Sun Mar 29 22:00:24 2015 (r280830) +++ head/sys/arm/altera/socfpga/files.socfpga Sun Mar 29 22:43:39 2015 (r280831) @@ -4,7 +4,6 @@ kern/kern_clocksource.c standard arm/arm/bus_space_generic.c standard arm/arm/bus_space_asm_generic.S standard -arm/arm/cpufunc_asm_armv7.S standard arm/arm/bus_space_base.c standard arm/arm/gic.c standard Modified: head/sys/arm/at91/files.at91 ============================================================================== --- head/sys/arm/at91/files.at91 Sun Mar 29 22:00:24 2015 (r280830) +++ head/sys/arm/at91/files.at91 Sun Mar 29 22:43:39 2015 (r280831) @@ -1,6 +1,5 @@ # $FreeBSD$ arm/arm/bus_space_generic.c standard -arm/arm/cpufunc_asm_arm9.S standard arm/at91/at91_machdep.c standard arm/at91/at91_aic.c standard arm/at91/at91.c standard Modified: head/sys/arm/broadcom/bcm2835/files.bcm2835 ============================================================================== --- head/sys/arm/broadcom/bcm2835/files.bcm2835 Sun Mar 29 22:00:24 2015 (r280830) +++ head/sys/arm/broadcom/bcm2835/files.bcm2835 Sun Mar 29 22:43:39 2015 (r280831) @@ -1,6 +1,3 @@ # $FreeBSD$ arm/broadcom/bcm2835/bcm2835_systimer.c standard - -arm/arm/cpufunc_asm_arm11.S standard -arm/arm/cpufunc_asm_arm11x6.S standard Modified: head/sys/arm/broadcom/bcm2835/files.bcm2836 ============================================================================== --- head/sys/arm/broadcom/bcm2835/files.bcm2836 Sun Mar 29 22:00:24 2015 (r280830) +++ head/sys/arm/broadcom/bcm2835/files.bcm2836 Sun Mar 29 22:43:39 2015 (r280831) @@ -1,6 +1,5 @@ # $FreeBSD$ -arm/arm/cpufunc_asm_armv7.S standard arm/arm/generic_timer.c standard arm/broadcom/bcm2835/bcm2836.c standard Modified: head/sys/arm/broadcom/bcm2835/files.bcm283x ============================================================================== --- head/sys/arm/broadcom/bcm2835/files.bcm283x Sun Mar 29 22:00:24 2015 (r280830) +++ head/sys/arm/broadcom/bcm2835/files.bcm283x Sun Mar 29 22:43:39 2015 (r280831) @@ -18,7 +18,6 @@ arm/broadcom/bcm2835/bcm283x_dwc_fdt.c arm/arm/bus_space_base.c standard arm/arm/bus_space_generic.c standard arm/arm/bus_space_asm_generic.S standard -arm/arm/cpufunc_asm_armv6.S standard kern/kern_clocksource.c standard Modified: head/sys/arm/cavium/cns11xx/files.econa ============================================================================== --- head/sys/arm/cavium/cns11xx/files.econa Sun Mar 29 22:00:24 2015 (r280830) +++ head/sys/arm/cavium/cns11xx/files.econa Sun Mar 29 22:43:39 2015 (r280831) @@ -1,5 +1,4 @@ # $FreeBSD$ -arm/arm/cpufunc_asm_fa526.S standard arm/cavium/cns11xx/econa_machdep.c standard arm/cavium/cns11xx/econa.c standard arm/cavium/cns11xx/timer.c standard Modified: head/sys/arm/freescale/imx/files.imx51 ============================================================================== --- head/sys/arm/freescale/imx/files.imx51 Sun Mar 29 22:00:24 2015 (r280830) +++ head/sys/arm/freescale/imx/files.imx51 Sun Mar 29 22:43:39 2015 (r280831) @@ -1,7 +1,6 @@ # $FreeBSD$ arm/arm/bus_space_asm_generic.S standard arm/arm/bus_space_generic.c standard -arm/arm/cpufunc_asm_armv7.S standard kern/kern_clocksource.c standard # Init Modified: head/sys/arm/freescale/imx/files.imx53 ============================================================================== --- head/sys/arm/freescale/imx/files.imx53 Sun Mar 29 22:00:24 2015 (r280830) +++ head/sys/arm/freescale/imx/files.imx53 Sun Mar 29 22:43:39 2015 (r280831) @@ -1,7 +1,6 @@ # $FreeBSD$ arm/arm/bus_space_asm_generic.S standard arm/arm/bus_space_generic.c standard -arm/arm/cpufunc_asm_armv7.S standard kern/kern_clocksource.c standard # Init Modified: head/sys/arm/freescale/imx/files.imx6 ============================================================================== --- head/sys/arm/freescale/imx/files.imx6 Sun Mar 29 22:00:24 2015 (r280830) +++ head/sys/arm/freescale/imx/files.imx6 Sun Mar 29 22:43:39 2015 (r280831) @@ -5,7 +5,6 @@ # arm/arm/bus_space_asm_generic.S standard arm/arm/bus_space_generic.c standard -arm/arm/cpufunc_asm_armv7.S standard kern/kern_clocksource.c standard # Modified: head/sys/arm/freescale/vybrid/files.vybrid ============================================================================== --- head/sys/arm/freescale/vybrid/files.vybrid Sun Mar 29 22:00:24 2015 (r280830) +++ head/sys/arm/freescale/vybrid/files.vybrid Sun Mar 29 22:43:39 2015 (r280831) @@ -4,7 +4,6 @@ kern/kern_clocksource.c standard arm/arm/bus_space_generic.c standard arm/arm/bus_space_asm_generic.S standard -arm/arm/cpufunc_asm_armv7.S standard arm/arm/bus_space_base.c standard arm/arm/gic.c standard Modified: head/sys/arm/lpc/files.lpc ============================================================================== --- head/sys/arm/lpc/files.lpc Sun Mar 29 22:00:24 2015 (r280830) +++ head/sys/arm/lpc/files.lpc Sun Mar 29 22:43:39 2015 (r280831) @@ -1,7 +1,6 @@ # $FreeBSD$ arm/arm/bus_space_base.c standard arm/arm/bus_space_generic.c standard -arm/arm/cpufunc_asm_arm9.S standard arm/lpc/lpc_machdep.c standard arm/lpc/lpc_pwr.c standard arm/lpc/lpc_intc.c standard Modified: head/sys/arm/mv/files.mv ============================================================================== --- head/sys/arm/mv/files.mv Sun Mar 29 22:00:24 2015 (r280830) +++ head/sys/arm/mv/files.mv Sun Mar 29 22:43:39 2015 (r280831) @@ -14,12 +14,6 @@ # arm/arm/bus_space_base.c standard arm/arm/bus_space_generic.c standard -arm/arm/cpufunc_asm_arm10.S standard -arm/arm/cpufunc_asm_arm11.S standard -arm/arm/cpufunc_asm_armv5_ec.S standard -arm/arm/cpufunc_asm_armv7.S standard -arm/arm/cpufunc_asm_sheeva.S standard -arm/arm/cpufunc_asm_pj4b.S standard arm/mv/gpio.c standard arm/mv/mv_common.c standard Modified: head/sys/arm/rockchip/files.rk30xx ============================================================================== --- head/sys/arm/rockchip/files.rk30xx Sun Mar 29 22:00:24 2015 (r280830) +++ head/sys/arm/rockchip/files.rk30xx Sun Mar 29 22:43:39 2015 (r280831) @@ -3,7 +3,6 @@ kern/kern_clocksource.c standard arm/arm/bus_space_asm_generic.S standard arm/arm/bus_space_generic.c standard -arm/arm/cpufunc_asm_armv7.S standard arm/arm/gic.c standard arm/arm/mpcore_timer.c standard Modified: head/sys/arm/samsung/exynos/files.exynos5 ============================================================================== --- head/sys/arm/samsung/exynos/files.exynos5 Sun Mar 29 22:00:24 2015 (r280830) +++ head/sys/arm/samsung/exynos/files.exynos5 Sun Mar 29 22:43:39 2015 (r280831) @@ -4,7 +4,6 @@ kern/kern_clocksource.c standard arm/arm/bus_space_generic.c standard arm/arm/bus_space_asm_generic.S standard -arm/arm/cpufunc_asm_armv7.S standard arm/arm/bus_space_base.c standard arm/arm/gic.c standard Modified: head/sys/arm/samsung/s3c2xx0/files.s3c2xx0 ============================================================================== --- head/sys/arm/samsung/s3c2xx0/files.s3c2xx0 Sun Mar 29 22:00:24 2015 (r280830) +++ head/sys/arm/samsung/s3c2xx0/files.s3c2xx0 Sun Mar 29 22:43:39 2015 (r280831) @@ -2,7 +2,6 @@ arm/arm/bus_space_base.c standard arm/arm/bus_space_asm_generic.S standard arm/arm/bus_space_generic.c standard -arm/arm/cpufunc_asm_arm9.S standard arm/samsung/s3c2xx0/board_ln2410sbc.c optional board_ln2410sbc arm/samsung/s3c2xx0/s3c24x0_rtc.c standard arm/samsung/s3c2xx0/s3c24x0_machdep.c standard Modified: head/sys/arm/ti/files.ti ============================================================================== --- head/sys/arm/ti/files.ti Sun Mar 29 22:00:24 2015 (r280830) +++ head/sys/arm/ti/files.ti Sun Mar 29 22:43:39 2015 (r280831) @@ -5,7 +5,6 @@ kern/kern_clocksource.c standard arm/arm/bus_space_base.c standard arm/arm/bus_space_generic.c standard arm/arm/bus_space_asm_generic.S standard -arm/arm/cpufunc_asm_armv7.S standard arm/arm/pmu.c optional hwpmc arm/ti/ti_common.c standard Modified: head/sys/arm/versatile/files.versatile ============================================================================== --- head/sys/arm/versatile/files.versatile Sun Mar 29 22:00:24 2015 (r280830) +++ head/sys/arm/versatile/files.versatile Sun Mar 29 22:43:39 2015 (r280831) @@ -3,9 +3,6 @@ arm/arm/bus_space_base.c standard arm/arm/bus_space_asm_generic.S standard arm/arm/bus_space_generic.c standard -arm/arm/cpufunc_asm_arm11.S standard -arm/arm/cpufunc_asm_arm11x6.S standard -arm/arm/cpufunc_asm_armv6.S standard arm/versatile/pl050.c optional sc arm/versatile/sp804.c standard Modified: head/sys/arm/xilinx/files.zynq7 ============================================================================== --- head/sys/arm/xilinx/files.zynq7 Sun Mar 29 22:00:24 2015 (r280830) +++ head/sys/arm/xilinx/files.zynq7 Sun Mar 29 22:43:39 2015 (r280831) @@ -8,7 +8,6 @@ kern/kern_clocksource.c standard arm/arm/bus_space_base.c standard arm/arm/bus_space_generic.c standard arm/arm/bus_space_asm_generic.S standard -arm/arm/cpufunc_asm_armv7.S standard arm/arm/gic.c standard arm/arm/mpcore_timer.c standard Modified: head/sys/arm/xscale/i80321/files.i80219 ============================================================================== --- head/sys/arm/xscale/i80321/files.i80219 Sun Mar 29 22:00:24 2015 (r280830) +++ head/sys/arm/xscale/i80321/files.i80219 Sun Mar 29 22:43:39 2015 (r280831) @@ -4,7 +4,6 @@ # arm/arm/bus_space_base.c standard arm/arm/bus_space_generic.c standard -arm/arm/cpufunc_asm_xscale.S standard arm/xscale/i80321/i80321.c standard arm/xscale/i80321/i80321_dma.c optional dma arm/xscale/i80321/i80321_mcu.c standard Modified: head/sys/arm/xscale/i80321/files.i80321 ============================================================================== --- head/sys/arm/xscale/i80321/files.i80321 Sun Mar 29 22:00:24 2015 (r280830) +++ head/sys/arm/xscale/i80321/files.i80321 Sun Mar 29 22:43:39 2015 (r280831) @@ -1,7 +1,6 @@ #$FreeBSD$ arm/arm/bus_space_base.c standard arm/arm/bus_space_generic.c standard -arm/arm/cpufunc_asm_xscale.S standard arm/xscale/i80321/i80321.c standard arm/xscale/i80321/i80321_aau.c optional aau arm/xscale/i80321/i80321_dma.c optional dma Modified: head/sys/arm/xscale/i8134x/files.i81342 ============================================================================== --- head/sys/arm/xscale/i8134x/files.i81342 Sun Mar 29 22:00:24 2015 (r280830) +++ head/sys/arm/xscale/i8134x/files.i81342 Sun Mar 29 22:43:39 2015 (r280831) @@ -1,8 +1,6 @@ # $FreeBSD$ arm/arm/bus_space_base.c standard arm/arm/bus_space_generic.c standard -arm/arm/cpufunc_asm_xscale.S standard -arm/arm/cpufunc_asm_xscale_c3.S standard arm/xscale/i80321/i80321_timer.c standard arm/xscale/i80321/i80321_wdog.c optional iopwdog arm/xscale/i8134x/i81342.c standard Modified: head/sys/arm/xscale/ixp425/files.ixp425 ============================================================================== --- head/sys/arm/xscale/ixp425/files.ixp425 Sun Mar 29 22:00:24 2015 (r280830) +++ head/sys/arm/xscale/ixp425/files.ixp425 Sun Mar 29 22:43:39 2015 (r280831) @@ -1,6 +1,5 @@ #$FreeBSD$ arm/arm/bus_space_generic.c standard -arm/arm/cpufunc_asm_xscale.S standard arm/xscale/ixp425/ixp425.c standard arm/xscale/ixp425/ixp425_mem.c standard arm/xscale/ixp425/ixp425_space.c standard Modified: head/sys/arm/xscale/pxa/files.pxa ============================================================================== --- head/sys/arm/xscale/pxa/files.pxa Sun Mar 29 22:00:24 2015 (r280830) +++ head/sys/arm/xscale/pxa/files.pxa Sun Mar 29 22:43:39 2015 (r280831) @@ -1,7 +1,6 @@ # $FreeBSD$ arm/arm/bus_space_generic.c standard -arm/arm/cpufunc_asm_xscale.S standard arm/xscale/pxa/pxa_gpio.c standard arm/xscale/pxa/pxa_icu.c standard Modified: head/sys/conf/files.arm ============================================================================== --- head/sys/conf/files.arm Sun Mar 29 22:00:24 2015 (r280830) +++ head/sys/conf/files.arm Sun Mar 29 22:43:39 2015 (r280831) @@ -9,7 +9,19 @@ arm/arm/busdma_machdep-v6.c optional ar arm/arm/copystr.S standard arm/arm/cpufunc.c standard arm/arm/cpufunc_asm.S standard +arm/arm/cpufunc_asm_arm9.S optional cpu_arm9 +arm/arm/cpufunc_asm_arm10.S optional cpu_arm9e +arm/arm/cpufunc_asm_arm11.S optional cpu_arm1176 +arm/arm/cpufunc_asm_arm11x6.S optional cpu_arm1176 arm/arm/cpufunc_asm_armv4.S standard +arm/arm/cpufunc_asm_armv5_ec.S optional cpu_arm9e +arm/arm/cpufunc_asm_armv6.S optional cpu_arm1176 +arm/arm/cpufunc_asm_armv7.S optional cpu_cortexa | cpu_krait | cpu_mv_pj4b +arm/arm/cpufunc_asm_fa526.S optional cpu_fa526 +arm/arm/cpufunc_asm_pj4b.S optional cpu_mv_pj4b +arm/arm/cpufunc_asm_sheeva.S optional cpu_arm9e +arm/arm/cpufunc_asm_xscale.S optional cpu_xscale_80200 | cpu_xscale_80321 | cpu_xscale_pxa2x0 | cpu_xscale_ixp425 | cpu_xscale_80219 | cpu_xscale_81342 +arm/arm/cpufunc_asm_xscale_c3.S optional cpu_xscale_81342 arm/arm/cpuinfo.c standard arm/arm/cpu_asm-v6.S optional armv6 arm/arm/db_disasm.c optional ddb From owner-svn-src-all@FreeBSD.ORG Sun Mar 29 22:45:28 2015 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 A985C48E for ; Sun, 29 Mar 2015 22:45:28 +0000 (UTC) Received: from mail-wi0-f179.google.com (mail-wi0-f179.google.com [209.85.212.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4002F6E2 for ; Sun, 29 Mar 2015 22:45:27 +0000 (UTC) Received: by wixm2 with SMTP id m2so71927672wix.0 for ; Sun, 29 Mar 2015 15:45:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=W12R3Ix4BxIubX1lI5ZJfsUSvM3tiGL78/DnLGVu7es=; b=STtYJhdGgCXCI286OJltoh8zEVH9jNjhvniwlyarzmu0GCZtAh1+ZD2WtdwHkYMZT3 eYSfru2HmCpw3KoV4G9Iz6wVEeLpBbdgWOX7WIoXgPSrRwQ1dCHCfqnR8IJA/yIrAsBC xlKU5KaTBkr/AqcFMpc3Ht9JmrAakMYIqftNU7fI/4QAs7aQC2ilsP4hwGKCSPE64njw g2tde1fWGN6CLuDdVIV6/7arFtY7mxGCK+lZ9jlfHVKs0JyjcwSq/H+VBQhXjgUPAMKI Lpi1KsrlDAEckRstU2/4UK5u0tC7j+sQMSqoQUmVIdlf3wxf3g1O/8rrfoBzK+hB2Ijz XiTQ== X-Gm-Message-State: ALoCoQlo+c6M+vrkux2dqZVw/j3f9SGfoOCfR3HT0ZBsRuMD0pKwmAD38FBkOPC3OxQxH2fvHzeg X-Received: by 10.194.62.74 with SMTP id w10mr56044244wjr.95.1427669120150; Sun, 29 Mar 2015 15:45:20 -0700 (PDT) Received: from [10.10.1.68] (82-69-141-170.dsl.in-addr.zen.co.uk. [82.69.141.170]) by mx.google.com with ESMTPSA id at4sm13037990wjc.16.2015.03.29.15.45.18 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 29 Mar 2015 15:45:19 -0700 (PDT) Message-ID: <55188087.4050601@multiplay.co.uk> Date: Sun, 29 Mar 2015 23:45:27 +0100 From: Steven Hartland User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:31.0) Gecko/20100101 Thunderbird/31.5.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: r280822 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs References: <201503292028.t2TKSJ9E016958@svn.freebsd.org> <55187240.4050007@freebsd.org> <5518740A.1050806@FreeBSD.org> In-Reply-To: <5518740A.1050806@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: Sun, 29 Mar 2015 22:45:28 -0000 On 29/03/2015 22:52, Alexander Motin wrote: > On 30.03.2015 00:44, Steven Hartland wrote: >> Given the upstream nature of this code it may be better to not do >> cosmetic changes like unless they are first upstreamed as it makes >> comparing with the upstream when bringing update harder. > My changes didn't move the code away from the upstream, may be even made > it a bit closer. In places where upstream code has "64 << 20", I changed > our code from "64<<18" to "16 << 20", which I believe both more correct > and closer to upstream. > Cool thanks for clarifying, sounds like we might need a pass over things to see if we can bring in any other changes which may have slipped though the net. From owner-svn-src-all@FreeBSD.ORG Sun Mar 29 22:45:34 2015 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 746EB5C9; Sun, 29 Mar 2015 22:45: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 5FDE16E4; Sun, 29 Mar 2015 22:45: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 t2TMjYU3082043; Sun, 29 Mar 2015 22:45:34 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2TMjYWj082042; Sun, 29 Mar 2015 22:45:34 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201503292245.t2TMjYWj082042@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 29 Mar 2015 22:45:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280832 - 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: Sun, 29 Mar 2015 22:45:34 -0000 Author: andrew Date: Sun Mar 29 22:45:33 2015 New Revision: 280832 URL: https://svnweb.freebsd.org/changeset/base/280832 Log: pj4b_config and pj4bv7_setup are only used when CPU_MV_PJ4B is defined. Modified: head/sys/arm/include/cpufunc.h Modified: head/sys/arm/include/cpufunc.h ============================================================================== --- head/sys/arm/include/cpufunc.h Sun Mar 29 22:43:39 2015 (r280831) +++ head/sys/arm/include/cpufunc.h Sun Mar 29 22:45:33 2015 (r280832) @@ -378,13 +378,15 @@ void armv7_drain_writebuf (void); void armv7_sev (void); void armv7_sleep (int unused); u_int armv7_auxctrl (u_int, u_int); -void pj4bv7_setup (void); -void pj4b_config (void); void armadaxp_idcache_wbinv_all (void); void cortexa_setup (void); #endif +#if defined(CPU_MV_PJ4B) +void pj4b_config (void); +void pj4bv7_setup (void); +#endif #if defined(CPU_ARM1176) void arm11_tlb_flushID (void); From owner-svn-src-all@FreeBSD.ORG Sun Mar 29 22:46:08 2015 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 2775F70F; Sun, 29 Mar 2015 22:46: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 1331474C; Sun, 29 Mar 2015 22:46: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 t2TMk7CZ082170; Sun, 29 Mar 2015 22:46:07 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2TMk7n4082169; Sun, 29 Mar 2015 22:46:07 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201503292246.t2TMk7n4082169@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 29 Mar 2015 22:46:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280833 - 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: Sun, 29 Mar 2015 22:46:08 -0000 Author: andrew Date: Sun Mar 29 22:46:07 2015 New Revision: 280833 URL: https://svnweb.freebsd.org/changeset/base/280833 Log: arm11_sleep is no longer needed, remove it. Modified: head/sys/arm/arm/cpufunc_asm_arm11.S Modified: head/sys/arm/arm/cpufunc_asm_arm11.S ============================================================================== --- head/sys/arm/arm/cpufunc_asm_arm11.S Sun Mar 29 22:45:33 2015 (r280832) +++ head/sys/arm/arm/cpufunc_asm_arm11.S Sun Mar 29 22:46:07 2015 (r280833) @@ -112,10 +112,3 @@ ENTRY(arm11_drain_writebuf) mcr p15, 0, r0, c7, c10, 4 /* drain write buffer */ mov pc, lr END(arm11_drain_writebuf) - -ENTRY_NP(arm11_sleep) - mov r0, #0 - mcr p15, 0, r0, c7, c0, 4 /* wait for interrupt */ - RET -END(arm11_sleep) - From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 01:54:03 2015 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 6D8447A; Mon, 30 Mar 2015 01:54:03 +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 28B0CAA5; Mon, 30 Mar 2015 01:54:02 +0000 (UTC) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail106.syd.optusnet.com.au (Postfix) with ESMTPS id D1D563C6367; Mon, 30 Mar 2015 12:54:00 +1100 (AEDT) Date: Mon, 30 Mar 2015 12:53:41 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Ian Lepore Subject: Re: svn commit: r280759 - head/sys/netinet In-Reply-To: <1427666182.82583.4.camel@freebsd.org> Message-ID: <20150330110104.J1113@besplex.bde.org> References: <201503271326.t2RDQxd3056112@svn.freebsd.org> <20150328083443.GV64665@FreeBSD.org> <20150328191629.GY64665@FreeBSD.org> <5517B433.5010508@selasky.org> <20150329210757.GA64665@FreeBSD.org> <1427666182.82583.4.camel@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=A5NVYcmG c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=ndaoGXS1AAAA:8 a=gEE0zVnCIVZYxM8EKGAA:9 a=CjuIK1q_8ugA:10 Cc: Hans Petter Selasky , Adrian Chadd , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , Gleb Smirnoff , "svn-src-head@freebsd.org" , Fabien Thomas X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2015 01:54:03 -0000 On Sun, 29 Mar 2015, Ian Lepore wrote: > On Mon, 2015-03-30 at 00:07 +0300, Gleb Smirnoff wrote: >> On Sun, Mar 29, 2015 at 08:16:46AM -0700, Adrian Chadd wrote: >> A> On 29 March 2015 at 01:13, Hans Petter Selasky wrote: >> A> > On 03/28/15 20:16, Gleb Smirnoff wrote: >> A> >> >> A> >> +uint16_t >> A> >> +ip_newid(void) >> A> >> +{ >> A> >> + >> A> >> + counter_u64_add(V_ip_id, 1); >> A> >> + return (htons((*(uint64_t *)zpcpu_get(V_ip_id)) & 0xffff)); >> A> >> +} >> A> > >> A> > Technically you would need to enter a critical section here, so that the >> A> > current process doesn't get swapped to a different CPU between the counter >> A> > add and the zpcpu_get. >> A> >> A> +10000 here. >> A> >> A> You can get preempted and shifted to another CPU at almost any point >> A> in time you're not explicitly asking not to be. It's.. frustrating. >> >> What happens in case of the race is that one CPU will use counter of the >> other CPU, reusing the ID that was just used by the other CPU. And this >> isn't a fatal race, it is just reuse of ID. The probability of such event >> is much lower than probability of a collision due to overflowing uint16_t. It's more confusing (and probably more harmless) than that. When there is a context switch, there are lots of atomic ops and delays which might sync the memory system. Otherwise, the reader on a different CPU might not see stale data instead of the value that the same thread just wrote. Then the read is non-atomic except possibly on 64-bit systems. It may see a mixture of old and new data. But only 16 bits are used, and on non-exotic systems these bits will be in the same memory access unit, so the result may be new or old but not a mixture. Code that runs unsynchronized can never depend on getting an in-order result. This is correct iff the order is unimportant. >> For example, if we emit 1 Mpps, then we overflow the ID counter 15 times >> per second. Every ID is reused 15 times within this small interval of time, >> which of course is larger than TTL. And we find this kinda acceptable. >> >> To illustrate the probability of 1 instruction race, I would suggest to >> look at PCPU_ADD() implementation for all arches except amd64/i386 and >> find out that it is prone to this race. Hitting the race in PCPU_ADD() >> will usually lead to mangling vm_meter statistics. Did we ever observe >> this in practice? No. Ugh, PCPU_ADD() is broken on i386 too. It violates its own stated requirement that the update be atomic with respect to interrupts. i386 can only naturally support up to 32-bit atomic accesses, but broken MI code assumes that all arches support 64-bit accesses. i386 version: X /* X * Adds a value of the per-cpu counter name. The implementation X * must be atomic with respect to interrupts. X */ But this implementation is not atomic with respect to interrupts. X #define __PCPU_ADD(name, val) do { \ X __pcpu_type(name) __val; \ X struct __s { \ X u_char __b[MIN(sizeof(__val), 4)]; \ X } __s; \ X \ X __val = (val); \ X if (sizeof(__val) == 1 || sizeof(__val) == 2 || \ X sizeof(__val) == 4) { \ X __s = *(struct __s *)(void *)&__val; \ X __asm __volatile("add %1,%%fs:%0" \ X : "=m" (*(struct __s *)(__pcpu_offset(name))) \ X : "r" (__s)); \ This part uses asm partly to ensure that a suitable atomic instruction is used. X } else \ X *__PCPU_PTR(name) += __val; \ This part handles 64-bit integers. Since i386 is 32 bits and SSE is unavailable, the compiler has to do a bunch of non-atomic 32-bit accesses, and without a compiler barrier it can do these in ways that are especially bad for atomicity. X } while (0) PCPU_INC() is similarly broken. PCPU_GET() and PCPU_SET() do similar non-atomic accesses, but never claimed that they were atomic with respect to interrupts. PCPU_PTR() is racy as designed. vmmeter uses a *(type_t *)&pcpu->pc_bar hack like the above. This has smaller atomicity problems because type_t is always int (vmmeter only supports u_int). Perhaps the i386 pcpu accesses are not so broken after all, with most MI code only doing 32-bit accesses. As you know, I don't like the implementation of counter64, but it is missing some of the above problems. On amd64, it uses a simple asm with addq; PCPU_ADD() would do the same except for it not having a compiler barrier. On i386, to avoid the above bug it uses a slow method using cmpxchg8b if available, else a slower method using critical sections. Most other arches use the critical section method. Even sparc64. sparc64's PCP_*() is even sloppier. Then the access methods are sloppy, as for vmmeter. kib wrote XXX comments about only some of them. i386 seems to be more careful -- it uses a complicated rendezvous method or critical section where needed. > I was under the impression that PCPU_ADD(), like all pcpu r-m-w > accesses, requires the calling code to have taken steps to ensure the > code doesn't migrate during the sequence. If callers aren't doing so, > that seems like a bug in the calling code, not the PCPU_ADD() code. No, PCPU_ADD() is supposed to be atomic enough, and the caller is only supposed to use it when it doesn't matter on which CPU the counter is incremented on. It is normal operation for the addition to occur on a different CPU than the one that called PCPU_ADD(). Similarly for counter_64. It doesn't matter where pure counters are accumulated, especially since there are almost no ways to see the counts for individual CPUs. Bruce From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 03:47:34 2015 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 D999FE43; Mon, 30 Mar 2015 03:47:33 +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 6A0B1877; Mon, 30 Mar 2015 03:47:32 +0000 (UTC) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail107.syd.optusnet.com.au (Postfix) with ESMTPS id 0A4A8D438EC; Mon, 30 Mar 2015 14:47:30 +1100 (AEDT) Date: Mon, 30 Mar 2015 14:47:29 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Jilles Tjoelker Subject: Re: svn commit: r280308 - head/sys/fs/devfs In-Reply-To: <20150329175137.GD95224@stack.nl> Message-ID: <20150330140932.D1560@besplex.bde.org> References: <20150322162507.GD2379@kib.kiev.ua> <201503221825.t2MIP7jv096531@gw.catspoiler.org> <20150329175137.GD95224@stack.nl> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=A5NVYcmG c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=nYMK6N0ycnvhnCZl4OQA:9 a=CjuIK1q_8ugA:10 Cc: src-committers@freebsd.org, Don Lewis , svn-src-head@freebsd.org, delphij@freebsd.org, brde@optusnet.com.au, kostikbel@gmail.com, 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: Mon, 30 Mar 2015 03:47:34 -0000 On Sun, 29 Mar 2015, Jilles Tjoelker wrote: > On Sun, Mar 22, 2015 at 11:25:07AM -0700, Don Lewis wrote: >> It's not totally worthless. I think the mtime on tty devices is used to >> calculate the idle time that is printed by the w command. We just don't >> need nanosecond accuracy for that. > > Hmm. The idle time on tty devices breaking is a clear POLA violation, > but I'm not sure what's the best way to fix it. By the way, w uses atime > and who -u uses mtime. POSIX specifies that the idle time is the time since _any_ activity occured on the terminal; the method of determining this time is unspecified. So both w and who -u are arguably wrong. They could look at both the mtime and the atime, and possibly even the ctime and the btime, and more (a device i/o time, which is not available). But looking at the atime alone is reasonable. It gives a time related to the user typing on the terminal. This depends on the user's application reading the output and something (hopefully not just w) updating the atime. mtime updates are related to the application writing the terminal, and this can happen without the user being present. > Some options are: > > * Bypass vfs_timestamp() and hard-code second accuracy in devfs; > futimens() will still set timestamps to the nanosecond, even with > UTIME_NOW. A timestamp update after UTIME_NOW setting may set back the > timestamp to an older value. Probably enough, but I worry about the times going backwards. calcru() has complicated code to give monotonic times, but still spams to console and gives broken times when the times would have gone backwards without the correction. > * Make vfs.timestamp_precision filesystem-specific. Since this does not > affect futimens() with explicit timestamps, it will not cause strange > situations with cp -p. I could use this, but it is too complicated. I sometimes run tests which need to change the precision. I want this only on the filesystem running the tests, but get it globally. So I try to change it only transiently, but sometimes forget to change back. > * Restrict file times on devfs to seconds. This is reasonable. It gives the same bug as the seconds resolution setting (that timestamps are more than 1 second in the past despite sychronization that would prevent this if the system conformed to POSIX) because time_second lags clocks that read the hardware. > * Somehow add a special case for TTY devices so they will always keep > timestamps. > > * Somehow add a special case for "performance-critical" devices so they > will not keep timestamps. > > * Change the default for vfs.timestamp_precision to 1, which still > provides non-zero nanoseconds (so much of the same bugs) but is not so > slow. The file server people won't like this though. Monotonic and unique is probably enough. > My proposal for delayed updates as in UFS clearly does not work for TTY > idle times, so there is no point in that. It gives what ufs always did when device files were on it instead of on devfs. The immediated devfs updates don't give correct atimes either. The atime is only set when something reads the tty, but the user's activity may be much earlier than that (when the application doing the reading is delayed, perhaps significantly in actual use by the application being stopped or buffering). But the delays are usually short. Users would complain if input is not acted on by more than the tty driver echo within 20 milliseconds. Even more so if the echo/action is done by the application. Bruce From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 03:55:53 2015 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 0589DC7; Mon, 30 Mar 2015 03:55: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 E42D4947; Mon, 30 Mar 2015 03:55: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 t2U3tqeu026385; Mon, 30 Mar 2015 03:55:52 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2U3tqo2026383; Mon, 30 Mar 2015 03:55:52 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201503300355.t2U3tqo2026383@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 30 Mar 2015 03:55:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280834 - in head/sys/cddl/dev/dtrace: amd64 i386 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, 30 Mar 2015 03:55:53 -0000 Author: markj Date: Mon Mar 30 03:55:51 2015 New Revision: 280834 URL: https://svnweb.freebsd.org/changeset/base/280834 Log: Import a missing piece of commit b8fac8e162eda7e98d from illumos-gate. This adds an upper bound, dtrace_ustackdepth_max, to the number of frames traversed when computing the userland stack depth. Some programs - notably firefox - are otherwise able to trigger an infinite loop in dtrace_getustack_common(), causing a panic. MFC after: 1 week Modified: head/sys/cddl/dev/dtrace/amd64/dtrace_isa.c head/sys/cddl/dev/dtrace/i386/dtrace_isa.c Modified: head/sys/cddl/dev/dtrace/amd64/dtrace_isa.c ============================================================================== --- head/sys/cddl/dev/dtrace/amd64/dtrace_isa.c Sun Mar 29 22:46:07 2015 (r280833) +++ head/sys/cddl/dev/dtrace/amd64/dtrace_isa.c Mon Mar 30 03:55:51 2015 (r280834) @@ -49,6 +49,8 @@ uint16_t dtrace_fuword16_nocheck(void *) uint32_t dtrace_fuword32_nocheck(void *); uint64_t dtrace_fuword64_nocheck(void *); +int dtrace_ustackdepth_max = 2048; + void dtrace_getpcstack(pc_t *pcstack, int pcstack_limit, int aframes, uint32_t *intrpc) @@ -102,14 +104,25 @@ static int dtrace_getustack_common(uint64_t *pcstack, int pcstack_limit, uintptr_t pc, uintptr_t sp) { + uintptr_t oldsp; volatile uint16_t *flags = (volatile uint16_t *)&cpu_core[curcpu].cpuc_dtrace_flags; int ret = 0; ASSERT(pcstack == NULL || pcstack_limit > 0); + ASSERT(dtrace_ustackdepth_max > 0); while (pc != 0) { - ret++; + /* + * We limit the number of times we can go around this + * loop to account for a circular stack. + */ + if (ret++ >= dtrace_ustackdepth_max) { + *flags |= CPU_DTRACE_BADSTACK; + cpu_core[curcpu].cpuc_dtrace_illval = sp; + break; + } + if (pcstack != NULL) { *pcstack++ = (uint64_t)pc; pcstack_limit--; @@ -120,10 +133,18 @@ dtrace_getustack_common(uint64_t *pcstac if (sp == 0) break; + oldsp = sp; + pc = dtrace_fuword64((void *)(sp + offsetof(struct amd64_frame, f_retaddr))); sp = dtrace_fuword64((void *)sp); + if (sp == oldsp) { + *flags |= CPU_DTRACE_BADSTACK; + cpu_core[curcpu].cpuc_dtrace_illval = sp; + break; + } + /* * This is totally bogus: if we faulted, we're going to clear * the fault and break. This is to deal with the apparently Modified: head/sys/cddl/dev/dtrace/i386/dtrace_isa.c ============================================================================== --- head/sys/cddl/dev/dtrace/i386/dtrace_isa.c Sun Mar 29 22:46:07 2015 (r280833) +++ head/sys/cddl/dev/dtrace/i386/dtrace_isa.c Mon Mar 30 03:55:51 2015 (r280834) @@ -55,6 +55,8 @@ uint16_t dtrace_fuword16_nocheck(void *) uint32_t dtrace_fuword32_nocheck(void *); uint64_t dtrace_fuword64_nocheck(void *); +int dtrace_ustackdepth_max = 2048; + void dtrace_getpcstack(pc_t *pcstack, int pcstack_limit, int aframes, uint32_t *intrpc) @@ -113,11 +115,13 @@ dtrace_getustack_common(uint64_t *pcstac uintptr_t oldcontext = lwp->lwp_oldcontext; /* XXX signal stack. */ size_t s1, s2; #endif + uintptr_t oldsp; volatile uint16_t *flags = (volatile uint16_t *)&cpu_core[curcpu].cpuc_dtrace_flags; int ret = 0; ASSERT(pcstack == NULL || pcstack_limit > 0); + ASSERT(dtrace_ustackdepth_max > 0); #ifdef notyet /* XXX signal stack. */ if (p->p_model == DATAMODEL_NATIVE) { @@ -130,7 +134,16 @@ dtrace_getustack_common(uint64_t *pcstac #endif while (pc != 0) { - ret++; + /* + * We limit the number of times we can go around this + * loop to account for a circular stack. + */ + if (ret++ >= dtrace_ustackdepth_max) { + *flags |= CPU_DTRACE_BADSTACK; + cpu_core[curcpu].cpuc_dtrace_illval = sp; + break; + } + if (pcstack != NULL) { *pcstack++ = (uint64_t)pc; pcstack_limit--; @@ -141,6 +154,8 @@ dtrace_getustack_common(uint64_t *pcstac if (sp == 0) break; + oldsp = sp; + #ifdef notyet /* XXX signal stack. */ if (oldcontext == sp + s1 || oldcontext == sp + s2) { if (p->p_model == DATAMODEL_NATIVE) { @@ -179,6 +194,12 @@ dtrace_getustack_common(uint64_t *pcstac sp = dtrace_fuword32((void *)sp); #endif /* ! notyet */ + if (sp == oldsp) { + *flags |= CPU_DTRACE_BADSTACK; + cpu_core[curcpu].cpuc_dtrace_illval = sp; + break; + } + /* * This is totally bogus: if we faulted, we're going to clear * the fault and break. This is to deal with the apparently From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 04:01:51 2015 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 6A7DC25A; Mon, 30 Mar 2015 04:01: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 4ADD3A02; Mon, 30 Mar 2015 04:01: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 t2U41pm2030683; Mon, 30 Mar 2015 04:01:51 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2U41na0030675; Mon, 30 Mar 2015 04:01:49 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201503300401.t2U41na0030675@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 30 Mar 2015 04:01:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280835 - in head/cddl/usr.sbin/dtrace/tests: . tools 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, 30 Mar 2015 04:01:51 -0000 Author: markj Date: Mon Mar 30 04:01:49 2015 New Revision: 280835 URL: https://svnweb.freebsd.org/changeset/base/280835 Log: Replace dtest.pl, the upstream DTrace test suite harness, with a shell script. This reimplementation is much simpler than dtest.pl and is more amenable to being run under Kyua - dtest.pl writes error output to a temporary directory that is deleted when the run finishes, making it hard to debug test failures. This change also removes the test suite's dependency on perl. Added: head/cddl/usr.sbin/dtrace/tests/tools/dtest.sh (contents, props changed) Modified: head/cddl/usr.sbin/dtrace/tests/Makefile head/cddl/usr.sbin/dtrace/tests/Makefile.inc1 head/cddl/usr.sbin/dtrace/tests/tools/gentest.sh Modified: head/cddl/usr.sbin/dtrace/tests/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/Makefile Mon Mar 30 03:55:51 2015 (r280834) +++ head/cddl/usr.sbin/dtrace/tests/Makefile Mon Mar 30 04:01:49 2015 (r280835) @@ -8,10 +8,8 @@ TESTS_SUBDIRS+= common .PATH: ${.CURDIR:H:H:H:H}/tests KYUAFILE= YES -.PATH: ${.CURDIR:H:H:H}/contrib/opensolaris/cmd/dtrace/test/cmd/scripts +.PATH: ${.CURDIR}/tools SCRIPTSDIR= ${TESTSDIR} -SCRIPTS= dtest.pl - -SUBDIR_PARALLEL= +SCRIPTS= dtest.sh .include Modified: head/cddl/usr.sbin/dtrace/tests/Makefile.inc1 ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/Makefile.inc1 Mon Mar 30 03:55:51 2015 (r280834) +++ head/cddl/usr.sbin/dtrace/tests/Makefile.inc1 Mon Mar 30 04:01:49 2015 (r280835) @@ -16,7 +16,6 @@ ${TESTGROUP}EXEDIR= ${TESTSDIR} TESTWRAPPER= t_dtrace_contrib ATF_TESTS_SH+= ${TESTWRAPPER} -TEST_METADATA.t_dtrace_contrib+= required_files="/usr/local/bin/perl" TEST_METADATA.t_dtrace_contrib+= required_files="/usr/local/bin/ksh" TEST_METADATA.t_dtrace_contrib+= required_user="root" Added: head/cddl/usr.sbin/dtrace/tests/tools/dtest.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/usr.sbin/dtrace/tests/tools/dtest.sh Mon Mar 30 04:01:49 2015 (r280835) @@ -0,0 +1,129 @@ +# $FreeBSD$ + +usage() +{ + cat >&2 <<__EOF__ +A harness for test cases in the DTrace test suite. + +usage: $(basename $0) +__EOF__ + exit 1 +} + +gettag() +{ + local tag + + tag=$(basename $1) + tag=${tag#*.} + tag=${tag%%[a-z.]*} + echo $tag +} + +runtest() +{ + local dflags exe exstatus pid retval status + + exstatus=0 + retval=0 + + case $TFILE in + drp.DTRACEDROP_*.d|err.*.d|tst.*.d) + case $TFILE in + drp.DTRACEDROP_*.d) + dflags="-x droptags" + tag=$(gettag "$TFILE") + ;; + err.D_*.d) + exstatus=1 + dflags="-x errtags" + tag=$(gettag "$TFILE") + ;; + err.*.d) + exstatus=1 + ;; + esac + + exe=${TFILE%.*}.exe + if [ -f "$exe" -a -x "$exe" ]; then + ./$exe & + pid=$! + dflags="$dflags ${pid}" + fi + + dtrace -C -s "${TFILE}" $dflags >$STDOUT 2>$STDERR + status=$? + + if [ $status -ne $exstatus ]; then + ERRMSG="dtrace exited with status ${status}, expected ${exstatus}" + retval=1 + elif [ -n "${tag}" ] && ! grep -Fq " [${tag}] " ${STDERR}; then + ERRMSG="dtrace's error output did not contain expected tag ${tag}" + retval=1 + fi + + if [ -n "$pid" ]; then + kill -0 $pid >/dev/null 2>&1 && kill -9 $pid >/dev/null 2>&1 + wait + fi + ;; + err.*.ksh|tst.*.ksh) + expr "$TFILE" : 'err.*' >/dev/null && exstatus=1 + + ksh "$TFILE" /usr/sbin/dtrace >$STDOUT 2>$STDERR + status=$? + + if [ $status -ne $exstatus ]; then + ERRMSG="script exited with status ${status}, expected ${exstatus}" + retval=1 + fi + ;; + *) + ERRMSG="unexpected test file name $TFILE" + retval=1 + ;; + esac + + return $retval +} + +[ $# -eq 1 ] || usage + +readonly STDERR=$(mktemp) +readonly STDOUT=$(mktemp) +readonly TFILE=$(basename $1) +readonly EXOUT=${TFILE}.out + +kldstat -q -m dtrace_test || kldload dtrace_test +cd $(dirname $1) +runtest +RESULT=$? + +if [ $RESULT -eq 0 -a -f $EXOUT -a -r $EXOUT ] && \ + ! cmp $STDOUT $EXOUT >/dev/null 2>&1; then + ERRMSG="test output mismatch" + RESULT=1 +fi + +if [ $RESULT -ne 0 ]; then + echo "test $TFILE failed: $ERRMSG" >&2 + if [ $(stat -f '%z' $STDOUT) -gt 0 ]; then + cat >&2 <<__EOF__ +test stdout: +-- +$(cat $STDOUT) +-- +__EOF__ + fi + if [ $(stat -f '%z' $STDERR) -gt 0 ]; then + cat >&2 <<__EOF__ +test stderr: +-- +$(cat $STDERR) +-- +__EOF__ + fi +fi + +rm -f $STDERR $STDOUT +exit $RESULT Modified: head/cddl/usr.sbin/dtrace/tests/tools/gentest.sh ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/tools/gentest.sh Mon Mar 30 03:55:51 2015 (r280834) +++ head/cddl/usr.sbin/dtrace/tests/tools/gentest.sh Mon Mar 30 04:01:49 2015 (r280835) @@ -33,8 +33,8 @@ ${tcase}_head() ${tcase}_body() { $mod - atf_check -s exit:0 -o ignore -e ignore \\ - "\$(atf_get_srcdir)/../../dtest" -n "\$(atf_get_srcdir)/${tfile}" + atf_check -s exit:0 -o empty -e empty \\ + "\$(atf_get_srcdir)/../../dtest" "\$(atf_get_srcdir)/${tfile}" } __EOF__ } From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 04:03:02 2015 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 D36733A9; Mon, 30 Mar 2015 04:03: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 A39B1A11; Mon, 30 Mar 2015 04:03: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 t2U432cC030895; Mon, 30 Mar 2015 04:03:02 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2U432WG030890; Mon, 30 Mar 2015 04:03:02 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201503300403.t2U432WG030890@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 30 Mar 2015 04:03:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280836 - head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs 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, 30 Mar 2015 04:03:02 -0000 Author: markj Date: Mon Mar 30 04:03:01 2015 New Revision: 280836 URL: https://svnweb.freebsd.org/changeset/base/280836 Log: Fix ping(8) usage in funcs/tst.system.d so that the test actually completes. MFC after: 1 week Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.system.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.system.d.out Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.system.d ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.system.d Mon Mar 30 04:01:49 2015 (r280835) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.system.d Mon Mar 30 04:03:01 2015 (r280836) @@ -35,11 +35,11 @@ BEGIN this->b = -2; system("echo %s %d %d", "foo", this->a, this->b); - system("ping localhost"); + system("ping -q -c 1 localhost 2>/dev/null | grep -v '^round-trip '"); system("echo %d", ++this->a); - system("ping localhost"); + system("ping -q -c 1 localhost 2>/dev/null | grep -v '^round-trip '"); system("echo %d", ++this->a); - system("ping localhost"); + system("ping -q -c 1 localhost 2>/dev/null | grep -v '^round-trip '"); system("echo %d", ++this->a); exit(0); } Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.system.d.out ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.system.d.out Mon Mar 30 04:01:49 2015 (r280835) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.system.d.out Mon Mar 30 04:03:01 2015 (r280836) @@ -1,8 +1,17 @@ foo 9 -2 -localhost is alive +PING localhost (127.0.0.1): 56 data bytes + +--- localhost ping statistics --- +1 packets transmitted, 1 packets received, 0.0% packet loss 10 -localhost is alive +PING localhost (127.0.0.1): 56 data bytes + +--- localhost ping statistics --- +1 packets transmitted, 1 packets received, 0.0% packet loss 11 -localhost is alive +PING localhost (127.0.0.1): 56 data bytes + +--- localhost ping statistics --- +1 packets transmitted, 1 packets received, 0.0% packet loss 12 From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 04:06:38 2015 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 B7A1D51E; Mon, 30 Mar 2015 04:06: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 97F87A31; Mon, 30 Mar 2015 04:06: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 t2U46c86031368; Mon, 30 Mar 2015 04:06:38 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2U46bgF031361; Mon, 30 Mar 2015 04:06:37 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201503300406.t2U46bgF031361@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 30 Mar 2015 04:06:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280837 - head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip 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, 30 Mar 2015 04:06:38 -0000 Author: markj Date: Mon Mar 30 04:06:36 2015 New Revision: 280837 URL: https://svnweb.freebsd.org/changeset/base/280837 Log: Fix ping(8) and ping6(8) usage in a couple of ip provider tests, and update expected test output to reflect differences in default TTL and payload length. MFC after: 1 week Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localicmp.ksh head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localicmp.ksh.out head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv6localicmp.ksh head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv6localicmp.ksh.out Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localicmp.ksh ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localicmp.ksh Mon Mar 30 04:03:01 2015 (r280836) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localicmp.ksh Mon Mar 30 04:06:36 2015 (r280837) @@ -45,12 +45,13 @@ fi dtrace=$1 local=127.0.0.1 -$dtrace -c "/sbin/ping $local 3" -qs /dev/stdin <ip_saddr == "$local" && args[2]->ip_daddr == "$local" && args[4]->ipv4_protocol == IPPROTO_ICMP/ { - printf("1 ip:::send ("); + printf("2 ip:::send ("); printf("args[2]: %d %d, ", args[2]->ip_ver, args[2]->ip_plength); printf("args[4]: %d %d %d %d %d)\n", args[4]->ipv4_ver, args[4]->ipv4_length, args[4]->ipv4_flags, @@ -61,7 +62,7 @@ ip:::receive /args[2]->ip_saddr == "$local" && args[2]->ip_daddr == "$local" && args[4]->ipv4_protocol == IPPROTO_ICMP/ { - printf("2 ip:::receive ("); + printf("3 ip:::receive ("); printf("args[2]: %d %d, ", args[2]->ip_ver, args[2]->ip_plength); printf("args[4]: %d %d %d %d %d)\n", args[4]->ipv4_ver, args[4]->ipv4_length, args[4]->ipv4_flags, Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localicmp.ksh.out ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localicmp.ksh.out Mon Mar 30 04:03:01 2015 (r280836) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localicmp.ksh.out Mon Mar 30 04:06:36 2015 (r280837) @@ -1,6 +1,8 @@ -1 ip:::send (args[2]: 4 64, args[4]: 4 84 0 0 255) -1 ip:::send (args[2]: 4 64, args[4]: 4 84 0 0 255) -2 ip:::receive (args[2]: 4 64, args[4]: 4 84 0 0 255) -2 ip:::receive (args[2]: 4 64, args[4]: 4 84 0 0 255) -127.0.0.1 is alive + +PING 127.0.0.1 (127.0.0.1): 56 data bytes +1 packets transmitted, 1 packets received, 0.0% packet loss +2 ip:::send (args[2]: 4 64, args[4]: 4 84 0 0 64) +2 ip:::send (args[2]: 4 64, args[4]: 4 84 0 0 64) +3 ip:::receive (args[2]: 4 64, args[4]: 4 84 0 0 64) +3 ip:::receive (args[2]: 4 64, args[4]: 4 84 0 0 64) Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv6localicmp.ksh ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv6localicmp.ksh Mon Mar 30 04:03:01 2015 (r280836) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv6localicmp.ksh Mon Mar 30 04:06:36 2015 (r280837) @@ -55,12 +55,13 @@ else removeinet6=0 fi -$dtrace -c "/sbin/ping -A inet6 $local 3" -qs /dev/stdin <ip_saddr == "$local" && args[2]->ip_daddr == "$local" && args[5]->ipv6_nexthdr == IPPROTO_ICMPV6/ { - printf("1 ip:::send ("); + printf("2 ip:::send ("); printf("args[2]: %d %d, ", args[2]->ip_ver, args[2]->ip_plength); printf("args[5]: %d %d %d)\n", args[5]->ipv6_ver, args[5]->ipv6_tclass, args[5]->ipv6_plen); @@ -70,7 +71,7 @@ ip:::receive /args[2]->ip_saddr == "$local" && args[2]->ip_daddr == "$local" && args[5]->ipv6_nexthdr == IPPROTO_ICMPV6/ { - printf("2 ip:::receive ("); + printf("3 ip:::receive ("); printf("args[2]: %d %d, ", args[2]->ip_ver, args[2]->ip_plength); printf("args[5]: %d %d %d)\n", args[5]->ipv6_ver, args[5]->ipv6_tclass, args[5]->ipv6_plen); Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv6localicmp.ksh.out ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv6localicmp.ksh.out Mon Mar 30 04:03:01 2015 (r280836) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv6localicmp.ksh.out Mon Mar 30 04:06:36 2015 (r280837) @@ -1,6 +1,8 @@ -::1 is alive -1 ip:::send (args[2]: 6 64, args[5]: 6 0 64) -1 ip:::send (args[2]: 6 64, args[5]: 6 0 64) -2 ip:::receive (args[2]: 6 64, args[5]: 6 0 64) -2 ip:::receive (args[2]: 6 64, args[5]: 6 0 64) + +PING6(56=40+8+8 bytes) ::1 --> ::1 +1 packets transmitted, 1 packets received, 0.0% packet loss +2 ip:::send (args[2]: 6 16, args[5]: 6 0 16) +2 ip:::send (args[2]: 6 16, args[5]: 6 0 16) +3 ip:::receive (args[2]: 6 16, args[5]: 6 0 16) +3 ip:::receive (args[2]: 6 16, args[5]: 6 0 16) From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 04:14:13 2015 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 EAAD981B; Mon, 30 Mar 2015 04:14:13 +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 AA288B55; Mon, 30 Mar 2015 04:14:13 +0000 (UTC) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail110.syd.optusnet.com.au (Postfix) with ESMTPS id 9ECBA782F0B; Mon, 30 Mar 2015 15:14:11 +1100 (AEDT) Date: Mon, 30 Mar 2015 15:14:10 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Konstantin Belousov Subject: Re: svn commit: r280308 - head/sys/fs/devfs In-Reply-To: <20150329184238.GB2379@kib.kiev.ua> Message-ID: <20150330145148.C1660@besplex.bde.org> References: <20150322162507.GD2379@kib.kiev.ua> <201503221825.t2MIP7jv096531@gw.catspoiler.org> <20150329175137.GD95224@stack.nl> <20150329184238.GB2379@kib.kiev.ua> 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=A5NVYcmG c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=Ie7hrarWT0n9zBAm1v4A:9 a=CjuIK1q_8ugA:10 Cc: src-committers@freebsd.org, Jilles Tjoelker , svn-src-all@freebsd.org, delphij@freebsd.org, brde@optusnet.com.au, svn-src-head@freebsd.org, Don Lewis X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2015 04:14:14 -0000 On Sun, 29 Mar 2015, Konstantin Belousov wrote: > Interesting complication with the devfs timestamp update is that > devfs_read_f() and devfs_write_f() do not lock the vnode. So whatever > update method is used, stat(2) on devfs might return inconsistent value, > since tv_src/tv_nsec cannot be updated or read by single op, without > locking. Urk. > That said, we could either: > - ignore the race. Then the patch below might be good enough. > - Trim the precision of futimens() for devfs to always set tv_nsec to 0. > Then, the race can be handled satisfactory with atomics. > - Add a lock (IMO this does not make sense). Locks aren't that expensive, and are easier to use than atomics. > diff --git a/sys/fs/devfs/devfs_vnops.c b/sys/fs/devfs/devfs_vnops.c > index 941f92c..e199d52 100644 > --- a/sys/fs/devfs/devfs_vnops.c > +++ b/sys/fs/devfs/devfs_vnops.c > @@ -83,8 +83,24 @@ MTX_SYSINIT(cdevpriv_mtx, &cdevpriv_mtx, "cdevpriv lock", MTX_DEF); > SYSCTL_DECL(_vfs_devfs); > > static int devfs_dotimes; > -SYSCTL_INT(_vfs_devfs, OID_AUTO, dotimes, CTLFLAG_RW, > - &devfs_dotimes, 0, "Update timestamps on DEVFS"); > +SYSCTL_INT(_vfs_devfs, OID_AUTO, dotimes, CTLFLAG_RW, &devfs_dotimes, 0, > + "Update timestamps on DEVFS with default precision"); This fixes 1 style bug (the tab) but adds another. The normal formatting is to split the declaration after CTLFLAG*. Then preferably use a less verbose discription so as to not need to split the line. The old description was a bit cryptic (but better than the sysctl name). > + > +static void > +devfs_timestamp(struct timespec *tsp) > +{ > + time_t ts; > + > + if (devfs_dotimes) { > + vfs_timestamp(tsp); > + } else { > + ts = time_second; > + if (tsp->tv_sec < ts) { > + tsp->tv_sec = ts; > + tsp->tv_nsec = 0; > + } File timestamps use CLOCK_REALTIME, so they are supposed to go backwards sometimes. More importantly, if the time is set to a future time (by utimes(), etc., not due to a clock step), this prevents it being correted. I think you only want to do a null update if tv_nsec is nonzero due to a previous setting with vfs_timestamp(), and the new second hasn't arrived yet. Something like: if (tsp->tv_sec != ts) ... If '<', then as above. If '>', it means a correction by >= 1 second (strictly greater if tv_nsec != 0). The initial value tv_nsec is irrelevant in both cases. > + } > +} Bruce From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 05:03:55 2015 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 AE66EDCD; Mon, 30 Mar 2015 05:03:55 +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 42B67F3B; Mon, 30 Mar 2015 05:03:54 +0000 (UTC) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail108.syd.optusnet.com.au (Postfix) with ESMTPS id 419E61A2581; Mon, 30 Mar 2015 16:03:39 +1100 (AEDT) Date: Mon, 30 Mar 2015 16:03:38 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Bruce Evans Subject: Re: svn commit: r280308 - head/sys/fs/devfs In-Reply-To: <20150330145148.C1660@besplex.bde.org> Message-ID: <20150330154136.O1803@besplex.bde.org> References: <20150322162507.GD2379@kib.kiev.ua> <201503221825.t2MIP7jv096531@gw.catspoiler.org> <20150329175137.GD95224@stack.nl> <20150329184238.GB2379@kib.kiev.ua> <20150330145148.C1660@besplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=ZuzUdbLG c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=zzdhk42y61ABjVYjYAsA:9 a=CjuIK1q_8ugA:10 Cc: src-committers@freebsd.org, Jilles Tjoelker , Don Lewis , svn-src-head@freebsd.org, delphij@freebsd.org, Konstantin Belousov , 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: Mon, 30 Mar 2015 05:03:55 -0000 On Mon, 30 Mar 2015, Bruce Evans wrote: > On Sun, 29 Mar 2015, Konstantin Belousov wrote: > >> Interesting complication with the devfs timestamp update is that >> devfs_read_f() and devfs_write_f() do not lock the vnode. So whatever >> update method is used, stat(2) on devfs might return inconsistent value, >> since tv_src/tv_nsec cannot be updated or read by single op, without >> locking. > > Urk. > ... >> +static void >> +devfs_timestamp(struct timespec *tsp) >> +{ >> + time_t ts; >> + >> + if (devfs_dotimes) { >> + vfs_timestamp(tsp); >> + } else { >> + ts = time_second; >> + if (tsp->tv_sec < ts) { >> + tsp->tv_sec = ts; >> + tsp->tv_nsec = 0; >> + } > ... > I think you only want to do a null update if tv_nsec is nonzero due to a > previous setting with vfs_timestamp(), and the new second hasn't arrived > yet. Something like: > ... Further problems: - all changes to vfs.timestamp_precision to a lower precision can give non-monotonic timestamps. I wouldn't bother fixing this only here. - time_t is bogusly 64 bits on some 32-bit arches (32-bit arm and 32-bit mips). Thus direct accesses to time_second are racy and should not be used in MI code. This bug is harmless for the same reason that 64-bit time_t is bogus -- 32-bit unsigned time_t works until 2106. The first race will occur slightly before then. Except for testing timestamps far in the future. With 32-bit time_t, you just can't do such tests, but with 64-bit time_t you can do them to find races like this one. Bruce From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 06:25:42 2015 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 6C2652B6; Mon, 30 Mar 2015 06:25:42 +0000 (UTC) Received: from gw.catspoiler.org (cl-1657.chi-02.us.sixxs.net [IPv6:2001:4978:f:678::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 D10CBA02; Mon, 30 Mar 2015 06:25:41 +0000 (UTC) Received: from FreeBSD.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.13.3/8.13.3) with ESMTP id t2U6PE3c093114; Sun, 29 Mar 2015 22:25:18 -0800 (PST) (envelope-from truckman@FreeBSD.org) Message-Id: <201503300625.t2U6PE3c093114@gw.catspoiler.org> Date: Sun, 29 Mar 2015 23:25:14 -0700 (PDT) From: Don Lewis Subject: Re: svn commit: r280327 - in head/sys: kern vm To: alc@rice.edu In-Reply-To: <5516EB31.7000309@rice.edu> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii Cc: src-committers@FreeBSD.org, alc@FreeBSD.org, svn-src-all@FreeBSD.org, bdrewery@FreeBSD.org, portmgr@FreeBSD.org, svn-src-head@FreeBSD.org, clusteradm@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, 30 Mar 2015 06:25:42 -0000 On 28 Mar, Alan Cox wrote: > On 03/28/2015 12:29, Bryan Drewery wrote: >> On 3/27/2015 9:41 PM, Don Lewis wrote: >>> On 21 Mar, Alan Cox wrote: >>>> Author: alc >>>> Date: Sat Mar 21 17:56:55 2015 >>>> New Revision: 280327 >>>> URL: https://svnweb.freebsd.org/changeset/base/280327 >>>> >>>> Log: >>>> Introduce vm_object_color() and use it in mmap(2) to set the color of >>>> named objects to zero before the virtual address is selected. Previously, >>>> the color setting was delayed until after the virtual address was >>>> selected. In rtld, this delay effectively prevented the mapping of a >>>> shared library's code section using superpages. Now, for example, we see >>>> the first 1 MB of libc's code on armv6 mapped by a superpage after we've >>>> gotten through the initial cold misses that bring the first 1 MB of code >>>> into memory. (With the page clustering that we perform on read faults, >>>> this happens quickly.) >>>> >>>> Differential Revision: https://reviews.freebsd.org/D2013 >>>> Reviewed by: jhb, kib >>>> Tested by: Svatopluk Kraus (armv6) >>>> MFC after: 6 weeks >>>> >>>> Modified: >>>> head/sys/kern/kern_exec.c >>>> head/sys/vm/vm_fault.c >>>> head/sys/vm/vm_mmap.c >>>> head/sys/vm/vm_object.h >>>> head/sys/vm/vnode_pager.c >>> This change appears to have partially broken package building. >>> >>> I recently set up a package building machine running 11.0-CURRENT >>> r280642 and found that it was unable to build openjdk7 packages inside >>> FreeBSD 8.4 and 9.3 poudriere jails, for both i386 and amd64. >>> >>> [snip] >>> Compiling ../generated/adfiles/ad_x86_64_gen.cpp >>> rm -f ad_x86_64_gen.o >>> c++ -D_ALLBSD_SOURCE -D_GNU_SOURCE -DAMD64 -DPRODUCT -I. -I/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/share/vm/prims -I/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/share/vm -I/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/share/vm/precompiled -I/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/cpu/x86/vm -I/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/os_cpu/bsd_x86/vm -I/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/os/bsd/vm -I/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/os/posix/vm -I../generated -DHOTSPOT_RELEASE_VERSION="\"24.76-b04\"" -DHOTSPOT_BUILD_TARGET="\"product\"" -DHOTSPOT_BUILD_USER="\"root\"" -DHOTSPOT_LIB_ARCH=\"amd64\" -DHOTSPOT_VM_DISTRO="\"OpenJDK\"" -O2 -pipe -fstack-protector -fno-strict-aliasing -DTARGET_OS_FAMILY_bsd -DTARGET_ARCH_x86 -DTARGET_ARCH_MODEL_x86_64 -DTARGET_OS_ARCH_bsd_x86 -DTARGET_OS_ARCH_MODEL_bsd_x86_64 -DTARGET_COMPILER_gcc -DCOMPILER2 -DCOMPILER1 ! -fno! >>> -rtti -fno-exceptions -pthread -fcheck-new -m64 -pipe -DTARGET_OS_FAMILY_bsd -DTARGET_ARCH_x86 -DTARGET_ARCH_MODEL_x86_64 -DTARGET_OS_ARCH_bsd_x86 -DTARGET_OS_ARCH_MODEL_bsd_x86_64 -DTARGET_COMPILER_gcc -DCOMPILER2 -DCOMPILER1 -fPIC -fno-rtti -fno-exceptions -pthread -fcheck-new -m64 -pipe -O3 -fno-strict-aliasing -DVM_LITTLE_ENDIAN -D_LP64=1 -fno-omit-frame-pointer -DINCLUDE_TRACE=1 -Wpointer-arith -Wconversion -Wsign-compare -c -fpch-deps -MMD -MP -MF ../generated/dependencies/ad_x86_64_format.o.d -o ad_x86_64_format.o ../generated/adfiles/ad_x86_64_format.cpp >>> c++ -D_ALLBSD_SOURCE -D_GNU_SOURCE -DAMD64 -DPRODUCT -I. -I/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/share/vm/prims -I/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/share/vm -I/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/share/vm/precompiled -I/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/cpu/x86/vm -I/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/os_cpu/bsd_x86/vm -I/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/os/bsd/vm -I/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/os/posix/vm -I../generated -DHOTSPOT_RELEASE_VERSION="\"24.76-b04\"" -DHOTSPOT_BUILD_TARGET="\"product\"" -DHOTSPOT_BUILD_USER="\"root\"" -DHOTSPOT_LIB_ARCH=\"amd64\" -DHOTSPOT_VM_DISTRO="\"OpenJDK\"" -O2 -pipe -fstack-protector -fno-strict-aliasing -DTARGET_OS_FAMILY_bsd -DTARGET_ARCH_x86 -DTARGET_ARCH_MODEL_x86_64 -DTARGET_OS_ARCH_bsd_x86 -DTARGET_OS_ARCH_MODEL_bsd_x86_64 -DTARGET_COMPILER_gcc -DCOMPILER2 -DCOMPILER1 ! -fno! >>> -rtti -fno-exceptions -pthread -fcheck-new -m64 -pipe -DTARGET_OS_FAMILY_bsd -DTARGET_ARCH_x86 -DTARGET_ARCH_MODEL_x86_64 -DTARGET_OS_ARCH_bsd_x86 -DTARGET_OS_ARCH_MODEL_bsd_x86_64 -DTARGET_COMPILER_gcc -DCOMPILER2 -DCOMPILER1 -fPIC -fno-rtti -fno-exceptions -pthread -fcheck-new -m64 -pipe -O3 -fno-strict-aliasing -DVM_LITTLE_ENDIAN -D_LP64=1 -fno-omit-frame-pointer -DINCLUDE_TRACE=1 -Wpointer-arith -Wconversion -Wsign-compare -c -fpch-deps -MMD -MP -MF ../generated/dependencies/ad_x86_64_gen.o.d -o ad_x86_64_gen.o ../generated/adfiles/ad_x86_64_gen.cpp >>> Compiling ../generated/adfiles/ad_x86_64_misc.cpp >>> rm -f ad_x86_64_misc.o >>> c++ -D_ALLBSD_SOURCE -D_GNU_SOURCE -DAMD64 -DPRODUCT -I. -I/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/share/vm/prims -I/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/share/vm -I/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/share/vm/precompiled -I/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/cpu/x86/vm -I/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/os_cpu/bsd_x86/vm -I/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/os/bsd/vm -I/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/os/posix/vm -I../generated -DHOTSPOT_RELEASE_VERSION="\"24.76-b04\"" -DHOTSPOT_BUILD_TARGET="\"product\"" -DHOTSPOT_BUILD_USER="\"root\"" -DHOTSPOT_LIB_ARCH=\"amd64\" -DHOTSPOT_VM_DISTRO="\"OpenJDK\"" -O2 -pipe -fstack-protector -fno-strict-aliasing -DTARGET_OS_FAMILY_bsd -DTARGET_ARCH_x86 -DTARGET_ARCH_MODEL_x86_64 -DTARGET_OS_ARCH_bsd_x86 -DTARGET_OS_ARCH_MODEL_bsd_x86_64 -DTARGET_COMPILER_gcc -DCOMPILER2 -DCOMPILER1 ! -fno! >>> -rtti -fno-exceptions -pthread -fcheck-new -m64 -pipe -DTARGET_OS_FAMILY_bsd -DTARGET_ARCH_x86 -DTARGET_ARCH_MODEL_x86_64 -DTARGET_OS_ARCH_bsd_x86 -DTARGET_OS_ARCH_MODEL_bsd_x86_64 -DTARGET_COMPILER_gcc -DCOMPILER2 -DCOMPILER1 -fPIC -fno-rtti -fno-exceptions -pthread -fcheck-new -m64 -pipe -O3 -fno-strict-aliasing -DVM_LITTLE_ENDIAN -D_LP64=1 -fno-omit-frame-pointer -DINCLUDE_TRACE=1 -Wpointer-arith -Wconversion -Wsign-compare -c -fpch-deps -MMD -MP -MF ../generated/dependencies/ad_x86_64_misc.o.d -o ad_x86_64_misc.o ../generated/adfiles/ad_x86_64_misc.cpp >>> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/share/vm/compiler/abstractCompiler.cpp:1: fatal error: had to relocate PCH >>> compilation terminated. >>> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/share/vm/utilities/accessFlags.cpp:1: fatal error: had to relocate PCH >>> compilation terminated. >>> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makefiles/rules.make:149: recipe for target 'abstractCompiler.o' failed >>> gmake[6]: *** [abstractCompiler.o] Error 1 >>> gmake[6]: *** Waiting for unfinished jobs.... >>> ../generated/adfiles/ad_x86_64.cpp:1: fatal error: had to relocate PCH >>> compilation terminated. >> Are you using ccache? >> >>> ../generated/adfiles/ad_x86_64_clone.cpp:1: fatal error: had to relocate PCH >>> compilation terminated. >>> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makefiles/rules.make:149: recipe for target 'accessFlags.o' failed >>> gmake[6]: *** [accessFlags.o] Error 1 >>> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makefiles/rules.make:149: recipe for target 'ad_x86_64_clone.o' failed >>> gmake[6]: *** [ad_x86_64_clone.o] Error 1 >>> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makefiles/rules.make:149: recipe for target 'ad_x86_64.o' failed >>> gmake[6]: *** [ad_x86_64.o] Error 1 >>> ../generated/adfiles/ad_x86_64_expand.cpp:1: fatal error: had to relocate PCH >>> compilation terminated. >>> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makefiles/rules.make:149: recipe for target 'ad_x86_64_expand.o' failed >>> gmake[6]: *** [ad_x86_64_expand.o] Error 1 >>> ../generated/adfiles/ad_x86_64_gen.cpp:1: fatal error: had to relocate PCH >>> compilation terminated. >>> ../generated/adfiles/ad_x86_64_misc.cpp:1: fatal error: had to relocate PCH >>> compilation terminated. >>> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makefiles/rules.make:149: recipe for target 'ad_x86_64_gen.o' failed >>> gmake[6]: *** [ad_x86_64_gen.o] Error 1 >>> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makefiles/rules.make:149: recipe for target 'ad_x86_64_misc.o' failed >>> gmake[6]: *** [ad_x86_64_misc.o] Error 1 >>> ../generated/adfiles/ad_x86_64_format.cpp:1: fatal error: had to relocate PCH >>> compilation terminated. >>> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makefiles/rules.make:149: recipe for target 'ad_x86_64_format.o' failed >>> gmake[6]: *** [ad_x86_64_format.o] Error 1 >>> gmake[6]: Leaving directory '/wrkdirs/usr/ports/java/openjdk7/work/openjdk/build/bsd-amd64/hotspot/outputdir/bsd_amd64_compiler2/product' >>> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makefiles/top.make:128: recipe for target 'the_vm' failed >>> gmake[5]: *** [the_vm] Error 2 >>> gmake[5]: Leaving directory '/wrkdirs/usr/ports/java/openjdk7/work/openjdk/build/bsd-amd64/hotspot/outputdir/bsd_amd64_compiler2/product' >>> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/Makefile:292: recipe for target 'product' failed >>> gmake[4]: *** [product] Error 2 >>> gmake[4]: Leaving directory '/wrkdirs/usr/ports/java/openjdk7/work/openjdk/build/bsd-amd64/hotspot/outputdir' >>> Makefile:191: recipe for target 'generic_build2' failed >>> gmake[3]: *** [generic_build2] Error 2 >>> gmake[3]: Leaving directory '/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make' >>> Makefile:151: recipe for target 'product' failed >>> gmake[2]: *** [product] Error 2 >>> gmake[2]: Leaving directory '/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make' >>> make/hotspot-rules.gmk:111: recipe for target 'hotspot-build' failed >>> gmake[1]: *** [hotspot-build] Error 2 >>> gmake[1]: Leaving directory '/wrkdirs/usr/ports/java/openjdk7/work/openjdk' >>> Makefile:251: recipe for target 'build_product_image' failed >>> gmake: *** [build_product_image] Error 2 >>> ===> Compilation failed unexpectedly. >>> >>> I was not seeing this problem on my older package builder running >>> 10.1-STABLE. Since this problem has not shown up on the FreeBSD package >>> building cluster, I got suspicious that the change was quite recent. >>> >>> This old gcc bug report: >>> led me to suspect >>> mmap(). >>> >>> The old gcc source file /usr/src/contrib/gcc/ggc-common.c does a couple >>> of mmap() calls. Tne first is in mmap_gt_pch_get_address() where a >>> NULL first argument is used. The address that gets returned is stashed >>> away and the region is unmapped. Then a later call in >>> mmap_gt_pch_use_address() passes this saved address to mmap() as a >>> hint. It expects the mapped region to get mapped to the same base >>> address. If this does not happen, the above error is the result. >> I don't know what I'm talking about but that doesn't sound like a very >> safe assumption for the gcc code to make. > > > Your intuition is correct. It is not. And, in fact, under Solaris and > Linux, gcc does not make this assumption. > > I suspect that the solution used by gcc under Solaris would work for > us. However, that would entail modifying gcc in older branches. After digging in to this today, I'm not sure that the Solaris solution would work. On amd64, with an amd64 jail, and kernel rev r280326, I observe the following: One gcc process calls mmap() with addr=0 and len=0x657a000, and the value 0x811400000 is returned. Subsequent gcc processes call mmap() with addr=0x811400000 and len=0x657a000, getting 0x811400000 in return. With kernel rev r280327 I see: One gcc process calls mmap() with addr=0 and len=0x657a000, and the value 0x811400000 is returned. Subsequent gcc processes call mmap() with addr=0x811400000 and len=0x657a000, getting 0x8115f4000 in return. What I later noticed is that the subsequent calls are passing offset=0x1f4000. Not so coincidentally, 0x811400000 + 0x1f4000 = 0x8115F4000. My first attempt at a fix subtracted offset from address, but the mmap() return value changed to 0x8113f4000 instead of the 0x811400000 I was expecting. It looked to me like the code must be doing superpage alignment on the start of the file and then adding the offset to get the start of the mapped region. This somewhat hacking patch disables this alignment if a non-zero address is passed as a hint, and allows the code to make the start of the mapped region match the hint. With this patch, I've been able to build openjdk7 in a FreeBSD 9.3 amd64 jail. Index: vm_mmap.c =================================================================== --- vm_mmap.c (revision 280327) +++ vm_mmap.c (working copy) @@ -325,6 +325,8 @@ * There should really be a pmap call to determine a reasonable * location. */ + if (addr != 0 && (flags & MAP_ANON) == 0) + flags |= MAP_RESERVED0100; PROC_LOCK(td->td_proc); if (addr == 0 || (addr >= round_page((vm_offset_t)vms->vm_taddr) && @@ -1665,6 +1667,8 @@ else if ((flags & MAP_ALIGNMENT_MASK) != 0) findspace = VMFS_ALIGNED_SPACE(flags >> MAP_ALIGNMENT_SHIFT); + else if ((flags & MAP_RESERVED0100) != 0) + findspace = VMFS_ANY_SPACE; else findspace = VMFS_OPTIMAL_SPACE; rv = vm_map_find(map, object, foff, addr, size, From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 07:06:30 2015 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 802CAA95 for ; Mon, 30 Mar 2015 07:06:30 +0000 (UTC) Received: from mail-ie0-x246.google.com (mail-ie0-x246.google.com [IPv6:2607:f8b0:4001:c03::246]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 45CC7E2E for ; Mon, 30 Mar 2015 07:06:30 +0000 (UTC) Received: by iedm5 with SMTP id m5so238727355ied.1 for ; Mon, 30 Mar 2015 00:06:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:message-id:date:subject:from:to:content-type; bh=o2tRHhYEbYk7vmTNgGdruocWe9F2NATKb8Onx2lRqu8=; b=GE3D/dfrYvA3pJobZD1vNwrJpjpV6dAH9TAUi/WR8vTg8++zYiioIIFZpxX5Z0gnLR YpCi/aYpo/5ZM3NBnK4+kKYTGfjIq65IOzsvnrpJ7lJivZu6T0HGs7Ghtib/PfTX8l7s cihGwOFnzvoyuWsCLk4H3iDv2S7amaYsdwNbhjan+25fRHw8bfKPbFR/NW9S/s+K9+/y sWIuN4AOmmOQWM48X9hLAS7qkZNYgW3SMi4/Q8intS03XjgAhmP9eZYdUu+6tc8v/Nv1 1GWa0Ap90DvEzSsBfxLObvbRilPbmj/B3Bxf+BOr/92TX8w6M/N2XoJzXbceYTn1tEXY I/Vg== MIME-Version: 1.0 X-Received: by 10.182.28.104 with SMTP id a8mr35059416obh.15.1427699189555; Mon, 30 Mar 2015 00:06:29 -0700 (PDT) Message-ID: <089e015372c60a282f05127c1fe5@google.com> Date: Mon, 30 Mar 2015 07:06:29 +0000 Subject: Higher Targeted Traffic: gcu-squad.org From: Heitor Lambert To: svn-src-all@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2015 07:06:30 -0000 Hi gcu-squad.org Team, Hope you are doing well. I thought you might like to know some of the *key points* which you need to address on priority and this can be the reason why you are not getting desired position out of continued SEO efforts. Well, you might consider this irrelevant but believe me, I have a complete analysis report ready with me for gcu-squad.org Your website needs immediate improvement on major factors like: Low online presence for many competitive keyword phrases Fixing errors that prevents your website from being indexed properly by search engine. Unorganized social media accounts Providing relevant content to create theme based back links and eliminate the bad back links. Active and regular updates and posts on social media portals to increase the popularity and brand awareness. We offer several services for your website such as Online Reputation Management, Social Media Optimization, SEO activities among others. We have excelled along with our customers because of some key propositions as delivering solution by competent Google Analytics certified professionals and we don't bind our customers with any set up fee or contract, i.e. *(NO CONTRACT or NO SET UP FEE)*. This e-mail provides you with a glimpse of some of the services which we offered from our company. If you have any queries about our services then kindly contact us back for a *free website audit report*. Should you be interested, get in touch with us on the mentioned email address or contact number. Best Regards, Heitor Lambert |DM Consultant PH. No: +1 605-277-9747 Skype: digital.marketinghm ------------------------------ ------------------------------ ------------------------------ 1: This is a onetime email and you may ask us to "UNSUBSCRIBE". 2: If you are interested we will send more details on our "corporate identity", "company profile", "why you should choose us?", "Price list", "money back" etc. in our next mail. P.S: - This is our marketing strategy that we use the Gmail account. Once you reply us back, the next communication will be done from our corporate email ID. From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 07:09:09 2015 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 5FCE4B85; Mon, 30 Mar 2015 07:09: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 40399E52; Mon, 30 Mar 2015 07:09: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 t2U799JU015693; Mon, 30 Mar 2015 07:09:09 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2U798fS015691; Mon, 30 Mar 2015 07:09:08 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201503300709.t2U798fS015691@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: Roger Pau Monné Date: Mon, 30 Mar 2015 07:09:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280838 - in head/sys: conf dev/xen/debug 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, 30 Mar 2015 07:09:09 -0000 Author: royger Date: Mon Mar 30 07:09:07 2015 New Revision: 280838 URL: https://svnweb.freebsd.org/changeset/base/280838 Log: xen: add a handler for the debug interrupt Handle the VIRQ_DEBUG signal and print a stack trace of each vCPU on the Xen console. This is only used for debug purposes and is triggered by the administrator of the Xen host. Sponsored by: Citrix Systems R&D MFC after: 1 week Added: head/sys/dev/xen/debug/ head/sys/dev/xen/debug/debug.c (contents, props changed) Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Mon Mar 30 04:06:36 2015 (r280837) +++ head/sys/conf/files Mon Mar 30 07:09:07 2015 (r280838) @@ -2702,6 +2702,7 @@ dev/xen/xenstore/xenstore_dev.c optional dev/xen/xenstore/xenstored_dev.c optional xen | xenhvm dev/xen/evtchn/evtchn_dev.c optional xen | xenhvm dev/xen/privcmd/privcmd.c optional xen | xenhvm +dev/xen/debug/debug.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/debug/debug.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/xen/debug/debug.c Mon Mar 30 07:09:07 2015 (r280838) @@ -0,0 +1,157 @@ +/* + * Copyright (c) 2015 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 "opt_stack.h" +#include "opt_ddb.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +/* + * Xen debug device + * + * Handles the VIRQ_DEBUG interrupt and prints the backtrace of each + * vCPU on the Xen console. + */ + +DPCPU_DEFINE(xen_intr_handle_t, xendebug_handler); +static struct mtx lock; +static struct sbuf *buf; + +static int +xendebug_drain(void *arg, const char *str, int len) +{ + + HYPERVISOR_console_write(__DECONST(char *, str), len); + return (len); +} + +extern void +stack_capture(struct stack *st, register_t rbp); + +static int +xendebug_filter(void *arg) +{ +#if defined(STACK) && defined(DDB) + struct stack st; + struct trapframe *frame; + + frame = arg; + stack_zero(&st); + stack_save(&st); + + mtx_lock_spin(&lock); + sbuf_clear(buf); + xc_printf("Printing stack trace vCPU%d\n", PCPU_GET(vcpu_id)); + stack_sbuf_print_ddb(buf, &st); + sbuf_finish(buf); + mtx_unlock_spin(&lock); +#endif + + return (FILTER_HANDLED); +} + +static void +xendebug_identify(driver_t *driver, device_t parent) +{ + + KASSERT(xen_domain(), + ("Trying to add Xen debug device to non-xen guest")); + + if (xen_hvm_domain() && !xen_vector_callback_enabled) + return; + + if (BUS_ADD_CHILD(parent, 0, "debug", 0) == NULL) + panic("Unable to add Xen debug device."); +} + +static int +xendebug_probe(device_t dev) +{ + + device_set_desc(dev, "Xen debug handler"); + return (BUS_PROBE_NOWILDCARD); +} + +static int +xendebug_attach(device_t dev) +{ + int i, error; + + mtx_init(&lock, "xen-dbg", NULL, MTX_SPIN); + buf = sbuf_new(NULL, NULL, 1024, SBUF_FIXEDLEN); + if (buf == NULL) + panic("Unable to create sbuf for stack dump"); + sbuf_set_drain(buf, xendebug_drain, NULL); + + /* Bind an event channel to a VIRQ on each VCPU. */ + CPU_FOREACH(i) { + error = xen_intr_bind_virq(dev, VIRQ_DEBUG, i, xendebug_filter, + NULL, NULL, INTR_TYPE_TTY, + DPCPU_ID_PTR(i, xendebug_handler)); + if (error != 0) { + printf("Failed to bind VIRQ_DEBUG to vCPU %d: %d", + i, error); + continue; + } + xen_intr_describe(DPCPU_ID_GET(i, xendebug_handler), "d%d", i); + } + + return (0); +} + +static device_method_t xendebug_methods[] = { + DEVMETHOD(device_identify, xendebug_identify), + DEVMETHOD(device_probe, xendebug_probe), + DEVMETHOD(device_attach, xendebug_attach), + + DEVMETHOD_END +}; + +static driver_t xendebug_driver = { + "debug", + xendebug_methods, + 0, +}; + +devclass_t xendebug_devclass; + +DRIVER_MODULE(xendebug, xenpv, xendebug_driver, xendebug_devclass, 0, 0); +MODULE_DEPEND(xendebug, xenpv, 1, 1, 1); From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 07:11:50 2015 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 9DC2CD06; Mon, 30 Mar 2015 07:11: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 8843FF09; Mon, 30 Mar 2015 07:11: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 t2U7BoSl019499; Mon, 30 Mar 2015 07:11:50 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2U7Boix019498; Mon, 30 Mar 2015 07:11:50 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201503300711.t2U7Boix019498@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 30 Mar 2015 07:11: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: r280839 - stable/10/sys/amd64/vmm 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: Mon, 30 Mar 2015 07:11:50 -0000 Author: mav Date: Mon Mar 30 07:11:49 2015 New Revision: 280839 URL: https://svnweb.freebsd.org/changeset/base/280839 Log: MFC r280134: Report ARAT (APIC-Timer-always-running) feature for virtual CPU. This makes FreeBSD guest to not avoid using LAPIC timer, preferring HPET due to worries about non-existing for virtual CPUs deep sleep states. Benchmarks of usleep(1) on guest and host show such extra latencies: - 51us for virtual HPET, - 22us for virtual LAPIC timer, - 22us for host HPET and - 3us for host LAPIC timer. Modified: stable/10/sys/amd64/vmm/x86.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/vmm/x86.c ============================================================================== --- stable/10/sys/amd64/vmm/x86.c Mon Mar 30 07:09:07 2015 (r280838) +++ stable/10/sys/amd64/vmm/x86.c Mon Mar 30 07:11:49 2015 (r280839) @@ -361,6 +361,12 @@ x86_emulate_cpuid(struct vm *vm, int vcp break; case CPUID_0000_0006: + regs[0] = CPUTPM1_ARAT; + regs[1] = 0; + regs[2] = 0; + regs[3] = 0; + break; + case CPUID_0000_000A: /* * Handle the access, but report 0 for From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 08:33:20 2015 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 C427E913; Mon, 30 Mar 2015 08:33: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 9512C97E; Mon, 30 Mar 2015 08:33: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 t2U8XKfC056490; Mon, 30 Mar 2015 08:33:20 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2U8XKfe056489; Mon, 30 Mar 2015 08:33:20 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201503300833.t2U8XKfe056489@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Mon, 30 Mar 2015 08:33:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280840 - head/release/tools 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, 30 Mar 2015 08:33:20 -0000 Author: cperciva Date: Mon Mar 30 08:33:19 2015 New Revision: 280840 URL: https://svnweb.freebsd.org/changeset/base/280840 Log: Clean up filesystem unmounting in vmimage builds: * Remove vm_umount_base function which is currently unused. * Add umount_loop function which loops attempting to unmount one filesystem. * Replace calls to umount with calls to umount_loop. * Don't attempt to unmount ${DESTDIR}/dev if it isn't mounted. The looping is necessary because sometimes umount fails due to filesystems being busy. The most common cause of such busyness is periodic(8) jobs running `find / ...`. Reviewed by: gjb Modified: head/release/tools/vmimage.subr Modified: head/release/tools/vmimage.subr ============================================================================== --- head/release/tools/vmimage.subr Mon Mar 30 07:11:49 2015 (r280839) +++ head/release/tools/vmimage.subr Mon Mar 30 08:33:19 2015 (r280840) @@ -45,8 +45,10 @@ err() { } cleanup() { - umount ${DESTDIR}/dev 2>/dev/null - umount ${DESTDIR} + if mount | grep -qE "devfs on ${DESTDIR}/dev"; then + umount_loop ${DESTDIR}/dev 2>/dev/null + fi + umount_loop ${DESTDIR} if [ ! -z "${mddev}" ]; then mdconfig -d -u ${mddev} fi @@ -86,11 +88,11 @@ vm_copy_base() { tar -cf- -C ${DESTDIR}/old . | tar -xf- -C ${DESTDIR}/new - umount /dev/${mdold} + umount_loop /dev/${mdold} rmdir ${DESTDIR}/old mdconfig -d -u ${mdold} - umount /dev/${mdnew} + umount_loop /dev/${mdnew} rmdir ${DESTDIR}/new mdconfig -d -u ${mdnew} mv ${VMBASE}.tmp ${VMBASE} @@ -117,7 +119,7 @@ vm_install_base() { mount -t devfs devfs ${DESTDIR}/dev chroot ${DESTDIR} /usr/bin/newaliases chroot ${DESTDIR} /etc/rc.d/ldconfig forcestart - umount ${DESTDIR}/dev + umount_loop ${DESTDIR}/dev cp /etc/resolv.conf ${DESTDIR}/etc/resolv.conf @@ -152,7 +154,7 @@ vm_extra_install_packages() { /usr/sbin/pkg bootstrap -y chroot ${DESTDIR} env ASSUME_ALWAYS_YES=yes \ /usr/sbin/pkg install -y ${VM_EXTRA_PACKAGES} - umount ${DESTDIR}/dev + umount_loop ${DESTDIR}/dev return 0 } @@ -181,16 +183,17 @@ vm_extra_pkg_rmcache() { return 0 } -vm_umount_base() { +umount_loop() { + DIR=$1 i=0 sync - while ! umount ${DESTDIR}/dev ${DESTDIR}; do + while ! umount ${DIR}; do i=$(( $i + 1 )) if [ $i -ge 10 ]; then # This should never happen. But, it has happened. - msg="Cannot umount(8) ${DESTDIR}\n" - msg="${msg}Something has gone horribly wrong." - err "${msg}" + echo "Cannot umount(8) ${DIR}" + echo "Something has gone horribly wrong." + return 1 fi sleep 1 done From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 08:37:04 2015 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 46692CBE; Mon, 30 Mar 2015 08:37:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 31BF99C3; Mon, 30 Mar 2015 08:37:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2U8b47K057120; Mon, 30 Mar 2015 08:37:04 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2U8b4IW057119; Mon, 30 Mar 2015 08:37:04 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201503300837.t2U8b4IW057119@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 30 Mar 2015 08:37:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280841 - 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: Mon, 30 Mar 2015 08:37:04 -0000 Author: andrew Date: Mon Mar 30 08:37:03 2015 New Revision: 280841 URL: https://svnweb.freebsd.org/changeset/base/280841 Log: Only build cpufunc_asm_armv4.S when needed. Modified: head/sys/conf/files.arm Modified: head/sys/conf/files.arm ============================================================================== --- head/sys/conf/files.arm Mon Mar 30 08:33:19 2015 (r280840) +++ head/sys/conf/files.arm Mon Mar 30 08:37:03 2015 (r280841) @@ -13,7 +13,7 @@ arm/arm/cpufunc_asm_arm9.S optional cpu arm/arm/cpufunc_asm_arm10.S optional cpu_arm9e arm/arm/cpufunc_asm_arm11.S optional cpu_arm1176 arm/arm/cpufunc_asm_arm11x6.S optional cpu_arm1176 -arm/arm/cpufunc_asm_armv4.S standard +arm/arm/cpufunc_asm_armv4.S optional cpu_arm9 | cpu_arm9e | cpu_fa526 | cpu_xscale_80200 | cpu_xscale_80321 | cpu_xscale_pxa2x0 | cpu_xscale_ixp425 | cpu_xscale_80219 | cpu_xscale_81342 arm/arm/cpufunc_asm_armv5_ec.S optional cpu_arm9e arm/arm/cpufunc_asm_armv6.S optional cpu_arm1176 arm/arm/cpufunc_asm_armv7.S optional cpu_cortexa | cpu_krait | cpu_mv_pj4b From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 08:38:20 2015 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 BC920E3A; Mon, 30 Mar 2015 08:38: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 9D79C9DD; Mon, 30 Mar 2015 08:38: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 t2U8cKdd057321; Mon, 30 Mar 2015 08:38:20 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2U8cI1e057316; Mon, 30 Mar 2015 08:38:18 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201503300838.t2U8cI1e057316@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 30 Mar 2015 08:38:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280842 - in head/sys: arm/arm arm/include 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: Mon, 30 Mar 2015 08:38:20 -0000 Author: andrew Date: Mon Mar 30 08:38:18 2015 New Revision: 280842 URL: https://svnweb.freebsd.org/changeset/base/280842 Log: Remove support for CPU_FA626TE. It's unused by any of our kernel configs. Modified: head/sys/arm/arm/cpufunc.c head/sys/arm/arm/elf_trampoline.c head/sys/arm/include/cpuconf.h head/sys/arm/include/cpufunc.h head/sys/conf/options.arm Modified: head/sys/arm/arm/cpufunc.c ============================================================================== --- head/sys/arm/arm/cpufunc.c Mon Mar 30 08:37:03 2015 (r280841) +++ head/sys/arm/arm/cpufunc.c Mon Mar 30 08:38:18 2015 (r280842) @@ -494,7 +494,7 @@ struct cpu_functions xscalec3_cpufuncs = #endif /* CPU_XSCALE_81342 */ -#if defined(CPU_FA526) || defined(CPU_FA626TE) +#if defined(CPU_FA526) struct cpu_functions fa526_cpufuncs = { /* CPU functions */ @@ -555,7 +555,7 @@ struct cpu_functions fa526_cpufuncs = { fa526_setup /* cpu setup */ }; -#endif /* CPU_FA526 || CPU_FA626TE */ +#endif /* CPU_FA526 */ #if defined(CPU_ARM1176) struct cpu_functions arm1176_cpufuncs = { @@ -705,7 +705,7 @@ u_int cpu_reset_needs_v4_MMU_disable; /* defined (CPU_ARM9E) || \ defined(CPU_ARM1176) || defined(CPU_XSCALE_80200) || defined(CPU_XSCALE_80321) || \ defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_IXP425) || \ - defined(CPU_FA526) || defined(CPU_FA626TE) || defined(CPU_MV_PJ4B) || \ + defined(CPU_FA526) || defined(CPU_MV_PJ4B) || \ defined(CPU_XSCALE_80219) || defined(CPU_XSCALE_81342) || \ defined(CPU_CORTEXA) || defined(CPU_KRAIT) @@ -943,7 +943,7 @@ set_cpufuncs() } #endif /* CPU_MV_PJ4B */ -#if defined(CPU_FA526) || defined(CPU_FA626TE) +#if defined(CPU_FA526) if (cputype == CPU_ID_FA526 || cputype == CPU_ID_FA626TE) { cpufuncs = fa526_cpufuncs; cpu_reset_needs_v4_MMU_disable = 1; /* SA needs it */ @@ -955,7 +955,7 @@ set_cpufuncs() goto out; } -#endif /* CPU_FA526 || CPU_FA626TE */ +#endif /* CPU_FA526 */ #ifdef CPU_XSCALE_80200 if (cputype == CPU_ID_80200) { @@ -1378,7 +1378,7 @@ cortexa_setup(void) } #endif /* CPU_CORTEXA */ -#if defined(CPU_FA526) || defined(CPU_FA626TE) +#if defined(CPU_FA526) void fa526_setup(void) { @@ -1415,7 +1415,7 @@ fa526_setup(void) ctrl = cpuctrl; cpu_control(0xffffffff, cpuctrl); } -#endif /* CPU_FA526 || CPU_FA626TE */ +#endif /* CPU_FA526 */ #if defined(CPU_XSCALE_80200) || defined(CPU_XSCALE_80321) || \ defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_IXP425) || \ Modified: head/sys/arm/arm/elf_trampoline.c ============================================================================== --- head/sys/arm/arm/elf_trampoline.c Mon Mar 30 08:37:03 2015 (r280841) +++ head/sys/arm/arm/elf_trampoline.c Mon Mar 30 08:38:18 2015 (r280842) @@ -59,7 +59,7 @@ extern void do_call(void *, void *, void #if defined(CPU_ARM9) #define cpu_idcache_wbinv_all arm9_idcache_wbinv_all extern void arm9_idcache_wbinv_all(void); -#elif defined(CPU_FA526) || defined(CPU_FA626TE) +#elif defined(CPU_FA526) #define cpu_idcache_wbinv_all fa526_idcache_wbinv_all extern void fa526_idcache_wbinv_all(void); #elif defined(CPU_ARM9E) Modified: head/sys/arm/include/cpuconf.h ============================================================================== --- head/sys/arm/include/cpuconf.h Mon Mar 30 08:37:03 2015 (r280841) +++ head/sys/arm/include/cpuconf.h Mon Mar 30 08:38:18 2015 (r280842) @@ -57,7 +57,6 @@ defined(CPU_XSCALE_80321) + \ defined(CPU_XSCALE_PXA2X0) + \ defined(CPU_FA526) + \ - defined(CPU_FA626TE) + \ defined(CPU_XSCALE_IXP425)) + \ defined(CPU_CORTEXA) + \ defined(CPU_KRAIT) + \ @@ -75,8 +74,7 @@ #if (defined(CPU_ARM9E) || defined(CPU_ARM10) || \ defined(CPU_XSCALE_80200) || defined(CPU_XSCALE_80321) || \ defined(CPU_XSCALE_80219) || defined(CPU_XSCALE_81342) || \ - defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_IXP425) || \ - defined(CPU_FA626TE)) + defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_IXP425)) #define ARM_ARCH_5 1 #else #define ARM_ARCH_5 0 @@ -149,8 +147,7 @@ * require different PTE layout to use. */ #if (defined(CPU_ARM9) || defined(CPU_ARM9E) || \ - defined(CPU_ARM10) || defined(CPU_FA526) || \ - defined(CPU_FA626TE)) + defined(CPU_ARM10) || defined(CPU_FA526)) #define ARM_MMU_GENERIC 1 #else #define ARM_MMU_GENERIC 0 Modified: head/sys/arm/include/cpufunc.h ============================================================================== --- head/sys/arm/include/cpufunc.h Mon Mar 30 08:37:03 2015 (r280841) +++ head/sys/arm/include/cpufunc.h Mon Mar 30 08:38:18 2015 (r280842) @@ -286,7 +286,7 @@ u_int cpufunc_faultstatus (void); u_int cpufunc_faultaddress (void); u_int cpu_pfr (int); -#if defined(CPU_FA526) || defined(CPU_FA626TE) +#if defined(CPU_FA526) void fa526_setup (void); void fa526_setttb (u_int ttb); void fa526_context_switch (void); @@ -434,7 +434,7 @@ void armv5_ec_idcache_wbinv_range(vm_off #if defined(CPU_ARM9) || defined(CPU_ARM9E) || \ defined(CPU_XSCALE_80200) || defined(CPU_XSCALE_80321) || \ - defined(CPU_FA526) || defined(CPU_FA626TE) || \ + defined(CPU_FA526) || \ defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_IXP425) || \ defined(CPU_XSCALE_80219) || defined(CPU_XSCALE_81342) Modified: head/sys/conf/options.arm ============================================================================== --- head/sys/conf/options.arm Mon Mar 30 08:37:03 2015 (r280841) +++ head/sys/conf/options.arm Mon Mar 30 08:38:18 2015 (r280842) @@ -14,7 +14,6 @@ CPU_ARM1176 opt_global.h CPU_CORTEXA opt_global.h CPU_KRAIT opt_global.h CPU_FA526 opt_global.h -CPU_FA626TE opt_global.h CPU_MV_PJ4B opt_global.h CPU_XSCALE_80219 opt_global.h CPU_XSCALE_80321 opt_global.h From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 08:48:37 2015 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 15254108; Mon, 30 Mar 2015 08:48: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 F3E48B34; Mon, 30 Mar 2015 08:48: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 t2U8mawl062127; Mon, 30 Mar 2015 08:48:36 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2U8maDa062126; Mon, 30 Mar 2015 08:48:36 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201503300848.t2U8maDa062126@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 30 Mar 2015 08:48:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280843 - 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: Mon, 30 Mar 2015 08:48:37 -0000 Author: eadler Date: Mon Mar 30 08:48:35 2015 New Revision: 280843 URL: https://svnweb.freebsd.org/changeset/base/280843 Log: Add support for "MosChip MCS9922 PCIe to Peripheral Controller" to uart Submitted by: PR: 199013 MFC After: 1 month Modified: head/sys/dev/uart/uart_bus_pci.c Modified: head/sys/dev/uart/uart_bus_pci.c ============================================================================== --- head/sys/dev/uart/uart_bus_pci.c Mon Mar 30 08:38:18 2015 (r280842) +++ head/sys/dev/uart/uart_bus_pci.c Mon Mar 30 08:48:35 2015 (r280843) @@ -142,6 +142,8 @@ static const struct pci_id pci_ns8250_id "MosChip MCS9904 PCIe to Peripheral Controller", 0x10 }, { 0x9710, 0x9922, 0xa000, 0x1000, "MosChip MCS9922 PCIe to Peripheral Controller", 0x10 }, +{ 0x9710, 0x9922, 0xa000, 0x1000, + "MosChip MCS9922 PCIe to Peripheral Controller", 0x10 }, { 0xdeaf, 0x9051, 0xffff, 0, "Middle Digital PC Weasel Serial Port", 0x10 }, { 0xffff, 0, 0xffff, 0, NULL, 0, 0} }; From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 08:51:13 2015 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 A49722B2; Mon, 30 Mar 2015 08:51:13 +0000 (UTC) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5CDC1B7B; Mon, 30 Mar 2015 08:51:12 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 00C321FE023; Mon, 30 Mar 2015 10:51:03 +0200 (CEST) Message-ID: <55190EA7.9010905@selasky.org> Date: Mon, 30 Mar 2015 10:51:51 +0200 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Ian Lepore , Gleb Smirnoff Subject: Re: svn commit: r280759 - head/sys/netinet References: <201503271326.t2RDQxd3056112@svn.freebsd.org> <20150328083443.GV64665@FreeBSD.org> <20150328191629.GY64665@FreeBSD.org> <5517B433.5010508@selasky.org> <20150329210757.GA64665@FreeBSD.org> <1427666182.82583.4.camel@freebsd.org> In-Reply-To: <1427666182.82583.4.camel@freebsd.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: "svn-src-head@freebsd.org" , Adrian Chadd , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , Fabien Thomas X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2015 08:51:13 -0000 Hi, Like was mentioned here, maybe we need a global counter that is not accessed that frequently, and use per-cpu counters for the most frequent accesses. To keep the order somewhat sane, we need a global counter: Pseudo code: static int V_ip_id; PER_CPU(V_ip_id_start); PER_CPU(V_ip_id_end); static uint16_t get_next_id() { if (PER_CPU(V_ip_id_start) == PER_CPU(V_ip_id_end)) { next = atomic_add32(&V_ip_id, 256); V_ip_id_start = next; V_ip_id_end = next + 256; } id = V_ip_id_start++; return (id); } --HPS From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 08:55:00 2015 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 DEF545E0; Mon, 30 Mar 2015 08:55: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 CA7E3C56; Mon, 30 Mar 2015 08:55: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 t2U8t0WZ066432; Mon, 30 Mar 2015 08:55:00 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2U8t0BC066431; Mon, 30 Mar 2015 08:55:00 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201503300855.t2U8t0BC066431@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 30 Mar 2015 08:55:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280844 - 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: Mon, 30 Mar 2015 08:55:01 -0000 Author: eadler Date: Mon Mar 30 08:54:59 2015 New Revision: 280844 URL: https://svnweb.freebsd.org/changeset/base/280844 Log: And it turns out someone beat me to it.... PR: 199013 Modified: head/sys/dev/uart/uart_bus_pci.c Modified: head/sys/dev/uart/uart_bus_pci.c ============================================================================== --- head/sys/dev/uart/uart_bus_pci.c Mon Mar 30 08:48:35 2015 (r280843) +++ head/sys/dev/uart/uart_bus_pci.c Mon Mar 30 08:54:59 2015 (r280844) @@ -142,8 +142,6 @@ static const struct pci_id pci_ns8250_id "MosChip MCS9904 PCIe to Peripheral Controller", 0x10 }, { 0x9710, 0x9922, 0xa000, 0x1000, "MosChip MCS9922 PCIe to Peripheral Controller", 0x10 }, -{ 0x9710, 0x9922, 0xa000, 0x1000, - "MosChip MCS9922 PCIe to Peripheral Controller", 0x10 }, { 0xdeaf, 0x9051, 0xffff, 0, "Middle Digital PC Weasel Serial Port", 0x10 }, { 0xffff, 0, 0xffff, 0, NULL, 0, 0} }; From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 09:03:28 2015 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 91047B03; Mon, 30 Mar 2015 09:03:28 +0000 (UTC) Received: from mail-qc0-x232.google.com (mail-qc0-x232.google.com [IPv6:2607:f8b0:400d:c01::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49153D80; Mon, 30 Mar 2015 09:03:28 +0000 (UTC) Received: by qcay5 with SMTP id y5so64908507qca.1; Mon, 30 Mar 2015 02:03:27 -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=c0lIjex41xjXzMq7+6dMb/Ph8i0vcuhFeo/mqwrg+VI=; b=vjcYziWl8pwLt5voV9Lnu2bXKLlWZvKYeTZqfQsVaAkSzNYbMeJFCJo/2Bwc825uv8 3CLuUWp0Y8QZbJSVK52UMCxkDtpB7R8cLQuso/BDCY693+0xwQW02ynfp0hh2CMIPMqi 2dovqEGlzs2zalYCLzywca4RqHpqVif0mpJSIN9AoWlcRSFq6Z+iYaSueyp1ElKtBtQj 6GTduei802ZcC4vAXKfWwaIRiW2oCADvebNeAKc/BhJWOeNb6qDHoADtA2mqZDXYFLrC N1YjyhvOnQ02IKgtSFsGz9p4AkEm7xaMOtknM9e6MbRz1R0+AIcPO5QX5nwPv7cd8fed G5Gg== MIME-Version: 1.0 X-Received: by 10.140.32.52 with SMTP id g49mr39273919qgg.83.1427706207415; Mon, 30 Mar 2015 02:03:27 -0700 (PDT) Received: by 10.140.94.99 with HTTP; Mon, 30 Mar 2015 02:03:27 -0700 (PDT) In-Reply-To: <201503300833.t2U8XKfe056489@svn.freebsd.org> References: <201503300833.t2U8XKfe056489@svn.freebsd.org> Date: Mon, 30 Mar 2015 02:03:27 -0700 Message-ID: Subject: Re: svn commit: r280840 - head/release/tools From: NGie Cooper To: Colin Percival 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: Mon, 30 Mar 2015 09:03:28 -0000 On Mon, Mar 30, 2015 at 1:33 AM, Colin Percival wrote: > Author: cperciva > Date: Mon Mar 30 08:33:19 2015 > New Revision: 280840 > URL: https://svnweb.freebsd.org/changeset/base/280840 > > Log: > Clean up filesystem unmounting in vmimage builds: > * Remove vm_umount_base function which is currently unused. > * Add umount_loop function which loops attempting to unmount one filesystem. > * Replace calls to umount with calls to umount_loop. > * Don't attempt to unmount ${DESTDIR}/dev if it isn't mounted. > > The looping is necessary because sometimes umount fails due to filesystems > being busy. The most common cause of such busyness is periodic(8) jobs > running `find / ...`. > > Reviewed by: gjb > > Modified: > head/release/tools/vmimage.subr > > Modified: head/release/tools/vmimage.subr > ============================================================================== > --- head/release/tools/vmimage.subr Mon Mar 30 07:11:49 2015 (r280839) > +++ head/release/tools/vmimage.subr Mon Mar 30 08:33:19 2015 (r280840) > @@ -45,8 +45,10 @@ err() { > } > > cleanup() { > - umount ${DESTDIR}/dev 2>/dev/null > - umount ${DESTDIR} > + if mount | grep -qE "devfs on ${DESTDIR}/dev"; then > + umount_loop ${DESTDIR}/dev 2>/dev/null > + fi if [ -c "${DESTDIR}/dev" ]; then umount_loop fi etc, is probably more foolproof here. From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 09:04:05 2015 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 B0462C58; Mon, 30 Mar 2015 09:04:05 +0000 (UTC) Received: from mail-qc0-x22f.google.com (mail-qc0-x22f.google.com [IPv6:2607:f8b0:400d:c01::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 669ADD89; Mon, 30 Mar 2015 09:04:05 +0000 (UTC) Received: by qcay5 with SMTP id y5so64918589qca.1; Mon, 30 Mar 2015 02:04: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=JkAjPH+beLusqvRSFJO4ZcLKnUJ9RRxMsr8LFxCXyUM=; b=xEd4HlP28ZvGO4Pwd253zsMET59DcHRW73TUD3sNdDIEsO+9bibPstprO5Ivg+JT9y 4C4vpM9wAIFUrYJqir29alcfDbxz3rICbAHsuG3nvELEcK7/iEkdkgkv5dXocM7MR1sd v25fQEXBMpptfEnCviTxPYDEj8wcWDv+G4Dfi/qNqMVcm8Xk/91GdsUnFMK4yBqN6ziT 1SEh+AsHi76rNt9wNEVTt2OSL0LYMUKpc7wo1d/Sn8qVZFq+WQYAHIdK/dZ4AKWtoYuP pbUqJIqQGo1M2wdtneMfLWxXGIdvTuU9ejW5jwy1OVap5IIWLcaw4tlqvgbBM12GfW4D klOw== MIME-Version: 1.0 X-Received: by 10.140.41.113 with SMTP id y104mr38038560qgy.25.1427706244612; Mon, 30 Mar 2015 02:04:04 -0700 (PDT) Received: by 10.140.94.99 with HTTP; Mon, 30 Mar 2015 02:04:04 -0700 (PDT) In-Reply-To: References: <201503300833.t2U8XKfe056489@svn.freebsd.org> Date: Mon, 30 Mar 2015 02:04:04 -0700 Message-ID: Subject: Re: svn commit: r280840 - head/release/tools From: NGie Cooper To: Colin Percival 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: Mon, 30 Mar 2015 09:04:05 -0000 On Mon, Mar 30, 2015 at 2:03 AM, NGie Cooper wrote: > On Mon, Mar 30, 2015 at 1:33 AM, Colin Percival wrote: >> Author: cperciva >> Date: Mon Mar 30 08:33:19 2015 >> New Revision: 280840 >> URL: https://svnweb.freebsd.org/changeset/base/280840 >> >> Log: >> Clean up filesystem unmounting in vmimage builds: >> * Remove vm_umount_base function which is currently unused. >> * Add umount_loop function which loops attempting to unmount one filesystem. >> * Replace calls to umount with calls to umount_loop. >> * Don't attempt to unmount ${DESTDIR}/dev if it isn't mounted. >> >> The looping is necessary because sometimes umount fails due to filesystems >> being busy. The most common cause of such busyness is periodic(8) jobs >> running `find / ...`. >> >> Reviewed by: gjb >> >> Modified: >> head/release/tools/vmimage.subr >> >> Modified: head/release/tools/vmimage.subr >> ============================================================================== >> --- head/release/tools/vmimage.subr Mon Mar 30 07:11:49 2015 (r280839) >> +++ head/release/tools/vmimage.subr Mon Mar 30 08:33:19 2015 (r280840) >> @@ -45,8 +45,10 @@ err() { >> } >> >> cleanup() { >> - umount ${DESTDIR}/dev 2>/dev/null >> - umount ${DESTDIR} >> + if mount | grep -qE "devfs on ${DESTDIR}/dev"; then >> + umount_loop ${DESTDIR}/dev 2>/dev/null >> + fi > > if [ -c "${DESTDIR}/dev" ]; then I meant: [ -c "${DESTDIR}/dev/null" ] From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 09:05:22 2015 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 F3376DB0; Mon, 30 Mar 2015 09: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 DE89FD98; Mon, 30 Mar 2015 09: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 t2U95LSY071314; Mon, 30 Mar 2015 09:05:21 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2U95L6f071313; Mon, 30 Mar 2015 09:05:21 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201503300905.t2U95L6f071313@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 30 Mar 2015 09:05:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280845 - head/sys/cam/ata 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, 30 Mar 2015 09:05:22 -0000 Author: eadler Date: Mon Mar 30 09:05:20 2015 New Revision: 280845 URL: https://svnweb.freebsd.org/changeset/base/280845 Log: Add some additional quirks for various Western Digital Caviar MHDDs Submitted by: Jeremy Chadwick PR: 188685 MFC After: 1 month Modified: head/sys/cam/ata/ata_da.c Modified: head/sys/cam/ata/ata_da.c ============================================================================== --- head/sys/cam/ata/ata_da.c Mon Mar 30 08:54:59 2015 (r280844) +++ head/sys/cam/ata/ata_da.c Mon Mar 30 09:05:20 2015 (r280845) @@ -233,16 +233,31 @@ static struct ada_quirk_entry ada_quirk_ /*quirks*/ADA_Q_4K }, { + /* WDC Caviar Red Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "WDC WD????CX*", "*" }, + /*quirks*/ADA_Q_4K + }, + { /* WDC Caviar Green Advanced Format (4k) drives */ { T_DIRECT, SIP_MEDIA_FIXED, "*", "WDC WD????RS*", "*" }, /*quirks*/ADA_Q_4K }, { - /* WDC Caviar Green Advanced Format (4k) drives */ + /* WDC Caviar Green/Red Advanced Format (4k) drives */ { T_DIRECT, SIP_MEDIA_FIXED, "*", "WDC WD????RX*", "*" }, /*quirks*/ADA_Q_4K }, { + /* WDC Caviar Red Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "WDC WD??????CX*", "*" }, + /*quirks*/ADA_Q_4K + }, + { + /* WDC Caviar Black Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "WDC WD??????EX*", "*" }, + /*quirks*/ADA_Q_4K + }, + { /* WDC Caviar Green Advanced Format (4k) drives */ { T_DIRECT, SIP_MEDIA_FIXED, "*", "WDC WD??????RS*", "*" }, /*quirks*/ADA_Q_4K From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 09:08:25 2015 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 C4A1EEC; Mon, 30 Mar 2015 09:08: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 AFD98DDE; Mon, 30 Mar 2015 09:08: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 t2U98PIQ071935; Mon, 30 Mar 2015 09:08:25 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2U98PN9071934; Mon, 30 Mar 2015 09:08:25 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201503300908.t2U98PN9071934@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Mon, 30 Mar 2015 09:08:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280846 - head/release/tools 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, 30 Mar 2015 09:08:25 -0000 Author: cperciva Date: Mon Mar 30 09:08:24 2015 New Revision: 280846 URL: https://svnweb.freebsd.org/changeset/base/280846 Log: Improve check for whether ${DESTDIR}/dev is mounted. Submitted by: gcooper Modified: head/release/tools/vmimage.subr Modified: head/release/tools/vmimage.subr ============================================================================== --- head/release/tools/vmimage.subr Mon Mar 30 09:05:20 2015 (r280845) +++ head/release/tools/vmimage.subr Mon Mar 30 09:08:24 2015 (r280846) @@ -45,7 +45,7 @@ err() { } cleanup() { - if mount | grep -qE "devfs on ${DESTDIR}/dev"; then + if [ -c "${DESTDIR}/dev/null" ]; then umount_loop ${DESTDIR}/dev 2>/dev/null fi umount_loop ${DESTDIR} From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 09:10:52 2015 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 8A9D03C7 for ; Mon, 30 Mar 2015 09:10:52 +0000 (UTC) Received: from o1.l99.sendgrid.net (o1.l99.sendgrid.net [198.37.153.74]) (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 32BF9EAF for ; Mon, 30 Mar 2015 09:10:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sendgrid.info; h=from:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; s=smtpapi; bh=nmwxpVBRXJn0+q3aRrnpsApF4ms=; b=Rj8z1thPUULcI/yEbG FbQcB9Ps2dbaSz15Mf0ULZu19JA6g/dzA7H6efHnidXalTdquRQCxTQqK5ttD3gB hhjjAoh78sMWD4DMszBevpbjcn55XABRPwNSwGajP0+5HjVMqmP6qZFG3jRXi7GA s1yjFWa8sSW44BjJLVwF/nZlw= Received: by filter0442p1mdw1.sendgrid.net with SMTP id filter0442p1mdw1.31950.5519131A8 2015-03-30 09:10:50.516538165 +0000 UTC Received: from mail.tarsnap.com (ec2-54-86-246-204.compute-1.amazonaws.com [54.86.246.204]) by ismtpd-025 (SG) with ESMTP id 14c69f29f03.3727.569548 for ; Mon, 30 Mar 2015 09:10:50 +0000 (UTC) Received: (qmail 91445 invoked from network); 30 Mar 2015 09:09:04 -0000 Received: from unknown (HELO clamshell.daemonology.net) (127.0.0.1) by ec2-107-20-205-189.compute-1.amazonaws.com with ESMTP; 30 Mar 2015 09:09:04 -0000 Received: (qmail 33830 invoked from network); 30 Mar 2015 09:07:51 -0000 Received: from unknown (HELO clamshell.daemonology.net) (127.0.0.1) by clamshell.daemonology.net with SMTP; 30 Mar 2015 09:07:51 -0000 Message-ID: <55191267.3070305@freebsd.org> Date: Mon, 30 Mar 2015 02:07:51 -0700 From: Colin Percival User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: NGie Cooper Subject: Re: svn commit: r280840 - head/release/tools References: <201503300833.t2U8XKfe056489@svn.freebsd.org> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SG-EID: A6W2xSVPHetogaU8rnzccWwgBYtN+QvIzXyjfe/10PGsyo1guJo9Lwr61yldBfmQ6fcaf2615p8tPM Tp35lCaVobVamLKTZVlg66fiStoz0jBCECxeXMUY/oCOASd0PTY5wZad9DC50tUpSSI7N7Imq8iLmC T4r9i0xGXtMfwY3Dk/8ZKge0zHkjMw1BzL1U 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, 30 Mar 2015 09:10:52 -0000 On 03/30/15 02:04, NGie Cooper wrote: > On Mon, Mar 30, 2015 at 2:03 AM, NGie Cooper wrote: >> On Mon, Mar 30, 2015 at 1:33 AM, Colin Percival wrote: >>> cleanup() { >>> + if mount | grep -qE "devfs on ${DESTDIR}/dev"; then >>> + umount_loop ${DESTDIR}/dev 2>/dev/null >>> + fi >> >> if [ -c "${DESTDIR}/dev" ]; then > > I meant: > > [ -c "${DESTDIR}/dev/null" ] Thanks! I was looking for a way to express "if this is a mount point" but I completely forgot that there are things which are reliably present *inside* a devfs... ... and looking at what I committed earlier I see now that I missed a ^ at the start of the regex anyway, so my first attempt was both a bad idea *and* wrong. ;-) -- 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 Mon Mar 30 09:12:27 2015 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 59E97520; Mon, 30 Mar 2015 09:12:27 +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 BBC2FEC8; Mon, 30 Mar 2015 09:12:26 +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 t2U9CAOO056132 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Mon, 30 Mar 2015 12:12:10 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t2U9CAOO056132 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t2U9CAT5056131; Mon, 30 Mar 2015 12:12:10 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 30 Mar 2015 12:12:10 +0300 From: Konstantin Belousov To: Don Lewis Subject: Re: svn commit: r280327 - in head/sys: kern vm Message-ID: <20150330091209.GC2379@kib.kiev.ua> References: <5516EB31.7000309@rice.edu> <201503300625.t2U6PE3c093114@gw.catspoiler.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201503300625.t2U6PE3c093114@gw.catspoiler.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: src-committers@FreeBSD.org, alc@rice.edu, alc@FreeBSD.org, svn-src-all@FreeBSD.org, bdrewery@FreeBSD.org, portmgr@FreeBSD.org, svn-src-head@FreeBSD.org, clusteradm@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, 30 Mar 2015 09:12:27 -0000 On Sun, Mar 29, 2015 at 11:25:14PM -0700, Don Lewis wrote: > On amd64, with an amd64 jail, and kernel rev r280326, I observe the > following: > One gcc process calls mmap() with addr=0 and len=0x657a000, and > the value 0x811400000 is returned. Subsequent gcc processes > call mmap() with addr=0x811400000 and len=0x657a000, getting > 0x811400000 in return. > > With kernel rev r280327 I see: > One gcc process calls mmap() with addr=0 and len=0x657a000, and > the value 0x811400000 is returned. Subsequent gcc processes > call mmap() with addr=0x811400000 and len=0x657a000, getting > 0x8115f4000 in return. What I later noticed is that the subsequent > calls are passing offset=0x1f4000. Not so coincidentally, > 0x811400000 + 0x1f4000 = 0x8115F4000. > > My first attempt at a fix subtracted offset from address, but the mmap() > return value changed to 0x8113f4000 instead of the 0x811400000 I was > expecting. It looked to me like the code must be doing superpage > alignment on the start of the file and then adding the offset to get the > start of the mapped region. So the real fix is to make gcc pass MAP_FIXED. > > This somewhat hacking patch disables this alignment if a non-zero > address is passed as a hint, and allows the code to make the start of > the mapped region match the hint. With this patch, I've been able to > build openjdk7 in a FreeBSD 9.3 amd64 jail. > This is for precompiled headers, right ? Could port disable pch ? From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 09:29:48 2015 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 4AEA2BD0; Mon, 30 Mar 2015 09:29: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 351676F; Mon, 30 Mar 2015 09:29: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 t2U9TmhJ081889; Mon, 30 Mar 2015 09:29:48 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2U9TkOe081884; Mon, 30 Mar 2015 09:29:46 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201503300929.t2U9TkOe081884@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 30 Mar 2015 09:29:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280847 - in head/sys: arm/arm arm/include 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: Mon, 30 Mar 2015 09:29:48 -0000 Author: andrew Date: Mon Mar 30 09:29:45 2015 New Revision: 280847 URL: https://svnweb.freebsd.org/changeset/base/280847 Log: Remove support for CPU_XSCALE_80200. None of our configs support it, and there wasn;t an option to enable it. While here remove a check for CPU_ARM10 being defined as it has also been removed. Modified: head/sys/arm/arm/cpufunc.c head/sys/arm/arm/elf_trampoline.c head/sys/arm/include/cpuconf.h head/sys/arm/include/cpufunc.h head/sys/conf/files.arm Modified: head/sys/arm/arm/cpufunc.c ============================================================================== --- head/sys/arm/arm/cpufunc.c Mon Mar 30 09:08:24 2015 (r280846) +++ head/sys/arm/arm/cpufunc.c Mon Mar 30 09:29:45 2015 (r280847) @@ -60,11 +60,6 @@ __FBSDID("$FreeBSD$"); #include #include -#ifdef CPU_XSCALE_80200 -#include -#include -#endif - #if defined(CPU_XSCALE_80321) || defined(CPU_XSCALE_80219) #include #include @@ -362,7 +357,7 @@ struct cpu_functions pj4bv7_cpufuncs = { }; #endif /* CPU_MV_PJ4B */ -#if defined(CPU_XSCALE_80200) || defined(CPU_XSCALE_80321) || \ +#if defined(CPU_XSCALE_80321) || \ defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_IXP425) || \ defined(CPU_XSCALE_80219) @@ -427,7 +422,7 @@ struct cpu_functions xscale_cpufuncs = { xscale_setup /* cpu setup */ }; #endif -/* CPU_XSCALE_80200 || CPU_XSCALE_80321 || CPU_XSCALE_PXA2X0 || CPU_XSCALE_IXP425 +/* CPU_XSCALE_80321 || CPU_XSCALE_PXA2X0 || CPU_XSCALE_IXP425 CPU_XSCALE_80219 */ #ifdef CPU_XSCALE_81342 @@ -703,7 +698,7 @@ u_int cpu_reset_needs_v4_MMU_disable; /* #if defined(CPU_ARM9) || \ defined (CPU_ARM9E) || \ - defined(CPU_ARM1176) || defined(CPU_XSCALE_80200) || defined(CPU_XSCALE_80321) || \ + defined(CPU_ARM1176) || defined(CPU_XSCALE_80321) || \ defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_IXP425) || \ defined(CPU_FA526) || defined(CPU_MV_PJ4B) || \ defined(CPU_XSCALE_80219) || defined(CPU_XSCALE_81342) || \ @@ -957,47 +952,6 @@ set_cpufuncs() } #endif /* CPU_FA526 */ -#ifdef CPU_XSCALE_80200 - if (cputype == CPU_ID_80200) { - int rev = cpufunc_id() & CPU_ID_REVISION_MASK; - - i80200_icu_init(); - -#if defined(XSCALE_CCLKCFG) - /* - * Crank CCLKCFG to maximum legal value. - */ - __asm __volatile ("mcr p14, 0, %0, c6, c0, 0" - : - : "r" (XSCALE_CCLKCFG)); -#endif - - /* - * XXX Disable ECC in the Bus Controller Unit; we - * don't really support it, yet. Clear any pending - * error indications. - */ - __asm __volatile("mcr p13, 0, %0, c0, c1, 0" - : - : "r" (BCUCTL_E0|BCUCTL_E1|BCUCTL_EV)); - - cpufuncs = xscale_cpufuncs; - /* - * i80200 errata: Step-A0 and A1 have a bug where - * D$ dirty bits are not cleared on "invalidate by - * address". - * - * Workaround: Clean cache line before invalidating. - */ - if (rev == 0 || rev == 1) - cpufuncs.cf_dcache_inv_range = xscale_cache_purgeD_rng; - - cpu_reset_needs_v4_MMU_disable = 1; /* XScale needs it */ - get_cachetype_cp15(); - pmap_pte_init_xscale(); - goto out; - } -#endif /* CPU_XSCALE_80200 */ #if defined(CPU_XSCALE_80321) || defined(CPU_XSCALE_80219) if (cputype == CPU_ID_80321_400 || cputype == CPU_ID_80321_600 || cputype == CPU_ID_80321_400_B0 || cputype == CPU_ID_80321_600_B0 || @@ -1417,7 +1371,7 @@ fa526_setup(void) } #endif /* CPU_FA526 */ -#if defined(CPU_XSCALE_80200) || defined(CPU_XSCALE_80321) || \ +#if defined(CPU_XSCALE_80321) || \ defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_IXP425) || \ defined(CPU_XSCALE_80219) || defined(CPU_XSCALE_81342) void @@ -1486,5 +1440,5 @@ xscale_setup(void) __asm __volatile("mcr p15, 0, %0, c1, c0, 1" : : "r" (auxctl)); } -#endif /* CPU_XSCALE_80200 || CPU_XSCALE_80321 || CPU_XSCALE_PXA2X0 || CPU_XSCALE_IXP425 +#endif /* CPU_XSCALE_80321 || CPU_XSCALE_PXA2X0 || CPU_XSCALE_IXP425 CPU_XSCALE_80219 */ Modified: head/sys/arm/arm/elf_trampoline.c ============================================================================== --- head/sys/arm/arm/elf_trampoline.c Mon Mar 30 09:08:24 2015 (r280846) +++ head/sys/arm/arm/elf_trampoline.c Mon Mar 30 09:29:45 2015 (r280847) @@ -67,7 +67,7 @@ extern void fa526_idcache_wbinv_all(void extern void armv5_ec_idcache_wbinv_all(void); #elif defined(CPU_ARM1176) #define cpu_idcache_wbinv_all armv6_idcache_wbinv_all -#elif defined(CPU_XSCALE_80200) || defined(CPU_XSCALE_80321) || \ +#elif defined(CPU_XSCALE_80321) || \ defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_IXP425) || \ defined(CPU_XSCALE_80219) #define cpu_idcache_wbinv_all xscale_cache_purgeID Modified: head/sys/arm/include/cpuconf.h ============================================================================== --- head/sys/arm/include/cpuconf.h Mon Mar 30 09:08:24 2015 (r280846) +++ head/sys/arm/include/cpuconf.h Mon Mar 30 09:29:45 2015 (r280847) @@ -53,7 +53,6 @@ #define CPU_NTYPES (defined(CPU_ARM9) + \ defined(CPU_ARM9E) + \ defined(CPU_ARM1176) + \ - defined(CPU_XSCALE_80200) + \ defined(CPU_XSCALE_80321) + \ defined(CPU_XSCALE_PXA2X0) + \ defined(CPU_FA526) + \ @@ -71,8 +70,8 @@ #define ARM_ARCH_4 0 #endif -#if (defined(CPU_ARM9E) || defined(CPU_ARM10) || \ - defined(CPU_XSCALE_80200) || defined(CPU_XSCALE_80321) || \ +#if (defined(CPU_ARM9E) || \ + defined(CPU_XSCALE_80321) || \ defined(CPU_XSCALE_80219) || defined(CPU_XSCALE_81342) || \ defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_IXP425)) #define ARM_ARCH_5 1 @@ -146,8 +145,7 @@ * MMU, but also has several extensions which * require different PTE layout to use. */ -#if (defined(CPU_ARM9) || defined(CPU_ARM9E) || \ - defined(CPU_ARM10) || defined(CPU_FA526)) +#if (defined(CPU_ARM9) || defined(CPU_ARM9E) || defined(CPU_FA526)) #define ARM_MMU_GENERIC 1 #else #define ARM_MMU_GENERIC 0 @@ -165,7 +163,7 @@ #define ARM_MMU_V7 0 #endif -#if (defined(CPU_XSCALE_80200) || defined(CPU_XSCALE_80321) || \ +#if (defined(CPU_XSCALE_80321) || \ defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_IXP425) || \ defined(CPU_XSCALE_80219) || defined(CPU_XSCALE_81342)) #define ARM_MMU_XSCALE 1 @@ -185,7 +183,7 @@ * ARM_XSCALE_PMU Performance Monitoring Unit on 80200 and 80321 */ -#if (defined(CPU_XSCALE_80200) || defined(CPU_XSCALE_80321) || \ +#if (defined(CPU_XSCALE_80321) || \ defined(CPU_XSCALE_80219) || defined(CPU_XSCALE_81342)) #define ARM_XSCALE_PMU 1 #else Modified: head/sys/arm/include/cpufunc.h ============================================================================== --- head/sys/arm/include/cpufunc.h Mon Mar 30 09:08:24 2015 (r280846) +++ head/sys/arm/include/cpufunc.h Mon Mar 30 09:29:45 2015 (r280847) @@ -433,7 +433,7 @@ void armv5_ec_idcache_wbinv_range(vm_off #endif #if defined(CPU_ARM9) || defined(CPU_ARM9E) || \ - defined(CPU_XSCALE_80200) || defined(CPU_XSCALE_80321) || \ + defined(CPU_XSCALE_80321) || \ defined(CPU_FA526) || \ defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_IXP425) || \ defined(CPU_XSCALE_80219) || defined(CPU_XSCALE_81342) @@ -447,7 +447,7 @@ void armv4_drain_writebuf (void); void armv4_idcache_inv_all (void); #endif -#if defined(CPU_XSCALE_80200) || defined(CPU_XSCALE_80321) || \ +#if defined(CPU_XSCALE_80321) || \ defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_IXP425) || \ defined(CPU_XSCALE_80219) || defined(CPU_XSCALE_81342) void xscale_cpwait (void); @@ -487,7 +487,7 @@ void xscale_cache_flushD_rng (vm_offset_ void xscale_context_switch (void); void xscale_setup (void); -#endif /* CPU_XSCALE_80200 || CPU_XSCALE_80321 || CPU_XSCALE_PXA2X0 || CPU_XSCALE_IXP425 +#endif /* CPU_XSCALE_80321 || CPU_XSCALE_PXA2X0 || CPU_XSCALE_IXP425 CPU_XSCALE_80219 */ #ifdef CPU_XSCALE_81342 Modified: head/sys/conf/files.arm ============================================================================== --- head/sys/conf/files.arm Mon Mar 30 09:08:24 2015 (r280846) +++ head/sys/conf/files.arm Mon Mar 30 09:29:45 2015 (r280847) @@ -13,14 +13,14 @@ arm/arm/cpufunc_asm_arm9.S optional cpu arm/arm/cpufunc_asm_arm10.S optional cpu_arm9e arm/arm/cpufunc_asm_arm11.S optional cpu_arm1176 arm/arm/cpufunc_asm_arm11x6.S optional cpu_arm1176 -arm/arm/cpufunc_asm_armv4.S optional cpu_arm9 | cpu_arm9e | cpu_fa526 | cpu_xscale_80200 | cpu_xscale_80321 | cpu_xscale_pxa2x0 | cpu_xscale_ixp425 | cpu_xscale_80219 | cpu_xscale_81342 +arm/arm/cpufunc_asm_armv4.S optional cpu_arm9 | cpu_arm9e | cpu_fa526 | cpu_xscale_80321 | cpu_xscale_pxa2x0 | cpu_xscale_ixp425 | cpu_xscale_80219 | cpu_xscale_81342 arm/arm/cpufunc_asm_armv5_ec.S optional cpu_arm9e arm/arm/cpufunc_asm_armv6.S optional cpu_arm1176 arm/arm/cpufunc_asm_armv7.S optional cpu_cortexa | cpu_krait | cpu_mv_pj4b arm/arm/cpufunc_asm_fa526.S optional cpu_fa526 arm/arm/cpufunc_asm_pj4b.S optional cpu_mv_pj4b arm/arm/cpufunc_asm_sheeva.S optional cpu_arm9e -arm/arm/cpufunc_asm_xscale.S optional cpu_xscale_80200 | cpu_xscale_80321 | cpu_xscale_pxa2x0 | cpu_xscale_ixp425 | cpu_xscale_80219 | cpu_xscale_81342 +arm/arm/cpufunc_asm_xscale.S optional cpu_xscale_80321 | cpu_xscale_pxa2x0 | cpu_xscale_ixp425 | cpu_xscale_80219 | cpu_xscale_81342 arm/arm/cpufunc_asm_xscale_c3.S optional cpu_xscale_81342 arm/arm/cpuinfo.c standard arm/arm/cpu_asm-v6.S optional armv6 From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 09:49:55 2015 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 806EF37A; Mon, 30 Mar 2015 09:49: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 6C7D12D8; Mon, 30 Mar 2015 09:49: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 t2U9ntQJ091426; Mon, 30 Mar 2015 09:49:55 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2U9ntL9091425; Mon, 30 Mar 2015 09:49:55 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201503300949.t2U9ntL9091425@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Mon, 30 Mar 2015 09:49:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280848 - head/sys/dev/ofw 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, 30 Mar 2015 09:49:55 -0000 Author: zbb Date: Mon Mar 30 09:49:54 2015 New Revision: 280848 URL: https://svnweb.freebsd.org/changeset/base/280848 Log: Fix bug in xrefinfo_find() for 64-bit platforms uintptr_t may be 64-bit on some platforms, therefore when finding xrefinfo by pointer to device the high word is being cut off due to cast to phandle_t which is 32-bit long by definition. Due to that we loose the high word of the address to compare with xi->dev's address. To fix that, first argument of xrefinfo_find() is extended to uintptr_t and is being cast to appropriate type (phandle_t) when compared. Submitted by: Zbigniew Bodek Reviewed by: nwhitehorn Obtained from: Semihalf Modified: head/sys/dev/ofw/openfirm.c Modified: head/sys/dev/ofw/openfirm.c ============================================================================== --- head/sys/dev/ofw/openfirm.c Mon Mar 30 09:29:45 2015 (r280847) +++ head/sys/dev/ofw/openfirm.c Mon Mar 30 09:49:54 2015 (r280848) @@ -154,16 +154,16 @@ xrefinfo_init(void *unsed) SYSINIT(xrefinfo, SI_SUB_KMEM, SI_ORDER_ANY, xrefinfo_init, NULL); static struct xrefinfo * -xrefinfo_find(phandle_t phandle, int find_by) +xrefinfo_find(uintptr_t key, int find_by) { struct xrefinfo *rv, *xi; rv = NULL; mtx_lock(&xreflist_lock); SLIST_FOREACH(xi, &xreflist, next_entry) { - if ((find_by == FIND_BY_XREF && phandle == xi->xref) || - (find_by == FIND_BY_NODE && phandle == xi->node) || - (find_by == FIND_BY_DEV && phandle == (uintptr_t)xi->dev)) { + if ((find_by == FIND_BY_XREF && (phandle_t)key == xi->xref) || + (find_by == FIND_BY_NODE && (phandle_t)key == xi->node) || + (find_by == FIND_BY_DEV && key == (uintptr_t)xi->dev)) { rv = xi; break; } From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 10:34:02 2015 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 89C76C6C; Mon, 30 Mar 2015 10:34:02 +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 2ABC4A3F; Mon, 30 Mar 2015 10:34:01 +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 t2UAXuJ1082143 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Mon, 30 Mar 2015 13:33:56 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t2UAXuJ1082143 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t2UAXtcE082142; Mon, 30 Mar 2015 13:33:55 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 30 Mar 2015 13:33:55 +0300 From: Konstantin Belousov To: Bruce Evans Subject: Re: svn commit: r280308 - head/sys/fs/devfs Message-ID: <20150330103355.GD2379@kib.kiev.ua> References: <20150322162507.GD2379@kib.kiev.ua> <201503221825.t2MIP7jv096531@gw.catspoiler.org> <20150329175137.GD95224@stack.nl> <20150329184238.GB2379@kib.kiev.ua> <20150330145148.C1660@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150330145148.C1660@besplex.bde.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: src-committers@freebsd.org, Jilles Tjoelker , Don Lewis , delphij@freebsd.org, svn-src-head@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: Mon, 30 Mar 2015 10:34:02 -0000 On Mon, Mar 30, 2015 at 03:14:10PM +1100, Bruce Evans wrote: > File timestamps use CLOCK_REALTIME, so they are supposed to go backwards > sometimes. More importantly, if the time is set to a future time (by > utimes(), etc., not due to a clock step), this prevents it being correted. > I think you only want to do a null update if tv_nsec is nonzero due to a > previous setting with vfs_timestamp(), and the new second hasn't arrived > yet. Something like: > > if (tsp->tv_sec != ts) ... > > If '<', then as above. If '>', it means a correction by >= 1 second > (strictly greater if tv_nsec != 0). The initial value tv_nsec is > irrelevant in both cases. Below is the updated patch. I also added a comment to devfs_timestamp(), please reformulate it to your liking. diff --git a/sys/fs/devfs/devfs_vnops.c b/sys/fs/devfs/devfs_vnops.c index 941f92c..552ddd2 100644 --- a/sys/fs/devfs/devfs_vnops.c +++ b/sys/fs/devfs/devfs_vnops.c @@ -84,7 +84,27 @@ SYSCTL_DECL(_vfs_devfs); static int devfs_dotimes; SYSCTL_INT(_vfs_devfs, OID_AUTO, dotimes, CTLFLAG_RW, - &devfs_dotimes, 0, "Update timestamps on DEVFS"); + &devfs_dotimes, 0, "Update timestamps on DEVFS with default precision"); + +/* + * Update devfs node timestamp. Note that updates are unlocked and + * stat(2) could see partially updated times. + */ +static void +devfs_timestamp(struct timespec *tsp) +{ + time_t ts; + + if (devfs_dotimes) { + vfs_timestamp(tsp); + } else { + ts = time_second; + if (tsp->tv_sec != ts) { + tsp->tv_sec = ts; + tsp->tv_nsec = 0; + } + } +} static int devfs_fp_check(struct file *fp, struct cdev **devp, struct cdevsw **dswp, @@ -1228,9 +1248,8 @@ devfs_read_f(struct file *fp, struct uio *uio, struct ucred *cred, foffset_lock_uio(fp, uio, flags | FOF_NOLOCK); error = dsw->d_read(dev, uio, ioflag); - if (devfs_dotimes && - (uio->uio_resid != resid || (error == 0 && resid != 0))) - vfs_timestamp(&dev->si_atime); + if (uio->uio_resid != resid || (error == 0 && resid != 0)) + devfs_timestamp(&dev->si_atime); td->td_fpop = fpop; dev_relthread(dev, ref); @@ -1708,9 +1727,8 @@ devfs_write_f(struct file *fp, struct uio *uio, struct ucred *cred, resid = uio->uio_resid; error = dsw->d_write(dev, uio, ioflag); - if (devfs_dotimes && - (uio->uio_resid != resid || (error == 0 && resid != 0))) { - vfs_timestamp(&dev->si_ctime); + if (uio->uio_resid != resid || (error == 0 && resid != 0)) { + devfs_timestamp(&dev->si_ctime); dev->si_mtime = dev->si_ctime; } td->td_fpop = fpop; From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 10:59:17 2015 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 381732C4; Mon, 30 Mar 2015 10:59: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 93A1DCE7; Mon, 30 Mar 2015 10:59:16 +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 t2UAxEEJ043249 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 30 Mar 2015 13:59:14 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t2UAxD2F043248; Mon, 30 Mar 2015 13:59:13 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 30 Mar 2015 13:59:13 +0300 From: Gleb Smirnoff To: Hans Petter Selasky Subject: Re: svn commit: r280759 - head/sys/netinet Message-ID: <20150330105913.GF64665@FreeBSD.org> References: <201503271326.t2RDQxd3056112@svn.freebsd.org> <20150328083443.GV64665@FreeBSD.org> <20150328191629.GY64665@FreeBSD.org> <5517B433.5010508@selasky.org> <20150329210757.GA64665@FreeBSD.org> <1427666182.82583.4.camel@freebsd.org> <55190EA7.9010905@selasky.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55190EA7.9010905@selasky.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: Adrian Chadd , "src-committers@freebsd.org" , Ian Lepore , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Fabien Thomas X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2015 10:59:17 -0000 On Mon, Mar 30, 2015 at 10:51:51AM +0200, Hans Petter Selasky wrote: H> Hi, H> H> Like was mentioned here, maybe we need a global counter that is not H> accessed that frequently, and use per-cpu counters for the most frequent H> accesses. To keep the order somewhat sane, we need a global counter: H> H> Pseudo code: H> H> static int V_ip_id; H> H> PER_CPU(V_ip_id_start); H> PER_CPU(V_ip_id_end); H> H> static uint16_t H> get_next_id() H> { H> if (PER_CPU(V_ip_id_start) == PER_CPU(V_ip_id_end)) { H> next = atomic_add32(&V_ip_id, 256); H> V_ip_id_start = next; H> V_ip_id_end = next + 256; H> } H> id = V_ip_id_start++; H> return (id); H> } What's the rationale of the code? Trying to keep CPUs off by 256 from each other? The suggested code suffers from migration more than what I suggested. E.g. you can assign V_ip_id_start on CPU 1 then migrate to CPU 2 and assign V_ip_id_end, yielding in the broken state of the ID generating machine. Or you can compare start and end on different CPUs, which causes less harm. And still the code doesn't protect against full 65k overflow. One CPU can emit a burst over 65k packets, and then go on and reuse all the IDs that other CPUs are using now. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 11:29:06 2015 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 8C9497B3; Mon, 30 Mar 2015 11:29:06 +0000 (UTC) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 456FEFE4; Mon, 30 Mar 2015 11:29:06 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id E8CDD1FE023; Mon, 30 Mar 2015 13:29:03 +0200 (CEST) Message-ID: <551933AF.4080300@selasky.org> Date: Mon, 30 Mar 2015 13:29:51 +0200 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Gleb Smirnoff Subject: Re: svn commit: r280759 - head/sys/netinet References: <201503271326.t2RDQxd3056112@svn.freebsd.org> <20150328083443.GV64665@FreeBSD.org> <20150328191629.GY64665@FreeBSD.org> <5517B433.5010508@selasky.org> <20150329210757.GA64665@FreeBSD.org> <1427666182.82583.4.camel@freebsd.org> <55190EA7.9010905@selasky.org> <20150330105913.GF64665@FreeBSD.org> In-Reply-To: <20150330105913.GF64665@FreeBSD.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: Adrian Chadd , "src-committers@freebsd.org" , Ian Lepore , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Fabien Thomas X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2015 11:29:06 -0000 On 03/30/15 12:59, Gleb Smirnoff wrote: > On Mon, Mar 30, 2015 at 10:51:51AM +0200, Hans Petter Selasky wrote: > H> Hi, > H> > H> Like was mentioned here, maybe we need a global counter that is not > H> accessed that frequently, and use per-cpu counters for the most frequent > H> accesses. To keep the order somewhat sane, we need a global counter: > H> > H> Pseudo code: > H> > H> static int V_ip_id; > H> > H> PER_CPU(V_ip_id_start); > H> PER_CPU(V_ip_id_end); > H> > H> static uint16_t > H> get_next_id() > H> { > H> if (PER_CPU(V_ip_id_start) == PER_CPU(V_ip_id_end)) { > H> next = atomic_add32(&V_ip_id, 256); > H> V_ip_id_start = next; > H> V_ip_id_end = next + 256; > H> } > H> id = V_ip_id_start++; > H> return (id); > H> } > > What's the rationale of the code? Trying to keep CPUs off by 256 from > each other? Hi, You don't get it fully. Every time a CPU runs out of IDs, it allocates a new 256 long series of numbers. That way the CPUs allocate numbers in sequence. > The suggested code suffers from migration more than what I suggested. E.g. > you can assign V_ip_id_start on CPU 1 then migrate to CPU 2 and assign > V_ip_id_end, yielding in the broken state of the ID generating machine. > Or you can compare start and end on different CPUs, which causes less harm. Surely we need to add the critial_enter() and critical_exit() around this code, it is just meant as an example. > > And still the code doesn't protect against full 65k overflow. One CPU > can emit a burst over 65k packets, and then go on and reuse all the IDs > that other CPUs are using now. > Given sending 65K packets will take some time, using a shared atomic operation will slow down this wraparound more than if it was per CPU. If this is an argument, why do you want to make the ID allocation faster and not slower? Should there perhaps be a DELAY() in there if too many IDs rush out too quickly? --HPS From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 12:07:08 2015 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 DF21F27B; Mon, 30 Mar 2015 12:07:08 +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 469476CE; Mon, 30 Mar 2015 12:07:07 +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 t2UC75wR043680 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 30 Mar 2015 15:07:05 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t2UC70n8043678; Mon, 30 Mar 2015 15:07:00 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 30 Mar 2015 15:07:00 +0300 From: Gleb Smirnoff To: Hans Petter Selasky Subject: Re: svn commit: r280759 - head/sys/netinet Message-ID: <20150330120700.GH64665@FreeBSD.org> References: <201503271326.t2RDQxd3056112@svn.freebsd.org> <20150328083443.GV64665@FreeBSD.org> <20150328191629.GY64665@FreeBSD.org> <5517B433.5010508@selasky.org> <20150329210757.GA64665@FreeBSD.org> <1427666182.82583.4.camel@freebsd.org> <55190EA7.9010905@selasky.org> <20150330105913.GF64665@FreeBSD.org> <551933AF.4080300@selasky.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <551933AF.4080300@selasky.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: Adrian Chadd , "src-committers@freebsd.org" , Ian Lepore , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Fabien Thomas X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2015 12:07:09 -0000 Hans, On Mon, Mar 30, 2015 at 01:29:51PM +0200, Hans Petter Selasky wrote: H> You don't get it fully. Every time a CPU runs out of IDs, it allocates a H> new 256 long series of numbers. That way the CPUs allocate numbers in H> sequence. H> H> > The suggested code suffers from migration more than what I suggested. E.g. H> > you can assign V_ip_id_start on CPU 1 then migrate to CPU 2 and assign H> > V_ip_id_end, yielding in the broken state of the ID generating machine. H> > Or you can compare start and end on different CPUs, which causes less harm. H> H> Surely we need to add the critial_enter() and critical_exit() around H> this code, it is just meant as an example. Making the function heavier and heavier, trying to reduce the probability of an event that already happens naturally orders of magnitude more often, than we can can trigger it with our code. H> > And still the code doesn't protect against full 65k overflow. One CPU H> > can emit a burst over 65k packets, and then go on and reuse all the IDs H> > that other CPUs are using now. H> > H> H> Given sending 65K packets will take some time, using a shared atomic H> operation will slow down this wraparound more than if it was per CPU. If H> this is an argument, why do you want to make the ID allocation faster H> and not slower? Should there perhaps be a DELAY() in there if too many H> IDs rush out too quickly? DELAY() into network stack? Are you serious now or kidding me? -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 12:37:27 2015 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 D2844A12; Mon, 30 Mar 2015 12:37:27 +0000 (UTC) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8928EA4F; Mon, 30 Mar 2015 12:37:27 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 5E5121FE023; Mon, 30 Mar 2015 14:37:25 +0200 (CEST) Message-ID: <551943B4.90102@selasky.org> Date: Mon, 30 Mar 2015 14:38:12 +0200 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Gleb Smirnoff Subject: Re: svn commit: r280759 - head/sys/netinet References: <201503271326.t2RDQxd3056112@svn.freebsd.org> <20150328083443.GV64665@FreeBSD.org> <20150328191629.GY64665@FreeBSD.org> <5517B433.5010508@selasky.org> <20150329210757.GA64665@FreeBSD.org> <1427666182.82583.4.camel@freebsd.org> <55190EA7.9010905@selasky.org> <20150330105913.GF64665@FreeBSD.org> <551933AF.4080300@selasky.org> <20150330120700.GH64665@FreeBSD.org> In-Reply-To: <20150330120700.GH64665@FreeBSD.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: Adrian Chadd , "src-committers@freebsd.org" , Ian Lepore , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Fabien Thomas X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2015 12:37:28 -0000 On 03/30/15 14:07, Gleb Smirnoff wrote: > Hans, > > On Mon, Mar 30, 2015 at 01:29:51PM +0200, Hans Petter Selasky wrote: > H> You don't get it fully. Every time a CPU runs out of IDs, it allocates a > H> new 256 long series of numbers. That way the CPUs allocate numbers in > H> sequence. > H> > H> > The suggested code suffers from migration more than what I suggested. E.g. > H> > you can assign V_ip_id_start on CPU 1 then migrate to CPU 2 and assign > H> > V_ip_id_end, yielding in the broken state of the ID generating machine. > H> > Or you can compare start and end on different CPUs, which causes less harm. > H> > H> Surely we need to add the critial_enter() and critical_exit() around > H> this code, it is just meant as an example. > > Making the function heavier and heavier, trying to reduce the probability > of an event that already happens naturally orders of magnitude more often, > than we can can trigger it with our code. > > H> > And still the code doesn't protect against full 65k overflow. One CPU > H> > can emit a burst over 65k packets, and then go on and reuse all the IDs > H> > that other CPUs are using now. > H> > > H> > H> Given sending 65K packets will take some time, using a shared atomic > H> operation will slow down this wraparound more than if it was per CPU. If > H> this is an argument, why do you want to make the ID allocation faster > H> and not slower? Should there perhaps be a DELAY() in there if too many > H> IDs rush out too quickly? > Hi Gleb, Should the IPv4 ID field carry useful information or not? > DELAY() into network stack? Are you serious now or kidding me? If there should be any useful meaning in the 16-bit IP ID field, the value can't be allowed to wrap several times in a millisecond. Given the context from where the network code is running, msleep() is not an option. A _conditional_ DELAY() of 1-2 us, is maybe all we need to prevent the value from wrapping too quickly. It is not perfect and it is indeed consuming more CPU. Or maybe we can add an IPv4 option to escape a 32-bit IP ID field and don't use the 16-bit IP ID field. --HPS From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 12:51:19 2015 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 E430FEDF; Mon, 30 Mar 2015 12:51:19 +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 6534CBBE; Mon, 30 Mar 2015 12:51:18 +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 t2UCpFEX043869 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 30 Mar 2015 15:51:15 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t2UCpFt7043868; Mon, 30 Mar 2015 15:51:15 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 30 Mar 2015 15:51:15 +0300 From: Gleb Smirnoff To: Hans Petter Selasky Subject: Re: svn commit: r280759 - head/sys/netinet Message-ID: <20150330125115.GI64665@FreeBSD.org> References: <20150328191629.GY64665@FreeBSD.org> <5517B433.5010508@selasky.org> <20150329210757.GA64665@FreeBSD.org> <1427666182.82583.4.camel@freebsd.org> <55190EA7.9010905@selasky.org> <20150330105913.GF64665@FreeBSD.org> <551933AF.4080300@selasky.org> <20150330120700.GH64665@FreeBSD.org> <551943B4.90102@selasky.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <551943B4.90102@selasky.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: Adrian Chadd , "src-committers@freebsd.org" , Ian Lepore , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Fabien Thomas X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2015 12:51:20 -0000 Hans, On Mon, Mar 30, 2015 at 02:38:12PM +0200, Hans Petter Selasky wrote: H> > DELAY() into network stack? Are you serious now or kidding me? H> H> If there should be any useful meaning in the 16-bit IP ID field, the H> value can't be allowed to wrap several times in a millisecond. Given the H> context from where the network code is running, msleep() is not an H> option. A _conditional_ DELAY() of 1-2 us, is maybe all we need to H> prevent the value from wrapping too quickly. It is not perfect and it is H> indeed consuming more CPU. Let me ask again: are you serious? Do you suggest to delay transmitting network packets with a DELAY()? H> Or maybe we can add an IPv4 option to escape a 32-bit IP ID field and H> don't use the 16-bit IP ID field. Is that also serious? Do you suggest to change layout of IP packet? -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 12:58:32 2015 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 42E5917B; Mon, 30 Mar 2015 12:58:32 +0000 (UTC) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EEA59C9A; Mon, 30 Mar 2015 12:58:31 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 5A9321FE023; Mon, 30 Mar 2015 14:58:29 +0200 (CEST) Message-ID: <551948A4.1070408@selasky.org> Date: Mon, 30 Mar 2015 14:59:16 +0200 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Gleb Smirnoff Subject: Re: svn commit: r280759 - head/sys/netinet References: <20150328191629.GY64665@FreeBSD.org> <5517B433.5010508@selasky.org> <20150329210757.GA64665@FreeBSD.org> <1427666182.82583.4.camel@freebsd.org> <55190EA7.9010905@selasky.org> <20150330105913.GF64665@FreeBSD.org> <551933AF.4080300@selasky.org> <20150330120700.GH64665@FreeBSD.org> <551943B4.90102@selasky.org> <20150330125115.GI64665@FreeBSD.org> In-Reply-To: <20150330125115.GI64665@FreeBSD.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: Adrian Chadd , "src-committers@freebsd.org" , Ian Lepore , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Fabien Thomas X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2015 12:58:32 -0000 On 03/30/15 14:51, Gleb Smirnoff wrote: > Hans, > Gleb: Can you answer my question first: Should the 16-bit IP ID field carry any useful information or not? > On Mon, Mar 30, 2015 at 02:38:12PM +0200, Hans Petter Selasky wrote: > H> > DELAY() into network stack? Are you serious now or kidding me? > H> > H> If there should be any useful meaning in the 16-bit IP ID field, the > H> value can't be allowed to wrap several times in a millisecond. Given the > H> context from where the network code is running, msleep() is not an > H> option. A _conditional_ DELAY() of 1-2 us, is maybe all we need to > H> prevent the value from wrapping too quickly. It is not perfect and it is > H> indeed consuming more CPU. > > Let me ask again: are you serious? Do you suggest to delay transmitting > network packets with a DELAY()? > > H> Or maybe we can add an IPv4 option to escape a 32-bit IP ID field and > H> don't use the 16-bit IP ID field. > > Is that also serious? Do you suggest to change layout of IP packet? > --HPS From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 13:01:27 2015 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 8537C380; Mon, 30 Mar 2015 13:01:27 +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 040EED4F; Mon, 30 Mar 2015 13:01:26 +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 t2UD1OHA043933 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 30 Mar 2015 16:01:24 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t2UD1Ofr043932; Mon, 30 Mar 2015 16:01:24 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 30 Mar 2015 16:01:24 +0300 From: Gleb Smirnoff To: Hans Petter Selasky Subject: Re: svn commit: r280759 - head/sys/netinet Message-ID: <20150330130124.GJ64665@FreeBSD.org> References: <20150329210757.GA64665@FreeBSD.org> <1427666182.82583.4.camel@freebsd.org> <55190EA7.9010905@selasky.org> <20150330105913.GF64665@FreeBSD.org> <551933AF.4080300@selasky.org> <20150330120700.GH64665@FreeBSD.org> <551943B4.90102@selasky.org> <20150330125115.GI64665@FreeBSD.org> <551948A4.1070408@selasky.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <551948A4.1070408@selasky.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: Adrian Chadd , "src-committers@freebsd.org" , Ian Lepore , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Fabien Thomas X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2015 13:01:27 -0000 On Mon, Mar 30, 2015 at 02:59:16PM +0200, Hans Petter Selasky wrote: H> Gleb: Can you answer my question first: H> H> Should the 16-bit IP ID field carry any useful information or not? Yes: An identifying value assigned by the sender to aid in assembling the fragments of a datagram. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 13:30:18 2015 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 E551CD43; Mon, 30 Mar 2015 13:30: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 C9344FC9; Mon, 30 Mar 2015 13:30: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 t2UDUI6N094656; Mon, 30 Mar 2015 13:30:18 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2UDUHpI094651; Mon, 30 Mar 2015 13:30:17 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201503301330.t2UDUHpI094651@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Mon, 30 Mar 2015 13:30:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280849 - in head: contrib/ntp contrib/ntp/adjtimed contrib/ntp/arlib contrib/ntp/clockstuff contrib/ntp/conf contrib/ntp/html contrib/ntp/html/build contrib/ntp/html/drivers contrib/nt... 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, 30 Mar 2015 13:30:19 -0000 Author: cy Date: Mon Mar 30 13:30:15 2015 New Revision: 280849 URL: https://svnweb.freebsd.org/changeset/base/280849 Log: MFV ntp 4.2.8p1 (r258945, r275970, r276091, r276092, r276093, r278284) Thanks to roberto for providing pointers to wedge this into HEAD. Approved by: roberto Added: head/contrib/ntp/FREEBSD-Xlist - copied unchanged from r276091, vendor/ntp/dist/FREEBSD-Xlist head/contrib/ntp/FREEBSD-upgrade - copied unchanged from r276091, vendor/ntp/dist/FREEBSD-upgrade head/contrib/ntp/check-libopts.mf - copied unchanged from r275970, vendor/ntp/dist/check-libopts.mf head/contrib/ntp/deps-ver - copied, changed from r258945, vendor/ntp/dist/deps-ver head/contrib/ntp/depsver.mf - copied, changed from r258945, vendor/ntp/dist/depsver.mf head/contrib/ntp/html/access.html - copied unchanged from r275970, vendor/ntp/dist/html/access.html head/contrib/ntp/html/authentic.html - copied unchanged from r275970, vendor/ntp/dist/html/authentic.html head/contrib/ntp/html/autokey.html - copied unchanged from r275970, vendor/ntp/dist/html/autokey.html head/contrib/ntp/html/bugs.html (contents, props changed) - copied, changed from r258945, vendor/ntp/dist/html/bugs.html head/contrib/ntp/html/build.html (contents, props changed) - copied, changed from r258945, vendor/ntp/dist/html/build.html head/contrib/ntp/html/clock.html - copied unchanged from r275970, vendor/ntp/dist/html/clock.html head/contrib/ntp/html/cluster.html - copied unchanged from r275970, vendor/ntp/dist/html/cluster.html head/contrib/ntp/html/comdex.html (contents, props changed) - copied, changed from r258945, vendor/ntp/dist/html/comdex.html head/contrib/ntp/html/config.html (contents, props changed) - copied, changed from r258945, vendor/ntp/dist/html/config.html head/contrib/ntp/html/decode.html (contents, props changed) - copied, changed from r258945, vendor/ntp/dist/html/decode.html head/contrib/ntp/html/discipline.html - copied unchanged from r275970, vendor/ntp/dist/html/discipline.html head/contrib/ntp/html/discover.html - copied unchanged from r275970, vendor/ntp/dist/html/discover.html head/contrib/ntp/html/drivers/driver45.html - copied unchanged from r275970, vendor/ntp/dist/html/drivers/driver45.html head/contrib/ntp/html/drivers/driver46.html - copied unchanged from r275970, vendor/ntp/dist/html/drivers/driver46.html head/contrib/ntp/html/drivers/mx4200data.html (contents, props changed) - copied, changed from r258945, vendor/ntp/dist/html/drivers/mx4200data.html head/contrib/ntp/html/filter.html - copied unchanged from r275970, vendor/ntp/dist/html/filter.html head/contrib/ntp/html/hints/ - copied from r276319, vendor/ntp/dist/html/hints/ head/contrib/ntp/html/hints.html (contents, props changed) - copied, changed from r258945, vendor/ntp/dist/html/hints.html head/contrib/ntp/html/history.html - copied unchanged from r275970, vendor/ntp/dist/html/history.html head/contrib/ntp/html/huffpuff.html - copied unchanged from r275970, vendor/ntp/dist/html/huffpuff.html head/contrib/ntp/html/icons/sitemap.png - copied unchanged from r275970, vendor/ntp/dist/html/icons/sitemap.png head/contrib/ntp/html/kernpps.html (contents, props changed) - copied, changed from r258945, vendor/ntp/dist/html/kernpps.html head/contrib/ntp/html/leap.html - copied unchanged from r275970, vendor/ntp/dist/html/leap.html head/contrib/ntp/html/ntp-wait.html (contents, props changed) - copied, changed from r258945, vendor/ntp/dist/html/ntp-wait.html head/contrib/ntp/html/orphan.html - copied unchanged from r275970, vendor/ntp/dist/html/orphan.html head/contrib/ntp/html/pic/ - copied from r278284, vendor/ntp/dist/html/pic/ head/contrib/ntp/html/poll.html - copied unchanged from r275970, vendor/ntp/dist/html/poll.html head/contrib/ntp/html/quick.html (contents, props changed) - copied, changed from r258945, vendor/ntp/dist/html/quick.html head/contrib/ntp/html/rate.html (contents, props changed) - copied, changed from r258945, vendor/ntp/dist/html/rate.html head/contrib/ntp/html/scripts/accopt.txt (contents, props changed) - copied, changed from r258945, vendor/ntp/dist/html/scripts/accopt.txt head/contrib/ntp/html/scripts/audio.txt (contents, props changed) - copied, changed from r258945, vendor/ntp/dist/html/scripts/audio.txt head/contrib/ntp/html/scripts/authopt.txt (contents, props changed) - copied, changed from r258945, vendor/ntp/dist/html/scripts/authopt.txt head/contrib/ntp/html/scripts/clockopt.txt (contents, props changed) - copied, changed from r258945, vendor/ntp/dist/html/scripts/clockopt.txt head/contrib/ntp/html/scripts/command.txt (contents, props changed) - copied, changed from r258945, vendor/ntp/dist/html/scripts/command.txt head/contrib/ntp/html/scripts/config.txt (contents, props changed) - copied, changed from r258945, vendor/ntp/dist/html/scripts/config.txt head/contrib/ntp/html/scripts/confopt.txt (contents, props changed) - copied, changed from r258945, vendor/ntp/dist/html/scripts/confopt.txt head/contrib/ntp/html/scripts/external.txt (contents, props changed) - copied, changed from r258945, vendor/ntp/dist/html/scripts/external.txt head/contrib/ntp/html/scripts/hand.txt - copied unchanged from r275970, vendor/ntp/dist/html/scripts/hand.txt head/contrib/ntp/html/scripts/install.txt (contents, props changed) - copied, changed from r258945, vendor/ntp/dist/html/scripts/install.txt head/contrib/ntp/html/scripts/manual.txt (contents, props changed) - copied, changed from r258945, vendor/ntp/dist/html/scripts/manual.txt head/contrib/ntp/html/scripts/misc.txt (contents, props changed) - copied, changed from r258945, vendor/ntp/dist/html/scripts/misc.txt head/contrib/ntp/html/scripts/miscopt.txt (contents, props changed) - copied, changed from r258945, vendor/ntp/dist/html/scripts/miscopt.txt head/contrib/ntp/html/scripts/monopt.txt (contents, props changed) - copied, changed from r258945, vendor/ntp/dist/html/scripts/monopt.txt head/contrib/ntp/html/scripts/refclock.txt (contents, props changed) - copied, changed from r258945, vendor/ntp/dist/html/scripts/refclock.txt head/contrib/ntp/html/scripts/special.txt - copied unchanged from r275970, vendor/ntp/dist/html/scripts/special.txt head/contrib/ntp/html/select.html - copied unchanged from r275970, vendor/ntp/dist/html/select.html head/contrib/ntp/html/sitemap.html (contents, props changed) - copied, changed from r258945, vendor/ntp/dist/html/sitemap.html head/contrib/ntp/html/stats.html - copied unchanged from r275970, vendor/ntp/dist/html/stats.html head/contrib/ntp/html/warp.html - copied unchanged from r275970, vendor/ntp/dist/html/warp.html head/contrib/ntp/html/xleave.html (contents, props changed) - copied, changed from r258945, vendor/ntp/dist/html/xleave.html head/contrib/ntp/include/declcond.h - copied unchanged from r275970, vendor/ntp/dist/include/declcond.h head/contrib/ntp/include/intreswork.h - copied unchanged from r275970, vendor/ntp/dist/include/intreswork.h head/contrib/ntp/include/lib_strbuf.h (contents, props changed) - copied, changed from r258945, vendor/ntp/dist/include/lib_strbuf.h head/contrib/ntp/include/libntp.h - copied unchanged from r275970, vendor/ntp/dist/include/libntp.h head/contrib/ntp/include/ntp_assert.h (contents, props changed) - copied, changed from r258945, vendor/ntp/dist/include/ntp_assert.h head/contrib/ntp/include/ntp_intres.h (contents, props changed) - copied, changed from r258945, vendor/ntp/dist/include/ntp_intres.h head/contrib/ntp/include/ntp_libopts.h (contents, props changed) - copied, changed from r258945, vendor/ntp/dist/include/ntp_libopts.h - copied unchanged from r258945, vendor/ntp/dist/include/ntp_lineedit.h - copied unchanged from r258945, vendor/ntp/dist/include/ntp_lists.h head/contrib/ntp/include/ntp_net.h (contents, props changed) - copied, changed from r258945, vendor/ntp/dist/include/ntp_net.h head/contrib/ntp/include/ntp_prio_q.h - copied unchanged from r275970, vendor/ntp/dist/include/ntp_prio_q.h head/contrib/ntp/include/ntp_worker.h - copied unchanged from r275970, vendor/ntp/dist/include/ntp_worker.h head/contrib/ntp/include/ntp_workimpl.h - copied unchanged from r275970, vendor/ntp/dist/include/ntp_workimpl.h head/contrib/ntp/include/refclock_atom.h (contents, props changed) - copied, changed from r258945, vendor/ntp/dist/include/refclock_atom.h - copied unchanged from r258945, vendor/ntp/dist/include/ssl_applink.c head/contrib/ntp/include/timespecops.h - copied unchanged from r275970, vendor/ntp/dist/include/timespecops.h head/contrib/ntp/include/timetoa.h - copied unchanged from r275970, vendor/ntp/dist/include/timetoa.h head/contrib/ntp/include/timevalops.h - copied unchanged from r275970, vendor/ntp/dist/include/timevalops.h head/contrib/ntp/include/vint64ops.h - copied unchanged from r275970, vendor/ntp/dist/include/vint64ops.h head/contrib/ntp/includes.mf - copied unchanged from r275970, vendor/ntp/dist/includes.mf head/contrib/ntp/lib/ - copied from r258945, vendor/ntp/dist/lib/ head/contrib/ntp/lib/isc/Atffile - copied unchanged from r275970, vendor/ntp/dist/lib/isc/Atffile head/contrib/ntp/lib/isc/app_api.c - copied unchanged from r275970, vendor/ntp/dist/lib/isc/app_api.c head/contrib/ntp/lib/isc/backtrace-emptytbl.c - copied unchanged from r275970, vendor/ntp/dist/lib/isc/backtrace-emptytbl.c head/contrib/ntp/lib/isc/backtrace.c - copied, changed from r275970, vendor/ntp/dist/lib/isc/backtrace.c head/contrib/ntp/lib/isc/include/isc/backtrace.h - copied, changed from r275970, vendor/ntp/dist/lib/isc/include/isc/backtrace.h head/contrib/ntp/lib/isc/include/isc/bind9.h - copied unchanged from r275970, vendor/ntp/dist/lib/isc/include/isc/bind9.h head/contrib/ntp/lib/isc/include/isc/namespace.h - copied unchanged from r275970, vendor/ntp/dist/lib/isc/include/isc/namespace.h head/contrib/ntp/lib/isc/include/isc/queue.h - copied unchanged from r275970, vendor/ntp/dist/lib/isc/include/isc/queue.h head/contrib/ntp/lib/isc/mem_api.c - copied unchanged from r275970, vendor/ntp/dist/lib/isc/mem_api.c head/contrib/ntp/lib/isc/socket_api.c - copied unchanged from r275970, vendor/ntp/dist/lib/isc/socket_api.c head/contrib/ntp/lib/isc/task_api.c - copied unchanged from r275970, vendor/ntp/dist/lib/isc/task_api.c head/contrib/ntp/lib/isc/tests/ - copied from r275970, vendor/ntp/dist/lib/isc/tests/ head/contrib/ntp/lib/isc/timer_api.c - copied unchanged from r275970, vendor/ntp/dist/lib/isc/timer_api.c head/contrib/ntp/lib/isc/win32/libgen.h - copied unchanged from r275970, vendor/ntp/dist/lib/isc/win32/libgen.h head/contrib/ntp/libjsmn/ - copied from r275970, vendor/ntp/dist/libjsmn/ head/contrib/ntp/libntp/bsd_strerror.c (contents, props changed) - copied, changed from r258945, vendor/ntp/dist/libntp/bsd_strerror.c head/contrib/ntp/libntp/ntp_calendar.c - copied, changed from r275970, vendor/ntp/dist/libntp/ntp_calendar.c head/contrib/ntp/libntp/ntp_crypto_rnd.c - copied, changed from r275970, vendor/ntp/dist/libntp/ntp_crypto_rnd.c head/contrib/ntp/libntp/ntp_intres.c - copied, changed from r275970, vendor/ntp/dist/libntp/ntp_intres.c head/contrib/ntp/libntp/ntp_libopts.c (contents, props changed) - copied, changed from r258945, vendor/ntp/dist/libntp/ntp_libopts.c head/contrib/ntp/libntp/ntp_lineedit.c (contents, props changed) - copied, changed from r258945, vendor/ntp/dist/libntp/ntp_lineedit.c head/contrib/ntp/libntp/ntp_worker.c - copied unchanged from r275970, vendor/ntp/dist/libntp/ntp_worker.c head/contrib/ntp/libntp/socket.c - copied unchanged from r275970, vendor/ntp/dist/libntp/socket.c head/contrib/ntp/libntp/ssl_init.c (contents, props changed) - copied, changed from r258945, vendor/ntp/dist/libntp/ssl_init.c head/contrib/ntp/libntp/strl_obsd.c - copied unchanged from r275970, vendor/ntp/dist/libntp/strl_obsd.c head/contrib/ntp/libntp/timetoa.c - copied, changed from r275970, vendor/ntp/dist/libntp/timetoa.c head/contrib/ntp/libntp/timevalops.c - copied unchanged from r275970, vendor/ntp/dist/libntp/timevalops.c head/contrib/ntp/libntp/vint64ops.c - copied unchanged from r275970, vendor/ntp/dist/libntp/vint64ops.c head/contrib/ntp/libntp/work_fork.c - copied unchanged from r275970, vendor/ntp/dist/libntp/work_fork.c head/contrib/ntp/libntp/work_thread.c - copied unchanged from r275970, vendor/ntp/dist/libntp/work_thread.c head/contrib/ntp/libparse/clk_sel240x.c - copied unchanged from r275970, vendor/ntp/dist/libparse/clk_sel240x.c head/contrib/ntp/ntpd/complete.conf.in - copied unchanged from r275970, vendor/ntp/dist/ntpd/complete.conf.in head/contrib/ntp/ntpd/declcond.h - copied unchanged from r275970, vendor/ntp/dist/ntpd/declcond.h head/contrib/ntp/ntpd/invoke-ntp.conf.menu - copied unchanged from r275970, vendor/ntp/dist/ntpd/invoke-ntp.conf.menu head/contrib/ntp/ntpd/invoke-ntp.conf.texi - copied, changed from r275970, vendor/ntp/dist/ntpd/invoke-ntp.conf.texi head/contrib/ntp/ntpd/invoke-ntp.keys.menu - copied unchanged from r275970, vendor/ntp/dist/ntpd/invoke-ntp.keys.menu head/contrib/ntp/ntpd/invoke-ntp.keys.texi - copied, changed from r275970, vendor/ntp/dist/ntpd/invoke-ntp.keys.texi head/contrib/ntp/ntpd/invoke-ntpd.menu - copied unchanged from r275970, vendor/ntp/dist/ntpd/invoke-ntpd.menu head/contrib/ntp/ntpd/invoke-ntpd.texi - copied, changed from r275970, vendor/ntp/dist/ntpd/invoke-ntpd.texi head/contrib/ntp/ntpd/keyword-gen-utd - copied, changed from r258945, vendor/ntp/dist/ntpd/keyword-gen-utd head/contrib/ntp/ntpd/keyword-gen.c (contents, props changed) - copied, changed from r258945, vendor/ntp/dist/ntpd/keyword-gen.c head/contrib/ntp/ntpd/ntp.conf.5man - copied, changed from r275970, vendor/ntp/dist/ntpd/ntp.conf.5man head/contrib/ntp/ntpd/ntp.conf.5mdoc - copied, changed from r275970, vendor/ntp/dist/ntpd/ntp.conf.5mdoc head/contrib/ntp/ntpd/ntp.conf.def - copied, changed from r275970, vendor/ntp/dist/ntpd/ntp.conf.def head/contrib/ntp/ntpd/ntp.conf.html - copied, changed from r275970, vendor/ntp/dist/ntpd/ntp.conf.html head/contrib/ntp/ntpd/ntp.conf.man.in - copied, changed from r275970, vendor/ntp/dist/ntpd/ntp.conf.man.in head/contrib/ntp/ntpd/ntp.conf.mdoc.in - copied, changed from r275970, vendor/ntp/dist/ntpd/ntp.conf.mdoc.in head/contrib/ntp/ntpd/ntp.conf.texi - copied unchanged from r275970, vendor/ntp/dist/ntpd/ntp.conf.texi head/contrib/ntp/ntpd/ntp.keys.5man - copied, changed from r275970, vendor/ntp/dist/ntpd/ntp.keys.5man head/contrib/ntp/ntpd/ntp.keys.5mdoc - copied, changed from r275970, vendor/ntp/dist/ntpd/ntp.keys.5mdoc head/contrib/ntp/ntpd/ntp.keys.def - copied unchanged from r275970, vendor/ntp/dist/ntpd/ntp.keys.def head/contrib/ntp/ntpd/ntp.keys.html - copied, changed from r275970, vendor/ntp/dist/ntpd/ntp.keys.html head/contrib/ntp/ntpd/ntp.keys.man.in - copied, changed from r275970, vendor/ntp/dist/ntpd/ntp.keys.man.in head/contrib/ntp/ntpd/ntp.keys.mdoc.in - copied, changed from r275970, vendor/ntp/dist/ntpd/ntp.keys.mdoc.in head/contrib/ntp/ntpd/ntp.keys.texi - copied unchanged from r275970, vendor/ntp/dist/ntpd/ntp.keys.texi head/contrib/ntp/ntpd/ntp_keyword.h (contents, props changed) - copied, changed from r258945, vendor/ntp/dist/ntpd/ntp_keyword.h head/contrib/ntp/ntpd/ntp_leapsec.c - copied, changed from r275970, vendor/ntp/dist/ntpd/ntp_leapsec.c head/contrib/ntp/ntpd/ntp_leapsec.h - copied unchanged from r275970, vendor/ntp/dist/ntpd/ntp_leapsec.h head/contrib/ntp/ntpd/ntp_parser.c - copied unchanged from r280261, vendor/ntp/dist/ntpd/ntp_parser.c head/contrib/ntp/ntpd/ntp_parser.h - copied unchanged from r280261, vendor/ntp/dist/ntpd/ntp_parser.h head/contrib/ntp/ntpd/ntp_parser.y - copied unchanged from r280261, vendor/ntp/dist/ntpd/ntp_parser.y head/contrib/ntp/ntpd/ntp_prio_q.c - copied unchanged from r275970, vendor/ntp/dist/ntpd/ntp_prio_q.c head/contrib/ntp/ntpd/ntp_scanner.c (contents, props changed) - copied, changed from r258945, vendor/ntp/dist/ntpd/ntp_scanner.c head/contrib/ntp/ntpd/ntp_scanner.h (contents, props changed) - copied, changed from r258945, vendor/ntp/dist/ntpd/ntp_scanner.h head/contrib/ntp/ntpd/ntp_signd.c (contents, props changed) - copied, changed from r258945, vendor/ntp/dist/ntpd/ntp_signd.c head/contrib/ntp/ntpd/ntpd.1ntpdman - copied, changed from r275970, vendor/ntp/dist/ntpd/ntpd.1ntpdman head/contrib/ntp/ntpd/ntpd.1ntpdmdoc - copied, changed from r275970, vendor/ntp/dist/ntpd/ntpd.1ntpdmdoc head/contrib/ntp/ntpd/ntpd.html - copied, changed from r275970, vendor/ntp/dist/ntpd/ntpd.html head/contrib/ntp/ntpd/ntpd.man.in - copied, changed from r275970, vendor/ntp/dist/ntpd/ntpd.man.in head/contrib/ntp/ntpd/ntpd.mdoc.in - copied, changed from r275970, vendor/ntp/dist/ntpd/ntpd.mdoc.in head/contrib/ntp/ntpd/ntpd.texi - copied unchanged from r275970, vendor/ntp/dist/ntpd/ntpd.texi head/contrib/ntp/ntpd/refclock_gpsdjson.c - copied, changed from r275970, vendor/ntp/dist/ntpd/refclock_gpsdjson.c head/contrib/ntp/ntpd/refclock_tsyncpci.c - copied unchanged from r275970, vendor/ntp/dist/ntpd/refclock_tsyncpci.c head/contrib/ntp/ntpdc/invoke-ntpdc.menu - copied unchanged from r275970, vendor/ntp/dist/ntpdc/invoke-ntpdc.menu head/contrib/ntp/ntpdc/invoke-ntpdc.texi - copied, changed from r275970, vendor/ntp/dist/ntpdc/invoke-ntpdc.texi head/contrib/ntp/ntpdc/ntpdc.1ntpdcman - copied, changed from r275970, vendor/ntp/dist/ntpdc/ntpdc.1ntpdcman head/contrib/ntp/ntpdc/ntpdc.1ntpdcmdoc - copied, changed from r275970, vendor/ntp/dist/ntpdc/ntpdc.1ntpdcmdoc head/contrib/ntp/ntpdc/ntpdc.html - copied, changed from r275970, vendor/ntp/dist/ntpdc/ntpdc.html head/contrib/ntp/ntpdc/ntpdc.man.in - copied, changed from r275970, vendor/ntp/dist/ntpdc/ntpdc.man.in head/contrib/ntp/ntpdc/ntpdc.mdoc.in - copied, changed from r275970, vendor/ntp/dist/ntpdc/ntpdc.mdoc.in head/contrib/ntp/ntpdc/ntpdc.texi - copied unchanged from r275970, vendor/ntp/dist/ntpdc/ntpdc.texi head/contrib/ntp/ntpq/invoke-ntpq.menu - copied unchanged from r275970, vendor/ntp/dist/ntpq/invoke-ntpq.menu head/contrib/ntp/ntpq/invoke-ntpq.texi - copied, changed from r275970, vendor/ntp/dist/ntpq/invoke-ntpq.texi head/contrib/ntp/ntpq/libntpq.c (contents, props changed) - copied, changed from r258945, vendor/ntp/dist/ntpq/libntpq.c head/contrib/ntp/ntpq/libntpq.h (contents, props changed) - copied, changed from r258945, vendor/ntp/dist/ntpq/libntpq.h head/contrib/ntp/ntpq/libntpq_subs.c (contents, props changed) - copied, changed from r258945, vendor/ntp/dist/ntpq/libntpq_subs.c head/contrib/ntp/ntpq/ntpq.1ntpqman - copied, changed from r275970, vendor/ntp/dist/ntpq/ntpq.1ntpqman head/contrib/ntp/ntpq/ntpq.1ntpqmdoc - copied, changed from r275970, vendor/ntp/dist/ntpq/ntpq.1ntpqmdoc head/contrib/ntp/ntpq/ntpq.html - copied, changed from r275970, vendor/ntp/dist/ntpq/ntpq.html head/contrib/ntp/ntpq/ntpq.man.in - copied, changed from r275970, vendor/ntp/dist/ntpq/ntpq.man.in head/contrib/ntp/ntpq/ntpq.mdoc.in - copied, changed from r275970, vendor/ntp/dist/ntpq/ntpq.mdoc.in head/contrib/ntp/ntpq/ntpq.texi - copied unchanged from r275970, vendor/ntp/dist/ntpq/ntpq.texi head/contrib/ntp/ntpsnmpd/ - copied from r258945, vendor/ntp/dist/ntpsnmpd/ head/contrib/ntp/ntpsnmpd/invoke-ntpsnmpd.menu - copied unchanged from r275970, vendor/ntp/dist/ntpsnmpd/invoke-ntpsnmpd.menu head/contrib/ntp/ntpsnmpd/invoke-ntpsnmpd.texi - copied, changed from r275970, vendor/ntp/dist/ntpsnmpd/invoke-ntpsnmpd.texi head/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdman - copied, changed from r275970, vendor/ntp/dist/ntpsnmpd/ntpsnmpd.1ntpsnmpdman head/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc - copied, changed from r275970, vendor/ntp/dist/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc head/contrib/ntp/ntpsnmpd/ntpsnmpd.html - copied, changed from r275970, vendor/ntp/dist/ntpsnmpd/ntpsnmpd.html head/contrib/ntp/ntpsnmpd/ntpsnmpd.man.in - copied, changed from r275970, vendor/ntp/dist/ntpsnmpd/ntpsnmpd.man.in head/contrib/ntp/ntpsnmpd/ntpsnmpd.mdoc.in - copied, changed from r275970, vendor/ntp/dist/ntpsnmpd/ntpsnmpd.mdoc.in head/contrib/ntp/ntpsnmpd/ntpsnmpd.texi - copied unchanged from r275970, vendor/ntp/dist/ntpsnmpd/ntpsnmpd.texi head/contrib/ntp/scripts/build/ - copied from r275970, vendor/ntp/dist/scripts/build/ head/contrib/ntp/scripts/calc_tickadj/ - copied from r275970, vendor/ntp/dist/scripts/calc_tickadj/ head/contrib/ntp/scripts/deprecated/ - copied from r275970, vendor/ntp/dist/scripts/deprecated/ head/contrib/ntp/scripts/invoke-plot_summary.menu - copied unchanged from r275970, vendor/ntp/dist/scripts/invoke-plot_summary.menu head/contrib/ntp/scripts/invoke-plot_summary.texi - copied, changed from r275970, vendor/ntp/dist/scripts/invoke-plot_summary.texi head/contrib/ntp/scripts/invoke-summary.menu - copied unchanged from r275970, vendor/ntp/dist/scripts/invoke-summary.menu head/contrib/ntp/scripts/invoke-summary.texi - copied, changed from r275970, vendor/ntp/dist/scripts/invoke-summary.texi head/contrib/ntp/scripts/lib/ - copied from r275970, vendor/ntp/dist/scripts/lib/ head/contrib/ntp/scripts/ntp-wait/ - copied from r275970, vendor/ntp/dist/scripts/ntp-wait/ head/contrib/ntp/scripts/ntpsweep/ - copied from r275970, vendor/ntp/dist/scripts/ntpsweep/ head/contrib/ntp/scripts/ntptrace/ - copied from r275970, vendor/ntp/dist/scripts/ntptrace/ head/contrib/ntp/scripts/plot_summary-opts - copied, changed from r275970, vendor/ntp/dist/scripts/plot_summary-opts head/contrib/ntp/scripts/plot_summary-opts.def - copied unchanged from r275970, vendor/ntp/dist/scripts/plot_summary-opts.def head/contrib/ntp/scripts/plot_summary.1plot_summaryman - copied, changed from r275970, vendor/ntp/dist/scripts/plot_summary.1plot_summaryman head/contrib/ntp/scripts/plot_summary.1plot_summarymdoc - copied, changed from r275970, vendor/ntp/dist/scripts/plot_summary.1plot_summarymdoc head/contrib/ntp/scripts/plot_summary.html - copied, changed from r275970, vendor/ntp/dist/scripts/plot_summary.html head/contrib/ntp/scripts/plot_summary.man.in - copied, changed from r275970, vendor/ntp/dist/scripts/plot_summary.man.in head/contrib/ntp/scripts/plot_summary.mdoc.in - copied, changed from r275970, vendor/ntp/dist/scripts/plot_summary.mdoc.in head/contrib/ntp/scripts/plot_summary.texi - copied unchanged from r275970, vendor/ntp/dist/scripts/plot_summary.texi head/contrib/ntp/scripts/rc/ - copied from r275970, vendor/ntp/dist/scripts/rc/ head/contrib/ntp/scripts/summary-opts - copied, changed from r275970, vendor/ntp/dist/scripts/summary-opts head/contrib/ntp/scripts/summary-opts.def - copied unchanged from r275970, vendor/ntp/dist/scripts/summary-opts.def head/contrib/ntp/scripts/summary.1summaryman - copied, changed from r275970, vendor/ntp/dist/scripts/summary.1summaryman head/contrib/ntp/scripts/summary.1summarymdoc - copied, changed from r275970, vendor/ntp/dist/scripts/summary.1summarymdoc head/contrib/ntp/scripts/summary.html - copied, changed from r275970, vendor/ntp/dist/scripts/summary.html head/contrib/ntp/scripts/summary.man.in - copied, changed from r275970, vendor/ntp/dist/scripts/summary.man.in head/contrib/ntp/scripts/summary.mdoc.in - copied, changed from r275970, vendor/ntp/dist/scripts/summary.mdoc.in head/contrib/ntp/scripts/summary.texi - copied unchanged from r275970, vendor/ntp/dist/scripts/summary.texi head/contrib/ntp/sntp/ag-tpl/ - copied from r275970, vendor/ntp/dist/sntp/ag-tpl/ head/contrib/ntp/sntp/check-libntp.mf - copied unchanged from r275970, vendor/ntp/dist/sntp/check-libntp.mf head/contrib/ntp/sntp/check-libopts.mf - copied unchanged from r275970, vendor/ntp/dist/sntp/check-libopts.mf head/contrib/ntp/sntp/crypto.c (contents, props changed) - copied, changed from r258945, vendor/ntp/dist/sntp/crypto.c head/contrib/ntp/sntp/crypto.h (contents, props changed) - copied, changed from r258945, vendor/ntp/dist/sntp/crypto.h - copied unchanged from r258945, vendor/ntp/dist/sntp/data_formats.h head/contrib/ntp/sntp/deps-ver - copied, changed from r258945, vendor/ntp/dist/sntp/deps-ver head/contrib/ntp/sntp/depsver.mf - copied, changed from r258945, vendor/ntp/dist/sntp/depsver.mf head/contrib/ntp/sntp/include/ - copied from r275970, vendor/ntp/dist/sntp/include/ head/contrib/ntp/sntp/includes.mf - copied unchanged from r275970, vendor/ntp/dist/sntp/includes.mf head/contrib/ntp/sntp/invoke-sntp.menu - copied unchanged from r275970, vendor/ntp/dist/sntp/invoke-sntp.menu head/contrib/ntp/sntp/invoke-sntp.texi - copied, changed from r275970, vendor/ntp/dist/sntp/invoke-sntp.texi head/contrib/ntp/sntp/kod_management.c (contents, props changed) - copied, changed from r258945, vendor/ntp/dist/sntp/kod_management.c head/contrib/ntp/sntp/kod_management.h (contents, props changed) - copied, changed from r258945, vendor/ntp/dist/sntp/kod_management.h head/contrib/ntp/sntp/libevent/ - copied from r275970, vendor/ntp/dist/sntp/libevent/ head/contrib/ntp/sntp/libopts/COPYING.gplv3 - copied, changed from r258945, vendor/ntp/dist/sntp/libopts/COPYING.gplv3 head/contrib/ntp/sntp/libopts/COPYING.lgplv3 - copied, changed from r258945, vendor/ntp/dist/sntp/libopts/COPYING.lgplv3 head/contrib/ntp/sntp/libopts/ag-char-map.h (contents, props changed) - copied, changed from r258945, vendor/ntp/dist/sntp/libopts/ag-char-map.h head/contrib/ntp/sntp/libopts/alias.c - copied unchanged from r275970, vendor/ntp/dist/sntp/libopts/alias.c head/contrib/ntp/sntp/libopts/ao-strs.c - copied unchanged from r275970, vendor/ntp/dist/sntp/libopts/ao-strs.c head/contrib/ntp/sntp/libopts/ao-strs.h - copied unchanged from r275970, vendor/ntp/dist/sntp/libopts/ao-strs.h head/contrib/ntp/sntp/libopts/autoopts/project.h (contents, props changed) - copied, changed from r258945, vendor/ntp/dist/sntp/libopts/autoopts/project.h head/contrib/ntp/sntp/libopts/check.c - copied unchanged from r275970, vendor/ntp/dist/sntp/libopts/check.c head/contrib/ntp/sntp/libopts/compat/_Noreturn.h - copied unchanged from r275970, vendor/ntp/dist/sntp/libopts/compat/_Noreturn.h head/contrib/ntp/sntp/libopts/enum.c - copied, changed from r275970, vendor/ntp/dist/sntp/libopts/enum.c head/contrib/ntp/sntp/libopts/env.c - copied unchanged from r275970, vendor/ntp/dist/sntp/libopts/env.c head/contrib/ntp/sntp/libopts/file.c (contents, props changed) - copied, changed from r258945, vendor/ntp/dist/sntp/libopts/file.c head/contrib/ntp/sntp/libopts/find.c - copied, changed from r275970, vendor/ntp/dist/sntp/libopts/find.c head/contrib/ntp/sntp/libopts/gettext.h - copied unchanged from r275970, vendor/ntp/dist/sntp/libopts/gettext.h head/contrib/ntp/sntp/libopts/init.c - copied, changed from r275970, vendor/ntp/dist/sntp/libopts/init.c head/contrib/ntp/sntp/libopts/intprops.h - copied unchanged from r275970, vendor/ntp/dist/sntp/libopts/intprops.h head/contrib/ntp/sntp/libopts/m4/stdnoreturn.m4 - copied unchanged from r275970, vendor/ntp/dist/sntp/libopts/m4/stdnoreturn.m4 head/contrib/ntp/sntp/libopts/option-value-type.c - copied unchanged from r275970, vendor/ntp/dist/sntp/libopts/option-value-type.c head/contrib/ntp/sntp/libopts/option-value-type.h - copied unchanged from r275970, vendor/ntp/dist/sntp/libopts/option-value-type.h head/contrib/ntp/sntp/libopts/option-xat-attribute.c - copied unchanged from r275970, vendor/ntp/dist/sntp/libopts/option-xat-attribute.c head/contrib/ntp/sntp/libopts/option-xat-attribute.h - copied unchanged from r275970, vendor/ntp/dist/sntp/libopts/option-xat-attribute.h head/contrib/ntp/sntp/libopts/parse-duration.c (contents, props changed) - copied, changed from r258945, vendor/ntp/dist/sntp/libopts/parse-duration.c head/contrib/ntp/sntp/libopts/parse-duration.h (contents, props changed) - copied, changed from r258945, vendor/ntp/dist/sntp/libopts/parse-duration.h head/contrib/ntp/sntp/libopts/reset.c (contents, props changed) - copied, changed from r258945, vendor/ntp/dist/sntp/libopts/reset.c head/contrib/ntp/sntp/libopts/stdnoreturn.in.h - copied unchanged from r275970, vendor/ntp/dist/sntp/libopts/stdnoreturn.in.h head/contrib/ntp/sntp/libopts/time.c (contents, props changed) - copied, changed from r258945, vendor/ntp/dist/sntp/libopts/time.c head/contrib/ntp/sntp/loc/ - copied from r275970, vendor/ntp/dist/sntp/loc/ head/contrib/ntp/sntp/log.c (contents, props changed) - copied, changed from r258945, vendor/ntp/dist/sntp/log.c head/contrib/ntp/sntp/log.h (contents, props changed) - copied, changed from r258945, vendor/ntp/dist/sntp/log.h head/contrib/ntp/sntp/m4/ - copied from r275970, vendor/ntp/dist/sntp/m4/ head/contrib/ntp/sntp/main.h (contents, props changed) - copied, changed from r258945, vendor/ntp/dist/sntp/main.h head/contrib/ntp/sntp/networking.c (contents, props changed) - copied, changed from r258945, vendor/ntp/dist/sntp/networking.c head/contrib/ntp/sntp/networking.h (contents, props changed) - copied, changed from r258945, vendor/ntp/dist/sntp/networking.h head/contrib/ntp/sntp/scm-rev - copied unchanged from r275970, vendor/ntp/dist/sntp/scm-rev head/contrib/ntp/sntp/scripts/ - copied from r275970, vendor/ntp/dist/sntp/scripts/ head/contrib/ntp/sntp/sntp.1sntpman - copied, changed from r275970, vendor/ntp/dist/sntp/sntp.1sntpman head/contrib/ntp/sntp/sntp.1sntpmdoc - copied, changed from r275970, vendor/ntp/dist/sntp/sntp.1sntpmdoc head/contrib/ntp/sntp/sntp.c (contents, props changed) - copied, changed from r258945, vendor/ntp/dist/sntp/sntp.c head/contrib/ntp/sntp/sntp.html (contents, props changed) - copied, changed from r258945, vendor/ntp/dist/sntp/sntp.html head/contrib/ntp/sntp/sntp.man.in - copied, changed from r275970, vendor/ntp/dist/sntp/sntp.man.in head/contrib/ntp/sntp/sntp.mdoc.in - copied, changed from r275970, vendor/ntp/dist/sntp/sntp.mdoc.in head/contrib/ntp/sntp/sntp.texi - copied, changed from r258945, vendor/ntp/dist/sntp/sntp.texi head/contrib/ntp/sntp/tests/ - copied from r275970, vendor/ntp/dist/sntp/tests/ head/contrib/ntp/sntp/tests_main.cpp - copied unchanged from r275970, vendor/ntp/dist/sntp/tests_main.cpp head/contrib/ntp/sntp/tests_main.h - copied unchanged from r275970, vendor/ntp/dist/sntp/tests_main.h head/contrib/ntp/sntp/utilities.c (contents, props changed) - copied, changed from r258945, vendor/ntp/dist/sntp/utilities.c head/contrib/ntp/sntp/utilities.h (contents, props changed) - copied, changed from r258945, vendor/ntp/dist/sntp/utilities.h head/contrib/ntp/tests/ - copied from r275970, vendor/ntp/dist/tests/ head/contrib/ntp/util/invoke-ntp-keygen.menu - copied unchanged from r275970, vendor/ntp/dist/util/invoke-ntp-keygen.menu head/contrib/ntp/util/invoke-ntp-keygen.texi - copied, changed from r275970, vendor/ntp/dist/util/invoke-ntp-keygen.texi head/contrib/ntp/util/ntp-keygen.1ntp-keygenman - copied, changed from r275970, vendor/ntp/dist/util/ntp-keygen.1ntp-keygenman head/contrib/ntp/util/ntp-keygen.1ntp-keygenmdoc - copied, changed from r275970, vendor/ntp/dist/util/ntp-keygen.1ntp-keygenmdoc head/contrib/ntp/util/ntp-keygen.html - copied, changed from r275970, vendor/ntp/dist/util/ntp-keygen.html head/contrib/ntp/util/ntp-keygen.man.in - copied, changed from r275970, vendor/ntp/dist/util/ntp-keygen.man.in head/contrib/ntp/util/ntp-keygen.mdoc.in - copied, changed from r275970, vendor/ntp/dist/util/ntp-keygen.mdoc.in head/contrib/ntp/util/ntp-keygen.texi - copied unchanged from r275970, vendor/ntp/dist/util/ntp-keygen.texi head/contrib/ntp/util/tg2.c - copied unchanged from r275970, vendor/ntp/dist/util/tg2.c head/contrib/ntp/ylwrap - copied unchanged from r258945, vendor/ntp/dist/ylwrap head/usr.sbin/ntp/doc/drivers/ head/usr.sbin/ntp/doc/drivers/Makefile (contents, props changed) head/usr.sbin/ntp/doc/drivers/icons/ head/usr.sbin/ntp/doc/drivers/icons/Makefile (contents, props changed) head/usr.sbin/ntp/doc/drivers/scripts/ head/usr.sbin/ntp/doc/drivers/scripts/Makefile (contents, props changed) head/usr.sbin/ntp/doc/hints/ head/usr.sbin/ntp/doc/hints/Makefile (contents, props changed) head/usr.sbin/ntp/doc/icons/ head/usr.sbin/ntp/doc/icons/Makefile (contents, props changed) head/usr.sbin/ntp/doc/pic/ head/usr.sbin/ntp/doc/pic/Makefile (contents, props changed) head/usr.sbin/ntp/doc/scripts/ head/usr.sbin/ntp/doc/scripts/Makefile (contents, props changed) head/usr.sbin/ntp/doc/sntp.8 (contents, props changed) head/usr.sbin/ntp/libntpevent/ head/usr.sbin/ntp/libntpevent/Makefile (contents, props changed) head/usr.sbin/ntp/libntpevent/event2/ head/usr.sbin/ntp/libntpevent/event2/event-config.h (contents, props changed) head/usr.sbin/ntp/ntpdc/nl.c (contents, props changed) Directory Properties: head/contrib/ntp/include/ntp_lineedit.h (props changed) head/contrib/ntp/include/ntp_lists.h (props changed) head/contrib/ntp/include/ssl_applink.c (props changed) head/contrib/ntp/sntp/data_formats.h (props changed) Deleted: head/contrib/ntp/arlib/ head/contrib/ntp/clockstuff/clktest.c head/contrib/ntp/excludes head/contrib/ntp/html/build/ head/contrib/ntp/html/drivers/driver2.html head/contrib/ntp/html/gadget.html head/contrib/ntp/html/groups.html head/contrib/ntp/html/ldisc.html head/contrib/ntp/html/manyopt.html head/contrib/ntp/html/measure.html head/contrib/ntp/html/mx4200data.html head/contrib/ntp/html/notes.html head/contrib/ntp/html/scripts/links10.txt head/contrib/ntp/html/scripts/links11.txt head/contrib/ntp/html/scripts/links12.txt head/contrib/ntp/html/scripts/links7.txt head/contrib/ntp/html/scripts/links8.txt head/contrib/ntp/html/scripts/links9.txt head/contrib/ntp/include/autogen-version.def head/contrib/ntp/include/copyright.def head/contrib/ntp/include/debug-opt.def head/contrib/ntp/include/global.h head/contrib/ntp/include/homerc.def head/contrib/ntp/include/isc/app.h head/contrib/ntp/include/isc/assertions.h head/contrib/ntp/include/isc/boolean.h head/contrib/ntp/include/isc/buffer.h head/contrib/ntp/include/isc/error.h head/contrib/ntp/include/isc/formatcheck.h head/contrib/ntp/include/isc/int.h head/contrib/ntp/include/isc/interfaceiter.h head/contrib/ntp/include/isc/ipv6.h head/contrib/ntp/include/isc/lang.h head/contrib/ntp/include/isc/lib.h head/contrib/ntp/include/isc/list.h head/contrib/ntp/include/isc/magic.h head/contrib/ntp/include/isc/msgcat.h head/contrib/ntp/include/isc/msgs.h head/contrib/ntp/include/isc/mutex.h head/contrib/ntp/include/isc/net.h head/contrib/ntp/include/isc/netaddr.h head/contrib/ntp/include/isc/netscope.h head/contrib/ntp/include/isc/offset.h head/contrib/ntp/include/isc/once.h head/contrib/ntp/include/isc/platform.h head/contrib/ntp/include/isc/print.h head/contrib/ntp/include/isc/region.h head/contrib/ntp/include/isc/result.h head/contrib/ntp/include/isc/sockaddr.h head/contrib/ntp/include/isc/strerror.h head/contrib/ntp/include/isc/string.h head/contrib/ntp/include/isc/types.h head/contrib/ntp/include/isc/util.h head/contrib/ntp/include/ntp_sprintf.h head/contrib/ntp/include/rsa_md5.h head/contrib/ntp/include/version.def head/contrib/ntp/kernel/README head/contrib/ntp/kernel/chuinit.c head/contrib/ntp/kernel/clkinit.c head/contrib/ntp/kernel/sys/chudefs.h head/contrib/ntp/kernel/sys/clkdefs.h head/contrib/ntp/kernel/tty_chu.c head/contrib/ntp/kernel/tty_chu_STREAMS.c head/contrib/ntp/kernel/tty_clk.c head/contrib/ntp/kernel/tty_clk_STREAMS.c head/contrib/ntp/libisc/ head/contrib/ntp/libntp/fptoa.c head/contrib/ntp/libntp/fptoms.c head/contrib/ntp/libntp/inttoa.c head/contrib/ntp/libntp/lib_strbuf.h head/contrib/ntp/libntp/md5c.c head/contrib/ntp/libntp/memmove.c head/contrib/ntp/libntp/mfptoa.c head/contrib/ntp/libntp/mfptoms.c head/contrib/ntp/libntp/msutotsf.c head/contrib/ntp/libntp/strerror.c head/contrib/ntp/libntp/strstr.c head/contrib/ntp/libntp/tsftomsu.c head/contrib/ntp/libntp/tstotv.c head/contrib/ntp/libntp/tvtoa.c head/contrib/ntp/libntp/tvtots.c head/contrib/ntp/libntp/uinttoa.c head/contrib/ntp/libntp/utvtoa.c head/contrib/ntp/libopts/ head/contrib/ntp/m4/ head/contrib/ntp/ntpd/ntp_intres.c head/contrib/ntp/ntpd/ntpd-opts.menu head/contrib/ntp/ntpd/ntpd-opts.texi head/contrib/ntp/ntpd/ntpd.1 head/contrib/ntp/ntpd/ntpdsim-opts.c head/contrib/ntp/ntpd/ntpdsim-opts.def head/contrib/ntp/ntpd/ntpdsim-opts.h head/contrib/ntp/ntpd/ntpdsim-opts.menu head/contrib/ntp/ntpd/ntpdsim-opts.texi head/contrib/ntp/ntpd/ntpdsim.1 head/contrib/ntp/ntpd/refclock_trak.c head/contrib/ntp/ntpdate/ntptime_config.c head/contrib/ntp/ntpdate/ntptimeset.c head/contrib/ntp/ntpdc/ntpdc-opts.menu head/contrib/ntp/ntpdc/ntpdc-opts.texi head/contrib/ntp/ntpdc/ntpdc.1 head/contrib/ntp/ntpq/ntpq-opts.menu head/contrib/ntp/ntpq/ntpq-opts.texi head/contrib/ntp/ntpq/ntpq.1 head/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.menu head/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.texi head/contrib/ntp/ntpsnmpd/ntpsnmpd.1 head/contrib/ntp/scripts/VersionName head/contrib/ntp/scripts/calc_tickadj.in head/contrib/ntp/scripts/checktime.in head/contrib/ntp/scripts/fixautomakedepsmagic head/contrib/ntp/scripts/freq_adj.in head/contrib/ntp/scripts/genCommitLog head/contrib/ntp/scripts/genver head/contrib/ntp/scripts/hpadjtime.sh head/contrib/ntp/scripts/html2man.in head/contrib/ntp/scripts/mkver.in head/contrib/ntp/scripts/ntp-close head/contrib/ntp/scripts/ntp-groper head/contrib/ntp/scripts/ntp-restart head/contrib/ntp/scripts/ntp-status head/contrib/ntp/scripts/ntp-wait.in head/contrib/ntp/scripts/ntpsweep.in head/contrib/ntp/scripts/ntptrace.in head/contrib/ntp/scripts/rc1/ head/contrib/ntp/scripts/rc2/ head/contrib/ntp/sntp/README head/contrib/ntp/sntp/autogen-version.def head/contrib/ntp/sntp/header.h head/contrib/ntp/sntp/internet.c head/contrib/ntp/sntp/internet.h head/contrib/ntp/sntp/kludges.h head/contrib/ntp/sntp/libopts/COPYING.lgpl head/contrib/ntp/sntp/libopts/enumeration.c head/contrib/ntp/sntp/libopts/environment.c head/contrib/ntp/sntp/sntp-opts.menu head/contrib/ntp/sntp/sntp-opts.texi head/contrib/ntp/sntp/sntp.1 head/contrib/ntp/sntp/socket.c head/contrib/ntp/sntp/timing.c head/contrib/ntp/sntp/unix.c head/contrib/ntp/sntp/version.def head/contrib/ntp/util/ntp-keygen-opts.menu head/contrib/ntp/util/ntp-keygen-opts.texi head/contrib/ntp/util/ntp-keygen.1 head/contrib/ntp/version head/contrib/ntp/version.m4 Modified: head/contrib/ntp/COPYRIGHT (contents, props changed) head/contrib/ntp/ChangeLog (contents, props changed) head/contrib/ntp/CommitLog head/contrib/ntp/Makefile.am (contents, props changed) head/contrib/ntp/Makefile.in (contents, props changed) head/contrib/ntp/NEWS (contents, props changed) head/contrib/ntp/README.hackers (contents, props changed) head/contrib/ntp/WHERE-TO-START (contents, props changed) head/contrib/ntp/aclocal.m4 (contents, props changed) head/contrib/ntp/adjtimed/Makefile.am (contents, props changed) head/contrib/ntp/adjtimed/Makefile.in (contents, props changed) head/contrib/ntp/bincheck.mf head/contrib/ntp/bootstrap head/contrib/ntp/build (contents, props changed) head/contrib/ntp/clockstuff/Makefile.am (contents, props changed) head/contrib/ntp/clockstuff/Makefile.in (contents, props changed) head/contrib/ntp/clockstuff/README (contents, props changed) head/contrib/ntp/clockstuff/chutest.c (contents, props changed) head/contrib/ntp/clockstuff/propdelay.c (contents, props changed) head/contrib/ntp/conf/beauregard.conf (contents, props changed) head/contrib/ntp/config.guess (contents, props changed) head/contrib/ntp/config.h.in (contents, props changed) head/contrib/ntp/config.sub (contents, props changed) head/contrib/ntp/configure (contents, props changed) head/contrib/ntp/configure.ac head/contrib/ntp/dot.emacs (contents, props changed) head/contrib/ntp/flock-build (contents, props changed) head/contrib/ntp/html/accopt.html (contents, props changed) head/contrib/ntp/html/assoc.html (contents, props changed) head/contrib/ntp/html/audio.html (contents, props changed) head/contrib/ntp/html/authopt.html (contents, props changed) head/contrib/ntp/html/clockopt.html (contents, props changed) head/contrib/ntp/html/confopt.html (contents, props changed) head/contrib/ntp/html/copyright.html (contents, props changed) head/contrib/ntp/html/debug.html (contents, props changed) head/contrib/ntp/html/drivers/driver1.html (contents, props changed) head/contrib/ntp/html/drivers/driver10.html (contents, props changed) head/contrib/ntp/html/drivers/driver11.html (contents, props changed) head/contrib/ntp/html/drivers/driver12.html (contents, props changed) head/contrib/ntp/html/drivers/driver16.html (contents, props changed) head/contrib/ntp/html/drivers/driver18.html (contents, props changed) head/contrib/ntp/html/drivers/driver19.html (contents, props changed) head/contrib/ntp/html/drivers/driver20.html (contents, props changed) head/contrib/ntp/html/drivers/driver22.html (contents, props changed) head/contrib/ntp/html/drivers/driver26.html (contents, props changed) head/contrib/ntp/html/drivers/driver27.html (contents, props changed) head/contrib/ntp/html/drivers/driver28.html (contents, props changed) head/contrib/ntp/html/drivers/driver29.html (contents, props changed) head/contrib/ntp/html/drivers/driver3.html (contents, props changed) head/contrib/ntp/html/drivers/driver30.html (contents, props changed) head/contrib/ntp/html/drivers/driver31.html head/contrib/ntp/html/drivers/driver32.html (contents, props changed) head/contrib/ntp/html/drivers/driver33.html (contents, props changed) head/contrib/ntp/html/drivers/driver34.html (contents, props changed) head/contrib/ntp/html/drivers/driver35.html (contents, props changed) head/contrib/ntp/html/drivers/driver36.html (contents, props changed) head/contrib/ntp/html/drivers/driver37.html (contents, props changed) head/contrib/ntp/html/drivers/driver38.html (contents, props changed) head/contrib/ntp/html/drivers/driver39.html (contents, props changed) head/contrib/ntp/html/drivers/driver4.html (contents, props changed) head/contrib/ntp/html/drivers/driver40.html (contents, props changed) head/contrib/ntp/html/drivers/driver42.html (contents, props changed) head/contrib/ntp/html/drivers/driver43.html (contents, props changed) head/contrib/ntp/html/drivers/driver44.html (contents, props changed) head/contrib/ntp/html/drivers/driver5.html (contents, props changed) head/contrib/ntp/html/drivers/driver6.html (contents, props changed) head/contrib/ntp/html/drivers/driver7.html (contents, props changed) head/contrib/ntp/html/drivers/driver8.html (contents, props changed) head/contrib/ntp/html/drivers/driver9.html (contents, props changed) head/contrib/ntp/html/drivers/oncore-shmem.html (contents, props changed) head/contrib/ntp/html/drivers/scripts/footer.txt head/contrib/ntp/html/drivers/scripts/style.css head/contrib/ntp/html/drivers/tf582_4.html head/contrib/ntp/html/extern.html (contents, props changed) head/contrib/ntp/html/howto.html (contents, props changed) head/contrib/ntp/html/index.html (contents, props changed) head/contrib/ntp/html/kern.html (contents, props changed) head/contrib/ntp/html/keygen.html (contents, props changed) head/contrib/ntp/html/miscopt.html (contents, props changed) head/contrib/ntp/html/monopt.html (contents, props changed) head/contrib/ntp/html/msyslog.html (contents, props changed) head/contrib/ntp/html/ntp_conf.html head/contrib/ntp/html/ntpd.html (contents, props changed) head/contrib/ntp/html/ntpdate.html (contents, props changed) head/contrib/ntp/html/ntpdc.html (contents, props changed) head/contrib/ntp/html/ntpdsim.html (contents, props changed) head/contrib/ntp/html/ntpdsim_new.html head/contrib/ntp/html/ntpq.html (contents, props changed) head/contrib/ntp/html/ntptime.html (contents, props changed) head/contrib/ntp/html/ntptrace.html (contents, props changed) head/contrib/ntp/html/parsedata.html (contents, props changed) head/contrib/ntp/html/parsenew.html (contents, props changed) head/contrib/ntp/html/pps.html (contents, props changed) head/contrib/ntp/html/prefer.html (contents, props changed) head/contrib/ntp/html/rdebug.html (contents, props changed) head/contrib/ntp/html/refclock.html (contents, props changed) head/contrib/ntp/html/release.html (contents, props changed) head/contrib/ntp/html/scripts/footer.txt (contents, props changed) head/contrib/ntp/html/scripts/style.css (contents, props changed) head/contrib/ntp/html/sntp.html (contents, props changed) head/contrib/ntp/html/tickadj.html (contents, props changed) head/contrib/ntp/include/Makefile.am (contents, props changed) head/contrib/ntp/include/Makefile.in (contents, props changed) head/contrib/ntp/include/audio.h (contents, props changed) head/contrib/ntp/include/binio.h (contents, props changed) head/contrib/ntp/include/icom.h (contents, props changed) head/contrib/ntp/include/ieee754io.h (contents, props changed) head/contrib/ntp/include/iosignal.h (contents, props changed) head/contrib/ntp/include/isc/Makefile.am (contents, props changed) head/contrib/ntp/include/isc/Makefile.in (contents, props changed) head/contrib/ntp/include/isc/mem.h (contents, props changed) head/contrib/ntp/include/l_stdlib.h (contents, props changed) head/contrib/ntp/include/mbg_gps166.h (contents, props changed) head/contrib/ntp/include/ntp.h (contents, props changed) head/contrib/ntp/include/ntp_calendar.h (contents, props changed) head/contrib/ntp/include/ntp_cmdargs.h (contents, props changed) head/contrib/ntp/include/ntp_config.h (contents, props changed) head/contrib/ntp/include/ntp_control.h (contents, props changed) head/contrib/ntp/include/ntp_crypto.h (contents, props changed) head/contrib/ntp/include/ntp_debug.h head/contrib/ntp/include/ntp_filegen.h (contents, props changed) head/contrib/ntp/include/ntp_fp.h (contents, props changed) head/contrib/ntp/include/ntp_io.h (contents, props changed) head/contrib/ntp/include/ntp_machine.h (contents, props changed) head/contrib/ntp/include/ntp_malloc.h (contents, props changed) head/contrib/ntp/include/ntp_md5.h (contents, props changed) head/contrib/ntp/include/ntp_proto.h (contents, props changed) head/contrib/ntp/include/ntp_random.h head/contrib/ntp/include/ntp_refclock.h (contents, props changed) head/contrib/ntp/include/ntp_request.h (contents, props changed) head/contrib/ntp/include/ntp_rfc2553.h (contents, props changed) head/contrib/ntp/include/ntp_select.h (contents, props changed) head/contrib/ntp/include/ntp_stdlib.h (contents, props changed) head/contrib/ntp/include/ntp_string.h (contents, props changed) head/contrib/ntp/include/ntp_syscall.h (contents, props changed) head/contrib/ntp/include/ntp_syslog.h (contents, props changed) head/contrib/ntp/include/ntp_tty.h (contents, props changed) head/contrib/ntp/include/ntp_types.h (contents, props changed) head/contrib/ntp/include/ntp_unixtime.h (contents, props changed) head/contrib/ntp/include/ntpd.h (contents, props changed) head/contrib/ntp/include/ntpsim.h (contents, props changed) head/contrib/ntp/include/parse.h (contents, props changed) head/contrib/ntp/include/recvbuff.h (contents, props changed) head/contrib/ntp/include/timepps-SCO.h head/contrib/ntp/include/timepps-Solaris.h head/contrib/ntp/include/timepps-SunOS.h head/contrib/ntp/include/trimble.h (contents, props changed) head/contrib/ntp/kernel/Makefile.am (contents, props changed) head/contrib/ntp/kernel/Makefile.in (contents, props changed) head/contrib/ntp/kernel/sys/Makefile.am (contents, props changed) head/contrib/ntp/kernel/sys/Makefile.in (contents, props changed) head/contrib/ntp/lib/isc/alpha/include/isc/atomic.h (contents, props changed) head/contrib/ntp/lib/isc/api head/contrib/ntp/lib/isc/assertions.c (contents, props changed) head/contrib/ntp/lib/isc/base32.c (contents, props changed) head/contrib/ntp/lib/isc/base64.c (contents, props changed) head/contrib/ntp/lib/isc/entropy.c (contents, props changed) head/contrib/ntp/lib/isc/event.c (contents, props changed) head/contrib/ntp/lib/isc/hash.c (contents, props changed) head/contrib/ntp/lib/isc/heap.c (contents, props changed) head/contrib/ntp/lib/isc/hmacmd5.c (contents, props changed) head/contrib/ntp/lib/isc/hmacsha.c (contents, props changed) head/contrib/ntp/lib/isc/httpd.c (contents, props changed) head/contrib/ntp/lib/isc/ia64/include/isc/atomic.h (contents, props changed) head/contrib/ntp/lib/isc/include/isc/app.h (contents, props changed) head/contrib/ntp/lib/isc/include/isc/assertions.h (contents, props changed) head/contrib/ntp/lib/isc/include/isc/buffer.h (contents, props changed) head/contrib/ntp/lib/isc/include/isc/entropy.h (contents, props changed) head/contrib/ntp/lib/isc/include/isc/error.h (contents, props changed) head/contrib/ntp/lib/isc/include/isc/file.h (contents, props changed) head/contrib/ntp/lib/isc/include/isc/fsaccess.h (contents, props changed) head/contrib/ntp/lib/isc/include/isc/hash.h (contents, props changed) head/contrib/ntp/lib/isc/include/isc/heap.h (contents, props changed) head/contrib/ntp/lib/isc/include/isc/hmacmd5.h (contents, props changed) head/contrib/ntp/lib/isc/include/isc/hmacsha.h (contents, props changed) head/contrib/ntp/lib/isc/include/isc/lib.h (contents, props changed) head/contrib/ntp/lib/isc/include/isc/list.h (contents, props changed) head/contrib/ntp/lib/isc/include/isc/log.h (contents, props changed) head/contrib/ntp/lib/isc/include/isc/md5.h (contents, props changed) head/contrib/ntp/lib/isc/include/isc/mem.h (contents, props changed) head/contrib/ntp/lib/isc/include/isc/msgs.h (contents, props changed) head/contrib/ntp/lib/isc/include/isc/netaddr.h (contents, props changed) head/contrib/ntp/lib/isc/include/isc/netscope.h (contents, props changed) head/contrib/ntp/lib/isc/include/isc/platform.h.in (contents, props changed) head/contrib/ntp/lib/isc/include/isc/portset.h (contents, props changed) head/contrib/ntp/lib/isc/include/isc/radix.h (contents, props changed) head/contrib/ntp/lib/isc/include/isc/random.h (contents, props changed) head/contrib/ntp/lib/isc/include/isc/ratelimiter.h (contents, props changed) head/contrib/ntp/lib/isc/include/isc/refcount.h (contents, props changed) head/contrib/ntp/lib/isc/include/isc/result.h (contents, props changed) head/contrib/ntp/lib/isc/include/isc/resultclass.h (contents, props changed) head/contrib/ntp/lib/isc/include/isc/serial.h (contents, props changed) head/contrib/ntp/lib/isc/include/isc/sha1.h (contents, props changed) head/contrib/ntp/lib/isc/include/isc/sha2.h (contents, props changed) head/contrib/ntp/lib/isc/include/isc/sockaddr.h (contents, props changed) head/contrib/ntp/lib/isc/include/isc/socket.h (contents, props changed) head/contrib/ntp/lib/isc/include/isc/stats.h (contents, props changed) head/contrib/ntp/lib/isc/include/isc/symtab.h (contents, props changed) head/contrib/ntp/lib/isc/include/isc/task.h (contents, props changed) head/contrib/ntp/lib/isc/include/isc/taskpool.h (contents, props changed) head/contrib/ntp/lib/isc/include/isc/timer.h (contents, props changed) head/contrib/ntp/lib/isc/include/isc/types.h (contents, props changed) head/contrib/ntp/lib/isc/include/isc/util.h (contents, props changed) head/contrib/ntp/lib/isc/inet_aton.c (contents, props changed) head/contrib/ntp/lib/isc/inet_ntop.c (contents, props changed) head/contrib/ntp/lib/isc/inet_pton.c (contents, props changed) head/contrib/ntp/lib/isc/iterated_hash.c (contents, props changed) head/contrib/ntp/lib/isc/lib.c (contents, props changed) head/contrib/ntp/lib/isc/log.c (contents, props changed) head/contrib/ntp/lib/isc/md5.c (contents, props changed) head/contrib/ntp/lib/isc/mem.c (contents, props changed) head/contrib/ntp/lib/isc/mutexblock.c (contents, props changed) head/contrib/ntp/lib/isc/netaddr.c (contents, props changed) head/contrib/ntp/lib/isc/powerpc/include/isc/atomic.h (contents, props changed) head/contrib/ntp/lib/isc/print.c (contents, props changed) head/contrib/ntp/lib/isc/pthreads/mutex.c (contents, props changed) head/contrib/ntp/lib/isc/radix.c (contents, props changed) head/contrib/ntp/lib/isc/random.c (contents, props changed) head/contrib/ntp/lib/isc/result.c (contents, props changed) head/contrib/ntp/lib/isc/rwlock.c (contents, props changed) head/contrib/ntp/lib/isc/sha1.c (contents, props changed) head/contrib/ntp/lib/isc/sha2.c (contents, props changed) head/contrib/ntp/lib/isc/sockaddr.c (contents, props changed) head/contrib/ntp/lib/isc/sparc64/include/isc/atomic.h (contents, props changed) head/contrib/ntp/lib/isc/stats.c (contents, props changed) head/contrib/ntp/lib/isc/string.c (contents, props changed) head/contrib/ntp/lib/isc/symtab.c (contents, props changed) head/contrib/ntp/lib/isc/task.c (contents, props changed) head/contrib/ntp/lib/isc/task_p.h (contents, props changed) head/contrib/ntp/lib/isc/taskpool.c (contents, props changed) head/contrib/ntp/lib/isc/timer.c (contents, props changed) head/contrib/ntp/lib/isc/timer_p.h (contents, props changed) head/contrib/ntp/lib/isc/unix/app.c (contents, props changed) head/contrib/ntp/lib/isc/unix/dir.c (contents, props changed) head/contrib/ntp/lib/isc/unix/entropy.c (contents, props changed) head/contrib/ntp/lib/isc/unix/errno2result.c (contents, props changed) head/contrib/ntp/lib/isc/unix/errno2result.h (contents, props changed) head/contrib/ntp/lib/isc/unix/file.c (contents, props changed) head/contrib/ntp/lib/isc/unix/ifiter_getifaddrs.c (contents, props changed) head/contrib/ntp/lib/isc/unix/ifiter_ioctl.c (contents, props changed) head/contrib/ntp/lib/isc/unix/ifiter_sysctl.c (contents, props changed) head/contrib/ntp/lib/isc/unix/include/isc/net.h (contents, props changed) head/contrib/ntp/lib/isc/unix/include/isc/offset.h (contents, props changed) head/contrib/ntp/lib/isc/unix/include/isc/stdtime.h (contents, props changed) head/contrib/ntp/lib/isc/unix/include/isc/strerror.h (contents, props changed) head/contrib/ntp/lib/isc/unix/include/isc/time.h (contents, props changed) head/contrib/ntp/lib/isc/unix/interfaceiter.c (contents, props changed) head/contrib/ntp/lib/isc/unix/net.c (contents, props changed) head/contrib/ntp/lib/isc/unix/resource.c (contents, props changed) head/contrib/ntp/lib/isc/unix/socket.c (contents, props changed) head/contrib/ntp/lib/isc/unix/socket_p.h (contents, props changed) head/contrib/ntp/lib/isc/unix/stdio.c (contents, props changed) head/contrib/ntp/lib/isc/unix/strerror.c (contents, props changed) head/contrib/ntp/lib/isc/unix/time.c (contents, props changed) head/contrib/ntp/lib/isc/win32/app.c (contents, props changed) head/contrib/ntp/lib/isc/win32/dir.c (contents, props changed) head/contrib/ntp/lib/isc/win32/entropy.c (contents, props changed) head/contrib/ntp/lib/isc/win32/file.c (contents, props changed) head/contrib/ntp/lib/isc/win32/include/isc/ipv6.h (contents, props changed) head/contrib/ntp/lib/isc/win32/include/isc/mutex.h (contents, props changed) head/contrib/ntp/lib/isc/win32/include/isc/net.h (contents, props changed) head/contrib/ntp/lib/isc/win32/include/isc/ntpaths.h (contents, props changed) head/contrib/ntp/lib/isc/win32/include/isc/platform.h (contents, props changed) head/contrib/ntp/lib/isc/win32/include/isc/stat.h (contents, props changed) head/contrib/ntp/lib/isc/win32/include/isc/stdtime.h (contents, props changed) head/contrib/ntp/lib/isc/win32/include/isc/thread.h (contents, props changed) head/contrib/ntp/lib/isc/win32/include/isc/time.h (contents, props changed) head/contrib/ntp/lib/isc/win32/include/isc/win32os.h (contents, props changed) head/contrib/ntp/lib/isc/win32/interfaceiter.c (contents, props changed) head/contrib/ntp/lib/isc/win32/libisc.def head/contrib/ntp/lib/isc/win32/libisc.dsp head/contrib/ntp/lib/isc/win32/libisc.mak head/contrib/ntp/lib/isc/win32/net.c (contents, props changed) head/contrib/ntp/lib/isc/win32/netdb.h (contents, props changed) head/contrib/ntp/lib/isc/win32/ntgroups.c (contents, props changed) head/contrib/ntp/lib/isc/win32/ntpaths.c (contents, props changed) head/contrib/ntp/lib/isc/win32/socket.c (contents, props changed) head/contrib/ntp/lib/isc/win32/time.c (contents, props changed) head/contrib/ntp/lib/isc/win32/unistd.h (contents, props changed) head/contrib/ntp/libjsmn/jsmn.c head/contrib/ntp/libntp/Makefile.am (contents, props changed) head/contrib/ntp/libntp/Makefile.in (contents, props changed) head/contrib/ntp/libntp/a_md5encrypt.c (contents, props changed) head/contrib/ntp/libntp/atoint.c (contents, props changed) head/contrib/ntp/libntp/atolfp.c (contents, props changed) head/contrib/ntp/libntp/atouint.c (contents, props changed) head/contrib/ntp/libntp/audio.c (contents, props changed) head/contrib/ntp/libntp/authkeys.c (contents, props changed) head/contrib/ntp/libntp/authreadkeys.c (contents, props changed) head/contrib/ntp/libntp/authusekey.c (contents, props changed) head/contrib/ntp/libntp/buftvtots.c (contents, props changed) head/contrib/ntp/libntp/caljulian.c (contents, props changed) head/contrib/ntp/libntp/caltontp.c (contents, props changed) head/contrib/ntp/libntp/calyearstart.c (contents, props changed) head/contrib/ntp/libntp/clocktime.c (contents, props changed) head/contrib/ntp/libntp/clocktypes.c (contents, props changed) head/contrib/ntp/libntp/decodenetnum.c (contents, props changed) head/contrib/ntp/libntp/dofptoa.c (contents, props changed) head/contrib/ntp/libntp/dolfptoa.c (contents, props changed) head/contrib/ntp/libntp/emalloc.c (contents, props changed) head/contrib/ntp/libntp/findconfig.c (contents, props changed) head/contrib/ntp/libntp/getopt.c (contents, props changed) head/contrib/ntp/libntp/hextoint.c (contents, props changed) head/contrib/ntp/libntp/hextolfp.c (contents, props changed) head/contrib/ntp/libntp/humandate.c (contents, props changed) head/contrib/ntp/libntp/icom.c (contents, props changed) head/contrib/ntp/libntp/iosignal.c (contents, props changed) head/contrib/ntp/libntp/lib_strbuf.c (contents, props changed) head/contrib/ntp/libntp/machines.c (contents, props changed) head/contrib/ntp/libntp/mktime.c (contents, props changed) head/contrib/ntp/libntp/modetoa.c (contents, props changed) head/contrib/ntp/libntp/mstolfp.c (contents, props changed) head/contrib/ntp/libntp/msyslog.c (contents, props changed) head/contrib/ntp/libntp/netof.c (contents, props changed) head/contrib/ntp/libntp/ntp_random.c head/contrib/ntp/libntp/ntp_rfc2553.c (contents, props changed) head/contrib/ntp/libntp/numtoa.c (contents, props changed) head/contrib/ntp/libntp/numtohost.c (contents, props changed) head/contrib/ntp/libntp/octtoint.c (contents, props changed) head/contrib/ntp/libntp/prettydate.c (contents, props changed) head/contrib/ntp/libntp/recvbuff.c (contents, props changed) head/contrib/ntp/libntp/refnumtoa.c (contents, props changed) head/contrib/ntp/libntp/snprintf.c (contents, props changed) head/contrib/ntp/libntp/socktoa.c (contents, props changed) head/contrib/ntp/libntp/socktohost.c (contents, props changed) head/contrib/ntp/libntp/statestr.c (contents, props changed) head/contrib/ntp/libntp/strdup.c (contents, props changed) head/contrib/ntp/libntp/syssignal.c (contents, props changed) head/contrib/ntp/libntp/systime.c (contents, props changed) head/contrib/ntp/libntp/uglydate.c (contents, props changed) head/contrib/ntp/libntp/ymd2yd.c (contents, props changed) head/contrib/ntp/libparse/Makefile.am (contents, props changed) head/contrib/ntp/libparse/Makefile.in (contents, props changed) head/contrib/ntp/libparse/binio.c head/contrib/ntp/libparse/clk_computime.c (contents, props changed) head/contrib/ntp/libparse/clk_dcf7000.c (contents, props changed) head/contrib/ntp/libparse/clk_hopf6021.c (contents, props changed) head/contrib/ntp/libparse/clk_meinberg.c (contents, props changed) head/contrib/ntp/libparse/clk_rawdcf.c (contents, props changed) head/contrib/ntp/libparse/clk_rcc8000.c (contents, props changed) head/contrib/ntp/libparse/clk_schmid.c (contents, props changed) head/contrib/ntp/libparse/clk_trimtaip.c (contents, props changed) head/contrib/ntp/libparse/clk_trimtsip.c (contents, props changed) head/contrib/ntp/libparse/clk_varitext.c (contents, props changed) head/contrib/ntp/libparse/clk_wharton.c (contents, props changed) head/contrib/ntp/libparse/data_mbg.c (contents, props changed) head/contrib/ntp/libparse/gpstolfp.c head/contrib/ntp/libparse/ieee754io.c head/contrib/ntp/libparse/info_trimble.c (contents, props changed) head/contrib/ntp/libparse/mfp_mul.c head/contrib/ntp/libparse/mkinfo_rcmd.sed (contents, props changed) head/contrib/ntp/libparse/mkinfo_scmd.sed (contents, props changed) head/contrib/ntp/libparse/parse.c (contents, props changed) head/contrib/ntp/libparse/parse_conf.c (contents, props changed) head/contrib/ntp/libparse/parsesolaris.c (contents, props changed) head/contrib/ntp/libparse/parsestreams.c (contents, props changed) head/contrib/ntp/libparse/trim_info.c (contents, props changed) head/contrib/ntp/ltmain.sh head/contrib/ntp/ntpd/Makefile.am (contents, props changed) head/contrib/ntp/ntpd/Makefile.in (contents, props changed) head/contrib/ntp/ntpd/check_y2k.c (contents, props changed) head/contrib/ntp/ntpd/cmd_args.c (contents, props changed) head/contrib/ntp/ntpd/ntp_config.c (contents, props changed) head/contrib/ntp/ntpd/ntp_control.c (contents, props changed) head/contrib/ntp/ntpd/ntp_crypto.c (contents, props changed) head/contrib/ntp/ntpd/ntp_filegen.c (contents, props changed) head/contrib/ntp/ntpd/ntp_io.c (contents, props changed) head/contrib/ntp/ntpd/ntp_loopfilter.c (contents, props changed) head/contrib/ntp/ntpd/ntp_monitor.c (contents, props changed) head/contrib/ntp/ntpd/ntp_peer.c (contents, props changed) head/contrib/ntp/ntpd/ntp_proto.c (contents, props changed) head/contrib/ntp/ntpd/ntp_refclock.c (contents, props changed) head/contrib/ntp/ntpd/ntp_request.c (contents, props changed) head/contrib/ntp/ntpd/ntp_restrict.c (contents, props changed) head/contrib/ntp/ntpd/ntp_timer.c (contents, props changed) head/contrib/ntp/ntpd/ntp_util.c (contents, props changed) head/contrib/ntp/ntpd/ntpd-opts.c head/contrib/ntp/ntpd/ntpd-opts.def head/contrib/ntp/ntpd/ntpd-opts.h head/contrib/ntp/ntpd/ntpd.c (contents, props changed) head/contrib/ntp/ntpd/ntpdbase-opts.def head/contrib/ntp/ntpd/ntpsim.c (contents, props changed) head/contrib/ntp/ntpd/refclock_acts.c (contents, props changed) head/contrib/ntp/ntpd/refclock_arbiter.c (contents, props changed) head/contrib/ntp/ntpd/refclock_arc.c (contents, props changed) head/contrib/ntp/ntpd/refclock_as2201.c (contents, props changed) head/contrib/ntp/ntpd/refclock_atom.c (contents, props changed) head/contrib/ntp/ntpd/refclock_bancomm.c (contents, props changed) head/contrib/ntp/ntpd/refclock_chronolog.c (contents, props changed) head/contrib/ntp/ntpd/refclock_chu.c (contents, props changed) head/contrib/ntp/ntpd/refclock_conf.c (contents, props changed) head/contrib/ntp/ntpd/refclock_datum.c (contents, props changed) head/contrib/ntp/ntpd/refclock_dumbclock.c (contents, props changed) head/contrib/ntp/ntpd/refclock_fg.c (contents, props changed) head/contrib/ntp/ntpd/refclock_gpsvme.c (contents, props changed) head/contrib/ntp/ntpd/refclock_heath.c (contents, props changed) head/contrib/ntp/ntpd/refclock_hopfpci.c (contents, props changed) head/contrib/ntp/ntpd/refclock_hopfser.c (contents, props changed) head/contrib/ntp/ntpd/refclock_hpgps.c (contents, props changed) head/contrib/ntp/ntpd/refclock_irig.c (contents, props changed) head/contrib/ntp/ntpd/refclock_jjy.c (contents, props changed) head/contrib/ntp/ntpd/refclock_jupiter.c (contents, props changed) head/contrib/ntp/ntpd/refclock_leitch.c (contents, props changed) head/contrib/ntp/ntpd/refclock_local.c (contents, props changed) head/contrib/ntp/ntpd/refclock_msfees.c (contents, props changed) head/contrib/ntp/ntpd/refclock_mx4200.c (contents, props changed) head/contrib/ntp/ntpd/refclock_neoclock4x.c (contents, props changed) head/contrib/ntp/ntpd/refclock_nmea.c (contents, props changed) head/contrib/ntp/ntpd/refclock_oncore.c (contents, props changed) head/contrib/ntp/ntpd/refclock_palisade.c (contents, props changed) head/contrib/ntp/ntpd/refclock_palisade.h (contents, props changed) head/contrib/ntp/ntpd/refclock_parse.c (contents, props changed) head/contrib/ntp/ntpd/refclock_pcf.c (contents, props changed) head/contrib/ntp/ntpd/refclock_pst.c (contents, props changed) head/contrib/ntp/ntpd/refclock_ripencc.c (contents, props changed) head/contrib/ntp/ntpd/refclock_shm.c (contents, props changed) head/contrib/ntp/ntpd/refclock_tpro.c (contents, props changed) head/contrib/ntp/ntpd/refclock_true.c (contents, props changed) head/contrib/ntp/ntpd/refclock_tt560.c (contents, props changed) head/contrib/ntp/ntpd/refclock_ulink.c (contents, props changed) head/contrib/ntp/ntpd/refclock_wwv.c (contents, props changed) head/contrib/ntp/ntpd/refclock_wwvb.c (contents, props changed) head/contrib/ntp/ntpd/refclock_zyfer.c (contents, props changed) head/contrib/ntp/ntpdate/Makefile.am (contents, props changed) head/contrib/ntp/ntpdate/Makefile.in (contents, props changed) head/contrib/ntp/ntpdate/ntpdate.c (contents, props changed) head/contrib/ntp/ntpdate/ntpdate.h (contents, props changed) head/contrib/ntp/ntpdc/Makefile.am (contents, props changed) head/contrib/ntp/ntpdc/Makefile.in (contents, props changed) head/contrib/ntp/ntpdc/layout.std (contents, props changed) head/contrib/ntp/ntpdc/nl.pl (contents, props changed) head/contrib/ntp/ntpdc/nl.pl.in (contents, props changed) head/contrib/ntp/ntpdc/ntpdc-layout.c (contents, props changed) head/contrib/ntp/ntpdc/ntpdc-opts.c head/contrib/ntp/ntpdc/ntpdc-opts.def head/contrib/ntp/ntpdc/ntpdc-opts.h head/contrib/ntp/ntpdc/ntpdc.c (contents, props changed) head/contrib/ntp/ntpdc/ntpdc.h (contents, props changed) head/contrib/ntp/ntpdc/ntpdc_ops.c (contents, props changed) head/contrib/ntp/ntpq/Makefile.am (contents, props changed) head/contrib/ntp/ntpq/Makefile.in (contents, props changed) head/contrib/ntp/ntpq/ntpq-opts.c head/contrib/ntp/ntpq/ntpq-opts.def head/contrib/ntp/ntpq/ntpq-opts.h head/contrib/ntp/ntpq/ntpq-subs.c head/contrib/ntp/ntpq/ntpq.c (contents, props changed) head/contrib/ntp/ntpq/ntpq.h (contents, props changed) head/contrib/ntp/ntpsnmpd/Makefile.am (contents, props changed) head/contrib/ntp/ntpsnmpd/Makefile.in (contents, props changed) head/contrib/ntp/ntpsnmpd/netsnmp_daemonize.c (contents, props changed) head/contrib/ntp/ntpsnmpd/ntpSnmpSubagentObject.c (contents, props changed) head/contrib/ntp/ntpsnmpd/ntp_snmp.h (contents, props changed) head/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.c (contents, props changed) head/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.def head/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.h (contents, props changed) head/contrib/ntp/ntpsnmpd/ntpsnmpd.c (contents, props changed) head/contrib/ntp/packageinfo.sh head/contrib/ntp/parseutil/Makefile.am (contents, props changed) head/contrib/ntp/parseutil/Makefile.in (contents, props changed) head/contrib/ntp/parseutil/dcfd.c (contents, props changed) head/contrib/ntp/parseutil/testdcf.c (contents, props changed) head/contrib/ntp/readme.y2kfixes (contents, props changed) head/contrib/ntp/scripts/Makefile.am (contents, props changed) head/contrib/ntp/scripts/Makefile.in (contents, props changed) head/contrib/ntp/scripts/README (contents, props changed) head/contrib/ntp/scripts/build/Makefile.in head/contrib/ntp/scripts/build/UpdatePoint head/contrib/ntp/scripts/build/VersionName head/contrib/ntp/scripts/calc_tickadj/Makefile.in head/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman head/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc head/contrib/ntp/scripts/calc_tickadj/calc_tickadj.html head/contrib/ntp/scripts/calc_tickadj/calc_tickadj.man.in head/contrib/ntp/scripts/calc_tickadj/calc_tickadj.mdoc.in head/contrib/ntp/scripts/calc_tickadj/invoke-calc_tickadj.texi head/contrib/ntp/scripts/lib/Makefile.in head/contrib/ntp/scripts/monitoring/ntp.pl (contents, props changed) head/contrib/ntp/scripts/monitoring/ntptrap (contents, props changed) head/contrib/ntp/scripts/ntp-wait/Makefile.in head/contrib/ntp/scripts/ntp-wait/invoke-ntp-wait.texi head/contrib/ntp/scripts/ntp-wait/ntp-wait-opts head/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitman head/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc head/contrib/ntp/scripts/ntp-wait/ntp-wait.html head/contrib/ntp/scripts/ntp-wait/ntp-wait.man.in head/contrib/ntp/scripts/ntp-wait/ntp-wait.mdoc.in head/contrib/ntp/scripts/ntpsweep/Makefile.in head/contrib/ntp/scripts/ntpsweep/invoke-ntpsweep.texi head/contrib/ntp/scripts/ntpsweep/ntpsweep-opts head/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepman head/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc head/contrib/ntp/scripts/ntpsweep/ntpsweep.html head/contrib/ntp/scripts/ntpsweep/ntpsweep.man.in head/contrib/ntp/scripts/ntpsweep/ntpsweep.mdoc.in head/contrib/ntp/scripts/ntptrace/Makefile.in head/contrib/ntp/scripts/ntptrace/invoke-ntptrace.texi head/contrib/ntp/scripts/ntptrace/ntptrace-opts head/contrib/ntp/scripts/ntptrace/ntptrace.1ntptraceman head/contrib/ntp/scripts/ntptrace/ntptrace.1ntptracemdoc head/contrib/ntp/scripts/ntptrace/ntptrace.html head/contrib/ntp/scripts/ntptrace/ntptrace.man.in head/contrib/ntp/scripts/ntptrace/ntptrace.mdoc.in head/contrib/ntp/scripts/ntpver.in (contents, props changed) head/contrib/ntp/scripts/plot_summary.in (contents, props changed) head/contrib/ntp/scripts/summary.in (contents, props changed) head/contrib/ntp/sntp/COPYRIGHT head/contrib/ntp/sntp/Makefile.am (contents, props changed) head/contrib/ntp/sntp/Makefile.in (contents, props changed) head/contrib/ntp/sntp/aclocal.m4 (contents, props changed) head/contrib/ntp/sntp/bincheck.mf head/contrib/ntp/sntp/config.guess (contents, props changed) head/contrib/ntp/sntp/config.h.in head/contrib/ntp/sntp/config.sub (contents, props changed) head/contrib/ntp/sntp/configure (contents, props changed) head/contrib/ntp/sntp/configure.ac (contents, props changed) head/contrib/ntp/sntp/include/Makefile.in head/contrib/ntp/sntp/include/copyright.def head/contrib/ntp/sntp/include/ntp.lic head/contrib/ntp/sntp/include/version.def head/contrib/ntp/sntp/include/version.texi head/contrib/ntp/sntp/libevent/Makefile.in head/contrib/ntp/sntp/libopts/Makefile.am head/contrib/ntp/sntp/libopts/Makefile.in head/contrib/ntp/sntp/libopts/README head/contrib/ntp/sntp/libopts/autoopts.c head/contrib/ntp/sntp/libopts/autoopts.h head/contrib/ntp/sntp/libopts/autoopts/options.h head/contrib/ntp/sntp/libopts/autoopts/usage-txt.h head/contrib/ntp/sntp/libopts/boolean.c head/contrib/ntp/sntp/libopts/compat/compat.h head/contrib/ntp/sntp/libopts/compat/pathfind.c head/contrib/ntp/sntp/libopts/compat/snprintf.c head/contrib/ntp/sntp/libopts/compat/strchr.c head/contrib/ntp/sntp/libopts/compat/strdup.c head/contrib/ntp/sntp/libopts/compat/windows-config.h head/contrib/ntp/sntp/libopts/configfile.c head/contrib/ntp/sntp/libopts/cook.c head/contrib/ntp/sntp/libopts/genshell.c head/contrib/ntp/sntp/libopts/genshell.h head/contrib/ntp/sntp/libopts/libopts.c head/contrib/ntp/sntp/libopts/load.c head/contrib/ntp/sntp/libopts/m4/libopts.m4 head/contrib/ntp/sntp/libopts/m4/liboptschk.m4 head/contrib/ntp/sntp/libopts/makeshell.c head/contrib/ntp/sntp/libopts/nested.c head/contrib/ntp/sntp/libopts/numeric.c head/contrib/ntp/sntp/libopts/pgusage.c head/contrib/ntp/sntp/libopts/proto.h head/contrib/ntp/sntp/libopts/putshell.c head/contrib/ntp/sntp/libopts/restore.c head/contrib/ntp/sntp/libopts/save.c head/contrib/ntp/sntp/libopts/sort.c head/contrib/ntp/sntp/libopts/stack.c head/contrib/ntp/sntp/libopts/streqvcmp.c head/contrib/ntp/sntp/libopts/text_mmap.c head/contrib/ntp/sntp/libopts/tokenize.c head/contrib/ntp/sntp/libopts/usage.c head/contrib/ntp/sntp/libopts/version.c head/contrib/ntp/sntp/loc/netbsd head/contrib/ntp/sntp/ltmain.sh head/contrib/ntp/sntp/m4/hms_search_lib.m4 head/contrib/ntp/sntp/m4/ntp_compiler.m4 head/contrib/ntp/sntp/m4/ntp_libevent.m4 head/contrib/ntp/sntp/m4/ntp_libntp.m4 head/contrib/ntp/sntp/m4/version.m4 head/contrib/ntp/sntp/main.c (contents, props changed) head/contrib/ntp/sntp/scripts/Makefile.in head/contrib/ntp/sntp/scripts/cvo.sh head/contrib/ntp/sntp/sntp-opts.c head/contrib/ntp/sntp/sntp-opts.def head/contrib/ntp/sntp/sntp-opts.h head/contrib/ntp/sntp/tests/Makefile.in head/contrib/ntp/tests/Makefile.in head/contrib/ntp/tests/libntp/Makefile.in head/contrib/ntp/tests/ntpd/Makefile.in head/contrib/ntp/util/Makefile.am (contents, props changed) head/contrib/ntp/util/Makefile.in (contents, props changed) head/contrib/ntp/util/README (contents, props changed) head/contrib/ntp/util/audio-pcm.c (contents, props changed) head/contrib/ntp/util/hist.c (contents, props changed) head/contrib/ntp/util/jitter.c (contents, props changed) head/contrib/ntp/util/jitter.h head/contrib/ntp/util/ntp-keygen-opts.c head/contrib/ntp/util/ntp-keygen-opts.def head/contrib/ntp/util/ntp-keygen-opts.h head/contrib/ntp/util/ntp-keygen.c (contents, props changed) head/contrib/ntp/util/ntptime.c (contents, props changed) head/contrib/ntp/util/sht.c (contents, props changed) head/contrib/ntp/util/tg.c head/contrib/ntp/util/tickadj.c (contents, props changed) head/etc/mtree/BSD.usr.dist head/share/mk/src.libnames.mk head/usr.sbin/ntp/Makefile head/usr.sbin/ntp/config.h head/usr.sbin/ntp/doc/Makefile head/usr.sbin/ntp/doc/ntp-keygen.8 head/usr.sbin/ntp/doc/ntp.conf.5 head/usr.sbin/ntp/doc/ntp.keys.5 head/usr.sbin/ntp/doc/ntpd.8 head/usr.sbin/ntp/doc/ntpdc.8 head/usr.sbin/ntp/doc/ntpq.8 head/usr.sbin/ntp/doc/ntptrace.8 head/usr.sbin/ntp/libntp/Makefile head/usr.sbin/ntp/libopts/Makefile head/usr.sbin/ntp/libparse/Makefile head/usr.sbin/ntp/ntp-keygen/Makefile head/usr.sbin/ntp/ntpd/Makefile head/usr.sbin/ntp/ntpdate/Makefile head/usr.sbin/ntp/ntpdc/Makefile head/usr.sbin/ntp/ntpq/Makefile head/usr.sbin/ntp/ntptime/Makefile head/usr.sbin/ntp/scripts/mkver head/usr.sbin/ntp/sntp/Makefile Directory Properties: head/contrib/ntp/ (props changed) head/contrib/ntp/INSTALL (props changed) head/contrib/ntp/NOTES.y2kfixes (props changed) head/contrib/ntp/README (props changed) head/contrib/ntp/README.bk (props changed) head/contrib/ntp/README.patches (props changed) head/contrib/ntp/README.refclocks (props changed) head/contrib/ntp/README.versions (props changed) head/contrib/ntp/TODO (props changed) head/contrib/ntp/adjtimed/README (props changed) head/contrib/ntp/adjtimed/adjtimed.c (props changed) head/contrib/ntp/compile (props changed) head/contrib/ntp/conf/README (props changed) head/contrib/ntp/conf/baldwin.conf (props changed) head/contrib/ntp/conf/grundoon.conf (props changed) head/contrib/ntp/conf/malarky.conf (props changed) head/contrib/ntp/conf/pogo.conf (props changed) head/contrib/ntp/conf/rackety.conf (props changed) head/contrib/ntp/depcomp (props changed) head/contrib/ntp/include/README (props changed) head/contrib/ntp/include/adjtime.h (props changed) head/contrib/ntp/include/ascii.h (props changed) head/contrib/ntp/include/gps.h (props changed) head/contrib/ntp/include/hopf6039.h (props changed) head/contrib/ntp/include/mx4200.h (props changed) head/contrib/ntp/include/ntif.h (props changed) head/contrib/ntp/include/ntp_datum.h (props changed) head/contrib/ntp/include/ntp_if.h (props changed) head/contrib/ntp/include/parse_conf.h (props changed) head/contrib/ntp/install-sh (props changed) head/contrib/ntp/kernel/sys/README (props changed) head/contrib/ntp/kernel/sys/bsd_audioirig.h (props changed) head/contrib/ntp/kernel/sys/i8253.h (props changed) head/contrib/ntp/kernel/sys/parsestreams.h (props changed) head/contrib/ntp/kernel/sys/pcl720.h (props changed) head/contrib/ntp/kernel/sys/ppsclock.h (props changed) head/contrib/ntp/kernel/sys/timex.h (props changed) head/contrib/ntp/kernel/sys/tpro.h (props changed) head/contrib/ntp/kernel/sys/tt560_api.h (props changed) head/contrib/ntp/lib/isc/bitstring.c (props changed) head/contrib/ntp/lib/isc/buffer.c (props changed) head/contrib/ntp/lib/isc/bufferlist.c (props changed) head/contrib/ntp/lib/isc/commandline.c (props changed) head/contrib/ntp/lib/isc/error.c (props changed) head/contrib/ntp/lib/isc/fsaccess.c (props changed) head/contrib/ntp/lib/isc/hex.c (props changed) head/contrib/ntp/lib/isc/include/isc/base32.h (props changed) head/contrib/ntp/lib/isc/include/isc/base64.h (props changed) head/contrib/ntp/lib/isc/include/isc/bitstring.h (props changed) head/contrib/ntp/lib/isc/include/isc/boolean.h (props changed) head/contrib/ntp/lib/isc/include/isc/bufferlist.h (props changed) head/contrib/ntp/lib/isc/include/isc/commandline.h (props changed) head/contrib/ntp/lib/isc/include/isc/event.h (props changed) head/contrib/ntp/lib/isc/include/isc/eventclass.h (props changed) head/contrib/ntp/lib/isc/include/isc/formatcheck.h (props changed) head/contrib/ntp/lib/isc/include/isc/hex.h (props changed) head/contrib/ntp/lib/isc/include/isc/httpd.h (props changed) head/contrib/ntp/lib/isc/include/isc/interfaceiter.h (props changed) head/contrib/ntp/lib/isc/include/isc/ipv6.h (props changed) head/contrib/ntp/lib/isc/include/isc/iterated_hash.h (props changed) head/contrib/ntp/lib/isc/include/isc/lang.h (props changed) head/contrib/ntp/lib/isc/include/isc/lex.h (props changed) head/contrib/ntp/lib/isc/include/isc/lfsr.h (props changed) head/contrib/ntp/lib/isc/include/isc/magic.h (props changed) head/contrib/ntp/lib/isc/include/isc/msgcat.h (props changed) head/contrib/ntp/lib/isc/include/isc/mutexblock.h (props changed) head/contrib/ntp/lib/isc/include/isc/ondestroy.h (props changed) head/contrib/ntp/lib/isc/include/isc/os.h (props changed) head/contrib/ntp/lib/isc/include/isc/parseint.h (props changed) head/contrib/ntp/lib/isc/include/isc/platform.h (props changed) head/contrib/ntp/lib/isc/include/isc/print.h (props changed) head/contrib/ntp/lib/isc/include/isc/quota.h (props changed) head/contrib/ntp/lib/isc/include/isc/region.h (props changed) head/contrib/ntp/lib/isc/include/isc/resource.h (props changed) head/contrib/ntp/lib/isc/include/isc/rwlock.h (props changed) head/contrib/ntp/lib/isc/include/isc/stdio.h (props changed) head/contrib/ntp/lib/isc/include/isc/stdlib.h (props changed) head/contrib/ntp/lib/isc/include/isc/string.h (props changed) head/contrib/ntp/lib/isc/include/isc/version.h (props changed) head/contrib/ntp/lib/isc/include/isc/xml.h (props changed) head/contrib/ntp/lib/isc/lex.c (props changed) head/contrib/ntp/lib/isc/lfsr.c (props changed) head/contrib/ntp/lib/isc/mips/include/isc/atomic.h (props changed) head/contrib/ntp/lib/isc/netscope.c (props changed) head/contrib/ntp/lib/isc/nls/msgcat.c (props changed) head/contrib/ntp/lib/isc/noatomic/include/isc/atomic.h (props changed) head/contrib/ntp/lib/isc/nothreads/condition.c (props changed) head/contrib/ntp/lib/isc/nothreads/include/isc/condition.h (props changed) head/contrib/ntp/lib/isc/nothreads/include/isc/mutex.h (props changed) head/contrib/ntp/lib/isc/nothreads/include/isc/once.h (props changed) head/contrib/ntp/lib/isc/nothreads/include/isc/thread.h (props changed) head/contrib/ntp/lib/isc/nothreads/mutex.c (props changed) head/contrib/ntp/lib/isc/nothreads/thread.c (props changed) head/contrib/ntp/lib/isc/ondestroy.c (props changed) head/contrib/ntp/lib/isc/parseint.c (props changed) head/contrib/ntp/lib/isc/portset.c (props changed) head/contrib/ntp/lib/isc/pthreads/condition.c (props changed) head/contrib/ntp/lib/isc/pthreads/include/isc/condition.h (props changed) head/contrib/ntp/lib/isc/pthreads/include/isc/mutex.h (props changed) head/contrib/ntp/lib/isc/pthreads/include/isc/once.h (props changed) head/contrib/ntp/lib/isc/pthreads/include/isc/thread.h (props changed) head/contrib/ntp/lib/isc/pthreads/thread.c (props changed) head/contrib/ntp/lib/isc/quota.c (props changed) head/contrib/ntp/lib/isc/ratelimiter.c (props changed) head/contrib/ntp/lib/isc/refcount.c (props changed) head/contrib/ntp/lib/isc/region.c (props changed) head/contrib/ntp/lib/isc/serial.c (props changed) head/contrib/ntp/lib/isc/strtoul.c (props changed) head/contrib/ntp/lib/isc/unix/fsaccess.c (props changed) head/contrib/ntp/lib/isc/unix/include/isc/dir.h (props changed) head/contrib/ntp/lib/isc/unix/include/isc/int.h (props changed) head/contrib/ntp/lib/isc/unix/include/isc/keyboard.h (props changed) head/contrib/ntp/lib/isc/unix/include/isc/netdb.h (props changed) head/contrib/ntp/lib/isc/unix/include/isc/stat.h (props changed) head/contrib/ntp/lib/isc/unix/include/isc/syslog.h (props changed) head/contrib/ntp/lib/isc/unix/ipv6.c (props changed) head/contrib/ntp/lib/isc/unix/keyboard.c (props changed) head/contrib/ntp/lib/isc/unix/os.c (props changed) head/contrib/ntp/lib/isc/unix/stdtime.c (props changed) head/contrib/ntp/lib/isc/unix/syslog.c (props changed) head/contrib/ntp/lib/isc/version.c (props changed) head/contrib/ntp/lib/isc/win32/DLLMain.c (props changed) head/contrib/ntp/lib/isc/win32/condition.c (props changed) head/contrib/ntp/lib/isc/win32/errno2result.c (props changed) head/contrib/ntp/lib/isc/win32/errno2result.h (props changed) head/contrib/ntp/lib/isc/win32/fsaccess.c (props changed) head/contrib/ntp/lib/isc/win32/include/isc/bind_registry.h (props changed) head/contrib/ntp/lib/isc/win32/include/isc/bindevt.h (props changed) head/contrib/ntp/lib/isc/win32/include/isc/condition.h (props changed) head/contrib/ntp/lib/isc/win32/include/isc/dir.h (props changed) head/contrib/ntp/lib/isc/win32/include/isc/int.h (props changed) head/contrib/ntp/lib/isc/win32/include/isc/keyboard.h (props changed) head/contrib/ntp/lib/isc/win32/include/isc/netdb.h (props changed) head/contrib/ntp/lib/isc/win32/include/isc/ntgroups.h (props changed) head/contrib/ntp/lib/isc/win32/include/isc/offset.h (props changed) head/contrib/ntp/lib/isc/win32/include/isc/once.h (props changed) head/contrib/ntp/lib/isc/win32/include/isc/strerror.h (props changed) head/contrib/ntp/lib/isc/win32/include/isc/syslog.h (props changed) head/contrib/ntp/lib/isc/win32/ipv6.c (props changed) head/contrib/ntp/lib/isc/win32/keyboard.c (props changed) head/contrib/ntp/lib/isc/win32/once.c (props changed) head/contrib/ntp/lib/isc/win32/os.c (props changed) head/contrib/ntp/lib/isc/win32/resource.c (props changed) head/contrib/ntp/lib/isc/win32/stdio.c (props changed) head/contrib/ntp/lib/isc/win32/stdtime.c (props changed) head/contrib/ntp/lib/isc/win32/strerror.c (props changed) head/contrib/ntp/lib/isc/win32/syslog.c (props changed) head/contrib/ntp/lib/isc/win32/syslog.h (props changed) head/contrib/ntp/lib/isc/win32/thread.c (props changed) head/contrib/ntp/lib/isc/win32/version.c (props changed) head/contrib/ntp/lib/isc/win32/win32os.c (props changed) head/contrib/ntp/lib/isc/x86_32/include/isc/atomic.h (props changed) head/contrib/ntp/lib/isc/x86_64/include/isc/atomic.h (props changed) head/contrib/ntp/libntp/README (props changed) head/contrib/ntp/libntp/adjtime.c (props changed) head/contrib/ntp/libntp/adjtimex.c (props changed) head/contrib/ntp/libntp/systime_s.c (props changed) head/contrib/ntp/libparse/README (props changed) head/contrib/ntp/missing (props changed) head/contrib/ntp/ntpd/jupiter.h (props changed) head/contrib/ntp/ntpdate/README (props changed) head/contrib/ntp/ntpdc/README (props changed) head/contrib/ntp/ntpdc/nl_in.c (props changed) head/contrib/ntp/ntpq/README (props changed) head/contrib/ntp/ntpsnmpd/ntpSnmpSubagentObject.h (props changed) head/contrib/ntp/parseutil/README (props changed) head/contrib/ntp/results.y2kfixes (props changed) head/contrib/ntp/scripts/monitoring/README (props changed) head/contrib/ntp/scripts/monitoring/loopwatch.config.SAMPLE (props changed) head/contrib/ntp/scripts/monitoring/lr.pl (props changed) head/contrib/ntp/scripts/monitoring/ntploopstat (props changed) head/contrib/ntp/scripts/monitoring/ntploopwatch (props changed) head/contrib/ntp/scripts/monitoring/timelocal.pl (props changed) head/contrib/ntp/scripts/stats/README (props changed) head/contrib/ntp/scripts/stats/README.stats (props changed) head/contrib/ntp/scripts/stats/README.timecodes (props changed) head/contrib/ntp/scripts/stats/clock.awk (props changed) head/contrib/ntp/scripts/stats/dupe.awk (props changed) head/contrib/ntp/scripts/stats/ensemble.S (props changed) head/contrib/ntp/scripts/stats/ensemble.awk (props changed) head/contrib/ntp/scripts/stats/etf.S (props changed) head/contrib/ntp/scripts/stats/etf.awk (props changed) head/contrib/ntp/scripts/stats/itf.S (props changed) head/contrib/ntp/scripts/stats/itf.awk (props changed) head/contrib/ntp/scripts/stats/loop.S (props changed) head/contrib/ntp/scripts/stats/loop.awk (props changed) head/contrib/ntp/scripts/stats/loop_summary (props changed) head/contrib/ntp/scripts/stats/peer.awk (props changed) head/contrib/ntp/scripts/stats/psummary.awk (props changed) head/contrib/ntp/scripts/stats/summary.sh (props changed) head/contrib/ntp/scripts/stats/tdata.S (props changed) head/contrib/ntp/scripts/stats/tdata.awk (props changed) head/contrib/ntp/sntp/depcomp (props changed) head/contrib/ntp/sntp/install-sh (props changed) head/contrib/ntp/sntp/missing (props changed) head/contrib/ntp/util/ansi2knr.1 (props changed) head/contrib/ntp/util/ansi2knr.c (props changed) head/contrib/ntp/util/byteorder.c (props changed) head/contrib/ntp/util/kern.c (props changed) head/contrib/ntp/util/longsize.c (props changed) head/contrib/ntp/util/pps-api.c (props changed) head/contrib/ntp/util/precision.c (props changed) head/contrib/ntp/util/testrs6000.c (props changed) head/contrib/ntp/util/timetrim.c (props changed) Modified: head/contrib/ntp/COPYRIGHT ============================================================================== --- head/contrib/ntp/COPYRIGHT Mon Mar 30 09:49:54 2015 (r280848) +++ head/contrib/ntp/COPYRIGHT Mon Mar 30 13:30:15 2015 (r280849) @@ -2,18 +2,18 @@ This file is automatically generated fro Copyright Notice - jpg "Clone me," says Dolly sheepishly + jpg "Clone me," says Dolly sheepishly. - Last update: 20:31 UTC Saturday, January 06, 2007 + Last update: 17-Jan-2015 00:16 UTC _________________________________________________________________ The following copyright notice applies to all files collectively called the Network Time Protocol Version 4 Distribution. Unless - specifically declared otherwise in an individual file, this notice - applies as if the text was explicitly included in the file. + specifically declared otherwise in an individual file, this entire + notice applies as if the text was explicitly included in the file. *********************************************************************** * * -* Copyright (c) David L. Mills 1992-2009 * +* Copyright (c) University of Delaware 1992-2015 * * * * Permission to use, copy, modify, and distribute this software and * * its documentation for any purpose with or without fee is hereby * @@ -29,148 +29,201 @@ This file is automatically generated fro * * *********************************************************************** + Content starting in 2011 from Harlan Stenn, Danny Mayer, and Martin + Burnicki is: +*********************************************************************** +* * +* Copyright (c) Network Time Foundation 2011-2015 * +* * +* 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 AUTHORS ``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 AUTHORS 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. * +*********************************************************************** + The following individuals contributed in part to the Network Time Protocol Distribution Version 4 and are acknowledged as authors of this work. - 1. [1]Mark Andrews Leitch atomic clock + 1. [1]Takao Abe Clock driver for JJY receivers + 2. [2]Mark Andrews Leitch atomic clock controller - 2. [2]Bernd Altmeier hopf Elektronik serial + 3. [3]Bernd Altmeier hopf Elektronik serial line and PCI-bus devices - 3. [3]Viraj Bais and [4]Clayton Kirkwood + 4. [4]Viraj Bais and [5]Clayton Kirkwood port to WindowsNT 3.5 - 4. [5]Michael Barone GPSVME fixes - 5. [6]Jean-Francois Boudreault - IPv6 support + 5. [6]Michael Barone GPSVME fixes 6. [7]Karl Berry syslog to file option 7. [8]Greg Brackley Major rework of WINNT port. Clean up recvbuf and iosignal code into separate modules. 8. [9]Marc Brett Magnavox GPS clock driver 9. [10]Piete Brooks MSF clock driver, Trimble PARSE support - 10. [11]Reg Clemens Oncore driver (Current maintainer) - 11. [12]Steve Clift OMEGA clock driver - 12. [13]Casey Crellin vxWorks (Tornado) port and + 10. [11]Nelson B Bolyard update and complete + broadcast and crypto features in sntp + 11. [12]Jean-Francois Boudreault + IPv6 support + 12. [13]Reg Clemens Oncore driver (Current maintainer) + 13. [14]Steve Clift OMEGA clock driver + 14. [15]Casey Crellin vxWorks (Tornado) port and help with target configuration - 13. [14]Sven Dietrich Palisade reference + 15. [16]Sven Dietrich Palisade reference clock driver, NT adj. residuals, integrated Greg's Winnt port. - 14. [15]John A. Dundas III Apple A/UX port - 15. [16]Torsten Duwe Linux + 16. [17]John A. Dundas III Apple A/UX port + 17. [18]Torsten Duwe Linux port - 16. [17]Dennis Ferguson foundation code for + 18. [19]Dennis Ferguson foundation code for NTP Version 2 as specified in RFC-1119 - 17. [18]John Hay IPv6 support and testing - 18. [19]Glenn Hollinger GOES clock driver - 19. [20]Mike Iglesias DEC Alpha port - 20. [21]Jim Jagielski A/UX port - 21. [22]Jeff Johnson massive prototyping + 19. [20]John Hay IPv6 support and testing + 20. [21]Dave Hart General maintenance, Windows + port interpolation rewrite + 21. [22]Claas Hilbrecht NeoClock4X clock driver + 22. [23]Glenn Hollinger GOES clock driver + 23. [24]Mike Iglesias DEC Alpha port + 24. [25]Jim Jagielski A/UX port + 25. [26]Jeff Johnson massive prototyping overhaul - 22. [23]Hans Lambermont or - [24] ntpsweep - 23. [25]Poul-Henning Kamp Oncore driver (Original + 26. [27]Hans Lambermont or + [28] ntpsweep + 27. [29]Poul-Henning Kamp Oncore driver (Original author) - 24. [26]Frank Kardel [27] PARSE - driver (>14 reference clocks), STREAMS modules for PARSE, support + 28. [30]Frank Kardel [31] PARSE + (driver 14 reference clocks), STREAMS modules for PARSE, support scripts, syslog cleanup, dynamic interface handling - 25. [28]William L. Jones RS/6000 AIX + 29. [32]Johannes Maximilian Kuehn Rewrote sntp to + comply with NTPv4 specification, ntpq saveconfig + 30. [33]William L. Jones RS/6000 AIX modifications, HPUX modifications - 26. [29]Dave Katz RS/6000 AIX port - 27. [30]Craig Leres 4.4BSD port, ppsclock, Magnavox + 31. [34]Dave Katz RS/6000 AIX port + 32. [35]Craig Leres 4.4BSD port, ppsclock, Magnavox GPS clock driver - 28. [31]George Lindholm SunOS 5.1 port - 29. [32]Louis A. Mamakos MD5-based authentication - 30. [33]Lars H. Mathiesen adaptation of foundation + 33. [36]George Lindholm SunOS 5.1 port + 34. [37]Louis A. Mamakos MD5-based authentication + 35. [38]Lars H. Mathiesen adaptation of foundation code for Version 3 as specified in RFC-1305 - 31. [34]Danny Mayer Network I/O, Windows Port, Code + 36. [39]Danny Mayer Network I/O, Windows Port, Code Maintenance - 32. [35]David L. Mills Version 4 foundation: clock - discipline, authentication, precision kernel; clock drivers: - Spectracom, Austron, Arbiter, Heath, ATOM, ACTS, KSI/Odetics; - audio clock drivers: CHU, WWV/H, IRIG - 33. [36]Wolfgang Moeller VMS port - 34. [37]Jeffrey Mogul ntptrace utility - 35. [38]Tom Moore i386 svr4 port - 36. [39]Kamal A Mostafa SCO OpenServer port - 37. [40]Derek Mulcahy and [41]Damon + 37. [40]David L. Mills Version 4 foundation, + precision kernel; clock drivers: 1, 3, 4, 6, 7, 11, 13, 18, 19, + 22, 36 + 38. [41]Wolfgang Moeller VMS port + 39. [42]Jeffrey Mogul ntptrace utility + 40. [43]Tom Moore i386 svr4 port + 41. [44]Kamal A Mostafa SCO OpenServer port + 42. [45]Derek Mulcahy and [46]Damon Hart-Davis ARCRON MSF clock driver - 38. [42]Rainer Pruy + 43. [47]Rob Neal Bancomm refclock and config/parse code + maintenance + 44. [48]Rainer Pruy monitoring/trap scripts, statistics file handling - 39. [43]Dirce Richards Digital UNIX V4.0 port - 40. [44]Wilfredo Sánchez added support for + 45. [49]Dirce Richards Digital UNIX V4.0 port + 46. [50]Wilfredo Sánchez added support for NetInfo - 41. [45]Nick Sayer SunOS streams modules - 42. [46]Jack Sasportas Saved a Lot of + 47. [51]Nick Sayer SunOS streams modules + 48. [52]Jack Sasportas Saved a Lot of space on the stuff in the html/pic/ subdirectory - 43. [47]Ray Schnitzler Unixware1 port - 44. [48]Michael Shields USNO clock driver - 45. [49]Jeff Steinman Datum PTS clock + 49. [53]Ray Schnitzler Unixware1 port + 50. [54]Michael Shields USNO clock driver + 51. [55]Jeff Steinman Datum PTS clock driver - 46. [50]Harlan Stenn GNU automake/autoconfigure + 52. [56]Harlan Stenn GNU automake/autoconfigure makeover, various other bits (see the ChangeLog) - 47. [51]Kenneth Stone HP-UX port - 48. [52]Ajit Thyagarajan IP multicast/anycast + 53. [57]Kenneth Stone HP-UX port + 54. [58]Ajit Thyagarajan IP multicast/anycast support - 49. [53]Tomoaki TSURUOKA TRAK clock + 55. [59]Tomoaki TSURUOKA TRAK clock driver - 50. [54]Paul A Vixie TrueTime GPS driver, generic + 56. [60]Brian Utterback General codebase, + Solaris issues + 57. [61]Loganaden Velvindron Sandboxing + (libseccomp) support + 58. [62]Paul A Vixie TrueTime GPS driver, generic TrueTime clock driver - 51. [55]Ulrich Windl corrected and + 59. [63]Ulrich Windl corrected and validated HTML documents according to the HTML DTD _________________________________________________________________ References - 1. mailto:%20mark_andrews@isc.org - 2. mailto:%20altmeier@atlsoft.de - 3. mailto:%20vbais@mailman1.intel.co - 4. mailto:%20kirkwood@striderfm.intel.com - 5. mailto:%20michael.barone@lmco.com - 6. mailto:%20Jean-Francois.Boudreault@viagenie.qc.ca + 1. mailto:%20takao_abe@xurb.jp + 2. mailto:%20mark_andrews@isc.org + 3. mailto:%20altmeier@atlsoft.de + 4. mailto:%20vbais@mailman1.intel.co + 5. mailto:%20kirkwood@striderfm.intel.com + 6. mailto:%20michael.barone@lmco.com 7. mailto:%20karl@owl.HQ.ileaf.com 8. mailto:%20greg.brackley@bigfoot.com 9. mailto:%20Marc.Brett@westgeo.com 10. mailto:%20Piete.Brooks@cl.cam.ac.uk - 11. mailto:%20reg@dwf.com - 12. mailto:%20clift@ml.csiro.au - 13. mailto:casey@csc.co.za - 14. mailto:%20Sven_Dietrich@trimble.COM - 15. mailto:%20dundas@salt.jpl.nasa.gov - 16. mailto:%20duwe@immd4.informatik.uni-erlangen.de - 17. mailto:%20dennis@mrbill.canet.ca - 18. mailto:%20jhay@icomtek.csir.co.za - 19. mailto:%20glenn@herald.usask.ca - 20. mailto:%20iglesias@uci.edu - 21. mailto:%20jagubox.gsfc.nasa.gov - 22. mailto:%20jbj@chatham.usdesign.com - 23. mailto:Hans.Lambermont@nl.origin-it.com - 24. mailto:H.Lambermont@chello.nl - 25. mailto:%20phk@FreeBSD.ORG - 26. http://www4.informatik.uni-erlangen.de/%7ekardel - 27. mailto:%20kardel(at)ntp(dot)org - 28. mailto:%20jones@hermes.chpc.utexas.edu - 29. mailto:%20dkatz@cisco.com - 30. mailto:%20leres@ee.lbl.gov - 31. mailto:%20lindholm@ucs.ubc.ca - 32. mailto:%20louie@ni.umd.edu - 33. mailto:%20thorinn@diku.dk - 34. mailto:%20mayer@ntp.org - 35. mailto:%20mills@udel.edu - 36. mailto:%20moeller@gwdgv1.dnet.gwdg.de - 37. mailto:%20mogul@pa.dec.com - 38. mailto:%20tmoore@fievel.daytonoh.ncr.com - 39. mailto:%20kamal@whence.com - 40. mailto:%20derek@toybox.demon.co.uk - 41. mailto:%20d@hd.org - 42. mailto:%20Rainer.Pruy@informatik.uni-erlangen.de - 43. mailto:%20dirce@zk3.dec.com - 44. mailto:%20wsanchez@apple.com - 45. mailto:%20mrapple@quack.kfu.com - 46. mailto:%20jack@innovativeinternet.com - 47. mailto:%20schnitz@unipress.com - 48. mailto:%20shields@tembel.org - 49. mailto:%20pebbles.jpl.nasa.gov - 50. mailto:%20harlan@pfcs.com - 51. mailto:%20ken@sdd.hp.com - 52. mailto:%20ajit@ee.udel.edu - 53. mailto:%20tsuruoka@nc.fukuoka-u.ac.jp - 54. mailto:%20vixie@vix.com - 55. mailto:%20Ulrich.Windl@rz.uni-regensburg.de + 11. mailto:%20nelson@bolyard.me + 12. mailto:%20Jean-Francois.Boudreault@viagenie.qc.ca + 13. mailto:%20reg@dwf.com + 14. mailto:%20clift@ml.csiro.au + 15. mailto:%20casey@csc.co.za + 16. mailto:%20Sven_Dietrich@trimble.COM + 17. mailto:%20dundas@salt.jpl.nasa.gov + 18. mailto:%20duwe@immd4.informatik.uni-erlangen.de + 19. mailto:%20dennis@mrbill.canet.ca + 20. mailto:%20jhay@icomtek.csir.co.za + 21. mailto:%20davehart@davehart.com + 22. mailto:%20neoclock4x@linum.com + 23. mailto:%20glenn@herald.usask.ca + 24. mailto:%20iglesias@uci.edu + 25. mailto:%20jagubox.gsfc.nasa.gov + 26. mailto:%20jbj@chatham.usdesign.com + 27. mailto:%20Hans.Lambermont@nl.origin-it.com + 28. mailto:H.Lambermont@chello.nl + 29. mailto:%20phk@FreeBSD.ORG + 30. http://www4.informatik.uni-erlangen.de/%7ekardel + 31. mailto:%20kardel%20%28at%29%20ntp%20%28dot%29%20org + 32. mailto:kuehn@ntp.org + 33. mailto:%20jones@hermes.chpc.utexas.edu + 34. mailto:%20dkatz@cisco.com + 35. mailto:%20leres@ee.lbl.gov + 36. mailto:%20lindholm@ucs.ubc.ca + 37. mailto:%20louie@ni.umd.edu + 38. mailto:%20thorinn@diku.dk + 39. mailto:%20mayer@ntp.org + 40. mailto:%20mills@udel.edu + 41. mailto:%20moeller@gwdgv1.dnet.gwdg.de + 42. mailto:%20mogul@pa.dec.com + 43. mailto:%20tmoore@fievel.daytonoh.ncr.com + 44. mailto:%20kamal@whence.com + 45. mailto:%20derek@toybox.demon.co.uk + 46. mailto:%20d@hd.org + 47. mailto:%20neal@ntp.org + 48. mailto:%20Rainer.Pruy@informatik.uni-erlangen.de + 49. mailto:%20dirce@zk3.dec.com + 50. mailto:%20wsanchez@apple.com + 51. mailto:%20mrapple@quack.kfu.com + 52. mailto:%20jack@innovativeinternet.com + 53. mailto:%20schnitz@unipress.com + 54. mailto:%20shields@tembel.org + 55. mailto:%20pebbles.jpl.nasa.gov + 56. mailto:%20harlan@pfcs.com + 57. mailto:%20ken@sdd.hp.com + 58. mailto:%20ajit@ee.udel.edu + 59. mailto:%20tsuruoka@nc.fukuoka-u.ac.jp + 60. mailto:%20brian.utterback@oracle.com + 61. mailto:%20loganaden@gmail.com + 62. mailto:%20vixie@vix.com + 63. mailto:%20Ulrich.Windl@rz.uni-regensburg.de Modified: head/contrib/ntp/ChangeLog ============================================================================== --- head/contrib/ntp/ChangeLog Mon Mar 30 09:49:54 2015 (r280848) +++ head/contrib/ntp/ChangeLog Mon Mar 30 13:30:15 2015 (r280849) @@ -1,4 +1,3226 @@ --- +(4.2.8p1) 2015/02/04 Released by Harlan Stenn + +* Update the NEWS file. +* [Sec 2671] vallen in extension fields are not validated. +--- +(4.2.8p1-RC2) 2015/01/29 Released by Harlan Stenn + +* [Bug 2627] shm refclock allows only two units with owner-only access + rework: reverted sense of mode bit (so default reflects previous + behaviour) and updated ducumentation. +* [Bug 2732] - Leap second not handled correctly on Windows 8 + use 'GetTickCount()' to get the true elapsed time of slew + (This should work for all versions of Windows >= W2K) +* [Bug 2738] Missing buffer initialization in refclocK_parse.c::parsestate(). +* [Bug 2739] Parse driver with PPS enabled occasionally evaluates + PPS timestamp with wrong sign. + Removed some German umlauts. +* [Bug 2740] Removed some obsolete code from the parse driver. +* [Bug 2741] Incorrect buffer check in refclocK_parse.c::parsestatus(). +--- +(4.2.8p1-RC1) 2015/01/24 Released by Harlan Stenn + +* Start the RC for 4.2.8p1. +* [Bug 2187] Update version number generation scripts. +* [Bug 2617] Fix sntp Usage documentation section. +* [Sec 2672] Code cleanup: On some OSes ::1 can be spoofed... +* [Bug 2736] Show error message if we cannot open the config file. +* Copyright update. +* Fix the package name. +--- +(4.2.8p1-beta5) 2015/01/07 Released by Harlan Stenn + +* [Bug 2695] Windows build: __func__ not supported under Windows. +* [Bug 2728] Work around C99-style structure initialization code + for older compilers, specifically Visual Studio prior to VS2013. +--- +(4.2.8p1-beta4) 2015/01/04 Released by Harlan Stenn + +* [Bug 1084] PPSAPI for ntpd on Windows with DLL backends +* [Bug 2695] Build problem on Windows (sys/socket.h). +* [Bug 2715] mdnstries option for ntp.conf from NetBSD. +* Fix a regression introduced to timepps-Solaris.h as part of: + [Bug 1206] Required compiler changes for Windows + (4.2.5p181) 2009/06/06 +--- +(4.2.8p1-beta3) 2015/01/02 Released by Harlan Stenn + +* [Bug 2627] shm refclock allows only two units with owner-only access + Use mode bit 0 to select public access for units >= 2 (units 0 & 1 are + always private. +* [Bug 2681] Fix display of certificate EOValidity dates on 32-bit systems. +* [Bug 2695] 4.2.8 does not build on Windows. +* [bug 2700] mrulist stopped working in 4.2.8. +* [Bug 2706] libparse/info_trimble.c build dependencies are broken. +* [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD. +* [Bug 2714] libevent may need to be built independently of any build of sntp. +* [Bug 2715] mdnstries option for ntp.conf from NetBSD. +--- +(4.2.8p1-beta2) 2014/12/27 Released by Harlan Stenn + +* [Bug 2674] Install sntp in sbin on NetBSD. +* [Bug 2693] ntp-keygen doesn't build without OpenSSL and sntp. +* [Bug 2707] Avoid a C90 extension in libjsmn/jsmn.c. +* [Bug 2709] see if we have a C99 compiler (not yet required). +--- +(4.2.8p1-beta1) 2014/12/23 Released by Harlan Stenn + +* [Sec 2672] On some OSes ::1 can be spoofed, bypassing source IP ACLs. +* [Bug 2693] ntp-keygen doesn't build without OpenSSL. +* [Bug 2697] IN6_IS_ADDR_LOOPBACK build problems on some OSes. +* [Bug 2699] HAVE_SYS_SELECT_H is misspelled in refclock_gpsdjson.c. +--- +(4.2.8) 2014/12/19 Released by Harlan Stenn + +* [Sec 730] Increase RSA_generate_key modulus. +* [Sec 2666] Use cryptographic random numbers for md5 key generation. +* [Sec 2667] buffer overflow in crypto_recv(). +* [Sec 2668] buffer overflow in ctl_putdata(). +* [Sec 2669] buffer overflow in configure(). +* [Sec 2670] Missing return; from error clause. +* [Sec 2671] vallen in extension fields are not validated. +* [Sec 2672] On some OSes ::1 can be spoofed, bypassing source IP ACLs. +* [Bug 2691] Wrong variable name in refclock_ripencc.c. +(4.2.7p486-RC) 2014/12/18 Released by Harlan Stenn +* [Bug 2687] RefClock 26/hpgps doesn't work at default line speed +(4.2.7p485-RC) 2014/12/12 Released by Harlan Stenn +* [Bug 2686] refclock_gpsdjson needs strtoll(), which is not always present. +(4.2.7p484-RC) 2014/12/11 Released by Harlan Stenn +(4.2.7p483) 2014/12/08 Released by Harlan Stenn +* [Bug 2685] Better document the KOD file for sntp. +(4.2.7p482) 2014/12/02 Released by Harlan Stenn +* [Bug 2641] sntp is installed in the wrong location in Solaris. +* [Bug 2678] nmea_control() now checks 'refclock_params()' result. +(4.2.7p481) 2014/11/22 Released by Harlan Stenn +* [Bug 2314] Only enable PPS if kernel consumer binding succeeds. +* [Bug 2314] Kernel PPS binding EOPNOTSUPP is a failure condition. +* Rename pps_enable to hardpps_enable. +(4.2.7p480) 2014/11/21 Released by Harlan Stenn +* [Bug 2677] PATH_MAX isn't #define'd under Windows. + Regression from the patch fixing Bug 2639. +(4.2.7p479) 2014/11/15 Released by Harlan Stenn +* [Bug 2651] Certificates with ASN timestamps w/ 4-digit years mis-parsed. +(4.2.7p478) 2014/11/14 Released by Harlan Stenn +* [Sec 2630] buffer overrun in ntpq tokenize(). +* [Bug 2639] Check return value of ntp_adjtime(). +* [Bug 2650] includefile processing broken. +* [Bug 2661] ntpq crashes with mreadvar. +(4.2.7p477) 2014/11/13 Released by Harlan Stenn +* [Bug 2657] Document that "restrict nopeer" intereferes with "pool". +(4.2.7p476) 2014/10/08 Released by Harlan Stenn +* [Bug 2503] SHT utility outdated +(4.2.7p475) 2014/09/11 Released by Harlan Stenn +* [Bug 2654] refclock_true.c doesn't identify the Mk III. +(4.2.7p474) 2014/09/10 Released by Harlan Stenn +* [Bug 2536] ntpd sandboxing support (libseccomp2) cleanup. +* [Bug 2649] Clean up html/ page installation. +(4.2.7p473) 2014/09/06 Released by Harlan Stenn +* [Bug 2649] Clean up html/ page installation. +(4.2.7p472) 2014/09/06 Released by Harlan Stenn +* [Bug 2556] mrulist is missing from the generated ntpq man page. +(4.2.7p471) 2014/09/05 Released by Harlan Stenn +* [Bug 2649] "make install" leaves wrong owner for files in html/. +* [Bug 2652] Windows hates directory names that contain a :. +(4.2.7p470) 2014/09/02 Released by Harlan Stenn +* [Bug 2502] Autogen text replacement errors. +* autogen-5.18.5pre1 +* html/ cleanups from Hal Murray. +(4.2.7p469) 2014/09/01 Released by Harlan Stenn +* [Bug 2536] ntpd sandboxing support (libseccomp2) cleanup. +(4.2.7p468) 2014/08/31 Released by Harlan Stenn +* [Bug 2556] ntpq man page cleanup. +* autogen-5.18.4 +(4.2.7p467) 2014/08/28 Released by Harlan Stenn +* [Bug 2639] Check return value of ntp_adjtime(). +* [Bug 2640] STA_NANO can result in invalid ntv.constant. +(4.2.7p466) 2014/08/27 Released by Harlan Stenn +* [Bug 2536] ntpd sandboxing support (libseccomp2) cleanup. +(4.2.7p465) 2014/08/23 Released by Harlan Stenn +* [Bug 2538] NTP programs print exit code in help/usage text. +* [Bug 2595] Man page quirks: ntpdate references in ntpd. +* [Bug 2613] www.ntp.org/bugs.html tells folks to email doc bugs to DLM. +* [Bug 2636] Clutter in syslog if gpsd not running + - found (hopefully) last cause for clutter in protocol version + - log GPSD revision and release numbers with protocol version +(4.2.7p464) 2014/08/22 Released by Harlan Stenn +* [Bug 2636] Fix coverity warning from previous patch. +(4.2.7p463) 2014/08/21 Released by Harlan Stenn +* [Bug 2636] Clutter in syslog if gpsd not running + - make driver work with GPSD protocol version 3.9 + - use exponential back-off for connection problems + - implement rate-limit for syslog entries +(4.2.7p462) 2014/08/16 Released by Harlan Stenn +* [Bug 2622] Synchronisation problem using SHM [...] + Add 'control' function -- fudge values not available during start. +(4.2.7p461) 2014/08/14 Released by Harlan Stenn +* [Bug 1128] ntpq truncates "remote" host information. +* More autogen-5.18.4pre14 cleanup. +(4.2.7p460) 2014/08/13 Released by Harlan Stenn +* More autogen-5.18.4pre14 cleanup. +(4.2.7p459) 2014/08/12 Released by Harlan Stenn +* [Bug 2630] Limit the ntpq command buffer to 512 bytes. +* FlexeLint cleanups. +* Try bison-3.0.2 instead of bison-2.5. +(4.2.7p458) 2014/08/11 Released by Harlan Stenn +* [Bug 2633] Provide stdnoreturn.h for windows port. +(4.2.7p457) 2014/08/09 Released by Harlan Stenn +* [Bug 2622] Synchronisation problem using SHM when time difference is + more than four hours: Change SHM driver so TOY restricted API is not + used any more. (Plus some minor cleanup in logic and flow control) +* Pass the configration source into the parser as argument rather + than through a global variable. +* Fix nits in the ntpq man page. +* autogen-5.18.4pre14 +(4.2.7p456) 2014/08/07 Released by Harlan Stenn +* CID 739722: Change the way the extention and MAC fields are processed. +(4.2.7p455) 2014/08/03 Released by Harlan Stenn +* [Bug 2565] ntpd sometimes logs unexpected getifaddrs() errors. +* CID 739722: Clean up the definition of the exten field of struct pkt. +(4.2.7p454) 2014/07/30 Released by Harlan Stenn +* [Bug 2628] 'mon_getmoremem()' relies on undefined behaviour +(4.2.7p453) 2014/07/19 Released by Harlan Stenn +* [Bug 2597] leap file loose ends (follow-up) + - uniform expiration check messages for config and timer triggered + leap file loads + - timer triggered loads log messages only once per day +(4.2.7p452) 2014/07/18 Released by Harlan Stenn +* Make all of the html/ .html files use the same format for "Last update". +(4.2.7p451) 2014/07/17 Released by Harlan Stenn +* Fix the "Last update" entries in the html/ subtree. +(4.2.7p450) 2014/07/16 Released by Harlan Stenn +* Distribute the scripts needed for the fix for Bug 2547. +(4.2.7p449) 2014/07/16 Released by Harlan Stenn +* [Bug 2547] Automate update of "Last Update" datestamps in .html files. +* [Bug 2623] Missing {} in refclock_oncore.c. +* Quiet warnings from ntp_calendar.h: avoid using argument names. +* Fix typos in decode.html and debug.html . +(4.2.7p448) 2014/07/15 Released by Harlan Stenn +* [Bug 2621] Avoid use of indeterminate address after 'free()' + (minor C standard conformance issue) +* Quiet warnings from ntp_calendar.h: avoid using argument names. +(4.2.7p447) 2014/07/05 Released by Harlan Stenn +* [Bug 2620] Use version.pm for checking version numbers in NTP::Util. +* [Bug 2624] Fix signed compare on 'l_fp'. +(4.2.7p446) 2014/06/28 Released by Harlan Stenn +* [Bug 2597] leap file processing -- loose ends. +* [Bug 2614] use 'unsigned long' consistently in ntp_random.c + to avoid possibly undefined behaviour in signed int overflow +* [Bug 2619] Save a signed int copy of the return value of i2d_DSA_SIG(). + Provide missing msyslog() message in crypto_alice(). +* Fix a variable lifetime issue. +* Allow for version suffix in libevent in ntp_libevent.m4. +(4.2.7p445) 2014/06/12 Released by Harlan Stenn +* [Bug 2556] mrulist isn't mentioned in the ntpq man page. +(4.2.7p444) 2014/05/19 Released by Harlan Stenn +* [Bug 2597] leap file processing -- loose ends + fixed coverity issues +(4.2.7p443) 2014/05/10 Released by Harlan Stenn +* [Bug 2594] Update the year in sntp/include/copyright.def. +(4.2.7p442) 2014/05/09 Released by Harlan Stenn +* [Bug 2589] Update VS2013 project files for libntp. +* [Bug 2600] Fix "Undisicplined Local Clock" driver1.html page. +(4.2.7p441) 2014/05/04 Released by Harlan Stenn +* [Bug 2597] leap file processing -- loose ends + log daily warning when leap info less than 28 days to expiration or + already expired; nag hourly on last day before expiration; log when + leapfile name is invalid +(4.2.7p440) 2014/04/09 Released by Harlan Stenn +* [Bug 2536] ntpd sandboxing support (libseccomp2) cleanup. +* [Bug 2570] cleanup: fix log format for successful leapfile load +(4.2.7p439) 2014/04/03 Released by Harlan Stenn +* [Bug 2589] fix VS2009 compile problem. +(4.2.7p438) 2014/04/01 Released by Harlan Stenn +* [Bug 2546] Windows build documentation updates. +(4.2.7p437) 2014/03/31 Released by Harlan Stenn +* [Bug 2537] ntpd truncates symmetric keys to 20 bytes. +* [Bug 2546] Documentation updates. +(4.2.7p436) 2014/03/31 Released by Harlan Stenn +* Update to libopts-40.2.15, and autogen-5.18.3pre18. +* [Bug 2311] Add more tags to mdoc2xxx. +* [Bug 2502] Assorted text replacement errors in 4.2.7p345 +* [Bug 2538] ntp programs print exit code as part of the "usage" text. +(4.2.7p435) 2014/03/29 Released by Harlan Stenn +* [Bug 2570] cleanup: reduced logging noise, moved some functions + into libntp. +(4.2.7p434) 2014/03/21 Released by Harlan Stenn +* [Bug 2577] Update VS2013 solution and project files. +(4.2.7p433) 2014/03/10 Released by Harlan Stenn +* Clean up last-update timestamps of html/*.html files. +* [Bug 2546] Documentation updates. +(4.2.7p432) 2014/03/09 Released by Harlan Stenn +* CID 711660: Do a non-NULL pointer assertion check a bit earlier. +(4.2.7p431) 2014/03/05 Released by Harlan Stenn +* [Bug 2572] cross-compiling fails for --with-yielding-select. +(4.2.7p430) 2014/03/04 Released by Harlan Stenn +* Upgrade to libevent-2.1.3-alpha-dev. +* [Bug 2572] cross-compiling fails for --with-yielding-select. +(4.2.7p429) 2014/03/03 Released by Harlan Stenn +* CID 1165098: Remove logically dead code from refclock_true.c. +* CID 1189401: Use INSIST() instead of a belt-and-suspenders pointer check. +* In ntp_dir_sep.m4, we care about $host_os, not $target_os. +* [Bug 2170] Use AC_PREPROC_IFELSE instead of AC_EGREP_CPP. +* [Bug 2540] bootstrap script needs to 'touch' files in finer-grained groups. +* [Bug 2570] refuse to load leapsec file with bad/missing SHA1 hash + -- change reading the hash line code: NIST omits leading zeros. +* [Bug 2576] refclock_gpsdjson.c doesn't compile if CLOCK_GPSDJSON is + not enabled at configure time. +(4.2.7p428) 2014/03/03 Released by Harlan Stenn +* [Bug 2570] refuse to load leapsec file with bad/missing SHA1 hash +* [Bug 2562] Distribute the code in libjsmn/ . +(4.2.7p427) 2014/03/02 Released by Harlan Stenn +* [Bug 2562] GPSD_JSON: fix solaris issues (asprintf(), isfinite()) +* [Bug 2562] first release of the GPSD client clock (type 46) +(4.2.7p426) 2014/02/28 Released by Harlan Stenn +* [Bug 2113] Warn about ignored extra args in ntpq. +* [Bug 2540] bootstrap script needs to 'touch' files in finer-grained groups. +* [Bug 2561] Allow wildcards in the target of the "interface" command. +* [Bug 2572] cross-compiling fails for --with-yielding_select. +(4.2.7p425) 2014/02/26 Released by Harlan Stenn +* Copyright file update. +(4.2.7p424) 2014/02/24 Released by Harlan Stenn +* [Bug 2541] ntpd terminates itself with SIGHUP unexpectedly. +(4.2.7p423) 2014/02/23 Released by Harlan Stenn +* [Bug 2565] Handle EINTR on getifaddrs(). +(4.2.7p422) 2014/02/17 Released by Harlan Stenn +* [Bug 2536] ntpd sandboxing support (libseccomp2). +(4.2.7p421) 2014/02/10 Released by Harlan Stenn +* [Bug 898] More documentation fixes. +* [Bug 2555] Autogen mdoc man pages all stamped with SunOS 5.10. +* calc_tickadj/Makefile.am man/mdoc page build cleanup. +(4.2.7p420) 2014/02/09 Released by Harlan Stenn +* [Bug 492] Clearly document ntpdate's pending deprecation. +* [Bug 1186] ntpd fails with link local IPv6 addresses. +* [Sec 2542] Strengthen the mrulist nonce. +(4.2.7p419) 2014/02/08 Released by Harlan Stenn +* [Bug 2466] Wrap NMEA timestamps in 1024 week cycles. +(4.2.7p418) 2014/02/05 Released by Harlan Stenn +* [Bug 2551] --disable-local-libevent breaks the build. +(4.2.7p417) 2014/02/02 Released by Harlan Stenn +* [Bug 2539] doc and code tweaks for NMEA driver. +* Add check for enable stats to ntpd/complete.conf.in +* Fix typo in html/confopt.html +(4.2.7p416) 2014/01/31 Released by Harlan Stenn +* Tweak the 'Modified' line on appropriate html pages. +* Note in the deprecation of ntpdc in its documentation. +* [Bug 2332] Be more careful about when we use 'libgcc_s'. +(4.2.7p415) 2014/01/28 Released by Harlan Stenn +* Fix the man page installation for the scripts/ files. +(4.2.7p414) 2014/01/28 Released by Harlan Stenn +* [Bug 792] TrueTime TL-3 WWV refclock support. +* [Bug 898] Documentation fixes. +* [Bug 930] ntpdc docs refer to 'clockinfo', but mean 'clockstat'. +* [Bug 1002] ntp-keygen option and documentation updates: -p/--pvt-passwd + is now -p/--password, and -q/--get-pvt-passwd is now -q/--export-passwd. +* [Bug 1349] statistics command not documented in HTML documentation. + In html/monopt.html, add statistics id, definition, description, and + correct typo. + In html/scripts/monopt.txt, add statistics item, href, and comment. + In ntpd/ntp.conf.def, under statistics correct four to eight kinds. + In ntpd/complete.conf.in, add all eight kinds to statistics. + In html/comdex.html, remove duplicate footer. +* [Bug 1734] Include man page for ntp.conf (fixed in 4.2.7p297). +* [Bug 2049] Clarify ntpdate's -d option behavior. +* [Bug 2366] ntpdc.html: burst/iburst only work on servers. +* [Bug 2493] ntptrace needs a man page (fixed in 4.2.7p402). +* [Bug 2545] Cleanup of scripts/monitoring/ntptrap. +(4.2.7p413) 2014/01/27 Released by Harlan Stenn +* Require a version string for perl scripts that use autogen. +* html/ cleanup. +(4.2.7p412) 2014/01/20 Released by Harlan Stenn +* [Bug 2540] bootstrap script needs to 'touch' files in finer-grained groups. +(4.2.7p411) 2014/01/12 Released by Harlan Stenn +* [Bug 2532] Note in ntpdc docs that "enable pps" only works on older ntpd. +(4.2.7p410) 2014/01/08 Released by Harlan Stenn +* [Bug 2332] Force reference to 'libgcc_s' when using GCC, because + threading+restricted user+locked memory otherwise fails on Linux. +* [Bug 2530] Fix documentation for enable/disable mode7 and pps. +* Cleanup to the new scripts/*/Makefile.am files. +(4.2.7p409) 2014/01/04 Released by Harlan Stenn +* [Bug 2060] Warn about restrictions with "kod" but not "limited". +(4.2.7p408) 2013/12/29 Released by Harlan Stenn +* [Bug 2187] Update version number generation scripts. +(4.2.7p407) 2013/12/29 Released by Harlan Stenn +* [Bug 2519] mktime.c does not compile on 64-bit Solaris but we do not + need timegm() and the Solaris provides mktime(). +* [Bug 2522] Revert Bug 2513 fix - it breaks backward compatibility. +(4.2.7p406) 2013/12/28 Released by Harlan Stenn +* [Bug 2521] VPATH tweaks for perl -opts files. +(4.2.7p405) 2013/12/27 Released by Harlan Stenn +* [Bug 2521] bootstrap script needs a tweak for perl -opts files. +* [Bug 2524] Add ntpsweep to sntp/loc/* files. +* [Bug 2526] Add "noinst" support to the sntp/loc/ framework. +(4.2.7p404) 2013/12/24 Released by Harlan Stenn +* [Bug 135] AIX5: "Address already in use" for IPv6 wildcard. +(4.2.7p403) 2013/12/23 Released by Harlan Stenn +* [Bug 2513] Remove any PIDFILE in finish(). +* [Bug 2516] Enable clock_gettime() support for AIX 5+. +* [Bug 2517] Fix peer status errors in decode.html. +(4.2.7p402) 2013/12/23 Released by Harlan Stenn +* Incorporate Oliver Kindernay's GSoC 2013 scripts/ cleanup. +(4.2.7p401) 2013/11/30 Released by Harlan Stenn +* [Bug 2491] VS20xx compile fixes. +(4.2.7p400) 2013/11/29 Released by Harlan Stenn +* [Bug 2491] VS2013 project files. +(4.2.7p399) 2013/11/28 Released by Harlan Stenn +* [Bug 2326] More leapsecond file notification cleanup. +* [Bug 2506] make sure routing updates are always tracked +* [Bug 2514] secs/* #define usage cleanup. +(4.2.7p398) 2013/11/25 Released by Harlan Stenn +* [Bug 2326] More leapsecond file notification cleanup. +* Improve sntp KoD data file fopen() error message. +(4.2.7p397) 2013/11/20 Released by Harlan Stenn +* [Bug 2326] More leapsecond file notification cleanup. +(4.2.7p396) 2013/11/19 Released by Harlan Stenn +* [Bug 2326] Improve stale leapsecond notifications. +(4.2.7p395) 2013/11/12 Released by Harlan Stenn +* Upgrade to autogen-5.18.3pre5 and libopts-40.1.15. +(4.2.7p394) 2013/11/05 Released by Harlan Stenn +* [Bug 1050] Change ONCORE log message for leap second announcement + to avoid misunderstandings. +* [Bug 2499] Win32 user-space/loopback ppsapi provider drops samples. +* [Bug 2256] Improve configure's function searches in libraries. +(4.2.7p393) 2013/10/16 Released by Harlan Stenn +* [Bug 2272] Use C99 integer types. ntp_calendar.h and ntp_types.h . +(4.2.7p392) 2013/10/15 Released by Harlan Stenn +* [Bug 2375] Improve AIX compatibility. +* [Bug 2490] Fixed non-const initializer coming from [Bug 2250] fix. +(4.2.7p391) 2013/10/12 Released by Harlan Stenn +* [Bug 2250] Rework of leap second handling machine. +* [Bug 2419] [rc-nmea] Improve clockstats reporting when receiver sends + data without valid GPS fix. +(4.2.7p390) 2013/09/26 Released by Harlan Stenn +* [Bug 2482] Cleanup of droproot and jail support for Solaris. +(4.2.7p389) 2013/09/24 Released by Harlan Stenn +* [Bug 2473] revisited: NTPD exits after clock is stepped backwards + Avoid possible unsigned underrun for startup condition when testing + for clock backstep. +* [Bug 2481] ntpd aborts when both user and group are specified with -u. +* [Bug 2482] Add droproot and jail support for Solaris. +(4.2.7p388) 2013/09/19 Released by Harlan Stenn +* [Bug 2473] NTPD exits after clock is stepped backwards externally +(4.2.7p387) 2013/09/16 Released by Harlan Stenn +* [Bug 1642] ntpdsim can't find simnulate block in config file. +(4.2.7p386) 2013/09/01 Released by Harlan Stenn +* [Bug 2472] (WinXP) Avoid self-termination of IO thread during exit(). +(4.2.7p385) 2013/08/19 Released by Harlan Stenn +* CID 975596: Copy/paste error: vallen should be siglen. +* CID 1009579: Check return status of X509_add_ext(). +* [2085] Fix root distance and root dispersion calculations. +* [Bug 2426] Possibly uninitialized data in crypto_send() - CID 975596. +(4.2.7p384) 2013/08/18 Released by Harlan Stenn +* [Bug 2450] --version has bogus short option. +(4.2.7p383) 2013/08/10 Released by Harlan Stenn +* (no changes - force a rebuild for a new Coverity scan) +(4.2.7p382) 2013/08/08 Released by Harlan Stenn +* [Bug 2454] Need way to set file descriptor limit - cleanup. +(4.2.7p381) 2013/08/07 Released by Harlan Stenn +* [Bug 2451] rlimit command is missing from the table of contents in + miscopt.html . +* [Bug 2452] provide io_handler/input_handler only on + non HAVE_IO_COMPLETION_PORT platforms +* [Bug 2453] Need a way to avoid calling mlockall. +* [Bug 2454] Need way to set file descriptor limit. +* [Bug 2458] AM_CONFIG_HEADER is obsolete. +(4.2.7p380) 2013/08/03 Released by Harlan Stenn +* CID 984511: Some systems have different printf needs for sizeof. +(4.2.7p379) 2013/08/02 Released by Harlan Stenn +* CID 739724: Fix printf arg mismatch in a debug line. +* [Bug 2425] compile io_handler() in ntp_io.c unconditionally +* [Bug 2448] Fix checks for configure --with-stack-limit and --with-memlock + values. +(4.2.7p378) 2013/08/01 Released by Harlan Stenn +* [Bug 2425] move part of input handler code from ntpd.c to ntp_io.c + and fix select()-only platforms calling input_handler directly. +* [Bug 2446] Quiet warnings from Oracle's Studio compiler. +* Upgrade to AutoGen-5.18.1pre3 +* Upgrade to libopts-40.1.15. +(4.2.7p377) 2013/07/28 Released by Harlan Stenn +* [Bug 2397] License/copyright cleanup. +* [Bug 2439] Fix check of EscapeCommFunction() in ports/winnt/libntp/termios.c. +(4.2.7p376) 2013/07/24 Released by Harlan Stenn +* [Bug 2322] Oncore driver should send 0 PPS offset to GPS. +(4.2.7p375) 2013/07/22 Released by Harlan Stenn +* [Bug 883] log warning arguments swapped in refclock_gpsvme.c. +* [Bug 2368] Correct bug in previous attempt. +* [Bug 2413] Fix "make check" with automake >= 1.13. +* [Bug 2434] Line-buffer (v. block-buffer) stdout. +(4.2.7p374) 2013/07/21 Released by Harlan Stenn +* [Bug 2368] make check troubles in libevent. +* [Bug 2425] setup SIGIO/SIGPOLL for asyncio on the read side + of a socketpair for the worker thread. +(4.2.7p373) 2013/07/20 Released by Harlan Stenn +* [Bug 2427] configure fails to detect recvmsg() on Solaris. +(4.2.7p372) 2013/07/17 Released by Harlan Stenn +* [Bug 1466] Oncore should set FLAG_PPS. +* [Bug 2375] AIX 7 doesn't like a libevent validation check. +* [Bug 2423] Log command-line args at LOG_INFO. +* [Bug 2428] do_unconf() should reset 'items' before the 2nd loop. +(4.2.7p371) 2013/07/07 Released by Harlan Stenn +* CID 1042586: Check the return value of clock_gettime() in worker_sleep(). +* Upgrade to libopts-39.0.14 from 5.17.5pre10. +(4.2.7p370) 2013/07/06 Released by Harlan Stenn +* Remove \n's from syslog output strings. +(4.2.7p369) 2013/07/05 Released by Harlan Stenn +* [Bug 2415] RES_LIMITED flags check should use &, not &&. +* Have NTP_LIBNTP check for time.h and clock_getres(). +* Fix ntpsweep to use sntp instead of ntpdate, from Oliver Kindernay. +(4.2.7p368) 2013/05/01 Released by Harlan Stenn +* [Bug 2145] ntpq dumps core when displaying sys_var_list and more. +(4.2.7p367) 2013/04/25 Released by Harlan Stenn +* [Bug 1485] Sometimes ntpd crashes +* [Bug 2382] Implement LOGTOD using ldexp() instead of shifting. +(4.2.7p366) 2013/04/17 Released by Harlan Stenn +* [Bug 1866] Disable some debugging output in refclock_oncore. +(4.2.7p365) 2013/04/16 Released by Harlan Stenn +* [Bug 2149] Log an error message if /proc/net/if_inet6 cannot be opened. +(4.2.7p364) 2013/03/26 Released by Harlan Stenn +* Bump sntp/include/autogen-version.def . +(4.2.7p363) 2013/03/26 Released by Harlan Stenn +* [Bug 2357] sntp/libopts/usage.c sometimes needs -lintl. +* Upgrade to libopts from 5.17.3pre10. +(4.2.7p362) 2013/03/19 Released by Harlan Stenn +* [Bug 2364] "sed -i" is not portable. +(4.2.7p361) 2013/03/17 Released by Harlan Stenn +* [Bug 2357] sntp/libopts/usage.c sometimes needs -lintl. +* [Bug 2365] "make check" fails in libevent. +(4.2.7p360) 2013/03/15 Released by Harlan Stenn +* Upgrade libevent (coverity fixes, etc.). +* EEXIST is OK for mkdir() in sntp/kod_management.c. +(4.2.7p359) 2013/03/03 Released by Harlan Stenn +* [Bug 2359] Fix send_via_ntp_signd() prototype. +(4.2.7p358) 2013/02/27 Released by Harlan Stenn +* Upgrade to autogen-5.17.3pre4 and libopts-38.0.13. +* [Bug 2357] sntp/libopts/usage.c on NetBSD needs -lintl. +(4.2.7p357) 2013/02/22 Released by Harlan Stenn +* Upgrade to autogen-5.17.2pre and libopts-38.0.13. +(4.2.7p356) 2013/02/19 Released by Harlan Stenn +* Added loc/debian. +(4.2.7p355) 2013/02/18 Released by Harlan Stenn +* CID 739708: Check return status of fcntl() in refclock_arc.c. +* CID 739709: Check return status of fcntl() in refclock_datum.c. +* CID 739710: Check return status of mkdir() in sntp/kod_management.c. +* CID 739711: Ignore return status of remove() in ntp-keygen.c. +* CID 739723: Print sizeof as unsigned. +* CID 971094: Clean up time of check/time of use in check_leap_file(). +(4.2.7p354) 2013/02/10 Released by Harlan Stenn +* CID 97194: Check return from setsockopt(). +* CID 739473,739532: Out-of-bounds access/illegal address computation. +* CID 739558: Double close. +* CID 739559: Double close. +* CID 739713: devmask/recmask copy/paste error. +* CID 739714: Fix code indentation level. +* CID 739715: Clean up sockaddr_dump(). +(4.2.7p353) 2013/02/09 Released by Harlan Stenn +* [Bug 2326] Check hourly for a new leapfile if the old one expired. +(4.2.7p352) 2013/01/28 Released by Harlan Stenn +* [Bug 2326] Notice when a new leapfile has been installed. +(4.2.7p351) 2013/01/24 Released by Harlan Stenn +* [Bug 2328] Don't apply small time adjustments on Windows versions + which don't support this. +(4.2.7p350) 2013/01/21 Released by Harlan Stenn +* Added sntp/loc/netbsd based on info from Christos Zoulas. +(4.2.7p349) 2013/01/20 Released by Harlan Stenn +* [Bug 2321] Fixed Windows build, but autogen update still required. +(4.2.7p348) 2013/01/17 Released by Harlan Stenn +* [Bug 2327] Rename sntp/ag-tpl/:Old to sntp/ag-tpl/Old. +* Cleanup to ntpsnmpd-opts.def. +* Cleanup to ntpq.texi. +* Documentation cleanup to the ntpd, ntpdc, ntpq and ntp-wait + .def files. +* In ntp.conf.def, cleanup SEE ALSO, document 'rlimit' options. +* Add a reference to RFC5907 in the ntpsnmpd documentation. +(4.2.7p347) 2013/01/07 Released by Harlan Stenn +* [Bug 2325] Re-enable mlockall() check under Linux post-1223 fix. +(4.2.7p346) 2013/01/06 Released by Harlan Stenn +* [Bug 1223] reorganize inclusion of sys/resource.h. +(4.2.7p345) 2013/01/04 Released by Harlan Stenn +* Update several .def files to use autogen-5.17 feature set. +(4.2.7p344) 2013/01/03 Released by Harlan Stenn +* Refactor and enhance mdoc2texi. +* Make sure agtexi-file.tpl defines label-str. +* Cleanup to ntp.conf.def. +* Upgrade to autogen-5.17 and libopts-37.0.12. +(4.2.7p343) 2013/01/02 Released by Harlan Stenn +* Update the copyright year. +(4.2.7p342) 2012/12/31 Released by Harlan Stenn +* [Bug 2081 - Backward Incompatible] rawstats now logs everything. +(4.2.7p341) 2012/12/30 Released by Harlan Stenn +(4.2.7p340) 2012/12/29 Released by Harlan Stenn +* mdoc2texi fixes: trailing punctuation. +(4.2.7p339) 2012/12/26 Released by Harlan Stenn +* mdoc2texi fixes: parseQuote, closing of list item tables. +* ntp-wait, ntpd, ntpdc, ntpq, ntpsnmpd autogen documentation updates. +(4.2.7p338) 2012/12/25 Released by Harlan Stenn +* mdoc2texi fixes: Handle_ArCmFlIc, Handle_Fn, HandleQ. +* ntp-keygen autogen documentation updates. +* ntpq autogen docs. +(4.2.7p337) 2012/12/22 Released by Harlan Stenn +* [Bug 1223] More final cleanup for rlimit changes. +(4.2.7p336) 2012/12/21 Released by Harlan Stenn +* [Bug 1223] Final cleanup for rlimit changes. +(4.2.7p335) 2012/12/18 Released by Harlan Stenn +* Update documentation templates and definitions. +* Create agtexi-file.tpl . +(4.2.7p334) 2012/12/10 Released by Harlan Stenn +* [Bug 2114] Update tests for sntp's synch distance. +* Create ntp-keygen.{html,texi}. +(4.2.7p333) 2012/12/07 Released by Harlan Stenn +* Autogen documentation cleanup. +(4.2.7p332) 2012/12/06 Released by Harlan Stenn +* sntp documentation cleanup. +(4.2.7p331) 2012/12/03 Released by Harlan Stenn +* [Bug 2114] Correctly calculate sntp's synch distance. +(4.2.7p330) 2012/12/03 Released by Harlan Stenn +* autogen doc cleanup +(4.2.7p329) 2012/12/01 Released by Harlan Stenn +* [Bug 2278] ACTS flag3 mismatch between code and driver18.html. +* Use an enum for the ACTS state table. +* html doc reconciliation with DLM's copy. +(4.2.7p328) 2012/11/30 Released by Harlan Stenn +* html doc reconciliation with DLM's copy. +(4.2.7p327) 2012/11/29 Released by Harlan Stenn +* [Bug 2024] Identify Events in the system status word in decode.html.' +* [Bug 2040] Provide a command-line option for the identity key bits. +* Create loc/darwin for Mac OSX +(4.2.7p326) 2012/11/21 Released by Harlan Stenn +* [Bug 1214] 'proto: precision = ...' should be at INFO, not NOTICE. +* [Bug 2246] Clear sys_leap when voting says to disarm the leap. +(4.2.7p325) 2012/11/20 Released by Harlan Stenn +* [Bug 2202] ntpq.html: there is no "acv" billboard. +* [Bug 2306] keep pps hack for Win32 even if user-mode/loopback + PPS API is activated on a serial line. +(4.2.7p324) 2012/11/19 Released by Harlan Stenn +* Reinstate doc fix to authentic.html from Mike T. +* [Bug 1223] cleanup for rlimit changes. +* [Bug 2098] Install DLM's HTML documentation. +* [Bug 2306] Added user-mode/loop-back PPS API provider for Win32 +(4.2.7p323) 2012/11/18 Released by Harlan Stenn +* html/ updates from Dave Mills. +(4.2.7p322) 2012/11/15 Released by Harlan Stenn +* [Bug 1223] Allow configurable values for RLIMIT_STACK and + RLIMIT_MEMLOCK. +* [Bug 1320] Log ntpd's initial command-line parameters. (updated fix) +* [Bug 2120] no sysexits.h under QNX. +* [Bug 2123] cleanup to html/leap.html. +(4.2.7p321) 2012/11/13 Released by Harlan Stenn +* [Bug 1320] Log ntpd's initial command-line parameters. +(4.2.7p320) 2012/11/12 Released by Harlan Stenn +* [Bug 969] Clarify ntpdate.html documentation about -u and ntpd. +* [Bug 1217] libisc/ifiter_sysctl.c:internal_current(): Ignore RTM + messages with wrong version +(4.2.7p319) 2012/11/11 Released by Harlan Stenn +* [Bug 2296] Fix compile problem with building with old OpenSSL. +(4.2.7p318) 2012/11/05 Released by Harlan Stenn +* [Bug 2301] Remove spurious debug output from ntpq. +(4.2.7p317) 2012/11/05 Released by Harlan Stenn +* [Bug 922] Allow interspersed -4 and -6 flags on the ntpq command line. +(4.2.7p316) 2012/10/27 Released by Harlan Stenn +* [Bug 2296] Update fix for Bug 2294 to handle --without-crypto. +(4.2.7p315) 2012/10/26 Released by Harlan Stenn +* [Bug 2294] ntpd crashes in FIPS mode. +(4.2.7p314) 2012/10/23 Released by Harlan Stenn +* Document a tricky malloc() of dns_ctx in sntp. +(4.2.7p313) 2012/10/23 Released by Harlan Stenn +* [Bug 2291] sntp should report why it cannot open file.kod. +* [Bug 2293] add support for SO_BINTIME, refine support for + SO_TIMESTAMPNS (bug 1374) +(4.2.7p312) 2012/10/11 Released by Harlan Stenn +* Clean up testing/debugging of fix for [Bug 938] from sntp/main.c . +(4.2.7p311) 2012/10/10 Released by Harlan Stenn +* [Bug 938] The argument to the -D flag takes a number, not a string. +* [Bug 1013] ntpdate's HTML page claims wrong default version. +* [Bug 1374] Support SO_TIMESTAMPNS. +(4.2.7p310) 2012/10/09 Released by Harlan Stenn +* [Bug 1374] Support SO_TIMESTAMPNS. +* [Bug 2266] Remove deprecated refclock_trak.c from Windows Makefile + equivalents. +* [Bug 2274] Bring libopts/enum.c back to (old) ANSI C compliance. +(4.2.7p309) 2012/10/04 Released by Harlan Stenn +* [Bug 2287] ntpdate returns 0 even if adjtime() call fails. +(4.2.7p308) 2012/09/29 Released by Harlan Stenn +* CID 97198: Check return from ioctl() calls in refclock_acts.c. +(4.2.7p307) 2012/09/29 Released by Harlan Stenn +* [Bug 1997] Fix sntp broadcast timeouts. +* [Bug 2234] Fix incorrect ntptrace html documentation. +* [Bug 2262] Install html docs in $htmldir. +* Fix typo in html/select.html. +(4.2.7p306) 2012/09/15 Released by Harlan Stenn +* [Bug 752] ToS cleanup from Mike Tatarinov. +(4.2.7p305) 2012/09/15 Released by Harlan Stenn +* [Bug 752] Use proper ToS network packet markings for IPv4 and IPv6. +* [Bug 1232] Convert SHM refclock to use struct timespec. +* [Bug 2258] Add syslog message about leap insertion. +* [Bug 2263] broadcast server doesn't work for host with + OS_MISSES_SPECIFIC_ROUTE_UPDATES. +* [Bug 2271] Decode refclock types when built with --disable-all-clocks. +* [Bug 2276] clk_sel240x.c #define's _XOPEN_SOURCE, breaking QNX6. +* Updates to driver28.html. +(4.2.7p304) 2012/09/06 Released by Harlan Stenn +* [Bug 2264] Cleanup SEL240X Refclock. +* In refclock_wwv.c rename SECOND to WWV_SEC and MINUTE to WWV_MIN. +(4.2.7p303) 2012/09/05 Released by Harlan Stenn +* [Bug 1232] Add nanosecond support to SHM driver. +(4.2.7p302) 2012/09/05 Released by Harlan Stenn +* [Bug 2160] Log warning about expired leapseconds file. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 13:30:54 2015 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 DAA2FE8D; Mon, 30 Mar 2015 13:30: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 C5861C1; Mon, 30 Mar 2015 13:30: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 t2UDUsZc095199; Mon, 30 Mar 2015 13:30:54 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2UDUsih095198; Mon, 30 Mar 2015 13:30:54 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201503301330.t2UDUsih095198@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 30 Mar 2015 13:30:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280850 - 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, 30 Mar 2015 13:30:55 -0000 Author: mav Date: Mon Mar 30 13:30:53 2015 New Revision: 280850 URL: https://svnweb.freebsd.org/changeset/base/280850 Log: Periodically wake up threads waiting for vmem(9) resources, so they could ask for resource reclamation again. This is kind of dirty hack, but as last resort this is better then stuck indefinitely because of KVA fragmentation, waiting until some random event free something sufficient. OpenSolaris also has this hack in its vmem(9). MFC after: 2 weeks Modified: head/sys/kern/subr_vmem.c Modified: head/sys/kern/subr_vmem.c ============================================================================== --- head/sys/kern/subr_vmem.c Mon Mar 30 13:30:15 2015 (r280849) +++ head/sys/kern/subr_vmem.c Mon Mar 30 13:30:53 2015 (r280850) @@ -747,6 +747,12 @@ vmem_periodic(void *unused, int pending) /* Grow in powers of two. Shrink less aggressively. */ if (desired >= current * 2 || desired * 4 <= current) vmem_rehash(vm, desired); + + /* + * Periodically wake up threads waiting for resources, + * so they could ask for reclamation again. + */ + VMEM_CONDVAR_BROADCAST(vm); } mtx_unlock(&vmem_list_lock); From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 13:44:16 2015 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 9A4E7589; Mon, 30 Mar 2015 13:44:16 +0000 (UTC) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 50DB8215; Mon, 30 Mar 2015 13:44:16 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id C8AD61FE023; Mon, 30 Mar 2015 15:44:13 +0200 (CEST) Message-ID: <5519535C.40608@selasky.org> Date: Mon, 30 Mar 2015 15:45:00 +0200 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Gleb Smirnoff Subject: Re: svn commit: r280759 - head/sys/netinet References: <20150328191629.GY64665@FreeBSD.org> <5517B433.5010508@selasky.org> <20150329210757.GA64665@FreeBSD.org> <1427666182.82583.4.camel@freebsd.org> <55190EA7.9010905@selasky.org> <20150330105913.GF64665@FreeBSD.org> <551933AF.4080300@selasky.org> <20150330120700.GH64665@FreeBSD.org> <551943B4.90102@selasky.org> <20150330125115.GI64665@FreeBSD.org> <551948A4.1070408@selasky.org> In-Reply-To: <551948A4.1070408@selasky.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: Adrian Chadd , "src-committers@freebsd.org" , Ian Lepore , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Fabien Thomas X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2015 13:44:16 -0000 Gleb, On 03/30/15 14:59, Hans Petter Selasky wrote: > On 03/30/15 14:51, Gleb Smirnoff wrote: >> Hans, >> > > Gleb: Can you answer my question first: > > Should the 16-bit IP ID field carry any useful information or not? > > Yes: > > An identifying value assigned by the sender to aid in assembling the > fragments of a datagram. The numbering should be somewhat sane and when you are suggesting that a multi-line function and cache line issues will hit the system hard, which I don't doubt, functions like "unrhdr()" are probably out of the question? >> Let me ask again: are you serious? Do you suggest to delay transmitting >> network packets with a DELAY()? Yes! It doesn't have to be done by the software. It can be done by the ethernet hardware too! >> >> H> Or maybe we can add an IPv4 option to escape a 32-bit IP ID field and >> H> don't use the 16-bit IP ID field. >> >> Is that also serious? Do you suggest to change layout of IP packet? >> IPv4 packets can carry additional options which is part of the standard IPv4 packet layout, though routers which perform fragmentation would need to support it ... Does this discussion mean that IPv4 traffic which is subject to fragmentation has a transmission rate limit depending on the roundtrip time to avoid risking bad defragmentation issues? --HPS From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 14:00:18 2015 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 8A2D47C8; Mon, 30 Mar 2015 14:00: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 7491C62B; Mon, 30 Mar 2015 14:00: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 t2UE0IUe012274; Mon, 30 Mar 2015 14:00:18 GMT (envelope-from amdmi3@FreeBSD.org) Received: (from amdmi3@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2UE0IAC012273; Mon, 30 Mar 2015 14:00:18 GMT (envelope-from amdmi3@FreeBSD.org) Message-Id: <201503301400.t2UE0IAC012273@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: amdmi3 set sender to amdmi3@FreeBSD.org using -f From: Dmitry Marakasov Date: Mon, 30 Mar 2015 14:00:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280851 - head/tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2015 14:00:18 -0000 Author: amdmi3 (ports committer) Date: Mon Mar 30 14:00:17 2015 New Revision: 280851 URL: https://svnweb.freebsd.org/changeset/base/280851 Log: - Remove more files when MK_FORTH == no MFC after: 1 week Reviewed by: ngie Approved by: ngie Differential Revision: D1600 Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Mon Mar 30 13:30:53 2015 (r280850) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Mon Mar 30 14:00:17 2015 (r280851) @@ -1606,6 +1606,19 @@ OLD_FILES+=usr/share/man/man1/fdwrite.1. OLD_FILES+=usr/share/man/man8/fdcontrol.8.gz .endif +.if ${MK_FORTH} == no +OLD_FILES+=usr/share/man/man5/loader.conf.5.gz +OLD_FILES+=usr/share/man/man8/beastie.4th.8.gz +OLD_FILES+=usr/share/man/man8/brand.4th.8.gz +OLD_FILES+=usr/share/man/man8/check-password.4th.8.gz +OLD_FILES+=usr/share/man/man8/color.4th.8.gz +OLD_FILES+=usr/share/man/man8/delay.4th.8.gz +OLD_FILES+=usr/share/man/man8/loader.4th.8.gz +OLD_FILES+=usr/share/man/man8/menu.4th.8.gz +OLD_FILES+=usr/share/man/man8/menusets.4th.8.gz +OLD_FILES+=usr/share/man/man8/version.4th.8.gz +.endif + .if ${MK_FREEBSD_UPDATE} == no OLD_FILES+=etc/freebsd-update.conf OLD_FILES+=usr/sbin/freebsd-update From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 14:13:02 2015 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 53414B9C; Mon, 30 Mar 2015 14:13: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 3E037861; Mon, 30 Mar 2015 14:13: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 t2UED2Ru018758; Mon, 30 Mar 2015 14:13:02 GMT (envelope-from amdmi3@FreeBSD.org) Received: (from amdmi3@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2UED1k1018757; Mon, 30 Mar 2015 14:13:01 GMT (envelope-from amdmi3@FreeBSD.org) Message-Id: <201503301413.t2UED1k1018757@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: amdmi3 set sender to amdmi3@FreeBSD.org using -f From: Dmitry Marakasov Date: Mon, 30 Mar 2015 14:13:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280852 - head/tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2015 14:13:02 -0000 Author: amdmi3 (ports committer) Date: Mon Mar 30 14:13:01 2015 New Revision: 280852 URL: https://svnweb.freebsd.org/changeset/base/280852 Log: - Remove more files when MK_INET6 == no MFC after: 1 week Reviewed by: ngie Approved by: ngie Differential Revision: D1600 Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Mon Mar 30 14:00:17 2015 (r280851) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Mon Mar 30 14:13:01 2015 (r280852) @@ -2520,9 +2520,11 @@ OLD_FILES+=usr/sbin/ndp OLD_FILES+=usr/sbin/rip6query OLD_FILES+=usr/sbin/route6d OLD_FILES+=usr/sbin/rrenumd +OLD_FILES+=usr/sbin/rtadvctl OLD_FILES+=usr/sbin/rtadvd OLD_FILES+=usr/sbin/rtsold OLD_FILES+=usr/sbin/traceroute6 +OLD_FILES+=usr/share/doc/IPv6/IMPLEMENTATION OLD_FILES+=usr/share/man/man5/rrenumd.conf.5.gz OLD_FILES+=usr/share/man/man5/rtadvd.conf.5.gz OLD_FILES+=usr/share/man/man8/ip6addrctl.8.gz @@ -2532,6 +2534,7 @@ OLD_FILES+=usr/share/man/man8/ping6.8.gz OLD_FILES+=usr/share/man/man8/rip6query.8.gz OLD_FILES+=usr/share/man/man8/route6d.8.gz OLD_FILES+=usr/share/man/man8/rrenumd.8.gz +OLD_FILES+=usr/share/man/man8/rtadvctl.8.gz OLD_FILES+=usr/share/man/man8/rtadvd.8.gz OLD_FILES+=usr/share/man/man8/rtsol.8.gz OLD_FILES+=usr/share/man/man8/rtsold.8.gz From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 14:16:20 2015 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 65C13D3F; Mon, 30 Mar 2015 14:16:20 +0000 (UTC) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 16CCC892; Mon, 30 Mar 2015 14:16:20 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1YcaUD-000Nrq-2v; Mon, 30 Mar 2015 17:16:17 +0300 Date: Mon, 30 Mar 2015 17:16:17 +0300 From: Slawa Olhovchenkov To: Hans Petter Selasky Subject: Re: svn commit: r280759 - head/sys/netinet Message-ID: <20150330141616.GC74532@zxy.spb.ru> References: <20150329210757.GA64665@FreeBSD.org> <1427666182.82583.4.camel@freebsd.org> <55190EA7.9010905@selasky.org> <20150330105913.GF64665@FreeBSD.org> <551933AF.4080300@selasky.org> <20150330120700.GH64665@FreeBSD.org> <551943B4.90102@selasky.org> <20150330125115.GI64665@FreeBSD.org> <551948A4.1070408@selasky.org> <5519535C.40608@selasky.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5519535C.40608@selasky.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: Adrian Chadd , "src-committers@freebsd.org" , Ian Lepore , "svn-src-all@freebsd.org" , Gleb Smirnoff , "svn-src-head@freebsd.org" , Fabien Thomas X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2015 14:16:20 -0000 On Mon, Mar 30, 2015 at 03:45:00PM +0200, Hans Petter Selasky wrote: > Gleb, > > On 03/30/15 14:59, Hans Petter Selasky wrote: > > On 03/30/15 14:51, Gleb Smirnoff wrote: > >> Hans, > >> > > > > Gleb: Can you answer my question first: > > > > Should the 16-bit IP ID field carry any useful information or not? > > > > > Yes: > > > > An identifying value assigned by the sender to aid in assembling the > > fragments of a datagram. > > The numbering should be somewhat sane and when you are suggesting that a > multi-line function and cache line issues will hit the system hard, > which I don't doubt, functions like "unrhdr()" are probably out of the > question? > > >> Let me ask again: are you serious? Do you suggest to delay transmitting > >> network packets with a DELAY()? > > Yes! It doesn't have to be done by the software. It can be done by the > ethernet hardware too! > > >> > >> H> Or maybe we can add an IPv4 option to escape a 32-bit IP ID field and > >> H> don't use the 16-bit IP ID field. > >> > >> Is that also serious? Do you suggest to change layout of IP packet? > >> > > IPv4 packets can carry additional options which is part of the standard > IPv4 packet layout, though routers which perform fragmentation would > need to support it ... > > > Does this discussion mean that IPv4 traffic which is subject to > fragmentation has a transmission rate limit depending on the roundtrip > time to avoid risking bad defragmentation issues? You can't be know about needing fragmenatation. Fragmentation occur on remote transit routers, w/o information packet source. Any packet (w/o DF) can be fragmented. In some cases pakets one flow can be dispatched by different path and fragmented only on the one path. From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 14:28:32 2015 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 61CF93A3; Mon, 30 Mar 2015 14:28: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 4D03CA1B; Mon, 30 Mar 2015 14:28: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 t2UESW6m024214; Mon, 30 Mar 2015 14:28:32 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2UESWpo024213; Mon, 30 Mar 2015 14:28:32 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201503301428.t2UESWpo024213@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 30 Mar 2015 14:28:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280853 - head/lib/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: Mon, 30 Mar 2015 14:28:32 -0000 Author: emaste Date: Mon Mar 30 14:28:31 2015 New Revision: 280853 URL: https://svnweb.freebsd.org/changeset/base/280853 Log: compiler-rt: Build additional quad precision floating point builtins These are needed for arm64 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D2160 Modified: head/lib/libcompiler_rt/Makefile Modified: head/lib/libcompiler_rt/Makefile ============================================================================== --- head/lib/libcompiler_rt/Makefile Mon Mar 30 14:13:01 2015 (r280852) +++ head/lib/libcompiler_rt/Makefile Mon Mar 30 14:28:31 2015 (r280853) @@ -37,6 +37,7 @@ SRCF= absvdi2 \ clzti2 \ cmpdi2 \ cmpti2 \ + comparetf2 \ ctzdi2 \ ctzsi2 \ ctzti2 \ @@ -50,6 +51,8 @@ SRCF= absvdi2 \ divxc3 \ enable_execute_stack \ eprintf \ + extenddftf2 \ + extendsftf2 \ ffsdi2 \ ffsti2 \ fixdfdi \ @@ -76,6 +79,7 @@ SRCF= absvdi2 \ floatdidf \ floatdisf \ floatdixf \ + floatsitf \ floattidf \ floattisf \ floattixf \ @@ -127,6 +131,8 @@ SRCF= absvdi2 \ subvsi3 \ subvti3 \ trampoline_setup \ + trunctfdf2 \ + trunctfsf2 \ ucmpdi2 \ ucmpti2 \ udivdi3 \ From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 15:23:59 2015 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 0E13518F; Mon, 30 Mar 2015 15:23:59 +0000 (UTC) Received: from work.netasq.com (gwlille.netasq.com [91.212.116.1]) by mx1.freebsd.org (Postfix) with ESMTP id 988F311E; Mon, 30 Mar 2015 15:23:57 +0000 (UTC) Received: from work.netasq.com (localhost.localdomain [127.0.0.1]) by work.netasq.com (Postfix) with ESMTP id F139B2700929; Mon, 30 Mar 2015 17:23:49 +0200 (CEST) Received: from localhost (localhost.localdomain [127.0.0.1]) by work.netasq.com (Postfix) with ESMTP id 5523C27004B1; Mon, 30 Mar 2015 17:23:49 +0200 (CEST) Received: from work.netasq.com ([127.0.0.1]) by localhost (work.netasq.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id w1aLpkld3k-Q; Mon, 30 Mar 2015 17:23:49 +0200 (CEST) Received: from work.netasq.com (localhost.localdomain [127.0.0.1]) by work.netasq.com (Postfix) with ESMTP id 065E627004A5; Mon, 30 Mar 2015 17:23:49 +0200 (CEST) Date: Mon, 30 Mar 2015 17:23:48 +0200 (CEST) From: Emeric POUPON To: Slawa Olhovchenkov Message-ID: <1872802434.26738716.1427729028579.JavaMail.zimbra@stormshield.eu> In-Reply-To: <20150330141616.GC74532@zxy.spb.ru> References: <20150329210757.GA64665@FreeBSD.org> <551933AF.4080300@selasky.org> <20150330120700.GH64665@FreeBSD.org> <551943B4.90102@selasky.org> <20150330125115.GI64665@FreeBSD.org> <551948A4.1070408@selasky.org> <5519535C.40608@selasky.org> <20150330141616.GC74532@zxy.spb.ru> Subject: Re: svn commit: r280759 - head/sys/netinet MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Thread-Topic: svn commit: r280759 - head/sys/netinet Thread-Index: 05++eDCQkPV3URQ/eksJGTUrk2oqHQ== Cc: Hans Petter Selasky , Adrian Chadd , src-committers@freebsd.org, Ian Lepore , svn-src-all@freebsd.org, Gleb Smirnoff , svn-src-head@freebsd.org, Fabien Thomas X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2015 15:23:59 -0000 Hello, Sorry for late response, I didn't notice this issue was discussed here. In one of our tests, we have several (up to 12) cpu that emit packets with = the same src, dst and protocol to a remote host. We did this patch since we observed bad packet reassembly on the remote hos= t, due to different fragments emitted with the same ip id. It was an IPsec test (emitting ESP packets) but I guess we could easily rep= roduce this problem using several "ping -i 0 -s BIG_SIZE_HERE DST" commands= running in parallel. Even if we reached something like 1M pps, it is likely that we did not see = any performance penalty since the IPsec stack is quite time consuming. Now, the question is: is there a real performance issue here or is it likel= y to be hidden by other problems? If it is a real problem, maybe an acceptable tradeoff would be to make the = counter per CPU and: - initialize it with the cpu id, - increment it by the number of cpus. What do you think? Best Regards, Emeric ----- Mail original ----- De: "Slawa Olhovchenkov" =C3=80: "Hans Petter Selasky" Cc: "Adrian Chadd" , src-committers@freebsd.org, "Ian L= epore" , svn-src-all@freebsd.org, "Gleb Smirnoff" , svn-src-head@freebsd.org, "Fabien Thomas" Envoy=C3=A9: Lundi 30 Mars 2015 16:16:17 Objet: Re: svn commit: r280759 - head/sys/netinet On Mon, Mar 30, 2015 at 03:45:00PM +0200, Hans Petter Selasky wrote: > Gleb, >=20 > On 03/30/15 14:59, Hans Petter Selasky wrote: > > On 03/30/15 14:51, Gleb Smirnoff wrote: > >> Hans, > >> > > > > Gleb: Can you answer my question first: > > > > Should the 16-bit IP ID field carry any useful information or not? > > >=20 > > Yes: > > > > An identifying value assigned by the sender to aid in assembling th= e > > fragments of a datagram. >=20 > The numbering should be somewhat sane and when you are suggesting that a= =20 > multi-line function and cache line issues will hit the system hard,=20 > which I don't doubt, functions like "unrhdr()" are probably out of the=20 > question? >=20 > >> Let me ask again: are you serious? Do you suggest to delay transmittin= g > >> network packets with a DELAY()? >=20 > Yes! It doesn't have to be done by the software. It can be done by the=20 > ethernet hardware too! >=20 > >> > >> H> Or maybe we can add an IPv4 option to escape a 32-bit IP ID field a= nd > >> H> don't use the 16-bit IP ID field. > >> > >> Is that also serious? Do you suggest to change layout of IP packet? > >> >=20 > IPv4 packets can carry additional options which is part of the standard= =20 > IPv4 packet layout, though routers which perform fragmentation would=20 > need to support it ... >=20 >=20 > Does this discussion mean that IPv4 traffic which is subject to=20 > fragmentation has a transmission rate limit depending on the roundtrip=20 > time to avoid risking bad defragmentation issues? You can't be know about needing fragmenatation. Fragmentation occur on remote transit routers, w/o information packet source. Any packet (w/o DF) can be fragmented. In some cases pakets one flow can be dispatched by different path and fragmented only on the one path. _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 15:27:20 2015 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 5C7BC47C; Mon, 30 Mar 2015 15:27:20 +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 531C714F; Mon, 30 Mar 2015 15:27:19 +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 t2UFR7D3044608 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 30 Mar 2015 18:27:07 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t2UFR7rN044607; Mon, 30 Mar 2015 18:27:07 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 30 Mar 2015 18:27:07 +0300 From: Gleb Smirnoff To: Emeric POUPON Subject: Re: svn commit: r280759 - head/sys/netinet Message-ID: <20150330152707.GP64665@FreeBSD.org> References: <20150329210757.GA64665@FreeBSD.org> <551933AF.4080300@selasky.org> <20150330120700.GH64665@FreeBSD.org> <551943B4.90102@selasky.org> <20150330125115.GI64665@FreeBSD.org> <551948A4.1070408@selasky.org> <5519535C.40608@selasky.org> <20150330141616.GC74532@zxy.spb.ru> <1872802434.26738716.1427729028579.JavaMail.zimbra@stormshield.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1872802434.26738716.1427729028579.JavaMail.zimbra@stormshield.eu> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: Hans Petter Selasky , Adrian Chadd , src-committers@freebsd.org, Ian Lepore , svn-src-all@freebsd.org, Slawa Olhovchenkov , svn-src-head@freebsd.org, Fabien Thomas X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2015 15:27:20 -0000 On Mon, Mar 30, 2015 at 05:23:48PM +0200, Emeric POUPON wrote: E> Hello, E> E> Sorry for late response, I didn't notice this issue was discussed here. E> E> In one of our tests, we have several (up to 12) cpu that emit packets with the same src, dst and protocol to a remote host. E> We did this patch since we observed bad packet reassembly on the remote host, due to different fragments emitted with the same ip id. E> It was an IPsec test (emitting ESP packets) but I guess we could easily reproduce this problem using several "ping -i 0 -s BIG_SIZE_HERE DST" commands running in parallel. E> E> Even if we reached something like 1M pps, it is likely that we did not see any performance penalty since the IPsec stack is quite time consuming. E> Now, the question is: is there a real performance issue here or is it likely to be hidden by other problems? E> E> If it is a real problem, maybe an acceptable tradeoff would be to make the counter per CPU and: E> - initialize it with the cpu id, E> - increment it by the number of cpus. E> E> What do you think? I already posted a patch that makes the counter per CPU. Can you please test it? -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 16:20:48 2015 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 A454E4DF; Mon, 30 Mar 2015 16:20:48 +0000 (UTC) Received: from work.netasq.com (gwlille.netasq.com [91.212.116.1]) by mx1.freebsd.org (Postfix) with ESMTP id 5E4C5A32; Mon, 30 Mar 2015 16:20:47 +0000 (UTC) Received: from work.netasq.com (localhost.localdomain [127.0.0.1]) by work.netasq.com (Postfix) with ESMTP id C39A12704531; Mon, 30 Mar 2015 18:20:46 +0200 (CEST) Received: from localhost (localhost.localdomain [127.0.0.1]) by work.netasq.com (Postfix) with ESMTP id 81EDB27044B0; Mon, 30 Mar 2015 18:20:46 +0200 (CEST) Received: from work.netasq.com ([127.0.0.1]) by localhost (work.netasq.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 8dS9kmSxZZP6; Mon, 30 Mar 2015 18:20:46 +0200 (CEST) Received: from work.netasq.com (localhost.localdomain [127.0.0.1]) by work.netasq.com (Postfix) with ESMTP id 3E76827044AE; Mon, 30 Mar 2015 18:20:46 +0200 (CEST) Date: Mon, 30 Mar 2015 18:20:45 +0200 (CEST) From: Emeric POUPON To: Gleb Smirnoff Message-ID: <964618150.26750606.1427732445799.JavaMail.zimbra@stormshield.eu> In-Reply-To: <20150330152707.GP64665@FreeBSD.org> References: <20150329210757.GA64665@FreeBSD.org> <551943B4.90102@selasky.org> <20150330125115.GI64665@FreeBSD.org> <551948A4.1070408@selasky.org> <5519535C.40608@selasky.org> <20150330141616.GC74532@zxy.spb.ru> <1872802434.26738716.1427729028579.JavaMail.zimbra@stormshield.eu> <20150330152707.GP64665@FreeBSD.org> Subject: Re: svn commit: r280759 - head/sys/netinet MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Thread-Topic: svn commit: r280759 - head/sys/netinet Thread-Index: jtXFy+DUqhLgWCHCoPorh8rEWMCt8A== Cc: Hans Petter Selasky , Adrian Chadd , src-committers@freebsd.org, Ian Lepore , svn-src-all@freebsd.org, Slawa Olhovchenkov , svn-src-head@freebsd.org, Fabien Thomas X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2015 16:20:48 -0000 Yes, sure! I will test it tomorrow and tell you the results. However, keep in mind I did not see any performance impact with the previou= s patch. Regards, ----- Mail original ----- De: "Gleb Smirnoff" =C3=80: "Emeric POUPON" Cc: "Slawa Olhovchenkov" , "Hans Petter Selasky" , "Adrian Chadd" , src-committers@freebsd.org, "= Ian Lepore" , svn-src-all@freebsd.org, svn-src-head@freebs= d.org, "Fabien Thomas" Envoy=C3=A9: Lundi 30 Mars 2015 17:27:07 Objet: Re: svn commit: r280759 - head/sys/netinet On Mon, Mar 30, 2015 at 05:23:48PM +0200, Emeric POUPON wrote: E> Hello, E>=20 E> Sorry for late response, I didn't notice this issue was discussed here. E>=20 E> In one of our tests, we have several (up to 12) cpu that emit packets wi= th the same src, dst and protocol to a remote host. E> We did this patch since we observed bad packet reassembly on the remote = host, due to different fragments emitted with the same ip id. E> It was an IPsec test (emitting ESP packets) but I guess we could easily = reproduce this problem using several "ping -i 0 -s BIG_SIZE_HERE DST" comma= nds running in parallel. E>=20 E> Even if we reached something like 1M pps, it is likely that we did not s= ee any performance penalty since the IPsec stack is quite time consuming. E> Now, the question is: is there a real performance issue here or is it li= kely to be hidden by other problems? E>=20 E> If it is a real problem, maybe an acceptable tradeoff would be to make t= he counter per CPU and: E> - initialize it with the cpu id, E> - increment it by the number of cpus. E>=20 E> What do you think? I already posted a patch that makes the counter per CPU. Can you please tes= t it? --=20 Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 16:28:06 2015 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 1C62C831; Mon, 30 Mar 2015 16:28: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 077EAB8C; Mon, 30 Mar 2015 16:28: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 t2UGS5eP082115; Mon, 30 Mar 2015 16:28:05 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2UGS5C3082114; Mon, 30 Mar 2015 16:28:05 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201503301628.t2UGS5C3082114@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 30 Mar 2015 16:28: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: r280856 - stable/10/sys/amd64/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: Mon, 30 Mar 2015 16:28:06 -0000 Author: jhb Date: Mon Mar 30 16:28:04 2015 New Revision: 280856 URL: https://svnweb.freebsd.org/changeset/base/280856 Log: Revert accidental(?) change in r280455 and do not compile hwpmc statically into GENERIC by default. This change is not present in HEAD and was not made in the two commits to HEAD that r280455 merged. Modified: stable/10/sys/amd64/conf/GENERIC Modified: stable/10/sys/amd64/conf/GENERIC ============================================================================== --- stable/10/sys/amd64/conf/GENERIC Mon Mar 30 15:29:06 2015 (r280855) +++ stable/10/sys/amd64/conf/GENERIC Mon Mar 30 16:28:04 2015 (r280856) @@ -84,7 +84,6 @@ options SMP # Symmetric MultiProcesso device cpufreq # Bus support. -device hwpmc device acpi options ACPI_DMAR device pci From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 16:40:20 2015 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 582AFD14; Mon, 30 Mar 2015 16:40:20 +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 2BF19D0C; Mon, 30 Mar 2015 16:40:20 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id CDA9EB95D; Mon, 30 Mar 2015 12:40:18 -0400 (EDT) From: John Baldwin To: Davide Italiano Subject: Re: svn commit: r280785 - in head/sys: kern netgraph/atm/sscop netgraph/atm/uni sys Date: Mon, 30 Mar 2015 12:10:07 -0400 Message-ID: <3218826.nq4nR2EqCz@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: References: <201503281250.t2SCoOkt020297@svn.freebsd.org> <4E7E0A0A-5125-4F3A-AC0C-D428A972C954@netflix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 30 Mar 2015 12:40:18 -0400 (EDT) Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Randall Stewart X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2015 16:40:20 -0000 On Saturday, March 28, 2015 01:48:49 PM Davide Italiano wrote: > On Sat, Mar 28, 2015 at 12:04 PM, Randall Stewart w= rote: > > Hmm does the KPI include the size of the callout structure (which i= s > > private)? > > >=20 > It's KBI, not KPI. >=20 > > If so I suppose we could change the c_flags/c_iflags to > > ushort =E2=80=A6 > > >=20 > I'm not familiar with your changes enough to suggest/propose a fix. > As I previously mentioned, this looks suspicious KBI-wise to me, and = I > reported to you. The KBI issue makes it much harder to MFC. In particular, even though you could move 'c_iflags' to the end to fix most things (though not callout_pending()), many drivers have 'struct callout foo' inside their= softc, etc. and this would break existing modules. OTOH, the uglier hack of adding locking in callout_deactivate() would preserve the KBI and be safe to merge. --=20 John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 16:40:22 2015 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 CEB38D81; Mon, 30 Mar 2015 16:40:21 +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 66627D0E; Mon, 30 Mar 2015 16:40:21 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 6965BB984; Mon, 30 Mar 2015 12:40:20 -0400 (EDT) From: John Baldwin To: Bruce Evans Subject: Re: svn commit: r280279 - head/sys/sys Date: Mon, 30 Mar 2015 11:50:57 -0400 Message-ID: <17035816.lxyzYKiOWV@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: <20150322080015.O955@besplex.bde.org> References: <201503201027.t2KAR6Ze053047@svn.freebsd.org> <550DA656.5060004@FreeBSD.org> <20150322080015.O955@besplex.bde.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, 30 Mar 2015 12:40:20 -0400 (EDT) Cc: Konstantin Belousov , 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, 30 Mar 2015 16:40:22 -0000 On Sunday, March 22, 2015 09:41:53 AM Bruce Evans wrote: > On Sat, 21 Mar 2015, John Baldwin wrote: > > > On 3/21/15 12:35 PM, Konstantin Belousov wrote: > >> On Sat, Mar 21, 2015 at 12:04:41PM -0400, John Baldwin wrote: > >>> On 3/20/15 9:02 AM, Konstantin Belousov wrote: > >>>> On Fri, Mar 20, 2015 at 10:27:06AM +0000, John Baldwin wrote: > >>>>> Author: jhb > >>>>> Date: Fri Mar 20 10:27:06 2015 > >>>>> New Revision: 280279 > >>>>> URL: https://svnweb.freebsd.org/changeset/base/280279 > >>>>> > >>>>> Log: > >>>>> Expand the bitcount* API to support 64-bit integers, plain ints and longs > >>>>> and create a "hidden" API that can be used in other system headers without > >>>>> adding namespace pollution. > >>>>> - If the POPCNT instruction is enabled at compile time, use > >>>>> __builtin_popcount*() to implement __bitcount*(), otherwise fall back > >>>>> to software implementations. > >>>> Are you aware of the Haswell errata HSD146 ? I see the described behaviour > >>>> on machines back to SandyBridge, but not on Nehalems. > >>>> HSD146. POPCNT Instruction May Take Longer to Execute Than Expected > >>>> Problem: POPCNT instruction execution with a 32 or 64 bit operand may be > >>>> delayed until previous non-dependent instructions have executed. > >>>> > >>>> Jilles noted that gcc head and 4.9.2 already provides a workaround by > >>>> xoring the dst register. I have some patch for amd64 pmap, see the end > >>>> of the message. > >>> > >>> No, I was not aware, but I think it's hard to fix this anywhere but the > >>> compiler. I set CPUTYPE in src.conf on my Ivy Bridge desktop and clang > >>> uses POPCOUNT for this function from ACPI-CA: > >>> > >>> static UINT8 > >>> AcpiRsCountSetBits ( > >>> UINT16 BitField) > >>> { > >>> UINT8 BitsSet; > >>> > >>> > >>> ACPI_FUNCTION_ENTRY (); > >>> > >>> > >>> for (BitsSet = 0; BitField; BitsSet++) > >>> { > >>> /* Zero the least significant bit that is set */ > >>> > >>> BitField &= (UINT16) (BitField - 1); > >>> } > >>> > >>> return (BitsSet); > >>> } > >>> > >>> (I ran into this accidentally because a kernel built on my system failed > >>> to boot in older qemu because the kernel paniced with an illegal instruction > >>> fault in this function.) > > Does it do the same for the similar home made popcount in pmap?: Yes: ffffffff807658d4: f6 04 25 46 e2 d6 80 testb $0x80,0xffffffff80d6e246 ffffffff807658db: 80 ffffffff807658dc: 74 32 je ffffffff80765910 ffffffff807658de: 48 89 4d b8 mov %rcx,-0x48(%rbp) ffffffff807658e2: f3 48 0f b8 4d b8 popcnt -0x48(%rbp),%rcx ffffffff807658e8: 48 8b 50 20 mov 0x20(%rax),%rdx ffffffff807658ec: 48 89 55 b0 mov %rdx,-0x50(%rbp) ffffffff807658f0: f3 48 0f b8 55 b0 popcnt -0x50(%rbp),%rdx ffffffff807658f6: 01 ca add %ecx,%edx ffffffff807658f8: 48 8b 48 28 mov 0x28(%rax),%rcx ffffffff807658fc: 48 89 4d a8 mov %rcx,-0x58(%rbp) ffffffff80765900: f3 48 0f b8 4d a8 popcnt -0x58(%rbp),%rcx ffffffff80765906: eb 1b jmp ffffffff80765923 ffffffff80765908: 0f 1f 84 00 00 00 00 nopl 0x0(%rax,%rax,1) ffffffff8076590f: 00 ffffffff80765910: f3 48 0f b8 c9 popcnt %rcx,%rcx ffffffff80765915: f3 48 0f b8 50 20 popcnt 0x20(%rax),%rdx ffffffff8076591b: 01 ca add %ecx,%edx ffffffff8076591d: f3 48 0f b8 48 28 popcnt 0x28(%rax),%rcx ffffffff80765923: 01 d1 add %edx,%ecx It also uses popcnt for this in blist_fill() and blist_meta_fill(): 742 /* Count the number of blocks we're about to allocate */ 743 bitmap = scan->u.bmu_bitmap & mask; 744 for (nblks = 0; bitmap != 0; nblks++) 745 bitmap &= bitmap - 1; > Always using new API would lose the micro-optimizations given by the runtime > decision for default CFLAGS (used by distributions for portability). To > keep them, it seems best to keep the inline asm but replace > popcnt_pc_map_elem(elem) by __bitcount64(elem). -mno-popcount can then > be used to work around slowness in the software (that is actually > hardware) case. I'm not sure if bitcount64() is strictly better than the loop in this case even though it is O(1) given the claimed nature of the values in the comment. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 16:40:20 2015 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 9FA2FD16; Mon, 30 Mar 2015 16:40:20 +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 77183D0D; Mon, 30 Mar 2015 16:40:20 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 75B99B96C; Mon, 30 Mar 2015 12:40:19 -0400 (EDT) From: John Baldwin To: Konstantin Belousov Subject: Re: svn commit: r280279 - head/sys/sys Date: Mon, 30 Mar 2015 11:57:08 -0400 Message-ID: <2526359.g5B2nXdKeQ@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: <20150322093251.GY2379@kib.kiev.ua> References: <201503201027.t2KAR6Ze053047@svn.freebsd.org> <20150322080015.O955@besplex.bde.org> <20150322093251.GY2379@kib.kiev.ua> 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, 30 Mar 2015 12:40:19 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@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: Mon, 30 Mar 2015 16:40:20 -0000 On Sunday, March 22, 2015 11:32:51 AM Konstantin Belousov wrote: > On Sun, Mar 22, 2015 at 09:41:53AM +1100, Bruce Evans wrote: > > Always using new API would lose the micro-optimizations given by the runtime > > decision for default CFLAGS (used by distributions for portability). To > > keep them, it seems best to keep the inline asm but replace > > popcnt_pc_map_elem(elem) by __bitcount64(elem). -mno-popcount can then > > be used to work around slowness in the software (that is actually > > hardware) case. > > So anybody has to compile his own kernel to get popcnt optimization ? > We do care about trivial things that improve time. That is not what Bruce said. He suggested using bitcount64() for the fallback if the cpuid check fails. He did not say to remove the runtime check to use popcnt if it is available: "Always using [bitcount64] would lose the micro-optimization... [to] keep [it], it seems best to keep the inline asm but replace popcnt_pc_map_elem(elem) by [bitcount64(elem)]." > BTW, I have the following WIP change, which popcnt xorl is a piece of. > It emulates the ifuncs with some preprocessing mess. It is much better > than runtime patching, and is a prerequisite to properly support more > things, like SMAP. I did not published it earlier, since I wanted to > convert TLB flush code to this. This looks fine to me. It seems to be manually converting certain symbols to use a dynamic lookup that must be explicitly resolved before first use? I agree that this seems cleaner than runtime patching. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 16:40:24 2015 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 AEDC1F8A; Mon, 30 Mar 2015 16:40:24 +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 8600FD13; Mon, 30 Mar 2015 16:40:24 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 92F15B9C6; Mon, 30 Mar 2015 12:40:23 -0400 (EDT) From: John Baldwin To: Randall Stewart Subject: Re: svn commit: r280785 - in head/sys: kern netgraph/atm/sscop netgraph/atm/uni sys Date: Mon, 30 Mar 2015 11:16:20 -0400 Message-ID: <32487399.PTq7ESkWJT@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: <201503281250.t2SCoOkt020297@svn.freebsd.org> References: <201503281250.t2SCoOkt020297@svn.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, 30 Mar 2015 12:40:23 -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, 30 Mar 2015 16:40:24 -0000 On Saturday, March 28, 2015 12:50:24 PM Randall Stewart wrote: > Author: rrs > Date: Sat Mar 28 12:50:24 2015 > New Revision: 280785 > URL: https://svnweb.freebsd.org/changeset/base/280785 > > Log: > Change the callout to supply -1 to indicate we are not changing > CPU, also add protection against invalid CPU's as well as > split c_flags and c_iflags so that if a user plays with the active > flag (the one expected to be played with by callers in MPSAFE) without > a lock, it won't adversely affect the callout system by causing a corrupt > list. This also means that all callers need to use the macros and *not* > play with the falgs directly (like netgraph used to). > > Differential Revision: htts://reviews.freebsd.org/D1894 > Reviewed by: .. timed out but looked at by jhb, imp, adrian hselasky > tested by hiren and netflix. > Sponsored by: Netflix Inc. Please use NOCPU rather than -1 directly for the CPU field when not moving a callout. > Modified: head/sys/sys/callout.h > ============================================================================== > --- head/sys/sys/callout.h Sat Mar 28 12:23:15 2015 (r280784) > +++ head/sys/sys/callout.h Sat Mar 28 12:50:24 2015 (r280785) > @@ -63,8 +63,23 @@ struct callout_handle { > }; > > #ifdef _KERNEL > +/* > + * Note the flags field is actually *two* fields. The c_flags > + * field is the one that caller operations that may, or may not have > + * a lock touches i.e. callout_deactivate(). The other, the c_iflags, > + * is the internal flags that *must* be kept correct on which the > + * callout system depend on i.e. callout_migrating() & callout_pending(), > + * these are used internally by the callout system to determine which > + * list and other critical internal state. Callers *should not* use the > + * c_flags field directly but should use the macros! > + * > + * If the caller wants to keep the c_flags field sane they > + * should init with a mutex *or* if using the older > + * mpsafe option, they *must* lock there own lock > + * before calling callout_deactivate(). Some wording suggestions: "is actually" -> "is split across" The second sentence quite seem to be English ("have a lock touches" which I think means "hold a lock while touching" or some such), but you can perhaps use this for the rest of the comment: "The c_iflags field holds internal flags that are protected by internal locks of the callout subsystem. The c_flags field holds external flags. The caller must hold its own lock while manipulating or reading external flags via callout_active(), callout_deactivate(), callout_reset*(), or callout_stop() to avoid races." (Also, please use double spaces after periods) > + */ > #define callout_active(c) ((c)->c_flags & CALLOUT_ACTIVE) > -#define callout_migrating(c) ((c)->c_flags & CALLOUT_DFRMIGRATION) > +#define callout_migrating(c) ((c)->c_iflags & CALLOUT_DFRMIGRATION) I would just move this into the C file. It isn't useful outside of the implementation as far as I know. This then avoids having to explain to users that they shouldn't see it in the block comment since it would no longer be there. :) > #define callout_deactivate(c) ((c)->c_flags &= ~CALLOUT_ACTIVE) > #define callout_drain(c) _callout_stop_safe(c, 1) > void callout_init(struct callout *, int); -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 16:40:23 2015 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 5231CEE5; Mon, 30 Mar 2015 16:40:23 +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 13408D11; Mon, 30 Mar 2015 16:40:23 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 0570EB99B; Mon, 30 Mar 2015 12:40:22 -0400 (EDT) From: John Baldwin To: Adrian Chadd Subject: Re: svn commit: r280799 - head/sys/dev/ath Date: Mon, 30 Mar 2015 11:26:42 -0400 Message-ID: <3261888.gflh0beI2v@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: <201503282341.t2SNfOZc032386@svn.freebsd.org> References: <201503282341.t2SNfOZc032386@svn.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, 30 Mar 2015 12:40:22 -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, 30 Mar 2015 16:40:23 -0000 On Saturday, March 28, 2015 11:41:24 PM Adrian Chadd wrote: > Author: adrian > Date: Sat Mar 28 23:41:23 2015 > New Revision: 280799 > URL: https://svnweb.freebsd.org/changeset/base/280799 > > Log: > Update if_ath(4) to check for "hint.ath.X.macaddr" for an override MAC address. > > This is used by the AR71xx platform code to choose a local MAC based on > the "board MAC address", versus whatever potentially invalid/garbage > values are stored in the Atheros calibration data. Are you sure that resource_string_value() doesn't work? If kern_getenv() works, then resource_string_value() should also work. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 16:40:25 2015 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 9BD2BF8C; Mon, 30 Mar 2015 16:40:25 +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 7394BD14; Mon, 30 Mar 2015 16:40:25 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 82826B9CB; Mon, 30 Mar 2015 12:40:24 -0400 (EDT) From: John Baldwin To: Konstantin Belousov Subject: Re: svn commit: r280760 - head/sys/ufs/ffs Date: Mon, 30 Mar 2015 11:05:18 -0400 Message-ID: <1562745.HBh4GIei5X@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: <201503271355.t2RDtuLt071068@svn.freebsd.org> References: <201503271355.t2RDtuLt071068@svn.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, 30 Mar 2015 12:40:24 -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, 30 Mar 2015 16:40:25 -0000 On Friday, March 27, 2015 01:55:56 PM Konstantin Belousov wrote: > Author: kib > Date: Fri Mar 27 13:55:56 2015 > New Revision: 280760 > URL: https://svnweb.freebsd.org/changeset/base/280760 > > Log: > Fix the hand after the immediate reboot when the following command > sequence is performed on UFS SU+J rootfs: > cp -Rp /sbin/init /sbin/init.old > mv -f /sbin/init.old /sbin/init > > Hang occurs on the rootfs unmount. There are two issues: > > 1. Removed init binary, which is still mapped, creates a reference to > the removed vnode. The inodeblock for such vnode must have active > inodedep, which is (eventually) linked through the unlinked list. This > means that ffs_sync(MNT_SUSPEND) cannot succeed, because number of > softdep workitems for the mp is always > 0. FFS is suspended during > unmount, so unmount just hangs. > > 2. As noted above, the inodedep is linked eventually. It is not > linked until the superblock is written. But at the vfs_unmountall() > time, when the rootfs is unmounted, the call is made to > ffs_unmount()->ffs_sync() before vflush(), and ffs_sync() only calls > ffs_sbupdate() after all workitems are flushed. It is masked for > normal system operations, because syncer works in parallel and > eventually flushes superblock. Syncer is stopped when rootfs > unmounted, so ffs_sync() must do sb update on its own. > > Correct the issues listed above. For MNT_SUSPEND, count the number of > linked unlinked inodedeps (this is not a typo) and substract the count > of such workitems from the total. For the second issue, the > ffs_sbupdate() is called right after device sync in ffs_sync() loop. > > There is third problem, occuring with both SU and SU+J. The > softdep_waitidle() loop, which waits for softdep_flush() thread to > clear the worklist, only waits 20ms max. It seems that the 1 tick, > specified for msleep(9), was a typo. > > Add fsync(devvp, MNT_WAIT) call to softdep_waitidle(), which seems to > significantly help the softdep thread, and change the MNT_LAZY update > at the reboot time to MNT_WAIT for similar reasons. Note that > userspace cannot create more work while devvp is flushed, since the > mount point is always suspended before the call to softdep_waitidle() > in unmount or remount path. Nice find! -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 16:40:24 2015 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 07BFCF72; Mon, 30 Mar 2015 16:40:24 +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 D4C30D12; Mon, 30 Mar 2015 16:40:23 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id D3283B9C3; Mon, 30 Mar 2015 12:40:22 -0400 (EDT) From: John Baldwin To: Adrian Chadd Subject: Re: svn commit: r280795 - head/sys/mips/conf Date: Mon, 30 Mar 2015 11:18:01 -0400 Message-ID: <3406307.0UbT1s6yp6@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: <201503282302.t2SN20Kd014996@svn.freebsd.org> References: <201503282302.t2SN20Kd014996@svn.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, 30 Mar 2015 12:40:22 -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, 30 Mar 2015 16:40:24 -0000 On Saturday, March 28, 2015 11:02:00 PM Adrian Chadd wrote: > Author: adrian > Date: Sat Mar 28 23:01:59 2015 > New Revision: 280795 > URL: https://svnweb.freebsd.org/changeset/base/280795 > > Log: > Remove the second MODULES_OVERRIDE; add if_vlan to the list. > > Modified: > head/sys/mips/conf/AR933X_BASE > > Modified: head/sys/mips/conf/AR933X_BASE > ============================================================================== > --- head/sys/mips/conf/AR933X_BASE Sat Mar 28 21:39:42 2015 (r280794) > +++ head/sys/mips/conf/AR933X_BASE Sat Mar 28 23:01:59 2015 (r280795) > @@ -20,8 +20,7 @@ files "../atheros/files.ar71xx" > hints "AR933X_BASE.hints" > > makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols > -makeoptions MODULES_OVERRIDE="random gpio ar71xx if_gif if_gre if_bridge bridgestp usb wlan wlan_xauth wlan_acl wlan_wep wlan_tkip wlan_ccmp wlan_rssadapt wlan_amrr hwpmc ipfw" > -makeoptions MODULES_OVERRIDE="" > +makeoptions MODULES_OVERRIDE="random gpio ar71xx if_gif if_vlan if_gre if_bridge bridgestp usb wlan wlan_xauth wlan_acl wlan_wep wlan_tkip wlan_ccmp wlan_rssadapt wlan_amrr hwpmc ipfw" Note that you can use += with makeoptions to wrap long lines, e.g. makeoptions MODULES_OVERRIDE="foo bar baz" makeoptions MODULES_OVERRIDE+="qux quux quuux" This might be more readable. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 16:42:09 2015 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 DF96B690; Mon, 30 Mar 2015 16:42: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 CAE74DF1; Mon, 30 Mar 2015 16:42: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 t2UGg9Ce090980; Mon, 30 Mar 2015 16:42:09 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2UGg9ZM090979; Mon, 30 Mar 2015 16:42:09 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201503301642.t2UGg9ZM090979@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 30 Mar 2015 16:42:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280857 - head/lib/msun/aarch64 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, 30 Mar 2015 16:42:10 -0000 Author: emaste Date: Mon Mar 30 16:42:08 2015 New Revision: 280857 URL: https://svnweb.freebsd.org/changeset/base/280857 Log: Correct mrs_fpcr and mrs_fpsr macros in arm64 fenv.h Submitted by: andrew Sponsored by: The FreeBSD Foundation Modified: head/lib/msun/aarch64/fenv.h Modified: head/lib/msun/aarch64/fenv.h ============================================================================== --- head/lib/msun/aarch64/fenv.h Mon Mar 30 16:28:04 2015 (r280856) +++ head/lib/msun/aarch64/fenv.h Mon Mar 30 16:42:08 2015 (r280857) @@ -71,18 +71,18 @@ extern const fenv_t __fe_dfl_env; #define _FPUSW_SHIFT 8 #define _ENABLE_MASK (FE_ALL_EXCEPT << _FPUSW_SHIFT) -#define __mrs_fpcr(__r) __asm __volatile("mrs %0, fpcr" : : "r" (__r)) -#define __msr_fpcr(__r) __asm __volatile("msr fpcr, %0" : "=r" (*(__r))) +#define __mrs_fpcr(__r) __asm __volatile("mrs %0, fpcr" : "=r" (__r)) +#define __msr_fpcr(__r) __asm __volatile("msr fpcr, %0" : : "r" (__r)) -#define __mrs_fpsr(__r) __asm __volatile("mrs %0, fpsr" : : "r" (__r)) -#define __msr_fpsr(__r) __asm __volatile("msr fpsr, %0" : "=r" (*(__r))) +#define __mrs_fpsr(__r) __asm __volatile("mrs %0, fpsr" : "=r" (__r)) +#define __msr_fpsr(__r) __asm __volatile("msr fpsr, %0" : : "r" (__r)) __fenv_static __inline int feclearexcept(int __excepts) { fexcept_t __r; - __mrs_fpsr(&__r); + __mrs_fpsr(__r); __r &= ~__excepts; __msr_fpsr(__r); return (0); @@ -93,7 +93,7 @@ fegetexceptflag(fexcept_t *__flagp, int { fexcept_t __r; - __mrs_fpsr(&__r); + __mrs_fpsr(__r); *__flagp = __r & __excepts; return (0); } @@ -103,7 +103,7 @@ fesetexceptflag(const fexcept_t *__flagp { fexcept_t __r; - __mrs_fpsr(&__r); + __mrs_fpsr(__r); __r &= ~__excepts; __r |= *__flagp & __excepts; __msr_fpsr(__r); @@ -115,7 +115,7 @@ feraiseexcept(int __excepts) { fexcept_t __r; - __mrs_fpsr(&__r); + __mrs_fpsr(__r); __r |= __excepts; __msr_fpsr(__r); return (0); @@ -126,7 +126,7 @@ fetestexcept(int __excepts) { fexcept_t __r; - __mrs_fpsr(&__r); + __mrs_fpsr(__r); return (__r & __excepts); } @@ -135,7 +135,7 @@ fegetround(void) { fenv_t __r; - __mrs_fpcr(&__r); + __mrs_fpcr(__r); return ((__r >> _ROUND_SHIFT) & _ROUND_MASK); } @@ -146,7 +146,7 @@ fesetround(int __round) if (__round & ~_ROUND_MASK) return (-1); - __mrs_fpcr(&__r); + __mrs_fpcr(__r); __r &= ~(_ROUND_MASK << _ROUND_SHIFT); __r |= __round << _ROUND_SHIFT; __msr_fpcr(__r); @@ -156,11 +156,12 @@ fesetround(int __round) __fenv_static inline int fegetenv(fenv_t *__envp) { + fenv_t __r; - __mrs_fpcr(&__r); + __mrs_fpcr(__r); *__envp = __r & _ENABLE_MASK; - __mrs_fpsr(&__r); + __mrs_fpsr(__r); *__envp |= __r & (FE_ALL_EXCEPT | (_ROUND_MASK << _ROUND_SHIFT)); return (0); @@ -171,14 +172,14 @@ feholdexcept(fenv_t *__envp) { fenv_t __r; - __mrs_fpcr(&__r); + __mrs_fpcr(__r); *__envp = __r & _ENABLE_MASK; __r &= ~(_ENABLE_MASK); __msr_fpcr(__r); - __mrs_fpsr(&__r); + __mrs_fpsr(__r); *__envp |= __r & (FE_ALL_EXCEPT | (_ROUND_MASK << _ROUND_SHIFT)); - r &= ~(_ENABLE_MASK); + __r &= ~(_ENABLE_MASK); __msr_fpsr(__r); return (0); } @@ -188,7 +189,7 @@ fesetenv(const fenv_t *__envp) { __msr_fpcr((*__envp) & _ENABLE_MASK); - __msr_fpsr((*__envp) & (FE_ALL_EXCEPT | (_ROUND_MASK << _ROUND_SHIFT)); + __msr_fpsr((*__envp) & (FE_ALL_EXCEPT | (_ROUND_MASK << _ROUND_SHIFT))); return (0); } @@ -197,7 +198,7 @@ feupdateenv(const fenv_t *__envp) { fexcept_t __r; - __mrs_fpsr(&__r); + __mrs_fpsr(__r); fesetenv(__envp); feraiseexcept(__r & FE_ALL_EXCEPT); return (0); @@ -212,7 +213,7 @@ feenableexcept(int __mask) { fenv_t __old_r, __new_r; - __mrs_fpcr(&__old_r); + __mrs_fpcr(__old_r); __new_r = __old_r | ((__mask & FE_ALL_EXCEPT) << _FPUSW_SHIFT); __msr_fpcr(__new_r); return ((__old_r >> _FPUSW_SHIFT) & FE_ALL_EXCEPT); @@ -223,7 +224,7 @@ fedisableexcept(int __mask) { fenv_t __old_r, __new_r; - __mrs_fpcr(&__old_r); + __mrs_fpcr(__old_r); __new_r = __old_r & ~((__mask & FE_ALL_EXCEPT) << _FPUSW_SHIFT); __msr_fpcr(__new_r); return ((__old_r >> _FPUSW_SHIFT) & FE_ALL_EXCEPT); @@ -234,7 +235,7 @@ fegetexcept(void) { fenv_t __r; - __mrs_fpcr(&__r); + __mrs_fpcr(__r); return ((__r & _ENABLE_MASK) >> _FPUSW_SHIFT); } From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 17:05:50 2015 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 1D471158; Mon, 30 Mar 2015 17:05:50 +0000 (UTC) Received: from pp2.rice.edu (proofpoint2.mail.rice.edu [128.42.201.101]) (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 CF24D112; Mon, 30 Mar 2015 17:05:49 +0000 (UTC) Received: from pps.filterd (pp2.rice.edu [127.0.0.1]) by pp2.rice.edu (8.14.5/8.14.5) with SMTP id t2UH16Dj027384; Mon, 30 Mar 2015 12:05:42 -0500 Received: from mh11.mail.rice.edu (mh11.mail.rice.edu [128.42.199.30]) by pp2.rice.edu with ESMTP id 1teuh3ren8-1; Mon, 30 Mar 2015 12:05:42 -0500 X-Virus-Scanned: by amavis-2.7.0 at mh11.mail.rice.edu, auth channel Received: from 108-254-203-201.lightspeed.hstntx.sbcglobal.net (108-254-203-201.lightspeed.hstntx.sbcglobal.net [108.254.203.201]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) (Authenticated sender: alc) by mh11.mail.rice.edu (Postfix) with ESMTPSA id 939BA4C0285; Mon, 30 Mar 2015 12:05:41 -0500 (CDT) Message-ID: <55198265.7050809@rice.edu> Date: Mon, 30 Mar 2015 12:05:41 -0500 From: Alan Cox User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Don Lewis Subject: Re: svn commit: r280327 - in head/sys: kern vm References: <201503300625.t2U6PE3c093114@gw.catspoiler.org> In-Reply-To: <201503300625.t2U6PE3c093114@gw.catspoiler.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 kscore.is_bulkscore=6.79584166718428e-12 kscore.compositescore=1.22868759611094e-09 circleOfTrustscore=0 compositescore=0.605526357678523 suspectscore=3 recipient_domain_to_sender_totalscore=0 phishscore=0 bulkscore=0 kscore.is_spamscore=0 rbsscore=0.605526357678523 recipient_to_sender_totalscore=0 recipient_domain_to_sender_domain_totalscore=0 spamscore=0 recipient_to_sender_domain_totalscore=0 urlsuspectscore=0.0055263576785225 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1402240000 definitions=main-1503300162 Cc: src-committers@FreeBSD.org, alc@FreeBSD.org, svn-src-all@FreeBSD.org, bdrewery@FreeBSD.org, portmgr@FreeBSD.org, svn-src-head@FreeBSD.org, clusteradm@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, 30 Mar 2015 17:05:50 -0000 On 03/30/2015 01:25, Don Lewis wrote: > On 28 Mar, Alan Cox wrote: >> On 03/28/2015 12:29, Bryan Drewery wrote: >>> On 3/27/2015 9:41 PM, Don Lewis wrote: >>>> On 21 Mar, Alan Cox wrote: >>>>> Author: alc >>>>> Date: Sat Mar 21 17:56:55 2015 >>>>> New Revision: 280327 >>>>> URL: https://svnweb.freebsd.org/changeset/base/280327 >>>>> >>>>> Log: >>>>> Introduce vm_object_color() and use it in mmap(2) to set the colo= r of >>>>> named objects to zero before the virtual address is selected. Pr= eviously, >>>>> the color setting was delayed until after the virtual address was= >>>>> selected. In rtld, this delay effectively prevented the mapping = of a >>>>> shared library's code section using superpages. Now, for example= , we see >>>>> the first 1 MB of libc's code on armv6 mapped by a superpage afte= r we've >>>>> gotten through the initial cold misses that bring the first 1 MB = of code >>>>> into memory. (With the page clustering that we perform on read f= aults, >>>>> this happens quickly.) >>>>> =20 >>>>> Differential Revision: https://reviews.freebsd.org/D2013 >>>>> Reviewed by: jhb, kib >>>>> Tested by: Svatopluk Kraus (armv6) >>>>> MFC after: 6 weeks >>>>> >>>>> Modified: >>>>> head/sys/kern/kern_exec.c >>>>> head/sys/vm/vm_fault.c >>>>> head/sys/vm/vm_mmap.c >>>>> head/sys/vm/vm_object.h >>>>> head/sys/vm/vnode_pager.c >>>> This change appears to have partially broken package building. >>>> >>>> I recently set up a package building machine running 11.0-CURRENT >>>> r280642 and found that it was unable to build openjdk7 packages insi= de >>>> FreeBSD 8.4 and 9.3 poudriere jails, for both i386 and amd64. >>>> >>>> [snip] >>>> Compiling ../generated/adfiles/ad_x86_64_gen.cpp >>>> rm -f ad_x86_64_gen.o >>>> c++ -D_ALLBSD_SOURCE -D_GNU_SOURCE -DAMD64 -DPRODUCT -I. -I/wrkdirs/= usr/ports/java/openjdk7/work/openjdk/hotspot/src/share/vm/prims -I/wrkdir= s/usr/ports/java/openjdk7/work/openjdk/hotspot/src/share/vm -I/wrkdirs/us= r/ports/java/openjdk7/work/openjdk/hotspot/src/share/vm/precompiled -I/wr= kdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/cpu/x86/vm -I/wrkd= irs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/os_cpu/bsd_x86/vm -I= /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/os/bsd/vm -I/wr= kdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/os/posix/vm -I../g= enerated -DHOTSPOT_RELEASE_VERSION=3D"\"24.76-b04\"" -DHOTSPOT_BUILD_TARG= ET=3D"\"product\"" -DHOTSPOT_BUILD_USER=3D"\"root\"" -DHOTSPOT_LIB_ARCH=3D= \"amd64\" -DHOTSPOT_VM_DISTRO=3D"\"OpenJDK\"" -O2 -pipe -fstack-protector= -fno-strict-aliasing -DTARGET_OS_FAMILY_bsd -DTARGET_ARCH_x86 -DTARGET_A= RCH_MODEL_x86_64 -DTARGET_OS_ARCH_bsd_x86 -DTARGET_OS_ARCH_MODEL_bsd_x86_= 64 -DTARGET_COMPILER_gcc -DCOMPILER2 -DCOMPILER1 ! > -fno! >>>> -rtti -fno-exceptions -pthread -fcheck-new -m64 -pipe -DTARGET_OS_F= AMILY_bsd -DTARGET_ARCH_x86 -DTARGET_ARCH_MODEL_x86_64 -DTARGET_OS_ARCH_b= sd_x86 -DTARGET_OS_ARCH_MODEL_bsd_x86_64 -DTARGET_COMPILER_gcc -DCOMPILER= 2 -DCOMPILER1 -fPIC -fno-rtti -fno-exceptions -pthread -fcheck-new -m64 -= pipe -O3 -fno-strict-aliasing -DVM_LITTLE_ENDIAN -D_LP64=3D1 -fno-omit-fr= ame-pointer -DINCLUDE_TRACE=3D1 -Wpointer-arith -Wconversion -Wsign-comp= are -c -fpch-deps -MMD -MP -MF ../generated/dependencies/ad_x86_64_fo= rmat.o.d -o ad_x86_64_format.o ../generated/adfiles/ad_x86_64_format.cpp = >>>> c++ -D_ALLBSD_SOURCE -D_GNU_SOURCE -DAMD64 -DPRODUCT -I. -I/wrkdirs/= usr/ports/java/openjdk7/work/openjdk/hotspot/src/share/vm/prims -I/wrkdir= s/usr/ports/java/openjdk7/work/openjdk/hotspot/src/share/vm -I/wrkdirs/us= r/ports/java/openjdk7/work/openjdk/hotspot/src/share/vm/precompiled -I/wr= kdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/cpu/x86/vm -I/wrkd= irs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/os_cpu/bsd_x86/vm -I= /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/os/bsd/vm -I/wr= kdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/os/posix/vm -I../g= enerated -DHOTSPOT_RELEASE_VERSION=3D"\"24.76-b04\"" -DHOTSPOT_BUILD_TARG= ET=3D"\"product\"" -DHOTSPOT_BUILD_USER=3D"\"root\"" -DHOTSPOT_LIB_ARCH=3D= \"amd64\" -DHOTSPOT_VM_DISTRO=3D"\"OpenJDK\"" -O2 -pipe -fstack-protector= -fno-strict-aliasing -DTARGET_OS_FAMILY_bsd -DTARGET_ARCH_x86 -DTARGET_A= RCH_MODEL_x86_64 -DTARGET_OS_ARCH_bsd_x86 -DTARGET_OS_ARCH_MODEL_bsd_x86_= 64 -DTARGET_COMPILER_gcc -DCOMPILER2 -DCOMPILER1 ! > -fno! >>>> -rtti -fno-exceptions -pthread -fcheck-new -m64 -pipe -DTARGET_OS_F= AMILY_bsd -DTARGET_ARCH_x86 -DTARGET_ARCH_MODEL_x86_64 -DTARGET_OS_ARCH_b= sd_x86 -DTARGET_OS_ARCH_MODEL_bsd_x86_64 -DTARGET_COMPILER_gcc -DCOMPILER= 2 -DCOMPILER1 -fPIC -fno-rtti -fno-exceptions -pthread -fcheck-new -m64 -= pipe -O3 -fno-strict-aliasing -DVM_LITTLE_ENDIAN -D_LP64=3D1 -fno-omit-fr= ame-pointer -DINCLUDE_TRACE=3D1 -Wpointer-arith -Wconversion -Wsign-comp= are -c -fpch-deps -MMD -MP -MF ../generated/dependencies/ad_x86_64_ge= n.o.d -o ad_x86_64_gen.o ../generated/adfiles/ad_x86_64_gen.cpp=20 >>>> Compiling ../generated/adfiles/ad_x86_64_misc.cpp >>>> rm -f ad_x86_64_misc.o >>>> c++ -D_ALLBSD_SOURCE -D_GNU_SOURCE -DAMD64 -DPRODUCT -I. -I/wrkdirs/= usr/ports/java/openjdk7/work/openjdk/hotspot/src/share/vm/prims -I/wrkdir= s/usr/ports/java/openjdk7/work/openjdk/hotspot/src/share/vm -I/wrkdirs/us= r/ports/java/openjdk7/work/openjdk/hotspot/src/share/vm/precompiled -I/wr= kdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/cpu/x86/vm -I/wrkd= irs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/os_cpu/bsd_x86/vm -I= /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/os/bsd/vm -I/wr= kdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/os/posix/vm -I../g= enerated -DHOTSPOT_RELEASE_VERSION=3D"\"24.76-b04\"" -DHOTSPOT_BUILD_TARG= ET=3D"\"product\"" -DHOTSPOT_BUILD_USER=3D"\"root\"" -DHOTSPOT_LIB_ARCH=3D= \"amd64\" -DHOTSPOT_VM_DISTRO=3D"\"OpenJDK\"" -O2 -pipe -fstack-protector= -fno-strict-aliasing -DTARGET_OS_FAMILY_bsd -DTARGET_ARCH_x86 -DTARGET_A= RCH_MODEL_x86_64 -DTARGET_OS_ARCH_bsd_x86 -DTARGET_OS_ARCH_MODEL_bsd_x86_= 64 -DTARGET_COMPILER_gcc -DCOMPILER2 -DCOMPILER1 ! > -fno! >>>> -rtti -fno-exceptions -pthread -fcheck-new -m64 -pipe -DTARGET_OS_F= AMILY_bsd -DTARGET_ARCH_x86 -DTARGET_ARCH_MODEL_x86_64 -DTARGET_OS_ARCH_b= sd_x86 -DTARGET_OS_ARCH_MODEL_bsd_x86_64 -DTARGET_COMPILER_gcc -DCOMPILER= 2 -DCOMPILER1 -fPIC -fno-rtti -fno-exceptions -pthread -fcheck-new -m64 -= pipe -O3 -fno-strict-aliasing -DVM_LITTLE_ENDIAN -D_LP64=3D1 -fno-omit-fr= ame-pointer -DINCLUDE_TRACE=3D1 -Wpointer-arith -Wconversion -Wsign-comp= are -c -fpch-deps -MMD -MP -MF ../generated/dependencies/ad_x86_64_mi= sc.o.d -o ad_x86_64_misc.o ../generated/adfiles/ad_x86_64_misc.cpp=20 >>>> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/share/vm/c= ompiler/abstractCompiler.cpp:1: fatal error: had to relocate PCH >>>> compilation terminated. >>>> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/share/vm/u= tilities/accessFlags.cpp:1: fatal error: had to relocate PCH >>>> compilation terminated. >>>> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makef= iles/rules.make:149: recipe for target 'abstractCompiler.o' failed >>>> gmake[6]: *** [abstractCompiler.o] Error 1 >>>> gmake[6]: *** Waiting for unfinished jobs.... >>>> ../generated/adfiles/ad_x86_64.cpp:1: fatal error: had to relocate P= CH >>>> compilation terminated. >>> Are you using ccache? >>> >>>> ../generated/adfiles/ad_x86_64_clone.cpp:1: fatal error: had to relo= cate PCH >>>> compilation terminated. >>>> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makef= iles/rules.make:149: recipe for target 'accessFlags.o' failed >>>> gmake[6]: *** [accessFlags.o] Error 1 >>>> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makef= iles/rules.make:149: recipe for target 'ad_x86_64_clone.o' failed >>>> gmake[6]: *** [ad_x86_64_clone.o] Error 1 >>>> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makef= iles/rules.make:149: recipe for target 'ad_x86_64.o' failed >>>> gmake[6]: *** [ad_x86_64.o] Error 1 >>>> ../generated/adfiles/ad_x86_64_expand.cpp:1: fatal error: had to rel= ocate PCH >>>> compilation terminated. >>>> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makef= iles/rules.make:149: recipe for target 'ad_x86_64_expand.o' failed >>>> gmake[6]: *** [ad_x86_64_expand.o] Error 1 >>>> ../generated/adfiles/ad_x86_64_gen.cpp:1: fatal error: had to reloca= te PCH >>>> compilation terminated. >>>> ../generated/adfiles/ad_x86_64_misc.cpp:1: fatal error: had to reloc= ate PCH >>>> compilation terminated. >>>> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makef= iles/rules.make:149: recipe for target 'ad_x86_64_gen.o' failed >>>> gmake[6]: *** [ad_x86_64_gen.o] Error 1 >>>> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makef= iles/rules.make:149: recipe for target 'ad_x86_64_misc.o' failed >>>> gmake[6]: *** [ad_x86_64_misc.o] Error 1 >>>> ../generated/adfiles/ad_x86_64_format.cpp:1: fatal error: had to rel= ocate PCH >>>> compilation terminated. >>>> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makef= iles/rules.make:149: recipe for target 'ad_x86_64_format.o' failed >>>> gmake[6]: *** [ad_x86_64_format.o] Error 1 >>>> gmake[6]: Leaving directory '/wrkdirs/usr/ports/java/openjdk7/work/o= penjdk/build/bsd-amd64/hotspot/outputdir/bsd_amd64_compiler2/product' >>>> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makef= iles/top.make:128: recipe for target 'the_vm' failed >>>> gmake[5]: *** [the_vm] Error 2 >>>> gmake[5]: Leaving directory '/wrkdirs/usr/ports/java/openjdk7/work/o= penjdk/build/bsd-amd64/hotspot/outputdir/bsd_amd64_compiler2/product' >>>> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/Makef= ile:292: recipe for target 'product' failed >>>> gmake[4]: *** [product] Error 2 >>>> gmake[4]: Leaving directory '/wrkdirs/usr/ports/java/openjdk7/work/o= penjdk/build/bsd-amd64/hotspot/outputdir' >>>> Makefile:191: recipe for target 'generic_build2' failed >>>> gmake[3]: *** [generic_build2] Error 2 >>>> gmake[3]: Leaving directory '/wrkdirs/usr/ports/java/openjdk7/work/o= penjdk/hotspot/make' >>>> Makefile:151: recipe for target 'product' failed >>>> gmake[2]: *** [product] Error 2 >>>> gmake[2]: Leaving directory '/wrkdirs/usr/ports/java/openjdk7/work/o= penjdk/hotspot/make' >>>> make/hotspot-rules.gmk:111: recipe for target 'hotspot-build' failed= >>>> gmake[1]: *** [hotspot-build] Error 2 >>>> gmake[1]: Leaving directory '/wrkdirs/usr/ports/java/openjdk7/work/o= penjdk' >>>> Makefile:251: recipe for target 'build_product_image' failed >>>> gmake: *** [build_product_image] Error 2 >>>> =3D=3D=3D> Compilation failed unexpectedly. >>>> >>>> I was not seeing this problem on my older package builder running >>>> 10.1-STABLE. Since this problem has not shown up on the FreeBSD pac= kage >>>> building cluster, I got suspicious that the change was quite recent.= >>>> >>>> This old gcc bug report: >>>> led me to sus= pect >>>> mmap(). >>>> >>>> The old gcc source file /usr/src/contrib/gcc/ggc-common.c does a cou= ple >>>> of mmap() calls. Tne first is in mmap_gt_pch_get_address() where a= >>>> NULL first argument is used. The address that gets returned is stas= hed >>>> away and the region is unmapped. Then a later call in >>>> mmap_gt_pch_use_address() passes this saved address to mmap() as a >>>> hint. It expects the mapped region to get mapped to the same base >>>> address. If this does not happen, the above error is the result. >>> I don't know what I'm talking about but that doesn't sound like a ver= y >>> safe assumption for the gcc code to make. >> >> Your intuition is correct. It is not. And, in fact, under Solaris an= d >> Linux, gcc does not make this assumption. >> >> I suspect that the solution used by gcc under Solaris would work for >> us. However, that would entail modifying gcc in older branches. > After digging in to this today, I'm not sure that the Solaris solution > would work. Actually, based on what you've written below, the solution in config/host-solaris.c should work. That solution uses mincore(2) to verify that the desired addresses are not in use and reissues the mmap(2) call with MAP_FIXED if they are not. MAP_FIXED overrides the automatic realignment that moves the mapping up to 0x8115F4000. This should work on any version of FreeBSD. In FreeBSD 10+, we have a new flag MAP_EXCL that eliminates the need for the mincore(2) calls and the second call to mmap(2). The first call can safely specify MAP_EXCL | MAP_FIXED. > On amd64, with an amd64 jail, and kernel rev r280326, I observe the > following: > One gcc process calls mmap() with addr=3D0 and len=3D0x657a000, and > the value 0x811400000 is returned. Subsequent gcc processes > call mmap() with addr=3D0x811400000 and len=3D0x657a000, gettin= g > 0x811400000 in return. > > With kernel rev r280327 I see: > One gcc process calls mmap() with addr=3D0 and len=3D0x657a000, and > the value 0x811400000 is returned. Subsequent gcc processes > call mmap() with addr=3D0x811400000 and len=3D0x657a000, getting > 0x8115f4000 in return. What I later noticed is that the subsequent > calls are passing offset=3D0x1f4000. Not so coincidentally, > 0x811400000 + 0x1f4000 =3D 0x8115F4000. > > My first attempt at a fix subtracted offset from address, but the mmap(= ) > return value changed to 0x8113f4000 instead of the 0x811400000 I was > expecting. It looked to me like the code must be doing superpage > alignment on the start of the file and then adding the offset to get th= e > start of the mapped region. > > This somewhat hacking patch disables this alignment if a non-zero > address is passed as a hint, and allows the code to make the start of > the mapped region match the hint. With this patch, I've been able to > build openjdk7 in a FreeBSD 9.3 amd64 jail. > > Index: vm_mmap.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 > --- vm_mmap.c (revision 280327) > +++ vm_mmap.c (working copy) > @@ -325,6 +325,8 @@ > * There should really be a pmap call to determine a reasonable > * location. > */ > + if (addr !=3D 0 && (flags & MAP_ANON) =3D=3D 0) > + flags |=3D MAP_RESERVED0100; > PROC_LOCK(td->td_proc); > if (addr =3D=3D 0 || > (addr >=3D round_page((vm_offset_t)vms->vm_taddr) && > @@ -1665,6 +1667,8 @@ > else if ((flags & MAP_ALIGNMENT_MASK) !=3D 0) > findspace =3D VMFS_ALIGNED_SPACE(flags >> > MAP_ALIGNMENT_SHIFT); > + else if ((flags & MAP_RESERVED0100) !=3D 0) > + findspace =3D VMFS_ANY_SPACE; > else > findspace =3D VMFS_OPTIMAL_SPACE; > rv =3D vm_map_find(map, object, foff, addr, size, > > =20 > From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 17:10:44 2015 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 D4DAB5D9; Mon, 30 Mar 2015 17:10:44 +0000 (UTC) Received: from mail-ig0-x22e.google.com (mail-ig0-x22e.google.com [IPv6:2607:f8b0:4001:c05::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 974C018E; Mon, 30 Mar 2015 17:10:44 +0000 (UTC) Received: by igcxg11 with SMTP id xg11so79344001igc.0; Mon, 30 Mar 2015 10:10:44 -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=5hG/hV0FblI4SKYtViElAoRSzOKBiutxHO1RRNUAiqc=; b=09N6FzASg6VwjNT2M+hc4iDJtP3c12lAfFBYQc0RG/8PU/tSstXEs5qAYf4YioCddZ VmvPjOpO/3VO7W43jTumNCST4IDfE66VaR0ibpWSXicTHjP6VnBLx6fWbQKI7GmwhoQc DBwL/HDUH1hY7GXIY6DXILHdizcpu+IZhe5SHfi40ULBDoo//x8Dpa8visO3Tc0UUOIJ zOUlGMGtePxH80poVw2nSkuTRkC1CkjNixPLjcXdPhtwijFnTp75/rBGgZ0Zb8VGjESQ bwfMMsKoHlVWS+rLT+DWgfT70JBWhvGOhm4mkOPwf7cs0UhQt3qI3HsxfCP2FSHJqiAI aWug== MIME-Version: 1.0 X-Received: by 10.50.132.66 with SMTP id os2mr18988376igb.6.1427735444026; Mon, 30 Mar 2015 10:10:44 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.36.17.194 with HTTP; Mon, 30 Mar 2015 10:10:43 -0700 (PDT) In-Reply-To: <3261888.gflh0beI2v@ralph.baldwin.cx> References: <201503282341.t2SNfOZc032386@svn.freebsd.org> <3261888.gflh0beI2v@ralph.baldwin.cx> Date: Mon, 30 Mar 2015 10:10:43 -0700 X-Google-Sender-Auth: lOe29v1cQPIILDSGdnEyXw8mi_E Message-ID: Subject: Re: svn commit: r280799 - head/sys/dev/ath From: Adrian Chadd To: John Baldwin 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: Mon, 30 Mar 2015 17:10:44 -0000 Yes, because it's before the dynamic hint stuff starts up. (kern.hintmode.) Hints don't show up in kenv on the mips boards until I set the sysctl to the "import them now!" setting. -adrian From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 17:15:18 2015 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 1EB3E8F8; Mon, 30 Mar 2015 17:15:18 +0000 (UTC) Received: from pp2.rice.edu (proofpoint2.mail.rice.edu [128.42.201.101]) (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 CE335281; Mon, 30 Mar 2015 17:15:17 +0000 (UTC) Received: from pps.filterd (pp2.rice.edu [127.0.0.1]) by pp2.rice.edu (8.14.5/8.14.5) with SMTP id t2UHCGFX032586; Mon, 30 Mar 2015 12:15:17 -0500 Received: from mh1.mail.rice.edu (mh1.mail.rice.edu [128.42.201.20]) by pp2.rice.edu with ESMTP id 1teuh3rf15-1; Mon, 30 Mar 2015 12:15:16 -0500 X-Virus-Scanned: by amavis-2.7.0 at mh1.mail.rice.edu, auth channel Received: from 108-254-203-201.lightspeed.hstntx.sbcglobal.net (108-254-203-201.lightspeed.hstntx.sbcglobal.net [108.254.203.201]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) (Authenticated sender: alc) by mh1.mail.rice.edu (Postfix) with ESMTPSA id 2AC2E460129; Mon, 30 Mar 2015 12:15:16 -0500 (CDT) Message-ID: <551984A3.2010507@rice.edu> Date: Mon, 30 Mar 2015 12:15:15 -0500 From: Alan Cox User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Adrian Chadd Subject: Re: svn commit: r280327 - in head/sys: kern vm References: <201503280241.t2S2fWcQ078499@gw.catspoiler.org> <5516E4EA.60201@FreeBSD.org> <5516EB31.7000309@rice.edu> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 kscore.is_bulkscore=1.26130939026581e-10 kscore.compositescore=0 circleOfTrustscore=0 compositescore=0.714301145562988 suspectscore=3 recipient_domain_to_sender_totalscore=0 phishscore=0 bulkscore=0 kscore.is_spamscore=0 rbsscore=0.714301145562988 recipient_to_sender_totalscore=0 recipient_domain_to_sender_domain_totalscore=0 spamscore=0 recipient_to_sender_domain_totalscore=0 urlsuspectscore=0.714301145562988 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1402240000 definitions=main-1503300164 Cc: "src-committers@freebsd.org" , Alan Cox , Don Lewis , Bryan Drewery , portmgr@freebsd.org, "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , clusteradm@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, 30 Mar 2015 17:15:18 -0000 On 03/28/2015 13:03, Adrian Chadd wrote: > Hm, at least MIPS is still using gcc-4.2. It won't happen on MIPS until superpage support is added to the pmap. > Shall we fix gcc in the tree to stop this from happening? I think > that's the most sane thing to do, if a bit tedious. Yes, at least for newer branches, where that's a possibility. For building ports for older branches on newer kernels, maybe we can do without precompiled headers. Also, we should figure out whether this is an issue for newer versions of gcc in ports. From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 17:15:49 2015 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 7ACBCA54; Mon, 30 Mar 2015 17:15: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 65F7628C; Mon, 30 Mar 2015 17:15: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 t2UHFnR1006012; Mon, 30 Mar 2015 17:15:49 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2UHFn0Z006011; Mon, 30 Mar 2015 17:15:49 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201503301715.t2UHFn0Z006011@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 30 Mar 2015 17:15:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280858 - 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: Mon, 30 Mar 2015 17:15:49 -0000 Author: emaste Date: Mon Mar 30 17:15:48 2015 New Revision: 280858 URL: https://svnweb.freebsd.org/changeset/base/280858 Log: Fill out arm64 dynamic relocation #defines Sponsored by: The FreeBSD Foundation Modified: head/sys/sys/elf_common.h Modified: head/sys/sys/elf_common.h ============================================================================== --- head/sys/sys/elf_common.h Mon Mar 30 16:42:08 2015 (r280857) +++ head/sys/sys/elf_common.h Mon Mar 30 17:15:48 2015 (r280858) @@ -870,7 +870,11 @@ typedef struct { #define R_AARCH64_GLOB_DAT 1025 /* Set GOT entry to data address */ #define R_AARCH64_JUMP_SLOT 1026 /* Set GOT entry to code address */ #define R_AARCH64_RELATIVE 1027 /* Add load address of shared object */ +#define R_AARCH64_TLS_DTPREL64 1028 +#define R_AARCH64_TLS_DTPMOD64 1029 +#define R_AARCH64_TLS_TPREL64 1030 #define R_AARCH64_TLSDESC 1031 /* Identify the TLS descriptor */ +#define R_AARCH64_IRELATIVE 1032 #define R_ARM_NONE 0 /* No relocation. */ #define R_ARM_PC24 1 From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 17:12:25 2015 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 1ABB5793 for ; Mon, 30 Mar 2015 17:12:25 +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 EB6E2258 for ; Mon, 30 Mar 2015 17:12:24 +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 t2UHCOBA048724 for ; Mon, 30 Mar 2015 17:12:24 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.9/8.14.9/Submit) id t2UHCOni048723 for svn-src-all@FreeBSD.org; Mon, 30 Mar 2015 17:12:24 GMT (envelope-from bdrewery) Received: (qmail 5189 invoked from network); 30 Mar 2015 12:12:20 -0500 Received: from unknown (HELO ?10.10.1.139?) (freebsd@shatow.net@10.10.1.139) by sweb.xzibition.com with ESMTPA; 30 Mar 2015 12:12:20 -0500 Message-ID: <55198400.1040300@FreeBSD.org> Date: Mon, 30 Mar 2015 12:12:32 -0500 From: Bryan Drewery Organization: FreeBSD User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Greg Lewis Subject: Re: svn commit: r280327 - in head/sys: kern vm References: <5516EB31.7000309@rice.edu> <201503300625.t2U6PE3c093114@gw.catspoiler.org> <20150330091209.GC2379@kib.kiev.ua> In-Reply-To: <20150330091209.GC2379@kib.kiev.ua> OpenPGP: id=6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="14QWRO38hCII64m64PCAsdf7M83WdKwCG" X-Mailman-Approved-At: Mon, 30 Mar 2015 17:23:57 +0000 Cc: src-committers@FreeBSD.org, alc@rice.edu, alc@FreeBSD.org, Don Lewis , clusteradm@FreeBSD.org, svn-src-head@FreeBSD.org, portmgr@FreeBSD.org, Konstantin Belousov , 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: Mon, 30 Mar 2015 17:12:25 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --14QWRO38hCII64m64PCAsdf7M83WdKwCG Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 3/30/2015 4:12 AM, Konstantin Belousov wrote: > On Sun, Mar 29, 2015 at 11:25:14PM -0700, Don Lewis wrote: >> On amd64, with an amd64 jail, and kernel rev r280326, I observe the >> following: >> One gcc process calls mmap() with addr=3D0 and len=3D0x657a000, and >> the value 0x811400000 is returned. Subsequent gcc processes >> call mmap() with addr=3D0x811400000 and len=3D0x657a000, getti= ng >> 0x811400000 in return. >> >> With kernel rev r280327 I see: >> One gcc process calls mmap() with addr=3D0 and len=3D0x657a000, and >> the value 0x811400000 is returned. Subsequent gcc processes >> call mmap() with addr=3D0x811400000 and len=3D0x657a000, getting >> 0x8115f4000 in return. What I later noticed is that the subsequent >> calls are passing offset=3D0x1f4000. Not so coincidentally, >> 0x811400000 + 0x1f4000 =3D 0x8115F4000. >> >> My first attempt at a fix subtracted offset from address, but the mmap= () >> return value changed to 0x8113f4000 instead of the 0x811400000 I was >> expecting. It looked to me like the code must be doing superpage >> alignment on the start of the file and then adding the offset to get t= he >> start of the mapped region. > So the real fix is to make gcc pass MAP_FIXED. >=20 >> >> This somewhat hacking patch disables this alignment if a non-zero >> address is passed as a hint, and allows the code to make the start of >> the mapped region match the hint. With this patch, I've been able to >> build openjdk7 in a FreeBSD 9.3 amd64 jail. >> > This is for precompiled headers, right ? Could port disable pch ? >=20 That is my opinion as well but I don't think it is enough. This gcc issue is quite old. Here is a 2004 reference for a similar issue on Cygwin. https://gcc.gnu.org/ml/gcc-bugs/2004-05/msg00559.html I think it is not enough to disable PCH in openjdk7. I am finding the "had to relocate PCH" error referenced in many other ports. I have ran into it randomly before as well. I think what we need to do is: 1. Fix GCC on head to use MAP_FIXED 2. Fix GCC ports to all use MAP_FIXED 3. Force ports that use PCH builds to use the port GCC or clang and not the base GCC in all releases. This patch should fix openjdk7 for now. My test build is still running. ~/svn/ports/java/openjdk7 # svn diff Index: Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- Makefile (revision 382519) +++ Makefile (working copy) @@ -26,7 +26,7 @@ WRKSRC=3D ${WRKDIR}/${PORTNAME} -USES=3D dos2unix iconv gmake zip +USES=3D compiler:features dos2unix iconv gmake zip USE_XORG+=3D x11 xext xi xrender xt xtst MAKE_ARGS=3D CC=3D${CC:Q} CXX=3D${CXX:Q} HOST_CC=3D${CC:Q} @@ -125,6 +125,10 @@ .include +.if ${COMPILER_TYPE} !=3D clang +MAKE_ENV+=3D USE_PRECOMPILED_HEADER=3D0 +.endif + .if empty(ICONV_LIB) MAKE_ENV+=3D EXTRA_CFLAGS=3D-DLIBICONV_PLUG .endif Index: files/patch-bsd =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- files/patch-bsd (revision 382519) +++ files/patch-bsd (working copy) @@ -184,16 +184,12 @@ # version 4 and above support fvisibility=3Dhidden (matches jni_x86.h f= ile) # except 4.1.2 gives pointless warnings that can't be disabled (afaik) ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) =3D 4 \) \& \( $(CC_VER_MINOR) \>=3D 3 \) \))" "0" -@@ -215,7 +218,11 @@ +@@ -215,7 +218,7 @@ # Flags for generating make dependency flags. ifneq ("${CC_VER_MAJOR}", "2") -DEPFLAGS =3D -fpch-deps -MMD -MP -MF $(DEP_DIR)/$(@:%=3D%.d) -+DEPFLAGS =3D -+ifeq (,$(findstring clang,$(shell $(CC) -v 2>&1))) -+DEPFLAGS +=3D -fpch-deps -+endif -+DEPFLAGS +=3D -MMD -MP -MF $(DEP_DIR)/$(@:%=3D%.d) ++DEPFLAGS =3D -MMD -MP -MF $(DEP_DIR)/$(@:%=3D%.d) endif # -DDONT_USE_PRECOMPILED_HEADER will exclude all includes in precompiled.hpp. --=20 Regards, Bryan Drewery --14QWRO38hCII64m64PCAsdf7M83WdKwCG 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 iQEcBAEBAgAGBQJVGYQAAAoJEDXXcbtuRpfPQ6YIAK+HCvHgzKHT1YLsHQ1YyNHa ZkLkftkIau6QsZMSqj5RvfiqqZbvESxCBd6snhWwpPaHjLJAg/Aw8Tz4nBuVADht iT8scJMrZw1JbyFmjYTulCCfsft3AQeYv23eYUAM9u+2zqytWASbOccQyrTYo+y0 OQc2RLWIANSfLdOvbPDJnig7hHZtER9GwBMlEBnwrsWOjJKZOPLk4g0vY3naCeFB daEn0LuseLGObfKmUy5JJu6ok7NgKFQWsLazsnMhTwrSSVIHsoedr57V+vUAqlkX 7LVJ066JyER6x0tBBa3jiO99poaFTmLQK35moX7NsKY+74epIj5uQf5uG0btcpA= =yvvi -----END PGP SIGNATURE----- --14QWRO38hCII64m64PCAsdf7M83WdKwCG-- From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 17:24:41 2015 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 64BE3D75; Mon, 30 Mar 2015 17:24:41 +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 06B673F0; Mon, 30 Mar 2015 17:24:40 +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 t2UHOYgU076412 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Mon, 30 Mar 2015 20:24:34 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t2UHOYgU076412 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t2UHOYiv076411; Mon, 30 Mar 2015 20:24:34 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 30 Mar 2015 20:24:34 +0300 From: Konstantin Belousov To: John Baldwin Subject: Re: svn commit: r280279 - head/sys/sys Message-ID: <20150330172434.GG2379@kib.kiev.ua> References: <201503201027.t2KAR6Ze053047@svn.freebsd.org> <20150322080015.O955@besplex.bde.org> <20150322093251.GY2379@kib.kiev.ua> <2526359.g5B2nXdKeQ@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2526359.g5B2nXdKeQ@ralph.baldwin.cx> 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, 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: Mon, 30 Mar 2015 17:24:41 -0000 On Mon, Mar 30, 2015 at 11:57:08AM -0400, John Baldwin wrote: > On Sunday, March 22, 2015 11:32:51 AM Konstantin Belousov wrote: > > On Sun, Mar 22, 2015 at 09:41:53AM +1100, Bruce Evans wrote: > > > Always using new API would lose the micro-optimizations given by the runtime > > > decision for default CFLAGS (used by distributions for portability). To > > > keep them, it seems best to keep the inline asm but replace > > > popcnt_pc_map_elem(elem) by __bitcount64(elem). -mno-popcount can then > > > be used to work around slowness in the software (that is actually > > > hardware) case. > > > > So anybody has to compile his own kernel to get popcnt optimization ? > > We do care about trivial things that improve time. > > That is not what Bruce said. He suggested using bitcount64() for the fallback > if the cpuid check fails. He did not say to remove the runtime check to use > popcnt if it is available: > > "Always using [bitcount64] would lose the micro-optimization... [to] keep > [it], it seems best to keep the inline asm but replace popcnt_pc_map_elem(elem) > by [bitcount64(elem)]." Ok, thank you for the clarification. I updated the pmap patch, see the end of the message. > > > BTW, I have the following WIP change, which popcnt xorl is a piece of. > > It emulates the ifuncs with some preprocessing mess. It is much better > > than runtime patching, and is a prerequisite to properly support more > > things, like SMAP. I did not published it earlier, since I wanted to > > convert TLB flush code to this. > > This looks fine to me. It seems to be manually converting certain symbols > to use a dynamic lookup that must be explicitly resolved before first > use? I am not sure what do you mean by dynamic lookup, but possibly it was mentioned. I can emulate the ifuncs more sincerely, by requiring a resolver function, which is called on the first real function invocation. I did not see it as very useful, but it is definitely doable. diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 6a4077c..fcfba56 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -412,7 +416,7 @@ static caddr_t crashdumpmap; static void free_pv_chunk(struct pv_chunk *pc); static void free_pv_entry(pmap_t pmap, pv_entry_t pv); static pv_entry_t get_pv_entry(pmap_t pmap, struct rwlock **lockp); -static int popcnt_pc_map_elem(uint64_t elem); +static int popcnt_pc_map_elem_pq(uint64_t elem); static vm_page_t reclaim_pv_chunk(pmap_t locked_pmap, struct rwlock **lockp); static void reserve_pv_entries(pmap_t pmap, int needed, struct rwlock **lockp); @@ -2980,20 +3002,27 @@ retry: /* * Returns the number of one bits within the given PV chunk map element. + * + * The erratas for Intel processors state that "POPCNT Instruction May + * Take Longer to Execute Than Expected". It is believed that the + * issue is the spurious dependency on the destination register. + * Provide a hint to the register rename logic that the destination + * value is overwritten, by clearing it, as suggested in the + * optimization manual. It should be cheap for unaffected processors + * as well. + * + * Reference numbers for erratas are + * 4th Gen Core: HSD146 + * 5th Gen Core: BDM85 */ static int -popcnt_pc_map_elem(uint64_t elem) +popcnt_pc_map_elem_pq(uint64_t elem) { - int count; + u_long result; - /* - * This simple method of counting the one bits performs well because - * the given element typically contains more zero bits than one bits. - */ - count = 0; - for (; elem != 0; elem &= elem - 1) - count++; - return (count); + __asm __volatile("xorl %k0,%k0;popcntq %1,%0" + : "=&r" (result) : "rm" (elem)); + return (result); } /* @@ -3025,13 +3054,13 @@ retry: avail = 0; TAILQ_FOREACH(pc, &pmap->pm_pvchunk, pc_list) { if ((cpu_feature2 & CPUID2_POPCNT) == 0) { - free = popcnt_pc_map_elem(pc->pc_map[0]); - free += popcnt_pc_map_elem(pc->pc_map[1]); - free += popcnt_pc_map_elem(pc->pc_map[2]); + free = bitcount64(pc->pc_map[0]); + free += bitcount64(pc->pc_map[1]); + free += bitcount64(pc->pc_map[2]); } else { - free = popcntq(pc->pc_map[0]); - free += popcntq(pc->pc_map[1]); - free += popcntq(pc->pc_map[2]); + free = popcnt_pc_map_elem_pq(pc->pc_map[0]); + free += popcnt_pc_map_elem_pq(pc->pc_map[1]); + free += popcnt_pc_map_elem_pq(pc->pc_map[2]); } if (free == 0) break; From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 17:38:27 2015 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 F3FCF47C; Mon, 30 Mar 2015 17:38: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 DED017A2; Mon, 30 Mar 2015 17:38: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 t2UHcQi3015710; Mon, 30 Mar 2015 17:38:26 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2UHcQ5A015707; Mon, 30 Mar 2015 17:38:26 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201503301738.t2UHcQ5A015707@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 30 Mar 2015 17:38:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280859 - in head: gnu/usr.bin/binutils usr.bin 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, 30 Mar 2015 17:38:27 -0000 Author: emaste Date: Mon Mar 30 17:38:25 2015 New Revision: 280859 URL: https://svnweb.freebsd.org/changeset/base/280859 Log: Switch to ELF toolchain readelf(1) ELF toolchain readelf lacked some functionality at the time other tools (like size, strip, nm, etc.) were switched over to the ELF toolchain versions. That has been addressed as of the last update, so we can add it to the list. PR: 198950 [exp-run] Reviewed by: bapt, imp, rpaulo Relnotes: yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D2156 Modified: head/gnu/usr.bin/binutils/Makefile head/usr.bin/Makefile Modified: head/gnu/usr.bin/binutils/Makefile ============================================================================== --- head/gnu/usr.bin/binutils/Makefile Mon Mar 30 17:15:48 2015 (r280858) +++ head/gnu/usr.bin/binutils/Makefile Mon Mar 30 17:38:25 2015 (r280859) @@ -13,7 +13,7 @@ SUBDIR= doc\ ${_nm} \ objcopy \ objdump \ - readelf \ + ${_readelf} \ ${_size} \ ${_strings} \ ${_strip} @@ -21,6 +21,7 @@ SUBDIR= doc\ .if ${MK_ELFTOOLCHAIN_TOOLS} == "no" _addr2line= addr2line _nm= nm +_readelf= readelf _size= size _strings= strings _strip= strip Modified: head/usr.bin/Makefile ============================================================================== --- head/usr.bin/Makefile Mon Mar 30 17:15:48 2015 (r280858) +++ head/usr.bin/Makefile Mon Mar 30 17:38:25 2015 (r280859) @@ -133,6 +133,7 @@ SUBDIR= ${_addr2line} \ procstat \ protect \ rctl \ + ${_readelf} \ renice \ rev \ revoke \ @@ -238,6 +239,7 @@ SUBDIR+= ee _addr2line= addr2line _elfcopy= elfcopy _nm= nm +_readelf= readelf _size= size _strings= strings .endif From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 18:24:12 2015 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 BEA45B94; Mon, 30 Mar 2015 18:24:12 +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 A309AE28; Mon, 30 Mar 2015 18:24:11 +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 t2UIO0q0045504 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 30 Mar 2015 21:24:00 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t2UINx8Y045503; Mon, 30 Mar 2015 21:23:59 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 30 Mar 2015 21:23:59 +0300 From: Gleb Smirnoff To: Emeric POUPON Subject: Re: svn commit: r280759 - head/sys/netinet Message-ID: <20150330182359.GR64665@FreeBSD.org> References: <20150329210757.GA64665@FreeBSD.org> <551943B4.90102@selasky.org> <20150330125115.GI64665@FreeBSD.org> <551948A4.1070408@selasky.org> <5519535C.40608@selasky.org> <20150330141616.GC74532@zxy.spb.ru> <1872802434.26738716.1427729028579.JavaMail.zimbra@stormshield.eu> <20150330152707.GP64665@FreeBSD.org> <964618150.26750606.1427732445799.JavaMail.zimbra@stormshield.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <964618150.26750606.1427732445799.JavaMail.zimbra@stormshield.eu> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: Hans Petter Selasky , Adrian Chadd , src-committers@freebsd.org, Ian Lepore , svn-src-all@freebsd.org, Slawa Olhovchenkov , svn-src-head@freebsd.org, Fabien Thomas X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2015 18:24:12 -0000 On Mon, Mar 30, 2015 at 06:20:45PM +0200, Emeric POUPON wrote: E> Yes, sure! E> E> I will test it tomorrow and tell you the results. E> However, keep in mind I did not see any performance impact with the previous patch. This is expectable, since a) foo++ is almost as bad to cache as atomic_add(&foo) b) you run IPSEC :) -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 18:31:36 2015 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 84A12E84; Mon, 30 Mar 2015 18:31:36 +0000 (UTC) Received: from gw.catspoiler.org (cl-1657.chi-02.us.sixxs.net [IPv6:2001:4978:f:678::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 339E1F19; Mon, 30 Mar 2015 18:31:36 +0000 (UTC) Received: from FreeBSD.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.13.3/8.13.3) with ESMTP id t2UIVClw095330; Mon, 30 Mar 2015 10:31:16 -0800 (PST) (envelope-from truckman@FreeBSD.org) Message-Id: <201503301831.t2UIVClw095330@gw.catspoiler.org> Date: Mon, 30 Mar 2015 11:31:12 -0700 (PDT) From: Don Lewis Subject: Re: svn commit: r280327 - in head/sys: kern vm To: kostikbel@gmail.com In-Reply-To: <20150330091209.GC2379@kib.kiev.ua> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii Cc: src-committers@FreeBSD.org, alc@rice.edu, alc@FreeBSD.org, svn-src-all@FreeBSD.org, bdrewery@FreeBSD.org, portmgr@FreeBSD.org, svn-src-head@FreeBSD.org, clusteradm@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, 30 Mar 2015 18:31:36 -0000 On 30 Mar, Konstantin Belousov wrote: > On Sun, Mar 29, 2015 at 11:25:14PM -0700, Don Lewis wrote: >> On amd64, with an amd64 jail, and kernel rev r280326, I observe the >> following: >> One gcc process calls mmap() with addr=0 and len=0x657a000, and >> the value 0x811400000 is returned. Subsequent gcc processes >> call mmap() with addr=0x811400000 and len=0x657a000, getting >> 0x811400000 in return. >> >> With kernel rev r280327 I see: >> One gcc process calls mmap() with addr=0 and len=0x657a000, and >> the value 0x811400000 is returned. Subsequent gcc processes >> call mmap() with addr=0x811400000 and len=0x657a000, getting >> 0x8115f4000 in return. What I later noticed is that the subsequent >> calls are passing offset=0x1f4000. Not so coincidentally, >> 0x811400000 + 0x1f4000 = 0x8115F4000. >> >> My first attempt at a fix subtracted offset from address, but the mmap() >> return value changed to 0x8113f4000 instead of the 0x811400000 I was >> expecting. It looked to me like the code must be doing superpage >> alignment on the start of the file and then adding the offset to get the >> start of the mapped region. > So the real fix is to make gcc pass MAP_FIXED. This PR explains why MAP_FIXED can't be used. Basically MAP_FIXED will silently clobber any other mappings in that range, introducing other bugs. MAP_FIXED | MAP_EXCL would work, but we didn't get that until FreeBSD 10. I think if the compiler specified the same offset to both mmap() calls, it might work properly. But that leaves the problem of actually fixing the compiler since it is a binary that is part of some number of supported releases. The usual practice for port building is to populate the jails with releases. It is possible to set up jails that build from source, but that's not commonly done and is broken in the case of 8.4 without extreme hackery. The ports versions of gcc might also be affected, but that's less of an issue. It just requires patching those ports. There is also the issue of customers who have a policy of only running official release code. When 11.0-RELEASE comes around, is is going to have a release note that says that the compiler in a 9.3-RELEASE jail doesn't work as well on an 11.0-RELEASE host vs. a 10.x-RELEASE host? Also, is there any other code out in the wild that assumes the old way that mmap() handled hints and will break when I runs on FreeBSD 11, either in an older jail or on bare metal? >> >> This somewhat hacking patch disables this alignment if a non-zero >> address is passed as a hint, and allows the code to make the start of >> the mapped region match the hint. With this patch, I've been able to >> build openjdk7 in a FreeBSD 9.3 amd64 jail. >> > This is for precompiled headers, right ? Could port disable pch ? Correct. I'm guessing that it is likely that the port could be tweaked to disable pch. I only build about 1100-1200 ports and found one that broke. We would need to do an exp run to find out how many others there are. That would take care of the problems of building the ports, but the other issues would still remain. From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 19:03:45 2015 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 9F573FDF; Mon, 30 Mar 2015 19:03:45 +0000 (UTC) Received: from pp1.rice.edu (proofpoint1.mail.rice.edu [128.42.201.100]) (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 634C23BA; Mon, 30 Mar 2015 19:03:44 +0000 (UTC) Received: from pps.filterd (pp1.rice.edu [127.0.0.1]) by pp1.rice.edu (8.14.5/8.14.5) with SMTP id t2UJ1p7p029208; Mon, 30 Mar 2015 14:03:38 -0500 Received: from mh1.mail.rice.edu (mh1.mail.rice.edu [128.42.201.20]) by pp1.rice.edu with ESMTP id 1tf8ay8agy-1; Mon, 30 Mar 2015 14:03:36 -0500 X-Virus-Scanned: by amavis-2.7.0 at mh1.mail.rice.edu, auth channel Received: from 108-254-203-201.lightspeed.hstntx.sbcglobal.net (108-254-203-201.lightspeed.hstntx.sbcglobal.net [108.254.203.201]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) (Authenticated sender: alc) by mh1.mail.rice.edu (Postfix) with ESMTPSA id 2FEEE460197; Mon, 30 Mar 2015 14:03:36 -0500 (CDT) Message-ID: <55199E07.6010500@rice.edu> Date: Mon, 30 Mar 2015 14:03:35 -0500 From: Alan Cox User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Don Lewis , kostikbel@gmail.com Subject: Re: svn commit: r280327 - in head/sys: kern vm References: <201503301831.t2UIVClw095330@gw.catspoiler.org> In-Reply-To: <201503301831.t2UIVClw095330@gw.catspoiler.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=3 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1402240000 definitions=main-1503300176 Cc: src-committers@FreeBSD.org, alc@FreeBSD.org, svn-src-all@FreeBSD.org, bdrewery@FreeBSD.org, portmgr@FreeBSD.org, svn-src-head@FreeBSD.org, clusteradm@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, 30 Mar 2015 19:03:45 -0000 On 03/30/2015 13:31, Don Lewis wrote: > On 30 Mar, Konstantin Belousov wrote: >> On Sun, Mar 29, 2015 at 11:25:14PM -0700, Don Lewis wrote: >>> On amd64, with an amd64 jail, and kernel rev r280326, I observe the >>> following: >>> One gcc process calls mmap() with addr=0 and len=0x657a000, and >>> the value 0x811400000 is returned. Subsequent gcc processes >>> call mmap() with addr=0x811400000 and len=0x657a000, getting >>> 0x811400000 in return. >>> >>> With kernel rev r280327 I see: >>> One gcc process calls mmap() with addr=0 and len=0x657a000, and >>> the value 0x811400000 is returned. Subsequent gcc processes >>> call mmap() with addr=0x811400000 and len=0x657a000, getting >>> 0x8115f4000 in return. What I later noticed is that the subsequent >>> calls are passing offset=0x1f4000. Not so coincidentally, >>> 0x811400000 + 0x1f4000 = 0x8115F4000. >>> >>> My first attempt at a fix subtracted offset from address, but the mmap() >>> return value changed to 0x8113f4000 instead of the 0x811400000 I was >>> expecting. It looked to me like the code must be doing superpage >>> alignment on the start of the file and then adding the offset to get the >>> start of the mapped region. >> So the real fix is to make gcc pass MAP_FIXED. > This PR explains > why MAP_FIXED can't be used. Basically MAP_FIXED will silently clobber > any other mappings in that range, introducing other bugs. MAP_FIXED | > MAP_EXCL would work, but we didn't get that until FreeBSD 10. This is precisely why config/host-solaris.c does a series of mincore() calls. > I think if the compiler specified the same offset to both mmap() calls, > it might work properly. > > But that leaves the problem of actually fixing the compiler since it is > a binary that is part of some number of supported releases. The usual > practice for port building is to populate the jails with releases. It > is possible to set up jails that build from source, but that's not > commonly done and is broken in the case of 8.4 without extreme hackery. > > The ports versions of gcc might also be affected, but that's less of > an issue. It just requires patching those ports. > > There is also the issue of customers who have a policy of only running > official release code. When 11.0-RELEASE comes around, is is going to > have a release note that says that the compiler in a 9.3-RELEASE jail > doesn't work as well on an 11.0-RELEASE host vs. a 10.x-RELEASE host? > > Also, is there any other code out in the wild that assumes the old > way that mmap() handled hints and will break when I runs on FreeBSD 11, > either in an older jail or on bare metal? > >>> This somewhat hacking patch disables this alignment if a non-zero >>> address is passed as a hint, and allows the code to make the start of >>> the mapped region match the hint. With this patch, I've been able to >>> build openjdk7 in a FreeBSD 9.3 amd64 jail. >>> >> This is for precompiled headers, right ? Could port disable pch ? > Correct. I'm guessing that it is likely that the port could be tweaked > to disable pch. I only build about 1100-1200 ports and found one that > broke. We would need to do an exp run to find out how many others there > are. That would take care of the problems of building the ports, but > the other issues would still remain. > > From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 19:08:40 2015 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 2DDD02EF; Mon, 30 Mar 2015 19:08: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 F37523FF; Mon, 30 Mar 2015 19:08: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 t2UJ8dku059552; Mon, 30 Mar 2015 19:08:39 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2UJ8cl6059545; Mon, 30 Mar 2015 19:08:38 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201503301908.t2UJ8cl6059545@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 30 Mar 2015 19:08:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280861 - head/release/tools/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: Mon, 30 Mar 2015 19:08:40 -0000 Author: gjb Date: Mon Mar 30 19:08:37 2015 New Revision: 280861 URL: https://svnweb.freebsd.org/changeset/base/280861 Log: Sigh. s/AutoSize/Growfs/ following upstream commit r761. MFH: 3 days Sponsored by: The FreeBSD Foundation Modified: head/release/tools/arm/crochet-BEAGLEBONE.conf head/release/tools/arm/crochet-PANDABOARD.conf head/release/tools/arm/crochet-RPI-B.conf head/release/tools/arm/crochet-WANDBOARD-QUAD.conf head/release/tools/arm/crochet-ZEDBOARD.conf Modified: head/release/tools/arm/crochet-BEAGLEBONE.conf ============================================================================== --- head/release/tools/arm/crochet-BEAGLEBONE.conf Mon Mar 30 18:35:40 2015 (r280860) +++ head/release/tools/arm/crochet-BEAGLEBONE.conf Mon Mar 30 19:08:37 2015 (r280861) @@ -7,7 +7,7 @@ board_setup BeagleBone option ImageSize 1gb -option AutoSize +option Growfs export MAKEOBJDIRPREFIX=/usr/obj FREEBSD_SRC=/usr/src Modified: head/release/tools/arm/crochet-PANDABOARD.conf ============================================================================== --- head/release/tools/arm/crochet-PANDABOARD.conf Mon Mar 30 18:35:40 2015 (r280860) +++ head/release/tools/arm/crochet-PANDABOARD.conf Mon Mar 30 19:08:37 2015 (r280861) @@ -7,7 +7,7 @@ board_setup PandaBoard option ImageSize 1gb -option AutoSize +option Growfs export MAKEOBJDIRPREFIX=/usr/obj FREEBSD_SRC=/usr/src Modified: head/release/tools/arm/crochet-RPI-B.conf ============================================================================== --- head/release/tools/arm/crochet-RPI-B.conf Mon Mar 30 18:35:40 2015 (r280860) +++ head/release/tools/arm/crochet-RPI-B.conf Mon Mar 30 19:08:37 2015 (r280861) @@ -7,7 +7,7 @@ board_setup RaspberryPi option ImageSize 1gb -option AutoSize +option Growfs export MAKEOBJDIRPREFIX=/usr/obj FREEBSD_SRC=/usr/src Modified: head/release/tools/arm/crochet-WANDBOARD-QUAD.conf ============================================================================== --- head/release/tools/arm/crochet-WANDBOARD-QUAD.conf Mon Mar 30 18:35:40 2015 (r280860) +++ head/release/tools/arm/crochet-WANDBOARD-QUAD.conf Mon Mar 30 19:08:37 2015 (r280861) @@ -7,7 +7,7 @@ board_setup Wandboard option ImageSize 1gb -option AutoSize +option Growfs export MAKEOBJDIRPREFIX=/usr/obj FREEBSD_SRC=/usr/src Modified: head/release/tools/arm/crochet-ZEDBOARD.conf ============================================================================== --- head/release/tools/arm/crochet-ZEDBOARD.conf Mon Mar 30 18:35:40 2015 (r280860) +++ head/release/tools/arm/crochet-ZEDBOARD.conf Mon Mar 30 19:08:37 2015 (r280861) @@ -7,7 +7,7 @@ board_setup ZedBoard option ImageSize 1gb -option AutoSize +option Growfs export MAKEOBJDIRPREFIX=/usr/obj FREEBSD_SRC=/usr/src From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 19:10:10 2015 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 B4DC2585; Mon, 30 Mar 2015 19:10: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 961FD61C; Mon, 30 Mar 2015 19:10: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 t2UJAAYF059944; Mon, 30 Mar 2015 19:10:10 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2UJAA7t059943; Mon, 30 Mar 2015 19:10:10 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201503301910.t2UJAA7t059943@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 30 Mar 2015 19:10:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280862 - head/lib/libthr/arch/aarch64/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: Mon, 30 Mar 2015 19:10:10 -0000 Author: andrew Date: Mon Mar 30 19:10:09 2015 New Revision: 280862 URL: https://svnweb.freebsd.org/changeset/base/280862 Log: Add pthread_md.h for arm64. Differential Revision: https://reviews.freebsd.org/D2137 Reviewed by: kib Sponsored by: The FreeBSD Foundation Added: head/lib/libthr/arch/aarch64/include/ head/lib/libthr/arch/aarch64/include/pthread_md.h (contents, props changed) Added: head/lib/libthr/arch/aarch64/include/pthread_md.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libthr/arch/aarch64/include/pthread_md.h Mon Mar 30 19:10:09 2015 (r280862) @@ -0,0 +1,84 @@ +/*- + * Copyright (c) 2005 David Xu . + * Copyright (c) 2014 the FreeBSD Foundation + * All rights reserved. + * + * Portions of this software were developed by Andrew Turner + * under sponsorship from the FreeBSD Foundation + * + * 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. + * + * $FreeBSD$ + */ + +/* + * Machine-dependent thread prototypes/definitions. + */ +#ifndef _PTHREAD_MD_H_ +#define _PTHREAD_MD_H_ + +#include +#include +#include + +#define CPU_SPINWAIT +#define DTV_OFFSET offsetof(struct tcb, tcb_dtv) + +/* + * Variant I tcb. The structure layout is fixed, don't blindly + * change it. + */ +struct tcb { + void *tcb_dtv; + struct pthread *tcb_thread; +}; + +/* Called from the thread to set its private data. */ +static __inline void +_tcb_set(struct tcb *tcb) +{ + + __asm __volatile("msr tpidr_el0, %x0" :: "r" (tcb)); +} + +/* + * Get the current tcb. + */ +static __inline struct tcb * +_tcb_get(void) +{ + struct tcb *tcb; + + __asm __volatile("mrs %x0, tpidr_el0" : "=r" (tcb)); + return (tcb); +} + +extern struct pthread *_thr_initial; + +static __inline struct pthread * +_get_curthread(void) +{ + + return (_tcb_get()->tcb_thread); +} + +#endif /* _PTHREAD_MD_H_ */ From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 19:36:34 2015 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 60340C6E; Mon, 30 Mar 2015 19:36: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 3211E97C; Mon, 30 Mar 2015 19:36: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 t2UJaYle074051; Mon, 30 Mar 2015 19:36:34 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2UJaYHj074050; Mon, 30 Mar 2015 19:36:34 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201503301936.t2UJaYHj074050@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 30 Mar 2015 19:36:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280864 - head/contrib/libc++/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: Mon, 30 Mar 2015 19:36:34 -0000 Author: dim Date: Mon Mar 30 19:36:33 2015 New Revision: 280864 URL: https://svnweb.freebsd.org/changeset/base/280864 Log: Pull in r233552 from upstream libc++ trunk (by Eric Fiselier): [libcxx] Fix PR22771 - Support access control SFINAE in the library version of is_convertible. Summary: Currently the conversion check does not take place in a context where access control SFINAE is applied. This patch changes the context of the test expression so that SFINAE occurs if access control does not permit the conversion. Related bug: https://llvm.org/bugs/show_bug.cgi?id=22771 Reviewers: mclow.lists, rsmith, dim Reviewed By: dim Subscribers: dim, rodrigc, emaste, cfe-commits Differential Revision: http://reviews.llvm.org/D8461 This fixes building clang, and other programs using libc++, with newer versions of gcc (specifically, gcc 4.8 and higher). Reported by: rodrigc MFC after: 1 week Modified: head/contrib/libc++/include/type_traits Modified: head/contrib/libc++/include/type_traits ============================================================================== --- head/contrib/libc++/include/type_traits Mon Mar 30 19:15:43 2015 (r280863) +++ head/contrib/libc++/include/type_traits Mon Mar 30 19:36:33 2015 (r280864) @@ -842,7 +842,16 @@ template struct _ namespace __is_convertible_imp { -template char __test(_Tp); +template void __test_convert(_Tp); + +template +struct __is_convertible_test : public false_type {}; + +template +struct __is_convertible_test<_From, _To, + decltype(__test_convert<_To>(_VSTD::declval<_From>()))> : public true_type +{}; + template __two __test(...); #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template _Tp&& __source(); @@ -877,10 +886,8 @@ template ::value> struct __is_convertible : public integral_constant(__is_convertible_imp::__source<_T1>())) == 1 -#else - sizeof(__is_convertible_imp::__test<_T2>(__is_convertible_imp::__source<_T1>())) == 1 + __is_convertible_imp::__is_convertible_test<_T1, _T2>::value +#if defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !(!is_function<_T1>::value && !is_reference<_T1>::value && is_reference<_T2>::value && (!is_const::type>::value || is_volatile::type>::value) From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 20:01:45 2015 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 1245AB2E; Mon, 30 Mar 2015 20:01: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 F0923CAA; Mon, 30 Mar 2015 20:01: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 t2UK1ihs088151; Mon, 30 Mar 2015 20:01:44 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2UK1gse088144; Mon, 30 Mar 2015 20:01:42 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201503302001.t2UK1gse088144@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 30 Mar 2015 20:01:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280865 - in head/contrib/llvm/lib/Target/AArch64: . Utils 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, 30 Mar 2015 20:01:45 -0000 Author: emaste Date: Mon Mar 30 20:01:41 2015 New Revision: 280865 URL: https://svnweb.freebsd.org/changeset/base/280865 Log: llvm: Backport upstream r229195 to fix arm64 TLS relocations As is described at http://llvm.org/bugs/show_bug.cgi?id=22408, the GNU linkers ld.bfd and ld.gold currently only support a subset of the whole range of AArch64 ELF TLS relocations. Furthermore, they assume that some of the code sequences to access thread-local variables are produced in a very specific sequence. When the sequence is not as the linker expects, it can silently mis-relaxe/mis-optimize the instructions. Even if that wouldn't be the case, it's good to produce the exact sequence, as that ensures that linkers can perform optimizing relaxations. This patch: * implements support for 16MiB TLS area size instead of 4GiB TLS area size. Ideally clang would grow an -mtls-size option to allow support for both, but that's not part of this patch. * by default doesn't produce local dynamic access patterns, as even modern ld.bfd and ld.gold linkers do not support the associated relocations. An option (-aarch64-elf-ldtls-generation) is added to enable generation of local dynamic code sequence, but is off by default. * makes sure that the exact expected code sequence for local dynamic and general dynamic accesses is produced, by making use of a new pseudo instruction. The patch also removes two (AArch64ISD::TLSDESC_BLR, AArch64ISD::TLSDESC_CALL) pre-existing AArch64-specific pseudo SDNode instructions that are superseded by the new one (TLSDESC_CALLSEQ). Submitted by: Kristof Beyls Differential Revision: https://reviews.freebsd.org/D2175 Modified: head/contrib/llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp head/contrib/llvm/lib/Target/AArch64/AArch64CleanupLocalDynamicTLSPass.cpp head/contrib/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp head/contrib/llvm/lib/Target/AArch64/AArch64ISelLowering.h head/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.td head/contrib/llvm/lib/Target/AArch64/AArch64MCInstLower.cpp head/contrib/llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h Modified: head/contrib/llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp ============================================================================== --- head/contrib/llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp Mon Mar 30 19:36:33 2015 (r280864) +++ head/contrib/llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp Mon Mar 30 20:01:41 2015 (r280865) @@ -12,6 +12,8 @@ // //===----------------------------------------------------------------------===// +#include "MCTargetDesc/AArch64AddressingModes.h" +#include "MCTargetDesc/AArch64MCExpr.h" #include "AArch64.h" #include "AArch64MCInstLower.h" #include "AArch64MachineFunctionInfo.h" @@ -494,24 +496,57 @@ void AArch64AsmPrinter::EmitInstruction( EmitToStreamer(OutStreamer, TmpInst); return; } - case AArch64::TLSDESC_BLR: { - MCOperand Callee, Sym; - MCInstLowering.lowerOperand(MI->getOperand(0), Callee); - MCInstLowering.lowerOperand(MI->getOperand(1), Sym); + case AArch64::TLSDESC_CALLSEQ: { + /// lower this to: + /// adrp x0, :tlsdesc:var + /// ldr x1, [x0, #:tlsdesc_lo12:var] + /// add x0, x0, #:tlsdesc_lo12:var + /// .tlsdesccall var + /// blr x1 + /// (TPIDR_EL0 offset now in x0) + const MachineOperand &MO_Sym = MI->getOperand(0); + MachineOperand MO_TLSDESC_LO12(MO_Sym), MO_TLSDESC(MO_Sym); + MCOperand Sym, SymTLSDescLo12, SymTLSDesc; + MO_TLSDESC_LO12.setTargetFlags(AArch64II::MO_TLS | AArch64II::MO_PAGEOFF | + AArch64II::MO_NC); + MO_TLSDESC.setTargetFlags(AArch64II::MO_TLS | AArch64II::MO_PAGE); + MCInstLowering.lowerOperand(MO_Sym, Sym); + MCInstLowering.lowerOperand(MO_TLSDESC_LO12, SymTLSDescLo12); + MCInstLowering.lowerOperand(MO_TLSDESC, SymTLSDesc); + + MCInst Adrp; + Adrp.setOpcode(AArch64::ADRP); + Adrp.addOperand(MCOperand::CreateReg(AArch64::X0)); + Adrp.addOperand(SymTLSDesc); + EmitToStreamer(OutStreamer, Adrp); + + MCInst Ldr; + Ldr.setOpcode(AArch64::LDRXui); + Ldr.addOperand(MCOperand::CreateReg(AArch64::X1)); + Ldr.addOperand(MCOperand::CreateReg(AArch64::X0)); + Ldr.addOperand(SymTLSDescLo12); + Ldr.addOperand(MCOperand::CreateImm(0)); + EmitToStreamer(OutStreamer, Ldr); + + MCInst Add; + Add.setOpcode(AArch64::ADDXri); + Add.addOperand(MCOperand::CreateReg(AArch64::X0)); + Add.addOperand(MCOperand::CreateReg(AArch64::X0)); + Add.addOperand(SymTLSDescLo12); + Add.addOperand(MCOperand::CreateImm(AArch64_AM::getShiftValue(0))); + EmitToStreamer(OutStreamer, Add); - // First emit a relocation-annotation. This expands to no code, but requests + // Emit a relocation-annotation. This expands to no code, but requests // the following instruction gets an R_AARCH64_TLSDESC_CALL. MCInst TLSDescCall; TLSDescCall.setOpcode(AArch64::TLSDESCCALL); TLSDescCall.addOperand(Sym); EmitToStreamer(OutStreamer, TLSDescCall); - // Other than that it's just a normal indirect call to the function loaded - // from the descriptor. - MCInst BLR; - BLR.setOpcode(AArch64::BLR); - BLR.addOperand(Callee); - EmitToStreamer(OutStreamer, BLR); + MCInst Blr; + Blr.setOpcode(AArch64::BLR); + Blr.addOperand(MCOperand::CreateReg(AArch64::X1)); + EmitToStreamer(OutStreamer, Blr); return; } Modified: head/contrib/llvm/lib/Target/AArch64/AArch64CleanupLocalDynamicTLSPass.cpp ============================================================================== --- head/contrib/llvm/lib/Target/AArch64/AArch64CleanupLocalDynamicTLSPass.cpp Mon Mar 30 19:36:33 2015 (r280864) +++ head/contrib/llvm/lib/Target/AArch64/AArch64CleanupLocalDynamicTLSPass.cpp Mon Mar 30 20:01:41 2015 (r280865) @@ -62,10 +62,10 @@ struct LDTLSCleanup : public MachineFunc for (MachineBasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; ++I) { switch (I->getOpcode()) { - case AArch64::TLSDESC_BLR: + case AArch64::TLSDESC_CALLSEQ: // Make sure it's a local dynamic access. - if (!I->getOperand(1).isSymbol() || - strcmp(I->getOperand(1).getSymbolName(), "_TLS_MODULE_BASE_")) + if (!I->getOperand(0).isSymbol() || + strcmp(I->getOperand(0).getSymbolName(), "_TLS_MODULE_BASE_")) break; if (TLSBaseAddrReg) Modified: head/contrib/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp ============================================================================== --- head/contrib/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp Mon Mar 30 19:36:33 2015 (r280864) +++ head/contrib/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp Mon Mar 30 20:01:41 2015 (r280865) @@ -64,8 +64,16 @@ EnableAArch64ExtrGeneration("aarch64-ext static cl::opt EnableAArch64SlrGeneration("aarch64-shift-insert-generation", cl::Hidden, - cl::desc("Allow AArch64 SLI/SRI formation"), - cl::init(false)); + cl::desc("Allow AArch64 SLI/SRI formation"), + cl::init(false)); + +// FIXME: The necessary dtprel relocations don't seem to be supported +// well in the GNU bfd and gold linkers at the moment. Therefore, by +// default, for now, fall back to GeneralDynamic code generation. +cl::opt EnableAArch64ELFLocalDynamicTLSGeneration( + "aarch64-elf-ldtls-generation", cl::Hidden, + cl::desc("Allow AArch64 Local Dynamic TLS code generation"), + cl::init(false)); AArch64TargetLowering::AArch64TargetLowering(const TargetMachine &TM) @@ -760,7 +768,7 @@ const char *AArch64TargetLowering::getTa case AArch64ISD::CSNEG: return "AArch64ISD::CSNEG"; case AArch64ISD::CSINC: return "AArch64ISD::CSINC"; case AArch64ISD::THREAD_POINTER: return "AArch64ISD::THREAD_POINTER"; - case AArch64ISD::TLSDESC_CALL: return "AArch64ISD::TLSDESC_CALL"; + case AArch64ISD::TLSDESC_CALLSEQ: return "AArch64ISD::TLSDESC_CALLSEQ"; case AArch64ISD::ADC: return "AArch64ISD::ADC"; case AArch64ISD::SBC: return "AArch64ISD::SBC"; case AArch64ISD::ADDS: return "AArch64ISD::ADDS"; @@ -3049,61 +3057,34 @@ AArch64TargetLowering::LowerDarwinGlobal /// When accessing thread-local variables under either the general-dynamic or /// local-dynamic system, we make a "TLS-descriptor" call. The variable will /// have a descriptor, accessible via a PC-relative ADRP, and whose first entry -/// is a function pointer to carry out the resolution. This function takes the -/// address of the descriptor in X0 and returns the TPIDR_EL0 offset in X0. All -/// other registers (except LR, NZCV) are preserved. -/// -/// Thus, the ideal call sequence on AArch64 is: -/// -/// adrp x0, :tlsdesc:thread_var -/// ldr x8, [x0, :tlsdesc_lo12:thread_var] -/// add x0, x0, :tlsdesc_lo12:thread_var -/// .tlsdesccall thread_var -/// blr x8 -/// (TPIDR_EL0 offset now in x0). +/// is a function pointer to carry out the resolution. /// -/// The ".tlsdesccall" directive instructs the assembler to insert a particular -/// relocation to help the linker relax this sequence if it turns out to be too -/// conservative. +/// The sequence is: +/// adrp x0, :tlsdesc:var +/// ldr x1, [x0, #:tlsdesc_lo12:var] +/// add x0, x0, #:tlsdesc_lo12:var +/// .tlsdesccall var +/// blr x1 +/// (TPIDR_EL0 offset now in x0) /// -/// FIXME: we currently produce an extra, duplicated, ADRP instruction, but this -/// is harmless. -SDValue AArch64TargetLowering::LowerELFTLSDescCall(SDValue SymAddr, - SDValue DescAddr, SDLoc DL, - SelectionDAG &DAG) const { +/// The above sequence must be produced unscheduled, to enable the linker to +/// optimize/relax this sequence. +/// Therefore, a pseudo-instruction (TLSDESC_CALLSEQ) is used to represent the +/// above sequence, and expanded really late in the compilation flow, to ensure +/// the sequence is produced as per above. +SDValue AArch64TargetLowering::LowerELFTLSDescCallSeq(SDValue SymAddr, SDLoc DL, + SelectionDAG &DAG) const { EVT PtrVT = getPointerTy(); - // The function we need to call is simply the first entry in the GOT for this - // descriptor, load it in preparation. - SDValue Func = DAG.getNode(AArch64ISD::LOADgot, DL, PtrVT, SymAddr); - - // TLS calls preserve all registers except those that absolutely must be - // trashed: X0 (it takes an argument), LR (it's a call) and NZCV (let's not be - // silly). - const TargetRegisterInfo *TRI = - getTargetMachine().getSubtargetImpl()->getRegisterInfo(); - const AArch64RegisterInfo *ARI = - static_cast(TRI); - const uint32_t *Mask = ARI->getTLSCallPreservedMask(); - - // The function takes only one argument: the address of the descriptor itself - // in X0. - SDValue Glue, Chain; - Chain = DAG.getCopyToReg(DAG.getEntryNode(), DL, AArch64::X0, DescAddr, Glue); - Glue = Chain.getValue(1); + SDValue Chain = DAG.getEntryNode(); + SDVTList NodeTys = DAG.getVTList(MVT::Other, MVT::Glue); - // We're now ready to populate the argument list, as with a normal call: - SmallVector Ops; + SmallVector Ops; Ops.push_back(Chain); - Ops.push_back(Func); Ops.push_back(SymAddr); - Ops.push_back(DAG.getRegister(AArch64::X0, PtrVT)); - Ops.push_back(DAG.getRegisterMask(Mask)); - Ops.push_back(Glue); - SDVTList NodeTys = DAG.getVTList(MVT::Other, MVT::Glue); - Chain = DAG.getNode(AArch64ISD::TLSDESC_CALL, DL, NodeTys, Ops); - Glue = Chain.getValue(1); + Chain = DAG.getNode(AArch64ISD::TLSDESC_CALLSEQ, DL, NodeTys, Ops); + SDValue Glue = Chain.getValue(1); return DAG.getCopyFromReg(Chain, DL, AArch64::X0, PtrVT, Glue); } @@ -3114,9 +3095,18 @@ AArch64TargetLowering::LowerELFGlobalTLS assert(Subtarget->isTargetELF() && "This function expects an ELF target"); assert(getTargetMachine().getCodeModel() == CodeModel::Small && "ELF TLS only supported in small memory model"); + // Different choices can be made for the maximum size of the TLS area for a + // module. For the small address model, the default TLS size is 16MiB and the + // maximum TLS size is 4GiB. + // FIXME: add -mtls-size command line option and make it control the 16MiB + // vs. 4GiB code sequence generation. const GlobalAddressSDNode *GA = cast(Op); TLSModel::Model Model = getTargetMachine().getTLSModel(GA->getGlobal()); + if (!EnableAArch64ELFLocalDynamicTLSGeneration) { + if (Model == TLSModel::LocalDynamic) + Model = TLSModel::GeneralDynamic; + } SDValue TPOff; EVT PtrVT = getPointerTy(); @@ -3127,17 +3117,20 @@ AArch64TargetLowering::LowerELFGlobalTLS if (Model == TLSModel::LocalExec) { SDValue HiVar = DAG.getTargetGlobalAddress( - GV, DL, PtrVT, 0, AArch64II::MO_TLS | AArch64II::MO_G1); + GV, DL, PtrVT, 0, AArch64II::MO_TLS | AArch64II::MO_HI12); SDValue LoVar = DAG.getTargetGlobalAddress( GV, DL, PtrVT, 0, - AArch64II::MO_TLS | AArch64II::MO_G0 | AArch64II::MO_NC); + AArch64II::MO_TLS | AArch64II::MO_PAGEOFF | AArch64II::MO_NC); - TPOff = SDValue(DAG.getMachineNode(AArch64::MOVZXi, DL, PtrVT, HiVar, - DAG.getTargetConstant(16, MVT::i32)), - 0); - TPOff = SDValue(DAG.getMachineNode(AArch64::MOVKXi, DL, PtrVT, TPOff, LoVar, - DAG.getTargetConstant(0, MVT::i32)), - 0); + SDValue TPWithOff_lo = + SDValue(DAG.getMachineNode(AArch64::ADDXri, DL, PtrVT, ThreadBase, + HiVar, DAG.getTargetConstant(0, MVT::i32)), + 0); + SDValue TPWithOff = + SDValue(DAG.getMachineNode(AArch64::ADDXri, DL, PtrVT, TPWithOff_lo, + LoVar, DAG.getTargetConstant(0, MVT::i32)), + 0); + return TPWithOff; } else if (Model == TLSModel::InitialExec) { TPOff = DAG.getTargetGlobalAddress(GV, DL, PtrVT, 0, AArch64II::MO_TLS); TPOff = DAG.getNode(AArch64ISD::LOADgot, DL, PtrVT, TPOff); @@ -3152,19 +3145,6 @@ AArch64TargetLowering::LowerELFGlobalTLS DAG.getMachineFunction().getInfo(); MFI->incNumLocalDynamicTLSAccesses(); - // Accesses used in this sequence go via the TLS descriptor which lives in - // the GOT. Prepare an address we can use to handle this. - SDValue HiDesc = DAG.getTargetExternalSymbol( - "_TLS_MODULE_BASE_", PtrVT, AArch64II::MO_TLS | AArch64II::MO_PAGE); - SDValue LoDesc = DAG.getTargetExternalSymbol( - "_TLS_MODULE_BASE_", PtrVT, - AArch64II::MO_TLS | AArch64II::MO_PAGEOFF | AArch64II::MO_NC); - - // First argument to the descriptor call is the address of the descriptor - // itself. - SDValue DescAddr = DAG.getNode(AArch64ISD::ADRP, DL, PtrVT, HiDesc); - DescAddr = DAG.getNode(AArch64ISD::ADDlow, DL, PtrVT, DescAddr, LoDesc); - // The call needs a relocation too for linker relaxation. It doesn't make // sense to call it MO_PAGE or MO_PAGEOFF though so we need another copy of // the address. @@ -3173,40 +3153,23 @@ AArch64TargetLowering::LowerELFGlobalTLS // Now we can calculate the offset from TPIDR_EL0 to this module's // thread-local area. - TPOff = LowerELFTLSDescCall(SymAddr, DescAddr, DL, DAG); + TPOff = LowerELFTLSDescCallSeq(SymAddr, DL, DAG); // Now use :dtprel_whatever: operations to calculate this variable's offset // in its thread-storage area. SDValue HiVar = DAG.getTargetGlobalAddress( - GV, DL, MVT::i64, 0, AArch64II::MO_TLS | AArch64II::MO_G1); + GV, DL, MVT::i64, 0, AArch64II::MO_TLS | AArch64II::MO_HI12); SDValue LoVar = DAG.getTargetGlobalAddress( GV, DL, MVT::i64, 0, - AArch64II::MO_TLS | AArch64II::MO_G0 | AArch64II::MO_NC); - - SDValue DTPOff = - SDValue(DAG.getMachineNode(AArch64::MOVZXi, DL, PtrVT, HiVar, - DAG.getTargetConstant(16, MVT::i32)), - 0); - DTPOff = - SDValue(DAG.getMachineNode(AArch64::MOVKXi, DL, PtrVT, DTPOff, LoVar, - DAG.getTargetConstant(0, MVT::i32)), - 0); - - TPOff = DAG.getNode(ISD::ADD, DL, PtrVT, TPOff, DTPOff); - } else if (Model == TLSModel::GeneralDynamic) { - // Accesses used in this sequence go via the TLS descriptor which lives in - // the GOT. Prepare an address we can use to handle this. - SDValue HiDesc = DAG.getTargetGlobalAddress( - GV, DL, PtrVT, 0, AArch64II::MO_TLS | AArch64II::MO_PAGE); - SDValue LoDesc = DAG.getTargetGlobalAddress( - GV, DL, PtrVT, 0, AArch64II::MO_TLS | AArch64II::MO_PAGEOFF | AArch64II::MO_NC); - // First argument to the descriptor call is the address of the descriptor - // itself. - SDValue DescAddr = DAG.getNode(AArch64ISD::ADRP, DL, PtrVT, HiDesc); - DescAddr = DAG.getNode(AArch64ISD::ADDlow, DL, PtrVT, DescAddr, LoDesc); - + TPOff = SDValue(DAG.getMachineNode(AArch64::ADDXri, DL, PtrVT, TPOff, HiVar, + DAG.getTargetConstant(0, MVT::i32)), + 0); + TPOff = SDValue(DAG.getMachineNode(AArch64::ADDXri, DL, PtrVT, TPOff, LoVar, + DAG.getTargetConstant(0, MVT::i32)), + 0); + } else if (Model == TLSModel::GeneralDynamic) { // The call needs a relocation too for linker relaxation. It doesn't make // sense to call it MO_PAGE or MO_PAGEOFF though so we need another copy of // the address. @@ -3214,7 +3177,7 @@ AArch64TargetLowering::LowerELFGlobalTLS DAG.getTargetGlobalAddress(GV, DL, PtrVT, 0, AArch64II::MO_TLS); // Finally we can make a call to calculate the offset from tpidr_el0. - TPOff = LowerELFTLSDescCall(SymAddr, DescAddr, DL, DAG); + TPOff = LowerELFTLSDescCallSeq(SymAddr, DL, DAG); } else llvm_unreachable("Unsupported ELF TLS access model"); Modified: head/contrib/llvm/lib/Target/AArch64/AArch64ISelLowering.h ============================================================================== --- head/contrib/llvm/lib/Target/AArch64/AArch64ISelLowering.h Mon Mar 30 19:36:33 2015 (r280864) +++ head/contrib/llvm/lib/Target/AArch64/AArch64ISelLowering.h Mon Mar 30 20:01:41 2015 (r280865) @@ -29,9 +29,9 @@ enum { WrapperLarge, // 4-instruction MOVZ/MOVK sequence for 64-bit addresses. CALL, // Function call. - // Almost the same as a normal call node, except that a TLSDesc relocation is - // needed so the linker can relax it correctly if possible. - TLSDESC_CALL, + // Produces the full sequence of instructions for getting the thread pointer + // offset of a variable into X0, using the TLSDesc model. + TLSDESC_CALLSEQ, ADRP, // Page address of a TargetGlobalAddress operand. ADDlow, // Add the low 12 bits of a TargetGlobalAddress operand. LOADgot, // Load from automatically generated descriptor (e.g. Global @@ -399,8 +399,8 @@ private: SDValue LowerGlobalTLSAddress(SDValue Op, SelectionDAG &DAG) const; SDValue LowerDarwinGlobalTLSAddress(SDValue Op, SelectionDAG &DAG) const; SDValue LowerELFGlobalTLSAddress(SDValue Op, SelectionDAG &DAG) const; - SDValue LowerELFTLSDescCall(SDValue SymAddr, SDValue DescAddr, SDLoc DL, - SelectionDAG &DAG) const; + SDValue LowerELFTLSDescCallSeq(SDValue SymAddr, SDLoc DL, + SelectionDAG &DAG) const; SDValue LowerSETCC(SDValue Op, SelectionDAG &DAG) const; SDValue LowerBR_CC(SDValue Op, SelectionDAG &DAG) const; SDValue LowerSELECT(SDValue Op, SelectionDAG &DAG) const; Modified: head/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.td ============================================================================== --- head/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.td Mon Mar 30 19:36:33 2015 (r280864) +++ head/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.td Mon Mar 30 20:01:41 2015 (r280865) @@ -96,6 +96,19 @@ def SDT_AArch64ITOF : SDTypeProfile<1, def SDT_AArch64TLSDescCall : SDTypeProfile<0, -2, [SDTCisPtrTy<0>, SDTCisPtrTy<1>]>; + +// Generates the general dynamic sequences, i.e. +// adrp x0, :tlsdesc:var +// ldr x1, [x0, #:tlsdesc_lo12:var] +// add x0, x0, #:tlsdesc_lo12:var +// .tlsdesccall var +// blr x1 + +// (the TPIDR_EL0 offset is put directly in X0, hence no "result" here) +// number of operands (the variable) +def SDT_AArch64TLSDescCallSeq : SDTypeProfile<0,1, + [SDTCisPtrTy<0>]>; + def SDT_AArch64WrapperLarge : SDTypeProfile<1, 4, [SDTCisVT<0, i64>, SDTCisVT<1, i32>, SDTCisSameAs<1, 2>, SDTCisSameAs<1, 3>, @@ -229,10 +242,11 @@ def AArch64Prefetch : SDNode<"AAr def AArch64sitof: SDNode<"AArch64ISD::SITOF", SDT_AArch64ITOF>; def AArch64uitof: SDNode<"AArch64ISD::UITOF", SDT_AArch64ITOF>; -def AArch64tlsdesc_call : SDNode<"AArch64ISD::TLSDESC_CALL", - SDT_AArch64TLSDescCall, - [SDNPInGlue, SDNPOutGlue, SDNPHasChain, - SDNPVariadic]>; +def AArch64tlsdesc_callseq : SDNode<"AArch64ISD::TLSDESC_CALLSEQ", + SDT_AArch64TLSDescCallSeq, + [SDNPInGlue, SDNPOutGlue, SDNPHasChain, + SDNPVariadic]>; + def AArch64WrapperLarge : SDNode<"AArch64ISD::WrapperLarge", SDT_AArch64WrapperLarge>; @@ -1049,15 +1063,16 @@ def TLSDESCCALL : Pseudo<(outs), (ins i6 let AsmString = ".tlsdesccall $sym"; } -// Pseudo-instruction representing a BLR with attached TLSDESC relocation. It -// gets expanded to two MCInsts during lowering. -let isCall = 1, Defs = [LR] in -def TLSDESC_BLR - : Pseudo<(outs), (ins GPR64:$dest, i64imm:$sym), - [(AArch64tlsdesc_call GPR64:$dest, tglobaltlsaddr:$sym)]>; +// FIXME: maybe the scratch register used shouldn't be fixed to X1? +// FIXME: can "hasSideEffects be dropped? +let isCall = 1, Defs = [LR, X0, X1], hasSideEffects = 1, + isCodeGenOnly = 1 in +def TLSDESC_CALLSEQ + : Pseudo<(outs), (ins i64imm:$sym), + [(AArch64tlsdesc_callseq tglobaltlsaddr:$sym)]>; +def : Pat<(AArch64tlsdesc_callseq texternalsym:$sym), + (TLSDESC_CALLSEQ texternalsym:$sym)>; -def : Pat<(AArch64tlsdesc_call GPR64:$dest, texternalsym:$sym), - (TLSDESC_BLR GPR64:$dest, texternalsym:$sym)>; //===----------------------------------------------------------------------===// // Conditional branch (immediate) instruction. //===----------------------------------------------------------------------===// Modified: head/contrib/llvm/lib/Target/AArch64/AArch64MCInstLower.cpp ============================================================================== --- head/contrib/llvm/lib/Target/AArch64/AArch64MCInstLower.cpp Mon Mar 30 19:36:33 2015 (r280864) +++ head/contrib/llvm/lib/Target/AArch64/AArch64MCInstLower.cpp Mon Mar 30 20:01:41 2015 (r280865) @@ -22,9 +22,12 @@ #include "llvm/MC/MCExpr.h" #include "llvm/MC/MCInst.h" #include "llvm/Support/CodeGen.h" +#include "llvm/Support/CommandLine.h" #include "llvm/Target/TargetMachine.h" using namespace llvm; +extern cl::opt EnableAArch64ELFLocalDynamicTLSGeneration; + AArch64MCInstLower::AArch64MCInstLower(MCContext &ctx, AsmPrinter &printer) : Ctx(ctx), Printer(printer), TargetTriple(printer.getTargetTriple()) {} @@ -84,10 +87,16 @@ MCOperand AArch64MCInstLower::lowerSymbo if (MO.isGlobal()) { const GlobalValue *GV = MO.getGlobal(); Model = Printer.TM.getTLSModel(GV); + if (!EnableAArch64ELFLocalDynamicTLSGeneration && + Model == TLSModel::LocalDynamic) + Model = TLSModel::GeneralDynamic; + } else { assert(MO.isSymbol() && StringRef(MO.getSymbolName()) == "_TLS_MODULE_BASE_" && "unexpected external TLS symbol"); + // The general dynamic access sequence is used to get the + // address of _TLS_MODULE_BASE_. Model = TLSModel::GeneralDynamic; } switch (Model) { @@ -123,6 +132,8 @@ MCOperand AArch64MCInstLower::lowerSymbo RefFlags |= AArch64MCExpr::VK_G1; else if ((MO.getTargetFlags() & AArch64II::MO_FRAGMENT) == AArch64II::MO_G0) RefFlags |= AArch64MCExpr::VK_G0; + else if ((MO.getTargetFlags() & AArch64II::MO_FRAGMENT) == AArch64II::MO_HI12) + RefFlags |= AArch64MCExpr::VK_HI12; if (MO.getTargetFlags() & AArch64II::MO_NC) RefFlags |= AArch64MCExpr::VK_NC; Modified: head/contrib/llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h ============================================================================== --- head/contrib/llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h Mon Mar 30 19:36:33 2015 (r280864) +++ head/contrib/llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h Mon Mar 30 20:01:41 2015 (r280865) @@ -1229,7 +1229,7 @@ namespace AArch64II { MO_NO_FLAG, - MO_FRAGMENT = 0x7, + MO_FRAGMENT = 0xf, /// MO_PAGE - A symbol operand with this flag represents the pc-relative /// offset of the 4K page containing the symbol. This is used with the @@ -1257,26 +1257,31 @@ namespace AArch64II { /// 0-15 of a 64-bit address, used in a MOVZ or MOVK instruction MO_G0 = 6, + /// MO_HI12 - This flag indicates that a symbol operand represents the bits + /// 13-24 of a 64-bit address, used in a arithmetic immediate-shifted-left- + /// by-12-bits instruction. + MO_HI12 = 7, + /// MO_GOT - This flag indicates that a symbol operand represents the /// address of the GOT entry for the symbol, rather than the address of /// the symbol itself. - MO_GOT = 8, + MO_GOT = 0x10, /// MO_NC - Indicates whether the linker is expected to check the symbol /// reference for overflow. For example in an ADRP/ADD pair of relocations /// the ADRP usually does check, but not the ADD. - MO_NC = 0x10, + MO_NC = 0x20, /// MO_TLS - Indicates that the operand being accessed is some kind of /// thread-local symbol. On Darwin, only one type of thread-local access /// exists (pre linker-relaxation), but on ELF the TLSModel used for the /// referee will affect interpretation. - MO_TLS = 0x20, + MO_TLS = 0x40, /// MO_CONSTPOOL - This flag indicates that a symbol operand represents /// the address of a constant pool entry for the symbol, rather than the /// address of the symbol itself. - MO_CONSTPOOL = 0x40 + MO_CONSTPOOL = 0x80 }; } // end namespace AArch64II From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 20:13:24 2015 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 6FF4AE76; Mon, 30 Mar 2015 20:13: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 5BDA0E8B; Mon, 30 Mar 2015 20:13: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 t2UKDOZA093444; Mon, 30 Mar 2015 20:13:24 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2UKDNCo093442; Mon, 30 Mar 2015 20:13:23 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201503302013.t2UKDNCo093442@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 30 Mar 2015 20:13:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280866 - in head/sys: amd64/amd64 i386/i386 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2015 20:13:24 -0000 Author: jhb Date: Mon Mar 30 20:13:22 2015 New Revision: 280866 URL: https://svnweb.freebsd.org/changeset/base/280866 Log: Wait 100 microseconds for a local APIC to dispatch each startup-related IPI rather than 20. The MP 1.4 specification states in Appendix B.2: "A period of 20 microseconds should be sufficient for IPI dispatch to complete under normal operating conditions". (Note that this appears to be separate from the 10 millisecond (INIT) and 200 microsecond (STARTUP) waits after the IPIs are dispatched.) The Intel SDM is silent on this issue as far as I can tell. At least some hardware requires 60 microseconds as noted in the PR, so bump this to 100 to be on the safe side. PR: 197756 Reported by: zaphod@berentweb.com MFC after: 1 week Modified: head/sys/amd64/amd64/mp_machdep.c head/sys/i386/i386/mp_machdep.c Modified: head/sys/amd64/amd64/mp_machdep.c ============================================================================== --- head/sys/amd64/amd64/mp_machdep.c Mon Mar 30 20:01:41 2015 (r280865) +++ head/sys/amd64/amd64/mp_machdep.c Mon Mar 30 20:13:22 2015 (r280866) @@ -1084,7 +1084,7 @@ ipi_startup(int apic_id, int vector) */ lapic_ipi_raw(APIC_DEST_DESTFLD | APIC_TRIGMOD_LEVEL | APIC_LEVEL_ASSERT | APIC_DESTMODE_PHY | APIC_DELMODE_INIT, apic_id); - lapic_ipi_wait(20); + lapic_ipi_wait(100); /* Explicitly deassert the INIT IPI. */ lapic_ipi_raw(APIC_DEST_DESTFLD | APIC_TRIGMOD_LEVEL | @@ -1104,7 +1104,7 @@ ipi_startup(int apic_id, int vector) lapic_ipi_raw(APIC_DEST_DESTFLD | APIC_TRIGMOD_EDGE | APIC_LEVEL_ASSERT | APIC_DESTMODE_PHY | APIC_DELMODE_STARTUP | vector, apic_id); - if (!lapic_ipi_wait(20)) + if (!lapic_ipi_wait(100)) panic("Failed to deliver first STARTUP IPI to APIC %d", apic_id); DELAY(200); /* wait ~200uS */ @@ -1118,7 +1118,7 @@ ipi_startup(int apic_id, int vector) lapic_ipi_raw(APIC_DEST_DESTFLD | APIC_TRIGMOD_EDGE | APIC_LEVEL_ASSERT | APIC_DESTMODE_PHY | APIC_DELMODE_STARTUP | vector, apic_id); - if (!lapic_ipi_wait(20)) + if (!lapic_ipi_wait(100)) panic("Failed to deliver second STARTUP IPI to APIC %d", apic_id); Modified: head/sys/i386/i386/mp_machdep.c ============================================================================== --- head/sys/i386/i386/mp_machdep.c Mon Mar 30 20:01:41 2015 (r280865) +++ head/sys/i386/i386/mp_machdep.c Mon Mar 30 20:13:22 2015 (r280866) @@ -1157,7 +1157,7 @@ ipi_startup(int apic_id, int vector) */ lapic_ipi_raw(APIC_DEST_DESTFLD | APIC_TRIGMOD_LEVEL | APIC_LEVEL_ASSERT | APIC_DESTMODE_PHY | APIC_DELMODE_INIT, apic_id); - lapic_ipi_wait(20); + lapic_ipi_wait(100); /* Explicitly deassert the INIT IPI. */ lapic_ipi_raw(APIC_DEST_DESTFLD | APIC_TRIGMOD_LEVEL | @@ -1177,7 +1177,7 @@ ipi_startup(int apic_id, int vector) lapic_ipi_raw(APIC_DEST_DESTFLD | APIC_TRIGMOD_EDGE | APIC_LEVEL_ASSERT | APIC_DESTMODE_PHY | APIC_DELMODE_STARTUP | vector, apic_id); - if (!lapic_ipi_wait(20)) + if (!lapic_ipi_wait(100)) panic("Failed to deliver first STARTUP IPI to APIC %d", apic_id); DELAY(200); /* wait ~200uS */ @@ -1191,7 +1191,7 @@ ipi_startup(int apic_id, int vector) lapic_ipi_raw(APIC_DEST_DESTFLD | APIC_TRIGMOD_EDGE | APIC_LEVEL_ASSERT | APIC_DESTMODE_PHY | APIC_DELMODE_STARTUP | vector, apic_id); - if (!lapic_ipi_wait(20)) + if (!lapic_ipi_wait(100)) panic("Failed to deliver second STARTUP IPI to APIC %d", apic_id); From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 20:14:43 2015 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 84067A2; Mon, 30 Mar 2015 20:14:43 +0000 (UTC) Received: from tensor.andric.com (unknown [IPv6:2001:7b8:3a7:1:2d0:b7ff:fea0:8c26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4000EEA2; Mon, 30 Mar 2015 20:14:43 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7::44d3:b559:28ea:5f23] (unknown [IPv6:2001:7b8:3a7:0:44d3:b559:28ea:5f23]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 51C4E5C2E; Mon, 30 Mar 2015 22:14:40 +0200 (CEST) Subject: Re: svn commit: r280865 - in head/contrib/llvm/lib/Target/AArch64: . Utils Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Content-Type: multipart/signed; boundary="Apple-Mail=_E4D5C259-2478-4CDD-AEE3-C947D6AC36CA"; protocol="application/pgp-signature"; micalg=pgp-sha1 X-Pgp-Agent: GPGMail 2.5b6 From: Dimitry Andric In-Reply-To: <201503302001.t2UK1gse088144@svn.freebsd.org> Date: Mon, 30 Mar 2015 22:14:29 +0200 Message-Id: References: <201503302001.t2UK1gse088144@svn.freebsd.org> To: Ed Maste X-Mailer: Apple Mail (2.2070.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, 30 Mar 2015 20:14:43 -0000 --Apple-Mail=_E4D5C259-2478-4CDD-AEE3-C947D6AC36CA Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii On 30 Mar 2015, at 22:01, Ed Maste wrote: > > Author: emaste > Date: Mon Mar 30 20:01:41 2015 > New Revision: 280865 > URL: https://svnweb.freebsd.org/changeset/base/280865 > > Log: > llvm: Backport upstream r229195 to fix arm64 TLS relocations Actually, this was upstream r231227: http://llvm.org/viewvc/llvm-project?view=revision&revision=231227 Upstream r229195 was only a temporary workaround so llvm.org's clang-native-aarch64-full buildbot would not keep failing, and it got reverted after r231227 went in. -Dimitry --Apple-Mail=_E4D5C259-2478-4CDD-AEE3-C947D6AC36CA 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.27 iEYEARECAAYFAlUZrq0ACgkQsF6jCi4glqNLzgCg1pq+GFTxfuzKsP3yXI02lX15 LDUAn0qOacNN4xycut7TvOvjB83B6EKR =6uxo -----END PGP SIGNATURE----- --Apple-Mail=_E4D5C259-2478-4CDD-AEE3-C947D6AC36CA-- From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 20:23:07 2015 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 5ED864A4; Mon, 30 Mar 2015 20:23: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 4932EFDF; Mon, 30 Mar 2015 20:23: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 t2UKN7Ym098118; Mon, 30 Mar 2015 20:23:07 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2UKN7hG098117; Mon, 30 Mar 2015 20:23:07 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201503302023.t2UKN7hG098117@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 30 Mar 2015 20:23:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280867 - head/contrib/llvm/patches 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, 30 Mar 2015 20:23:07 -0000 Author: dim Date: Mon Mar 30 20:23:06 2015 New Revision: 280867 URL: https://svnweb.freebsd.org/changeset/base/280867 Log: Add llvm patch corresponding to r280865. Added: head/contrib/llvm/patches/patch-11-llvm-r231227-aarch64-tls-relocs.diff Added: head/contrib/llvm/patches/patch-11-llvm-r231227-aarch64-tls-relocs.diff ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/llvm/patches/patch-11-llvm-r231227-aarch64-tls-relocs.diff Mon Mar 30 20:23:06 2015 (r280867) @@ -0,0 +1,811 @@ +Pull in r231227 from upstream llvm trunk (by Kristof Beyls): + + Fix PR22408 - LLVM producing AArch64 TLS relocations that GNU linkers + cannot handle yet. + + As is described at http://llvm.org/bugs/show_bug.cgi?id=22408, the + GNU linkers ld.bfd and ld.gold currently only support a subset of the + whole range of AArch64 ELF TLS relocations. Furthermore, they assume + that some of the code sequences to access thread-local variables are + produced in a very specific sequence. When the sequence is not as the + linker expects, it can silently mis-relaxe/mis-optimize the + instructions. + Even if that wouldn't be the case, it's good to produce the exact + sequence, as that ensures that linkers can perform optimizing + relaxations. + + This patch: + + * implements support for 16MiB TLS area size instead of 4GiB TLS area + size. Ideally clang would grow an -mtls-size option to allow + support for both, but that's not part of this patch. + * by default doesn't produce local dynamic access patterns, as even + modern ld.bfd and ld.gold linkers do not support the associated + relocations. An option (-aarch64-elf-ldtls-generation) is added to + enable generation of local dynamic code sequence, but is off by + default. + * makes sure that the exact expected code sequence for local dynamic + and general dynamic accesses is produced, by making use of a new + pseudo instruction. The patch also removes two + (AArch64ISD::TLSDESC_BLR, AArch64ISD::TLSDESC_CALL) pre-existing + AArch64-specific pseudo SDNode instructions that are superseded by + the new one (TLSDESC_CALLSEQ). + +Introduced here: https://svnweb.freebsd.org/changeset/base/280865 + +Index: lib/Target/AArch64/AArch64AsmPrinter.cpp +=================================================================== +--- lib/Target/AArch64/AArch64AsmPrinter.cpp ++++ lib/Target/AArch64/AArch64AsmPrinter.cpp +@@ -12,6 +12,8 @@ + // + //===----------------------------------------------------------------------===// + ++#include "MCTargetDesc/AArch64AddressingModes.h" ++#include "MCTargetDesc/AArch64MCExpr.h" + #include "AArch64.h" + #include "AArch64MCInstLower.h" + #include "AArch64MachineFunctionInfo.h" +@@ -494,12 +496,47 @@ void AArch64AsmPrinter::EmitInstruction(const Mach + EmitToStreamer(OutStreamer, TmpInst); + return; + } +- case AArch64::TLSDESC_BLR: { +- MCOperand Callee, Sym; +- MCInstLowering.lowerOperand(MI->getOperand(0), Callee); +- MCInstLowering.lowerOperand(MI->getOperand(1), Sym); ++ case AArch64::TLSDESC_CALLSEQ: { ++ /// lower this to: ++ /// adrp x0, :tlsdesc:var ++ /// ldr x1, [x0, #:tlsdesc_lo12:var] ++ /// add x0, x0, #:tlsdesc_lo12:var ++ /// .tlsdesccall var ++ /// blr x1 ++ /// (TPIDR_EL0 offset now in x0) ++ const MachineOperand &MO_Sym = MI->getOperand(0); ++ MachineOperand MO_TLSDESC_LO12(MO_Sym), MO_TLSDESC(MO_Sym); ++ MCOperand Sym, SymTLSDescLo12, SymTLSDesc; ++ MO_TLSDESC_LO12.setTargetFlags(AArch64II::MO_TLS | AArch64II::MO_PAGEOFF | ++ AArch64II::MO_NC); ++ MO_TLSDESC.setTargetFlags(AArch64II::MO_TLS | AArch64II::MO_PAGE); ++ MCInstLowering.lowerOperand(MO_Sym, Sym); ++ MCInstLowering.lowerOperand(MO_TLSDESC_LO12, SymTLSDescLo12); ++ MCInstLowering.lowerOperand(MO_TLSDESC, SymTLSDesc); + +- // First emit a relocation-annotation. This expands to no code, but requests ++ MCInst Adrp; ++ Adrp.setOpcode(AArch64::ADRP); ++ Adrp.addOperand(MCOperand::CreateReg(AArch64::X0)); ++ Adrp.addOperand(SymTLSDesc); ++ EmitToStreamer(OutStreamer, Adrp); ++ ++ MCInst Ldr; ++ Ldr.setOpcode(AArch64::LDRXui); ++ Ldr.addOperand(MCOperand::CreateReg(AArch64::X1)); ++ Ldr.addOperand(MCOperand::CreateReg(AArch64::X0)); ++ Ldr.addOperand(SymTLSDescLo12); ++ Ldr.addOperand(MCOperand::CreateImm(0)); ++ EmitToStreamer(OutStreamer, Ldr); ++ ++ MCInst Add; ++ Add.setOpcode(AArch64::ADDXri); ++ Add.addOperand(MCOperand::CreateReg(AArch64::X0)); ++ Add.addOperand(MCOperand::CreateReg(AArch64::X0)); ++ Add.addOperand(SymTLSDescLo12); ++ Add.addOperand(MCOperand::CreateImm(AArch64_AM::getShiftValue(0))); ++ EmitToStreamer(OutStreamer, Add); ++ ++ // Emit a relocation-annotation. This expands to no code, but requests + // the following instruction gets an R_AARCH64_TLSDESC_CALL. + MCInst TLSDescCall; + TLSDescCall.setOpcode(AArch64::TLSDESCCALL); +@@ -506,12 +543,10 @@ void AArch64AsmPrinter::EmitInstruction(const Mach + TLSDescCall.addOperand(Sym); + EmitToStreamer(OutStreamer, TLSDescCall); + +- // Other than that it's just a normal indirect call to the function loaded +- // from the descriptor. +- MCInst BLR; +- BLR.setOpcode(AArch64::BLR); +- BLR.addOperand(Callee); +- EmitToStreamer(OutStreamer, BLR); ++ MCInst Blr; ++ Blr.setOpcode(AArch64::BLR); ++ Blr.addOperand(MCOperand::CreateReg(AArch64::X1)); ++ EmitToStreamer(OutStreamer, Blr); + + return; + } +Index: lib/Target/AArch64/AArch64CleanupLocalDynamicTLSPass.cpp +=================================================================== +--- lib/Target/AArch64/AArch64CleanupLocalDynamicTLSPass.cpp ++++ lib/Target/AArch64/AArch64CleanupLocalDynamicTLSPass.cpp +@@ -62,10 +62,10 @@ struct LDTLSCleanup : public MachineFunctionPass { + for (MachineBasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; + ++I) { + switch (I->getOpcode()) { +- case AArch64::TLSDESC_BLR: ++ case AArch64::TLSDESC_CALLSEQ: + // Make sure it's a local dynamic access. +- if (!I->getOperand(1).isSymbol() || +- strcmp(I->getOperand(1).getSymbolName(), "_TLS_MODULE_BASE_")) ++ if (!I->getOperand(0).isSymbol() || ++ strcmp(I->getOperand(0).getSymbolName(), "_TLS_MODULE_BASE_")) + break; + + if (TLSBaseAddrReg) +Index: lib/Target/AArch64/AArch64ISelLowering.cpp +=================================================================== +--- lib/Target/AArch64/AArch64ISelLowering.cpp ++++ lib/Target/AArch64/AArch64ISelLowering.cpp +@@ -64,10 +64,18 @@ EnableAArch64ExtrGeneration("aarch64-extr-generati + + static cl::opt + EnableAArch64SlrGeneration("aarch64-shift-insert-generation", cl::Hidden, +- cl::desc("Allow AArch64 SLI/SRI formation"), +- cl::init(false)); ++ cl::desc("Allow AArch64 SLI/SRI formation"), ++ cl::init(false)); + ++// FIXME: The necessary dtprel relocations don't seem to be supported ++// well in the GNU bfd and gold linkers at the moment. Therefore, by ++// default, for now, fall back to GeneralDynamic code generation. ++cl::opt EnableAArch64ELFLocalDynamicTLSGeneration( ++ "aarch64-elf-ldtls-generation", cl::Hidden, ++ cl::desc("Allow AArch64 Local Dynamic TLS code generation"), ++ cl::init(false)); + ++ + AArch64TargetLowering::AArch64TargetLowering(const TargetMachine &TM) + : TargetLowering(TM) { + Subtarget = &TM.getSubtarget(); +@@ -760,7 +768,7 @@ const char *AArch64TargetLowering::getTargetNodeNa + case AArch64ISD::CSNEG: return "AArch64ISD::CSNEG"; + case AArch64ISD::CSINC: return "AArch64ISD::CSINC"; + case AArch64ISD::THREAD_POINTER: return "AArch64ISD::THREAD_POINTER"; +- case AArch64ISD::TLSDESC_CALL: return "AArch64ISD::TLSDESC_CALL"; ++ case AArch64ISD::TLSDESC_CALLSEQ: return "AArch64ISD::TLSDESC_CALLSEQ"; + case AArch64ISD::ADC: return "AArch64ISD::ADC"; + case AArch64ISD::SBC: return "AArch64ISD::SBC"; + case AArch64ISD::ADDS: return "AArch64ISD::ADDS"; +@@ -3049,61 +3057,34 @@ AArch64TargetLowering::LowerDarwinGlobalTLSAddress + /// When accessing thread-local variables under either the general-dynamic or + /// local-dynamic system, we make a "TLS-descriptor" call. The variable will + /// have a descriptor, accessible via a PC-relative ADRP, and whose first entry +-/// is a function pointer to carry out the resolution. This function takes the +-/// address of the descriptor in X0 and returns the TPIDR_EL0 offset in X0. All +-/// other registers (except LR, NZCV) are preserved. ++/// is a function pointer to carry out the resolution. + /// +-/// Thus, the ideal call sequence on AArch64 is: ++/// The sequence is: ++/// adrp x0, :tlsdesc:var ++/// ldr x1, [x0, #:tlsdesc_lo12:var] ++/// add x0, x0, #:tlsdesc_lo12:var ++/// .tlsdesccall var ++/// blr x1 ++/// (TPIDR_EL0 offset now in x0) + /// +-/// adrp x0, :tlsdesc:thread_var +-/// ldr x8, [x0, :tlsdesc_lo12:thread_var] +-/// add x0, x0, :tlsdesc_lo12:thread_var +-/// .tlsdesccall thread_var +-/// blr x8 +-/// (TPIDR_EL0 offset now in x0). +-/// +-/// The ".tlsdesccall" directive instructs the assembler to insert a particular +-/// relocation to help the linker relax this sequence if it turns out to be too +-/// conservative. +-/// +-/// FIXME: we currently produce an extra, duplicated, ADRP instruction, but this +-/// is harmless. +-SDValue AArch64TargetLowering::LowerELFTLSDescCall(SDValue SymAddr, +- SDValue DescAddr, SDLoc DL, +- SelectionDAG &DAG) const { ++/// The above sequence must be produced unscheduled, to enable the linker to ++/// optimize/relax this sequence. ++/// Therefore, a pseudo-instruction (TLSDESC_CALLSEQ) is used to represent the ++/// above sequence, and expanded really late in the compilation flow, to ensure ++/// the sequence is produced as per above. ++SDValue AArch64TargetLowering::LowerELFTLSDescCallSeq(SDValue SymAddr, SDLoc DL, ++ SelectionDAG &DAG) const { + EVT PtrVT = getPointerTy(); + +- // The function we need to call is simply the first entry in the GOT for this +- // descriptor, load it in preparation. +- SDValue Func = DAG.getNode(AArch64ISD::LOADgot, DL, PtrVT, SymAddr); ++ SDValue Chain = DAG.getEntryNode(); ++ SDVTList NodeTys = DAG.getVTList(MVT::Other, MVT::Glue); + +- // TLS calls preserve all registers except those that absolutely must be +- // trashed: X0 (it takes an argument), LR (it's a call) and NZCV (let's not be +- // silly). +- const TargetRegisterInfo *TRI = +- getTargetMachine().getSubtargetImpl()->getRegisterInfo(); +- const AArch64RegisterInfo *ARI = +- static_cast(TRI); +- const uint32_t *Mask = ARI->getTLSCallPreservedMask(); +- +- // The function takes only one argument: the address of the descriptor itself +- // in X0. +- SDValue Glue, Chain; +- Chain = DAG.getCopyToReg(DAG.getEntryNode(), DL, AArch64::X0, DescAddr, Glue); +- Glue = Chain.getValue(1); +- +- // We're now ready to populate the argument list, as with a normal call: +- SmallVector Ops; ++ SmallVector Ops; + Ops.push_back(Chain); +- Ops.push_back(Func); + Ops.push_back(SymAddr); +- Ops.push_back(DAG.getRegister(AArch64::X0, PtrVT)); +- Ops.push_back(DAG.getRegisterMask(Mask)); +- Ops.push_back(Glue); + +- SDVTList NodeTys = DAG.getVTList(MVT::Other, MVT::Glue); +- Chain = DAG.getNode(AArch64ISD::TLSDESC_CALL, DL, NodeTys, Ops); +- Glue = Chain.getValue(1); ++ Chain = DAG.getNode(AArch64ISD::TLSDESC_CALLSEQ, DL, NodeTys, Ops); ++ SDValue Glue = Chain.getValue(1); + + return DAG.getCopyFromReg(Chain, DL, AArch64::X0, PtrVT, Glue); + } +@@ -3114,9 +3095,18 @@ AArch64TargetLowering::LowerELFGlobalTLSAddress(SD + assert(Subtarget->isTargetELF() && "This function expects an ELF target"); + assert(getTargetMachine().getCodeModel() == CodeModel::Small && + "ELF TLS only supported in small memory model"); ++ // Different choices can be made for the maximum size of the TLS area for a ++ // module. For the small address model, the default TLS size is 16MiB and the ++ // maximum TLS size is 4GiB. ++ // FIXME: add -mtls-size command line option and make it control the 16MiB ++ // vs. 4GiB code sequence generation. + const GlobalAddressSDNode *GA = cast(Op); + + TLSModel::Model Model = getTargetMachine().getTLSModel(GA->getGlobal()); ++ if (!EnableAArch64ELFLocalDynamicTLSGeneration) { ++ if (Model == TLSModel::LocalDynamic) ++ Model = TLSModel::GeneralDynamic; ++ } + + SDValue TPOff; + EVT PtrVT = getPointerTy(); +@@ -3127,17 +3117,20 @@ AArch64TargetLowering::LowerELFGlobalTLSAddress(SD + + if (Model == TLSModel::LocalExec) { + SDValue HiVar = DAG.getTargetGlobalAddress( +- GV, DL, PtrVT, 0, AArch64II::MO_TLS | AArch64II::MO_G1); ++ GV, DL, PtrVT, 0, AArch64II::MO_TLS | AArch64II::MO_HI12); + SDValue LoVar = DAG.getTargetGlobalAddress( + GV, DL, PtrVT, 0, +- AArch64II::MO_TLS | AArch64II::MO_G0 | AArch64II::MO_NC); ++ AArch64II::MO_TLS | AArch64II::MO_PAGEOFF | AArch64II::MO_NC); + +- TPOff = SDValue(DAG.getMachineNode(AArch64::MOVZXi, DL, PtrVT, HiVar, +- DAG.getTargetConstant(16, MVT::i32)), +- 0); +- TPOff = SDValue(DAG.getMachineNode(AArch64::MOVKXi, DL, PtrVT, TPOff, LoVar, +- DAG.getTargetConstant(0, MVT::i32)), +- 0); ++ SDValue TPWithOff_lo = ++ SDValue(DAG.getMachineNode(AArch64::ADDXri, DL, PtrVT, ThreadBase, ++ HiVar, DAG.getTargetConstant(0, MVT::i32)), ++ 0); ++ SDValue TPWithOff = ++ SDValue(DAG.getMachineNode(AArch64::ADDXri, DL, PtrVT, TPWithOff_lo, ++ LoVar, DAG.getTargetConstant(0, MVT::i32)), ++ 0); ++ return TPWithOff; + } else if (Model == TLSModel::InitialExec) { + TPOff = DAG.getTargetGlobalAddress(GV, DL, PtrVT, 0, AArch64II::MO_TLS); + TPOff = DAG.getNode(AArch64ISD::LOADgot, DL, PtrVT, TPOff); +@@ -3152,19 +3145,6 @@ AArch64TargetLowering::LowerELFGlobalTLSAddress(SD + DAG.getMachineFunction().getInfo(); + MFI->incNumLocalDynamicTLSAccesses(); + +- // Accesses used in this sequence go via the TLS descriptor which lives in +- // the GOT. Prepare an address we can use to handle this. +- SDValue HiDesc = DAG.getTargetExternalSymbol( +- "_TLS_MODULE_BASE_", PtrVT, AArch64II::MO_TLS | AArch64II::MO_PAGE); +- SDValue LoDesc = DAG.getTargetExternalSymbol( +- "_TLS_MODULE_BASE_", PtrVT, +- AArch64II::MO_TLS | AArch64II::MO_PAGEOFF | AArch64II::MO_NC); +- +- // First argument to the descriptor call is the address of the descriptor +- // itself. +- SDValue DescAddr = DAG.getNode(AArch64ISD::ADRP, DL, PtrVT, HiDesc); +- DescAddr = DAG.getNode(AArch64ISD::ADDlow, DL, PtrVT, DescAddr, LoDesc); +- + // The call needs a relocation too for linker relaxation. It doesn't make + // sense to call it MO_PAGE or MO_PAGEOFF though so we need another copy of + // the address. +@@ -3173,40 +3153,23 @@ AArch64TargetLowering::LowerELFGlobalTLSAddress(SD + + // Now we can calculate the offset from TPIDR_EL0 to this module's + // thread-local area. +- TPOff = LowerELFTLSDescCall(SymAddr, DescAddr, DL, DAG); ++ TPOff = LowerELFTLSDescCallSeq(SymAddr, DL, DAG); + + // Now use :dtprel_whatever: operations to calculate this variable's offset + // in its thread-storage area. + SDValue HiVar = DAG.getTargetGlobalAddress( +- GV, DL, MVT::i64, 0, AArch64II::MO_TLS | AArch64II::MO_G1); ++ GV, DL, MVT::i64, 0, AArch64II::MO_TLS | AArch64II::MO_HI12); + SDValue LoVar = DAG.getTargetGlobalAddress( + GV, DL, MVT::i64, 0, +- AArch64II::MO_TLS | AArch64II::MO_G0 | AArch64II::MO_NC); ++ AArch64II::MO_TLS | AArch64II::MO_PAGEOFF | AArch64II::MO_NC); + +- SDValue DTPOff = +- SDValue(DAG.getMachineNode(AArch64::MOVZXi, DL, PtrVT, HiVar, +- DAG.getTargetConstant(16, MVT::i32)), +- 0); +- DTPOff = +- SDValue(DAG.getMachineNode(AArch64::MOVKXi, DL, PtrVT, DTPOff, LoVar, +- DAG.getTargetConstant(0, MVT::i32)), +- 0); +- +- TPOff = DAG.getNode(ISD::ADD, DL, PtrVT, TPOff, DTPOff); ++ TPOff = SDValue(DAG.getMachineNode(AArch64::ADDXri, DL, PtrVT, TPOff, HiVar, ++ DAG.getTargetConstant(0, MVT::i32)), ++ 0); ++ TPOff = SDValue(DAG.getMachineNode(AArch64::ADDXri, DL, PtrVT, TPOff, LoVar, ++ DAG.getTargetConstant(0, MVT::i32)), ++ 0); + } else if (Model == TLSModel::GeneralDynamic) { +- // Accesses used in this sequence go via the TLS descriptor which lives in +- // the GOT. Prepare an address we can use to handle this. +- SDValue HiDesc = DAG.getTargetGlobalAddress( +- GV, DL, PtrVT, 0, AArch64II::MO_TLS | AArch64II::MO_PAGE); +- SDValue LoDesc = DAG.getTargetGlobalAddress( +- GV, DL, PtrVT, 0, +- AArch64II::MO_TLS | AArch64II::MO_PAGEOFF | AArch64II::MO_NC); +- +- // First argument to the descriptor call is the address of the descriptor +- // itself. +- SDValue DescAddr = DAG.getNode(AArch64ISD::ADRP, DL, PtrVT, HiDesc); +- DescAddr = DAG.getNode(AArch64ISD::ADDlow, DL, PtrVT, DescAddr, LoDesc); +- + // The call needs a relocation too for linker relaxation. It doesn't make + // sense to call it MO_PAGE or MO_PAGEOFF though so we need another copy of + // the address. +@@ -3214,7 +3177,7 @@ AArch64TargetLowering::LowerELFGlobalTLSAddress(SD + DAG.getTargetGlobalAddress(GV, DL, PtrVT, 0, AArch64II::MO_TLS); + + // Finally we can make a call to calculate the offset from tpidr_el0. +- TPOff = LowerELFTLSDescCall(SymAddr, DescAddr, DL, DAG); ++ TPOff = LowerELFTLSDescCallSeq(SymAddr, DL, DAG); + } else + llvm_unreachable("Unsupported ELF TLS access model"); + +Index: lib/Target/AArch64/AArch64ISelLowering.h +=================================================================== +--- lib/Target/AArch64/AArch64ISelLowering.h ++++ lib/Target/AArch64/AArch64ISelLowering.h +@@ -29,9 +29,9 @@ enum { + WrapperLarge, // 4-instruction MOVZ/MOVK sequence for 64-bit addresses. + CALL, // Function call. + +- // Almost the same as a normal call node, except that a TLSDesc relocation is +- // needed so the linker can relax it correctly if possible. +- TLSDESC_CALL, ++ // Produces the full sequence of instructions for getting the thread pointer ++ // offset of a variable into X0, using the TLSDesc model. ++ TLSDESC_CALLSEQ, + ADRP, // Page address of a TargetGlobalAddress operand. + ADDlow, // Add the low 12 bits of a TargetGlobalAddress operand. + LOADgot, // Load from automatically generated descriptor (e.g. Global +@@ -399,8 +399,8 @@ class AArch64TargetLowering : public TargetLowerin + SDValue LowerGlobalTLSAddress(SDValue Op, SelectionDAG &DAG) const; + SDValue LowerDarwinGlobalTLSAddress(SDValue Op, SelectionDAG &DAG) const; + SDValue LowerELFGlobalTLSAddress(SDValue Op, SelectionDAG &DAG) const; +- SDValue LowerELFTLSDescCall(SDValue SymAddr, SDValue DescAddr, SDLoc DL, +- SelectionDAG &DAG) const; ++ SDValue LowerELFTLSDescCallSeq(SDValue SymAddr, SDLoc DL, ++ SelectionDAG &DAG) const; + SDValue LowerSETCC(SDValue Op, SelectionDAG &DAG) const; + SDValue LowerBR_CC(SDValue Op, SelectionDAG &DAG) const; + SDValue LowerSELECT(SDValue Op, SelectionDAG &DAG) const; +Index: lib/Target/AArch64/AArch64InstrInfo.td +=================================================================== +--- lib/Target/AArch64/AArch64InstrInfo.td ++++ lib/Target/AArch64/AArch64InstrInfo.td +@@ -96,6 +96,19 @@ def SDT_AArch64ITOF : SDTypeProfile<1, 1, [SDTCis + + def SDT_AArch64TLSDescCall : SDTypeProfile<0, -2, [SDTCisPtrTy<0>, + SDTCisPtrTy<1>]>; ++ ++// Generates the general dynamic sequences, i.e. ++// adrp x0, :tlsdesc:var ++// ldr x1, [x0, #:tlsdesc_lo12:var] ++// add x0, x0, #:tlsdesc_lo12:var ++// .tlsdesccall var ++// blr x1 ++ ++// (the TPIDR_EL0 offset is put directly in X0, hence no "result" here) ++// number of operands (the variable) ++def SDT_AArch64TLSDescCallSeq : SDTypeProfile<0,1, ++ [SDTCisPtrTy<0>]>; ++ + def SDT_AArch64WrapperLarge : SDTypeProfile<1, 4, + [SDTCisVT<0, i64>, SDTCisVT<1, i32>, + SDTCisSameAs<1, 2>, SDTCisSameAs<1, 3>, +@@ -229,11 +242,12 @@ def AArch64Prefetch : SDNode<"AArch64ISD::P + def AArch64sitof: SDNode<"AArch64ISD::SITOF", SDT_AArch64ITOF>; + def AArch64uitof: SDNode<"AArch64ISD::UITOF", SDT_AArch64ITOF>; + +-def AArch64tlsdesc_call : SDNode<"AArch64ISD::TLSDESC_CALL", +- SDT_AArch64TLSDescCall, +- [SDNPInGlue, SDNPOutGlue, SDNPHasChain, +- SDNPVariadic]>; ++def AArch64tlsdesc_callseq : SDNode<"AArch64ISD::TLSDESC_CALLSEQ", ++ SDT_AArch64TLSDescCallSeq, ++ [SDNPInGlue, SDNPOutGlue, SDNPHasChain, ++ SDNPVariadic]>; + ++ + def AArch64WrapperLarge : SDNode<"AArch64ISD::WrapperLarge", + SDT_AArch64WrapperLarge>; + +@@ -1049,15 +1063,16 @@ def TLSDESCCALL : Pseudo<(outs), (ins i64imm:$sym) + let AsmString = ".tlsdesccall $sym"; + } + +-// Pseudo-instruction representing a BLR with attached TLSDESC relocation. It +-// gets expanded to two MCInsts during lowering. +-let isCall = 1, Defs = [LR] in +-def TLSDESC_BLR +- : Pseudo<(outs), (ins GPR64:$dest, i64imm:$sym), +- [(AArch64tlsdesc_call GPR64:$dest, tglobaltlsaddr:$sym)]>; ++// FIXME: maybe the scratch register used shouldn't be fixed to X1? ++// FIXME: can "hasSideEffects be dropped? ++let isCall = 1, Defs = [LR, X0, X1], hasSideEffects = 1, ++ isCodeGenOnly = 1 in ++def TLSDESC_CALLSEQ ++ : Pseudo<(outs), (ins i64imm:$sym), ++ [(AArch64tlsdesc_callseq tglobaltlsaddr:$sym)]>; ++def : Pat<(AArch64tlsdesc_callseq texternalsym:$sym), ++ (TLSDESC_CALLSEQ texternalsym:$sym)>; + +-def : Pat<(AArch64tlsdesc_call GPR64:$dest, texternalsym:$sym), +- (TLSDESC_BLR GPR64:$dest, texternalsym:$sym)>; + //===----------------------------------------------------------------------===// + // Conditional branch (immediate) instruction. + //===----------------------------------------------------------------------===// +Index: lib/Target/AArch64/AArch64MCInstLower.cpp +=================================================================== +--- lib/Target/AArch64/AArch64MCInstLower.cpp ++++ lib/Target/AArch64/AArch64MCInstLower.cpp +@@ -22,9 +22,12 @@ + #include "llvm/MC/MCExpr.h" + #include "llvm/MC/MCInst.h" + #include "llvm/Support/CodeGen.h" ++#include "llvm/Support/CommandLine.h" + #include "llvm/Target/TargetMachine.h" + using namespace llvm; + ++extern cl::opt EnableAArch64ELFLocalDynamicTLSGeneration; ++ + AArch64MCInstLower::AArch64MCInstLower(MCContext &ctx, AsmPrinter &printer) + : Ctx(ctx), Printer(printer), TargetTriple(printer.getTargetTriple()) {} + +@@ -84,10 +87,16 @@ MCOperand AArch64MCInstLower::lowerSymbolOperandEL + if (MO.isGlobal()) { + const GlobalValue *GV = MO.getGlobal(); + Model = Printer.TM.getTLSModel(GV); ++ if (!EnableAArch64ELFLocalDynamicTLSGeneration && ++ Model == TLSModel::LocalDynamic) ++ Model = TLSModel::GeneralDynamic; ++ + } else { + assert(MO.isSymbol() && + StringRef(MO.getSymbolName()) == "_TLS_MODULE_BASE_" && + "unexpected external TLS symbol"); ++ // The general dynamic access sequence is used to get the ++ // address of _TLS_MODULE_BASE_. + Model = TLSModel::GeneralDynamic; + } + switch (Model) { +@@ -123,6 +132,8 @@ MCOperand AArch64MCInstLower::lowerSymbolOperandEL + RefFlags |= AArch64MCExpr::VK_G1; + else if ((MO.getTargetFlags() & AArch64II::MO_FRAGMENT) == AArch64II::MO_G0) + RefFlags |= AArch64MCExpr::VK_G0; ++ else if ((MO.getTargetFlags() & AArch64II::MO_FRAGMENT) == AArch64II::MO_HI12) ++ RefFlags |= AArch64MCExpr::VK_HI12; + + if (MO.getTargetFlags() & AArch64II::MO_NC) + RefFlags |= AArch64MCExpr::VK_NC; +Index: lib/Target/AArch64/Utils/AArch64BaseInfo.h +=================================================================== +--- lib/Target/AArch64/Utils/AArch64BaseInfo.h ++++ lib/Target/AArch64/Utils/AArch64BaseInfo.h +@@ -1229,7 +1229,7 @@ namespace AArch64II { + + MO_NO_FLAG, + +- MO_FRAGMENT = 0x7, ++ MO_FRAGMENT = 0xf, + + /// MO_PAGE - A symbol operand with this flag represents the pc-relative + /// offset of the 4K page containing the symbol. This is used with the +@@ -1257,26 +1257,31 @@ namespace AArch64II { + /// 0-15 of a 64-bit address, used in a MOVZ or MOVK instruction + MO_G0 = 6, + ++ /// MO_HI12 - This flag indicates that a symbol operand represents the bits ++ /// 13-24 of a 64-bit address, used in a arithmetic immediate-shifted-left- ++ /// by-12-bits instruction. ++ MO_HI12 = 7, ++ + /// MO_GOT - This flag indicates that a symbol operand represents the + /// address of the GOT entry for the symbol, rather than the address of + /// the symbol itself. +- MO_GOT = 8, ++ MO_GOT = 0x10, + + /// MO_NC - Indicates whether the linker is expected to check the symbol + /// reference for overflow. For example in an ADRP/ADD pair of relocations + /// the ADRP usually does check, but not the ADD. +- MO_NC = 0x10, ++ MO_NC = 0x20, + + /// MO_TLS - Indicates that the operand being accessed is some kind of + /// thread-local symbol. On Darwin, only one type of thread-local access + /// exists (pre linker-relaxation), but on ELF the TLSModel used for the + /// referee will affect interpretation. +- MO_TLS = 0x20, ++ MO_TLS = 0x40, + + /// MO_CONSTPOOL - This flag indicates that a symbol operand represents + /// the address of a constant pool entry for the symbol, rather than the + /// address of the symbol itself. +- MO_CONSTPOOL = 0x40 ++ MO_CONSTPOOL = 0x80 + }; + } // end namespace AArch64II + +Index: test/CodeGen/AArch64/arm64-tls-dynamics.ll +=================================================================== +--- test/CodeGen/AArch64/arm64-tls-dynamics.ll ++++ test/CodeGen/AArch64/arm64-tls-dynamics.ll +@@ -1,5 +1,7 @@ +-; RUN: llc -mtriple=arm64-none-linux-gnu -relocation-model=pic -verify-machineinstrs < %s | FileCheck %s +-; RUN: llc -mtriple=arm64-none-linux-gnu -relocation-model=pic -filetype=obj < %s | llvm-objdump -r - | FileCheck --check-prefix=CHECK-RELOC %s ++; RUN: llc -mtriple=arm64-none-linux-gnu -relocation-model=pic -aarch64-elf-ldtls-generation=1 -verify-machineinstrs < %s | FileCheck %s ++; RUN: llc -mtriple=arm64-none-linux-gnu -relocation-model=pic -aarch64-elf-ldtls-generation=1 -filetype=obj < %s | llvm-objdump -r - | FileCheck --check-prefix=CHECK-RELOC %s ++; RUN: llc -mtriple=arm64-none-linux-gnu -relocation-model=pic -verify-machineinstrs < %s | FileCheck --check-prefix=CHECK-NOLD %s ++; RUN: llc -mtriple=arm64-none-linux-gnu -relocation-model=pic -filetype=obj < %s | llvm-objdump -r - | FileCheck --check-prefix=CHECK-NOLD-RELOC %s + + @general_dynamic_var = external thread_local global i32 + +@@ -9,22 +11,34 @@ define i32 @test_generaldynamic() { + %val = load i32* @general_dynamic_var + ret i32 %val + +- ; FIXME: the adrp instructions are redundant (if harmless). +-; CHECK: adrp [[TLSDESC_HI:x[0-9]+]], :tlsdesc:general_dynamic_var +-; CHECK: add x0, [[TLSDESC_HI]], :tlsdesc_lo12:general_dynamic_var + ; CHECK: adrp x[[TLSDESC_HI:[0-9]+]], :tlsdesc:general_dynamic_var +-; CHECK: ldr [[CALLEE:x[0-9]+]], [x[[TLSDESC_HI]], :tlsdesc_lo12:general_dynamic_var] +-; CHECK: .tlsdesccall general_dynamic_var ++; CHECK-NEXT: ldr [[CALLEE:x[0-9]+]], [x[[TLSDESC_HI]], :tlsdesc_lo12:general_dynamic_var] ++; CHECK-NEXT: add x0, x[[TLSDESC_HI]], :tlsdesc_lo12:general_dynamic_var ++; CHECK-NEXT: .tlsdesccall general_dynamic_var + ; CHECK-NEXT: blr [[CALLEE]] + ++; CHECK-NOLD: adrp x[[TLSDESC_HI:[0-9]+]], :tlsdesc:general_dynamic_var ++; CHECK-NOLD-NEXT: ldr [[CALLEE:x[0-9]+]], [x[[TLSDESC_HI]], :tlsdesc_lo12:general_dynamic_var] ++; CHECK-NOLD-NEXT: add x0, x[[TLSDESC_HI]], :tlsdesc_lo12:general_dynamic_var ++; CHECK-NOLD-NEXT: .tlsdesccall general_dynamic_var ++; CHECK-NOLD-NEXT: blr [[CALLEE]] ++ ++ + ; CHECK: mrs x[[TP:[0-9]+]], TPIDR_EL0 + ; CHECK: ldr w0, [x[[TP]], x0] ++; CHECK-NOLD: mrs x[[TP:[0-9]+]], TPIDR_EL0 ++; CHECK-NOLD: ldr w0, [x[[TP]], x0] + + ; CHECK-RELOC: R_AARCH64_TLSDESC_ADR_PAGE21 ++; CHECK-RELOC: R_AARCH64_TLSDESC_LD64_LO12_NC + ; CHECK-RELOC: R_AARCH64_TLSDESC_ADD_LO12_NC +-; CHECK-RELOC: R_AARCH64_TLSDESC_LD64_LO12_NC + ; CHECK-RELOC: R_AARCH64_TLSDESC_CALL + ++; CHECK-NOLD-RELOC: R_AARCH64_TLSDESC_ADR_PAGE21 ++; CHECK-NOLD-RELOC: R_AARCH64_TLSDESC_LD64_LO12_NC ++; CHECK-NOLD-RELOC: R_AARCH64_TLSDESC_ADD_LO12_NC ++; CHECK-NOLD-RELOC: R_AARCH64_TLSDESC_CALL ++ + } + + define i32* @test_generaldynamic_addr() { +@@ -32,12 +46,10 @@ define i32* @test_generaldynamic_addr() { + + ret i32* @general_dynamic_var + +- ; FIXME: the adrp instructions are redundant (if harmless). +-; CHECK: adrp [[TLSDESC_HI:x[0-9]+]], :tlsdesc:general_dynamic_var +-; CHECK: add x0, [[TLSDESC_HI]], :tlsdesc_lo12:general_dynamic_var + ; CHECK: adrp x[[TLSDESC_HI:[0-9]+]], :tlsdesc:general_dynamic_var +-; CHECK: ldr [[CALLEE:x[0-9]+]], [x[[TLSDESC_HI]], :tlsdesc_lo12:general_dynamic_var] +-; CHECK: .tlsdesccall general_dynamic_var ++; CHECK-NEXT: ldr [[CALLEE:x[0-9]+]], [x[[TLSDESC_HI]], :tlsdesc_lo12:general_dynamic_var] ++; CHECK-NEXT: add x0, x[[TLSDESC_HI]], :tlsdesc_lo12:general_dynamic_var ++; CHECK-NEXT: .tlsdesccall general_dynamic_var + ; CHECK-NEXT: blr [[CALLEE]] + + ; CHECK: mrs [[TP:x[0-9]+]], TPIDR_EL0 +@@ -44,9 +56,15 @@ define i32* @test_generaldynamic_addr() { + ; CHECK: add x0, [[TP]], x0 + + ; CHECK-RELOC: R_AARCH64_TLSDESC_ADR_PAGE21 ++; CHECK-RELOC: R_AARCH64_TLSDESC_LD64_LO12_NC + ; CHECK-RELOC: R_AARCH64_TLSDESC_ADD_LO12_NC +-; CHECK-RELOC: R_AARCH64_TLSDESC_LD64_LO12_NC + ; CHECK-RELOC: R_AARCH64_TLSDESC_CALL ++ ++; CHECK-NOLD-RELOC: R_AARCH64_TLSDESC_ADR_PAGE21 ++; CHECK-NOLD-RELOC: R_AARCH64_TLSDESC_LD64_LO12_NC ++; CHECK-NOLD-RELOC: R_AARCH64_TLSDESC_ADD_LO12_NC ++; CHECK-NOLD-RELOC: R_AARCH64_TLSDESC_CALL ++ + } + + @local_dynamic_var = external thread_local(localdynamic) global i32 +@@ -58,54 +76,71 @@ define i32 @test_localdynamic() { + ret i32 %val + + ; CHECK: adrp x[[TLSDESC_HI:[0-9]+]], :tlsdesc:_TLS_MODULE_BASE_ +-; CHECK: add x0, x[[TLSDESC_HI]], :tlsdesc_lo12:_TLS_MODULE_BASE_ +-; CHECK: adrp x[[TLSDESC_HI:[0-9]+]], :tlsdesc:_TLS_MODULE_BASE_ +-; CHECK: ldr [[CALLEE:x[0-9]+]], [x[[TLSDESC_HI]], :tlsdesc_lo12:_TLS_MODULE_BASE_] +-; CHECK: .tlsdesccall _TLS_MODULE_BASE_ ++; CHECK-NEXT: ldr [[CALLEE:x[0-9]+]], [x[[TLSDESC_HI]], :tlsdesc_lo12:_TLS_MODULE_BASE_] ++; CHECK-NEXT: add x0, x[[TLSDESC_HI]], :tlsdesc_lo12:_TLS_MODULE_BASE_ ++; CHECK-NEXT: .tlsdesccall _TLS_MODULE_BASE_ + ; CHECK-NEXT: blr [[CALLEE]] ++; CHECK-NEXT: add x[[TPOFF:[0-9]+]], x0, :dtprel_hi12:local_dynamic_var ++; CHECK-NEXT: add x[[TPOFF]], x[[TPOFF]], :dtprel_lo12_nc:local_dynamic_var ++; CHECK: mrs x[[TPIDR:[0-9]+]], TPIDR_EL0 ++; CHECK: ldr w0, [x[[TPIDR]], x[[TPOFF]]] + +-; CHECK: movz [[DTP_OFFSET:x[0-9]+]], #:dtprel_g1:local_dynamic_var +-; CHECK: movk [[DTP_OFFSET]], #:dtprel_g0_nc:local_dynamic_var ++; CHECK-NOLD: adrp x[[TLSDESC_HI:[0-9]+]], :tlsdesc:local_dynamic_var ++; CHECK-NOLD-NEXT: ldr [[CALLEE:x[0-9]+]], [x[[TLSDESC_HI]], :tlsdesc_lo12:local_dynamic_var] ++; CHECK-NOLD-NEXT: add x0, x[[TLSDESC_HI]], :tlsdesc_lo12:local_dynamic_var ++; CHECK-NOLD-NEXT: .tlsdesccall local_dynamic_var ++; CHECK-NOLD-NEXT: blr [[CALLEE]] ++; CHECK-NOLD: mrs x[[TPIDR:[0-9]+]], TPIDR_EL0 ++; CHECK-NOLD: ldr w0, [x[[TPIDR]], x0] + +-; CHECK: add x[[TPREL:[0-9]+]], x0, [[DTP_OFFSET]] + +-; CHECK: mrs x[[TPIDR:[0-9]+]], TPIDR_EL0 +- +-; CHECK: ldr w0, [x[[TPIDR]], x[[TPREL]]] +- + ; CHECK-RELOC: R_AARCH64_TLSDESC_ADR_PAGE21 ++; CHECK-RELOC: R_AARCH64_TLSDESC_LD64_LO12_NC + ; CHECK-RELOC: R_AARCH64_TLSDESC_ADD_LO12_NC +-; CHECK-RELOC: R_AARCH64_TLSDESC_LD64_LO12_NC + ; CHECK-RELOC: R_AARCH64_TLSDESC_CALL ++; CHECK-RELOC: R_AARCH64_TLSLD_ADD_DTPREL_HI12 ++; CHECK-RELOC: R_AARCH64_TLSLD_ADD_DTPREL_LO12_NC + ++; CHECK-NOLD-RELOC: R_AARCH64_TLSDESC_ADR_PAGE21 ++; CHECK-NOLD-RELOC: R_AARCH64_TLSDESC_LD64_LO12_NC ++; CHECK-NOLD-RELOC: R_AARCH64_TLSDESC_ADD_LO12_NC ++; CHECK-NOLD-RELOC: R_AARCH64_TLSDESC_CALL ++ + } + + define i32* @test_localdynamic_addr() { + ; CHECK-LABEL: test_localdynamic_addr: + +- ret i32* @local_dynamic_var +- + ; CHECK: adrp x[[TLSDESC_HI:[0-9]+]], :tlsdesc:_TLS_MODULE_BASE_ +-; CHECK: add x0, x[[TLSDESC_HI]], :tlsdesc_lo12:_TLS_MODULE_BASE_ +-; CHECK: adrp x[[TLSDESC_HI:[0-9]+]], :tlsdesc:_TLS_MODULE_BASE_ +-; CHECK: ldr [[CALLEE:x[0-9]+]], [x[[TLSDESC_HI]], :tlsdesc_lo12:_TLS_MODULE_BASE_] +-; CHECK: .tlsdesccall _TLS_MODULE_BASE_ ++; CHECK-NEXT: ldr [[CALLEE:x[0-9]+]], [x[[TLSDESC_HI]], :tlsdesc_lo12:_TLS_MODULE_BASE_] ++; CHECK-NEXT: add x0, x[[TLSDESC_HI]], :tlsdesc_lo12:_TLS_MODULE_BASE_ ++; CHECK-NEXT: .tlsdesccall _TLS_MODULE_BASE_ + ; CHECK-NEXT: blr [[CALLEE]] ++; CHECK-NEXT: add x[[TPOFF:[0-9]+]], x0, :dtprel_hi12:local_dynamic_var ++; CHECK-NEXT: add x[[TPOFF]], x[[TPOFF]], :dtprel_lo12_nc:local_dynamic_var ++; CHECK: mrs x[[TPIDR:[0-9]+]], TPIDR_EL0 ++; CHECK: add x0, x[[TPIDR]], x[[TPOFF]] + +-; CHECK: movz [[DTP_OFFSET:x[0-9]+]], #:dtprel_g1:local_dynamic_var +-; CHECK: movk [[DTP_OFFSET]], #:dtprel_g0_nc:local_dynamic_var ++; CHECK-NOLD: adrp x[[TLSDESC_HI:[0-9]+]], :tlsdesc:local_dynamic_var ++; CHECK-NOLD-NEXT: ldr [[CALLEE:x[0-9]+]], [x[[TLSDESC_HI]], :tlsdesc_lo12:local_dynamic_var] ++; CHECK-NOLD-NEXT: add x0, x[[TLSDESC_HI]], :tlsdesc_lo12:local_dynamic_var ++; CHECK-NOLD-NEXT: .tlsdesccall local_dynamic_var ++; CHECK-NOLD-NEXT: blr [[CALLEE]] ++; CHECK-NOLD: mrs x[[TPIDR:[0-9]+]], TPIDR_EL0 ++; CHECK-NOLD: add x0, x[[TPIDR]], x0 ++ ret i32* @local_dynamic_var + +-; CHECK: add [[TPREL:x[0-9]+]], x0, [[DTP_OFFSET]] +- +-; CHECK: mrs [[TPIDR:x[0-9]+]], TPIDR_EL0 +- +-; CHECK: add x0, [[TPIDR]], [[TPREL]] +- + ; CHECK-RELOC: R_AARCH64_TLSDESC_ADR_PAGE21 ++; CHECK-RELOC: R_AARCH64_TLSDESC_LD64_LO12_NC + ; CHECK-RELOC: R_AARCH64_TLSDESC_ADD_LO12_NC +-; CHECK-RELOC: R_AARCH64_TLSDESC_LD64_LO12_NC + ; CHECK-RELOC: R_AARCH64_TLSDESC_CALL ++; CHECK-RELOC: R_AARCH64_TLSLD_ADD_DTPREL_HI12 ++; CHECK-RELOC: R_AARCH64_TLSLD_ADD_DTPREL_LO12_NC + ++; CHECK-NOLD-RELOC: R_AARCH64_TLSDESC_ADR_PAGE21 ++; CHECK-NOLD-RELOC: R_AARCH64_TLSDESC_LD64_LO12_NC ++; CHECK-NOLD-RELOC: R_AARCH64_TLSDESC_ADD_LO12_NC ++; CHECK-NOLD-RELOC: R_AARCH64_TLSDESC_CALL + } + + ; The entire point of the local-dynamic access model is to have a single call to +@@ -122,11 +157,10 @@ define i32 @test_localdynamic_deduplicate() { + %sum = add i32 %val, %val2 + ret i32 %sum + +-; CHECK: adrp x[[TLSDESC_HI:[0-9]+]], :tlsdesc:_TLS_MODULE_BASE_ +-; CHECK: add x0, x[[TLSDESC_HI]], :tlsdesc_lo12:_TLS_MODULE_BASE_ +-; CHECK: adrp x[[TLSDESC_HI:[0-9]+]], :tlsdesc:_TLS_MODULE_BASE_ +-; CHECK: ldr [[CALLEE:x[0-9]+]], [x[[TLSDESC_HI]], :tlsdesc_lo12:_TLS_MODULE_BASE_] +-; CHECK: .tlsdesccall _TLS_MODULE_BASE_ ++; CHECK: adrp x[[DTPREL_HI:[0-9]+]], :tlsdesc:_TLS_MODULE_BASE_ ++; CHECK-NEXT: ldr [[CALLEE:x[0-9]+]], [x[[DTPREL_HI]], :tlsdesc_lo12:_TLS_MODULE_BASE_] ++; CHECK-NEXT: add x0, x[[TLSDESC_HI]], :tlsdesc_lo12:_TLS_MODULE_BASE ++; CHECK-NEXT: .tlsdesccall _TLS_MODULE_BASE_ + ; CHECK-NEXT: blr [[CALLEE]] + + ; CHECK-NOT: _TLS_MODULE_BASE_ +Index: test/CodeGen/AArch64/arm64-tls-execs.ll +=================================================================== +--- test/CodeGen/AArch64/arm64-tls-execs.ll ++++ test/CodeGen/AArch64/arm64-tls-execs.ll +@@ -38,14 +38,13 @@ define i32 @test_local_exec() { + ; CHECK-LABEL: test_local_exec: + %val = load i32* @local_exec_var + +-; CHECK: movz [[TP_OFFSET:x[0-9]+]], #:tprel_g1:local_exec_var // encoding: [0bAAA{{[01]+}},A,0b101AAAAA,0x92] +-; CHECK: movk [[TP_OFFSET]], #:tprel_g0_nc:local_exec_var +-; CHECK: mrs x[[TP:[0-9]+]], TPIDR_EL0 +-; CHECK: ldr w0, [x[[TP]], [[TP_OFFSET]]] ++; CHECK: mrs x[[R1:[0-9]+]], TPIDR_EL0 ++; CHECK: add x[[R2:[0-9]+]], x[[R1]], :tprel_hi12:local_exec_var ++; CHECK: add x[[R3:[0-9]+]], x[[R2]], :tprel_lo12_nc:local_exec_var ++; CHECK: ldr w0, [x[[R3]]] + +-; CHECK-RELOC: R_AARCH64_TLSLE_MOVW_TPREL_G1 +-; CHECK-RELOC: R_AARCH64_TLSLE_MOVW_TPREL_G0_NC +- ++; CHECK-RELOC: R_AARCH64_TLSLE_ADD_TPREL_HI12 ++; CHECK-RELOC: R_AARCH64_TLSLE_ADD_TPREL_LO12_NC + ret i32 %val + } + +@@ -53,11 +52,11 @@ define i32* @test_local_exec_addr() { + ; CHECK-LABEL: test_local_exec_addr: + ret i32* @local_exec_var + +-; CHECK: movz [[TP_OFFSET:x[0-9]+]], #:tprel_g1:local_exec_var +-; CHECK: movk [[TP_OFFSET]], #:tprel_g0_nc:local_exec_var +-; CHECK: mrs [[TP:x[0-9]+]], TPIDR_EL0 +-; CHECK: add x0, [[TP]], [[TP_OFFSET]] ++; CHECK: mrs x[[R1:[0-9]+]], TPIDR_EL0 ++; CHECK: add x[[R2:[0-9]+]], x[[R1]], :tprel_hi12:local_exec_var ++; CHECK: add x0, x[[R2]], :tprel_lo12_nc:local_exec_var ++; CHECK: ret + +-; CHECK-RELOC: R_AARCH64_TLSLE_MOVW_TPREL_G1 +-; CHECK-RELOC: R_AARCH64_TLSLE_MOVW_TPREL_G0_NC ++; CHECK-RELOC: R_AARCH64_TLSLE_ADD_TPREL_HI12 ++; CHECK-RELOC: R_AARCH64_TLSLE_ADD_TPREL_LO12_NC + } From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 20:26:03 2015 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 3F22072A; Mon, 30 Mar 2015 20:26:03 +0000 (UTC) Received: from mail-ig0-x234.google.com (mail-ig0-x234.google.com [IPv6:2607:f8b0:4001:c05::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 031E961; Mon, 30 Mar 2015 20:26:03 +0000 (UTC) Received: by igcau2 with SMTP id au2so88071igc.1; Mon, 30 Mar 2015 13:26: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:cc:content-type; bh=H1RdJdht1GvQtRaDXHErIQZFuNI5tdtdJHW/TH/UJh8=; b=qBytm+WCb5CTMvB+ssUJS4M9h72/rNWTfe7Rr/qUZ6qYleh7yzwDX1o7n7bmOOAbKi Q5PBHqmnN5t+54XF0t7JdYZgaKPashDGPgmkLcHGW6SpSxR22PsYd140qB3scpD05cvP urYiQ/lhqwuRxeLYkfxndS0da2+nJwY8qMgtm9NmKf7bYpBZbd86eGhaKehsTfxEKAK2 XDkLOmC6goNQOQSH6OVH/HKc1v7PiM5pU2EO5uvSg35H07utnOP07N6a4IFNkKchjLpW o/76QM2d8mweQ9dGPvxY9Q8bHpXYu0Q79eIZXzjcr0lKljYOjH0Ed3QDBGSiLFZiT403 4i7A== X-Received: by 10.107.47.26 with SMTP id j26mr50492028ioo.36.1427747161587; Mon, 30 Mar 2015 13:26:01 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.158.19 with HTTP; Mon, 30 Mar 2015 13:25:41 -0700 (PDT) In-Reply-To: References: <201503302001.t2UK1gse088144@svn.freebsd.org> From: Ed Maste Date: Mon, 30 Mar 2015 16:25:41 -0400 X-Google-Sender-Auth: TZSt0G91tbPmlN0rEN4fIozPlTA Message-ID: Subject: Re: svn commit: r280865 - in head/contrib/llvm/lib/Target/AArch64: . Utils To: Dimitry Andric 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: Mon, 30 Mar 2015 20:26:03 -0000 On 30 March 2015 at 16:14, Dimitry Andric wrote: > On 30 Mar 2015, at 22:01, Ed Maste wrote: >> >> Author: emaste >> Date: Mon Mar 30 20:01:41 2015 >> New Revision: 280865 >> URL: https://svnweb.freebsd.org/changeset/base/280865 >> >> Log: >> llvm: Backport upstream r229195 to fix arm64 TLS relocations > > Actually, this was upstream r231227: > http://llvm.org/viewvc/llvm-project?view=revision&revision=231227 > > Upstream r229195 was only a temporary workaround so llvm.org's > clang-native-aarch64-full buildbot would not keep failing, and it got > reverted after r231227 went in. Yeah, sorry about that - I copied the (wrong) version number out of the thread discussing the backport to 3.6. Thanks for noting this and committing the .patch. From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 20:44:09 2015 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 ACAB1BDA; Mon, 30 Mar 2015 20:44: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 98C2127E; Mon, 30 Mar 2015 20:44: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 t2UKi9ju007950; Mon, 30 Mar 2015 20:44:09 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2UKi9OF007949; Mon, 30 Mar 2015 20:44:09 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201503302044.t2UKi9OF007949@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 30 Mar 2015 20:44:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280868 - 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: Mon, 30 Mar 2015 20:44:09 -0000 Author: andrew Date: Mon Mar 30 20:44:08 2015 New Revision: 280868 URL: https://svnweb.freebsd.org/changeset/base/280868 Log: Restore setting cpufuncs on arm1176, it was removed by accident with the arm1136 code. Reviewed by: ian Modified: head/sys/arm/arm/cpufunc.c Modified: head/sys/arm/arm/cpufunc.c ============================================================================== --- head/sys/arm/arm/cpufunc.c Mon Mar 30 20:23:06 2015 (r280867) +++ head/sys/arm/arm/cpufunc.c Mon Mar 30 20:44:08 2015 (r280868) @@ -893,6 +893,7 @@ set_cpufuncs() #endif /* CPU_ARM9E */ #if defined(CPU_ARM1176) if (cputype == CPU_ID_ARM1176JZS) { + cpufuncs = arm1176_cpufuncs; cpu_reset_needs_v4_MMU_disable = 1; /* V4 or higher */ get_cachetype_cp15(); From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 20:44:36 2015 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 294F3D2D; Mon, 30 Mar 2015 20:44:36 +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 021DE28D; Mon, 30 Mar 2015 20:44:36 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 08AE0B985; Mon, 30 Mar 2015 16:44:34 -0400 (EDT) From: John Baldwin To: Randall Stewart Subject: Re: svn commit: r280785 - in head/sys: kern netgraph/atm/sscop netgraph/atm/uni sys Date: Mon, 30 Mar 2015 16:38:47 -0400 Message-ID: <3254671.hyy8TUCr3i@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: <32487399.PTq7ESkWJT@ralph.baldwin.cx> References: <201503281250.t2SCoOkt020297@svn.freebsd.org> <32487399.PTq7ESkWJT@ralph.baldwin.cx> 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, 30 Mar 2015 16:44:34 -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, 30 Mar 2015 20:44:36 -0000 On Monday, March 30, 2015 11:16:20 AM John Baldwin wrote: > The second sentence quite seem to be English ("have a lock touches" s/sentence quite/sentence doesn't quite/ *sigh* -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 20:44:37 2015 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 C60A5DB5; Mon, 30 Mar 2015 20:44:37 +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 7C38C298; Mon, 30 Mar 2015 20:44:37 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 6AFB8B9B0; Mon, 30 Mar 2015 16:44:36 -0400 (EDT) From: John Baldwin To: Adrian Chadd Subject: Re: svn commit: r280799 - head/sys/dev/ath Date: Mon, 30 Mar 2015 16:32:30 -0400 Message-ID: <2308891.2rLa0R7ktj@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: References: <201503282341.t2SNfOZc032386@svn.freebsd.org> <3261888.gflh0beI2v@ralph.baldwin.cx> 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, 30 Mar 2015 16:44:36 -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, 30 Mar 2015 20:44:38 -0000 On Monday, March 30, 2015 10:10:43 AM Adrian Chadd wrote: > Yes, because it's before the dynamic hint stuff starts up. (kern.hintmode.) > > Hints don't show up in kenv on the mips boards until I set the sysctl > to the "import them now!" setting. Everything in if_ath.c happens well after SYSINITs are going. Are you explicitly forcing hintmode to 1 in your kernel config? At least on x86 it always is zero and always pulls from kenv. If this is magic that config does when you have static hints, then why not have init_dynamic_kenv() call into subr_hints.c to pull all the static hints into the kenv right away? SI_SUB_KMEM is way, way before any device drivers start doing anything. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 20:44:36 2015 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 C8DCED2F; Mon, 30 Mar 2015 20:44:36 +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 9F3E0295; Mon, 30 Mar 2015 20:44:36 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 10743B98C; Mon, 30 Mar 2015 16:44:35 -0400 (EDT) From: John Baldwin To: Konstantin Belousov Subject: Re: svn commit: r280279 - head/sys/sys Date: Mon, 30 Mar 2015 16:37:10 -0400 Message-ID: <1853187.nsx00mfzo7@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: <20150330172434.GG2379@kib.kiev.ua> References: <201503201027.t2KAR6Ze053047@svn.freebsd.org> <2526359.g5B2nXdKeQ@ralph.baldwin.cx> <20150330172434.GG2379@kib.kiev.ua> 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, 30 Mar 2015 16:44:35 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@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: Mon, 30 Mar 2015 20:44:36 -0000 On Monday, March 30, 2015 08:24:34 PM Konstantin Belousov wrote: > > That is not what Bruce said. He suggested using bitcount64() for the fallback > > if the cpuid check fails. He did not say to remove the runtime check to use > > popcnt if it is available: > > > > "Always using [bitcount64] would lose the micro-optimization... [to] keep > > [it], it seems best to keep the inline asm but replace popcnt_pc_map_elem(elem) > > by [bitcount64(elem)]." > Ok, thank you for the clarification. > > I updated the pmap patch, see the end of the message. I think the pmap change looks fine. If we know which compilers include a workaround we might also consider specifying "-mno-popcount" for everything except known-ok compilers in at least kern.mk. > > This looks fine to me. It seems to be manually converting certain symbols > > to use a dynamic lookup that must be explicitly resolved before first > > use? > I am not sure what do you mean by dynamic lookup, but possibly it > was mentioned. I can emulate the ifuncs more sincerely, by requiring > a resolver function, which is called on the first real function > invocation. I did not see it as very useful, but it is definitely > doable. I just mean that the effect at runtime is similar to that of dynamic symbols once they are resolved (a call into a PLT entry (or is it GOT? I keep getting those confused) that does a jump to the resolved symbol). -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 20:54:31 2015 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 6E90E6D1; Mon, 30 Mar 2015 20:54:31 +0000 (UTC) Received: from mail-ie0-x232.google.com (mail-ie0-x232.google.com [IPv6:2607:f8b0:4001:c03::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 32CA43E8; Mon, 30 Mar 2015 20:54:31 +0000 (UTC) Received: by iedfl3 with SMTP id fl3so486058ied.1; Mon, 30 Mar 2015 13:54:30 -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=J7sEHlPp/mW5y1SvC4tsym3N0dpNzLxAAz08HdMgjZU=; b=hJOKEic8ZFTUPg9MAIVQ+Eakvs4EGFPy+7KX+wpQMFspSdHwhuDd3S2FX9sE+cng9k r4ipXg4q65XwFCrDPiNzHOtxhiCEimXyj4oRGh8fpXUuPDIqiL0SX120/BJm9qEkNZEr iXsYhWsZrWyRHE0OpThXKu4wEsLSwZkGMjB5KDxmh/YVNwM20lnlDSOzGJFNsvQ7Zy3R RWcMn6WUzLUtA1mG0iTy6g8DQCexjhvqUG2Z42tqUIIQDYtQWMqArBn7Psc715JF7oKy 2pocRjoXC2tnBsPKi2xVL5l1a+Sc5cIq6rVY+5o3o2/0XpZyoRcZbpbG6iO8H2KORpwn 41ug== MIME-Version: 1.0 X-Received: by 10.50.36.65 with SMTP id o1mr20428440igj.32.1427748870563; Mon, 30 Mar 2015 13:54:30 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.36.17.194 with HTTP; Mon, 30 Mar 2015 13:54:30 -0700 (PDT) In-Reply-To: <2308891.2rLa0R7ktj@ralph.baldwin.cx> References: <201503282341.t2SNfOZc032386@svn.freebsd.org> <3261888.gflh0beI2v@ralph.baldwin.cx> <2308891.2rLa0R7ktj@ralph.baldwin.cx> Date: Mon, 30 Mar 2015 13:54:30 -0700 X-Google-Sender-Auth: 3Wr97gklPgIzg60I2Tobya6MmDo Message-ID: Subject: Re: svn commit: r280799 - head/sys/dev/ath From: Adrian Chadd To: John Baldwin 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: Mon, 30 Mar 2015 20:54:31 -0000 On 30 March 2015 at 13:32, John Baldwin wrote: > On Monday, March 30, 2015 10:10:43 AM Adrian Chadd wrote: >> Yes, because it's before the dynamic hint stuff starts up. (kern.hintmode.) >> >> Hints don't show up in kenv on the mips boards until I set the sysctl >> to the "import them now!" setting. > > Everything in if_ath.c happens well after SYSINITs are going. Are you > explicitly forcing hintmode to 1 in your kernel config? At least on > x86 it always is zero and always pulls from kenv. > > If this is magic that config does when you have static hints, then why > not have init_dynamic_kenv() call into subr_hints.c to pull all the > static hints into the kenv right away? SI_SUB_KMEM is way, way before > any device drivers start doing anything. This is on MIPS and not on x86. And yes, I checked - both arge and ath probe/attach get called with no hints in kenv (ie, static hints) and I don't recall the hintmode being explicitly set in a config file. I'd love to make it work via hints calls; it'd significantly simplify things. -a From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 22:19:43 2015 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 E0F511EE for ; Mon, 30 Mar 2015 22:19:43 +0000 (UTC) Received: from mail-pa0-x235.google.com (mail-pa0-x235.google.com [IPv6:2607:f8b0:400e:c03::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9E215FBE for ; Mon, 30 Mar 2015 22:19:43 +0000 (UTC) Received: by patj18 with SMTP id j18so23751850pat.2 for ; Mon, 30 Mar 2015 15:19:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netflix.com; s=google; h=content-type:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=UPK7+WDzTrDOo4HLTQzkt+1IVh7C1c7u3GbWa+EQZBw=; b=nk8oaskr9+EHenPhpMlXW0IE5bIfGet896lVEI5OdBkG6mB47AvL6aFqMum9xh6Q6a S2d+ATQeGPmFKUjmMqLLeibK4du7nbrQx32hWkICwUwEI7GIZUwJKTLc1tPZ+GaKvNHN xhvZuTjKhiKmtyZIQI5i89FIKXOkpM/4bNATM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:content-type:mime-version:subject:from :in-reply-to:date:cc:message-id:references:to; bh=UPK7+WDzTrDOo4HLTQzkt+1IVh7C1c7u3GbWa+EQZBw=; b=WBcneOQqjhQ+pid6HiZJesDX0yMB6zphcaPCD2du5yzYLXrTbsD92u/FRosqt8KhYz IsTeNoARd02pBxvnfysFNuYUtGVhqw5s9HnyZloHn6nthrGpLeTfJkXhAs9sOkuKYaPa dmY2TWtsV3V8J0i/5NXJNTVU4CJvv6o7flYc1TI55mq44+/3A8lAwo1RS1oU5SCQRRaf r02Helw3Ymunp0pRrlUfXuZl6g4s71TwMvc5+KLmQK/XD+cZiUkWLThyZAPwxRKB2/+u //OOczoxbvHmNEycUd7N8JkwpyFwLsNhIex69Rhdx6nVLaq94tXEJ4h+cMgxUrVQTrVi TkkA== X-Gm-Message-State: ALoCoQlRFH1vNY+TQjGwTgk0eFrtoQcgotFQ2ag9XEIsB0fUWklgFBV4XWGptN7CFlbWN6YEqH6y X-Received: by 10.70.130.132 with SMTP id oe4mr32168914pdb.153.1427753983140; Mon, 30 Mar 2015 15:19:43 -0700 (PDT) Received: from lgml-rrs.corp.netflix.com ([69.53.237.72]) by mx.google.com with ESMTPSA id wt1sm11700130pbc.76.2015.03.30.15.19.41 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 30 Mar 2015 15:19:42 -0700 (PDT) Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r280785 - in head/sys: kern netgraph/atm/sscop netgraph/atm/uni sys From: Randall Stewart In-Reply-To: Date: Mon, 30 Mar 2015 16:19:41 -0600 Message-Id: <10B55CA1-47E5-43FE-9DC1-AEE4A964A65C@netflix.com> References: <201503281250.t2SCoOkt020297@svn.freebsd.org> <4E7E0A0A-5125-4F3A-AC0C-D428A972C954@netflix.com> To: Davide Italiano X-Mailer: Apple Mail (2.1878.6) Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable 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" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2015 22:19:44 -0000 Davide: I have had a long chat this weekend with imp, and both he and I feel the = right fix is to *not* bump the version, but instead change the two fields to = shorts. That way the length will still say the same so we can MFC this. I will be committing that shortly, I have it testing inside right now=85 = :-) R On Mar 28, 2015, at 2:48 PM, Davide Italiano wrote: > On Sat, Mar 28, 2015 at 12:04 PM, Randall Stewart = wrote: >> Hmm does the KPI include the size of the callout structure (which is >> private)? >>=20 >=20 > It's KBI, not KPI. >=20 >> If so I suppose we could change the c_flags/c_iflags to >> ushort =85 >>=20 >=20 > I'm not familiar with your changes enough to suggest/propose a fix. > As I previously mentioned, this looks suspicious KBI-wise to me, and I > reported to you. >=20 > --=20 > Davide >=20 > "There are no solved problems; there are only problems that are more > or less solved" -- Henri Poincare -------- Randall Stewart rrs@netflix.com 803-317-4952 From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 22:21:06 2015 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 0C92133A for ; Mon, 30 Mar 2015 22:21:06 +0000 (UTC) Received: from mail-pd0-x233.google.com (mail-pd0-x233.google.com [IPv6:2607:f8b0:400e:c02::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BD6C0BA for ; Mon, 30 Mar 2015 22:21:05 +0000 (UTC) Received: by pddn5 with SMTP id n5so72834924pdd.2 for ; Mon, 30 Mar 2015 15:21:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netflix.com; s=google; h=content-type:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=xbWn4onIjvHSF55JtmBGIH41b/x0tIUv0ekK5l2SevI=; b=Hsyd+9YjO6fWLyU/dAiAkea5MHrlaJA8XjahrjCh14cBKrf2gPOkmOK81+XSwY1xFF atcNRJ5UpOUZZoDI//3f3ytkvqS1JroERNv3oDSB34BwyxyE0maQJ1x/vPcYdNlWl8Rv nHp2mMzOV7PFu4e2uyhvCcUwB6vImfjUFtkm0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:content-type:mime-version:subject:from :in-reply-to:date:cc:message-id:references:to; bh=xbWn4onIjvHSF55JtmBGIH41b/x0tIUv0ekK5l2SevI=; b=WzQ4Z8VViZWtHPmQKfA7XJwkrf46ujmjelbHMZFTYoz6QNsC+NAD69TI7eoA/kqZE9 vb+/Co8mj+hY+49bkKYgPnmh+5cM25z9bznLUGA1XePr3xjaT0JuHCrNGnqiN9EKLAz3 eb9D1YWb0ojdXBZ5QlAxYz+lKPTb7Vf48riyLPAMxbYk/c8lh7Y4nLjMbpOIAXSXEszc BMBSZdxm4KOV37iNJrHma3gg2YmL9UZZVVlwQ75ILi2YzTsBPJoLczSfA+quGAdaktwn dNy3pbD/3T0nKRaFpkgZlfSXVY5l/4cycMmZUqE4wvKSxKit8XSpogYQCJFs5b8qAHkf 6X5A== X-Gm-Message-State: ALoCoQlkMdzdKzO/89ephFVg3CGc5jbdR0l4rZLahkypY+5FVyqlGFCtKs0AWuFogGBam9+mylT+ X-Received: by 10.70.65.39 with SMTP id u7mr62609129pds.11.1427754065409; Mon, 30 Mar 2015 15:21:05 -0700 (PDT) Received: from ?IPv6:2607:fb10:2:236:6412:7db4:a40e:aec0? ([2607:fb10:2:236:6412:7db4:a40e:aec0]) by mx.google.com with ESMTPSA id jh2sm11717440pbb.25.2015.03.30.15.21.03 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 30 Mar 2015 15:21:04 -0700 (PDT) Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r280785 - in head/sys: kern netgraph/atm/sscop netgraph/atm/uni sys From: Randall Stewart In-Reply-To: <3218826.nq4nR2EqCz@ralph.baldwin.cx> Date: Mon, 30 Mar 2015 16:21:03 -0600 Message-Id: References: <201503281250.t2SCoOkt020297@svn.freebsd.org> <4E7E0A0A-5125-4F3A-AC0C-D428A972C954@netflix.com> <3218826.nq4nR2EqCz@ralph.baldwin.cx> To: John Baldwin X-Mailer: Apple Mail (2.1878.6) Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: Davide Italiano , "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, 30 Mar 2015 22:21:06 -0000 John: As I just said, Warner and I feel we can get by with making the int -> = short/short so we preserver the KPI and at the same time achieve the objective .. My big concern was no intel platforms but Warner gave me a green light = there ;-) R On Mar 30, 2015, at 10:10 AM, John Baldwin wrote: > On Saturday, March 28, 2015 01:48:49 PM Davide Italiano wrote: >> On Sat, Mar 28, 2015 at 12:04 PM, Randall Stewart = wrote: >>> Hmm does the KPI include the size of the callout structure (which is >>> private)? >>>=20 >>=20 >> It's KBI, not KPI. >>=20 >>> If so I suppose we could change the c_flags/c_iflags to >>> ushort =85 >>>=20 >>=20 >> I'm not familiar with your changes enough to suggest/propose a fix. >> As I previously mentioned, this looks suspicious KBI-wise to me, and = I >> reported to you. >=20 > The KBI issue makes it much harder to MFC. In particular, even though > you could move 'c_iflags' to the end to fix most things (though not > callout_pending()), many drivers have 'struct callout foo' inside = their > softc, etc. and this would break existing modules. >=20 > OTOH, the uglier hack of adding locking in callout_deactivate() would > preserve the KBI and be safe to merge. >=20 > --=20 > John Baldwin -------- Randall Stewart rrs@netflix.com 803-317-4952 From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 22:23:17 2015 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 A12C96F0 for ; Mon, 30 Mar 2015 22:23:17 +0000 (UTC) Received: from mail-pd0-x22d.google.com (mail-pd0-x22d.google.com [IPv6:2607:f8b0:400e:c02::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 58832EC for ; Mon, 30 Mar 2015 22:23:17 +0000 (UTC) Received: by pdcp1 with SMTP id p1so97354438pdc.3 for ; Mon, 30 Mar 2015 15:23:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netflix.com; s=google; h=content-type:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=QuY9P2zLBA/2ZIYVF1E46vP1N3YZa6JUyZs+8dtusWM=; b=C2BBdSoqWJ0pjyuSzhY5jv7QVqz21HkbEEdkFXmt1B/+q5lJmTEIYK/jbQoesnUCN+ pUhMTpzkAuQRAh86JBj03i5ApnkiaRZhQw0B0ZnrRhODxkS1WT2U0eb7eBZTioLEDewJ M9IFkEiQyOKfNPMihkv6qDGW6YUgFh/2I9vRk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:content-type:mime-version:subject:from :in-reply-to:date:cc:message-id:references:to; bh=QuY9P2zLBA/2ZIYVF1E46vP1N3YZa6JUyZs+8dtusWM=; b=Z0C26cvY/OM0tGC3judzxdQYwxS/LctaT1HuFzGZN5iioyS9vzuDQ76J+pD/4Lu1ee re7fnBEO7cwQUDvI0wylRLECR5zNMc+stAszhY26m2YrGXMUE7Fo/g6O6VlKfuMtUO5Z 3utKT9ht6lLpONeExNf+1jf7qeqpdc7Fl1860UqkTy6BHqseWv03NyhIevSu5R1JsEPV +G28sQ2Z4UIIS9893ZyKwdmH7IQDdfraVleKvHcWxDtGkQxHrDnkYoQsty3WgnHQd2Vh v3nR8GrjsNwjB1gUDDKnVJktVUTJ8z1WXg52xP8H+b9Adhozei5palBU9yo7JL/k8id9 7JTg== X-Gm-Message-State: ALoCoQn0WHwYuNz5sP7QcevJq5gTKPEHxoKxpy2rE7E253o24vB3eUXMSPvtC2+E3OwD858i535i X-Received: by 10.68.69.103 with SMTP id d7mr18461957pbu.145.1427754196826; Mon, 30 Mar 2015 15:23:16 -0700 (PDT) Received: from lgml-rrs.corp.netflix.com ([69.53.237.72]) by mx.google.com with ESMTPSA id x3sm11732117pdo.0.2015.03.30.15.23.15 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 30 Mar 2015 15:23:15 -0700 (PDT) Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r280785 - in head/sys: kern netgraph/atm/sscop netgraph/atm/uni sys From: Randall Stewart In-Reply-To: <32487399.PTq7ESkWJT@ralph.baldwin.cx> Date: Mon, 30 Mar 2015 16:23:15 -0600 Message-Id: References: <201503281250.t2SCoOkt020297@svn.freebsd.org> <32487399.PTq7ESkWJT@ralph.baldwin.cx> To: John Baldwin X-Mailer: Apple Mail (2.1878.6) Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: svn-src-head@freebsd.org, Randall Stewart , 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, 30 Mar 2015 22:23:17 -0000 John: Comments below.. On Mar 30, 2015, at 9:16 AM, John Baldwin wrote: > On Saturday, March 28, 2015 12:50:24 PM Randall Stewart wrote: >> Author: rrs >> Date: Sat Mar 28 12:50:24 2015 >> New Revision: 280785 >> URL: https://svnweb.freebsd.org/changeset/base/280785 >>=20 >> Log: >> Change the callout to supply -1 to indicate we are not changing >> CPU, also add protection against invalid CPU's as well as >> split c_flags and c_iflags so that if a user plays with the active >> flag (the one expected to be played with by callers in MPSAFE) = without >> a lock, it won't adversely affect the callout system by causing a = corrupt >> list. This also means that all callers need to use the macros and = *not* >> play with the falgs directly (like netgraph used to). >>=20 >> Differential Revision: htts://reviews.freebsd.org/D1894 >> Reviewed by: .. timed out but looked at by jhb, imp, adrian hselasky >> tested by hiren and netflix. >> Sponsored by: Netflix Inc. >=20 > Please use NOCPU rather than -1 directly for the CPU field when not > moving a callout. ok, did not no a =93NOCPU=94 was defined .. thanks.. >=20 >> Modified: head/sys/sys/callout.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/callout.h Sat Mar 28 12:23:15 2015 = (r280784) >> +++ head/sys/sys/callout.h Sat Mar 28 12:50:24 2015 = (r280785) >> @@ -63,8 +63,23 @@ struct callout_handle { >> }; >>=20 >> #ifdef _KERNEL >> +/*=20 >> + * Note the flags field is actually *two* fields. The c_flags >> + * field is the one that caller operations that may, or may not have >> + * a lock touches i.e. callout_deactivate(). The other, the = c_iflags, >> + * is the internal flags that *must* be kept correct on which the >> + * callout system depend on i.e. callout_migrating() & = callout_pending(), >> + * these are used internally by the callout system to determine = which >> + * list and other critical internal state. Callers *should not* use = the=20 >> + * c_flags field directly but should use the macros! >> + * =20 >> + * If the caller wants to keep the c_flags field sane they=20 >> + * should init with a mutex *or* if using the older >> + * mpsafe option, they *must* lock there own lock >> + * before calling callout_deactivate(). >=20 > Some wording suggestions: >=20 > "is actually" -> "is split across" >=20 > The second sentence quite seem to be English ("have a lock touches" > which I think means "hold a lock while touching" or some such), but > you can perhaps use this for the rest of the comment: >=20 > "The c_iflags field holds internal flags that are protected by = internal > locks of the callout subsystem. The c_flags field holds external = flags. > The caller must hold its own lock while manipulating or reading = external > flags via callout_active(), callout_deactivate(), callout_reset*(), or > callout_stop() to avoid races." >=20 > (Also, please use double spaces after periods) ok I will commit that with my split to short/short. >=20 >> + */ >> #define callout_active(c) ((c)->c_flags & CALLOUT_ACTIVE) >> -#define callout_migrating(c) ((c)->c_flags & = CALLOUT_DFRMIGRATION) >> +#define callout_migrating(c) ((c)->c_iflags & = CALLOUT_DFRMIGRATION) >=20 > I would just move this into the C file. It isn't useful outside of = the > implementation as far as I know. This then avoids having to explain = to > users that they shouldn't see it in the block comment since it would = no > longer be there. :) >=20 Ok that sounds fine, I too doubt it would be used outside the = kern_timeout.c file ;-) R >> #define callout_deactivate(c) ((c)->c_flags &=3D = ~CALLOUT_ACTIVE) >> #define callout_drain(c) _callout_stop_safe(c, 1) >> void callout_init(struct callout *, int); >=20 > --=20 > John Baldwin -------- Randall Stewart rrs@netflix.com 803-317-4952 From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 22:35:10 2015 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 BEB38F03 for ; Mon, 30 Mar 2015 22:35:10 +0000 (UTC) Received: from mail-pd0-x22d.google.com (mail-pd0-x22d.google.com [IPv6:2607:f8b0:400e:c02::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7E42727C for ; Mon, 30 Mar 2015 22:35:10 +0000 (UTC) Received: by pddn5 with SMTP id n5so73132918pdd.2 for ; Mon, 30 Mar 2015 15:35:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netflix.com; s=google; h=content-type:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=tdyg3lFEe+jtnCi7S4fUKPfFSLWSqLL/jIX2fA6Fr0I=; b=lWCq78tipIVjGYvy+GTwuvy7ERFZjxzuaWqFjDkbB1Trg3/6DtAK6qrFiHORkRqenz 03xkO0B6zWL8ZnnF4W0qbZzacdFyMreCjCfVV/MYSSheITtbcxF6K9jKHLh+A4cGBxxV cEt/I1X17Jfw3KzDBcjLY2Byq6/IQb1aVNuTw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:content-type:mime-version:subject:from :in-reply-to:date:cc:message-id:references:to; bh=tdyg3lFEe+jtnCi7S4fUKPfFSLWSqLL/jIX2fA6Fr0I=; b=UFe6RSk5kRKcDizvsb7ikXdYdSynd0NEJJovFzLEOM0TAlzr6BlkJbZf+skf8oo856 HyopY9OxRdjHKUAGDX4vTqhLA4bhgYVWOS6cbc4+4RZuVCfIhZBUZ3F9QRnFE/IwQm9J 59x1eraXas2FjpD35/28pHwsrprSPbsL9rqjh1ZaWesHqVTd0UcyWFxPFvkdQ1ZwYiVX SeV2UqI9T+o397mMHHvV1eqpJbly0/5AVVhy5DJ5cjbi0+YNXWXx5R1NzcCrPFNI+klS z39HIfYnsHfMxXjNRI6bF+o8T3uKlfi4uSEYS/3I3hRoISgGvXs0TJgP1/HToWKiRMtv ki6Q== X-Gm-Message-State: ALoCoQleBJWc4GlKIJ0kbZisqmtIGmPIJQTF5A2LMZ+MiEIio693EgZYdgUI5oRawnAAJUMFjV0R X-Received: by 10.66.146.6 with SMTP id sy6mr61475409pab.150.1427754910071; Mon, 30 Mar 2015 15:35:10 -0700 (PDT) Received: from ?IPv6:2607:fb10:2:236:6412:7db4:a40e:aec0? ([2607:fb10:2:236:6412:7db4:a40e:aec0]) by mx.google.com with ESMTPSA id dk3sm11711939pbb.91.2015.03.30.15.35.08 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 30 Mar 2015 15:35:08 -0700 (PDT) Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r280785 - in head/sys: kern netgraph/atm/sscop netgraph/atm/uni sys From: Randall Stewart In-Reply-To: <3254671.hyy8TUCr3i@ralph.baldwin.cx> Date: Mon, 30 Mar 2015 16:35:08 -0600 Message-Id: <31360B83-E0C0-427C-AAFD-8D47926B2C75@netflix.com> References: <201503281250.t2SCoOkt020297@svn.freebsd.org> <32487399.PTq7ESkWJT@ralph.baldwin.cx> <3254671.hyy8TUCr3i@ralph.baldwin.cx> To: John Baldwin X-Mailer: Apple Mail (2.1878.6) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: svn-src-head@freebsd.org, Randall Stewart , 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, 30 Mar 2015 22:35:10 -0000 John: FYI in getting this setup, NOCPU will mean callout.h will need to include sys/proc.h I hope thats ok.. either that or I need to do a #ifndef NOCPU #define NOCPU (-1) #endif.. Which seems ugly.. R On Mar 30, 2015, at 2:38 PM, John Baldwin wrote: > On Monday, March 30, 2015 11:16:20 AM John Baldwin wrote: >> The second sentence quite seem to be English ("have a lock touches" > > s/sentence quite/sentence doesn't quite/ *sigh* > > -- > John Baldwin -------- Randall Stewart rrs@netflix.com 803-317-4952 From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 22:38:45 2015 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 87A6414B; Mon, 30 Mar 2015 22:38:45 +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 506E32E2; Mon, 30 Mar 2015 22:38:44 +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 t2UMcb8L046759 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 31 Mar 2015 01:38:37 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t2UMcaUG046758; Tue, 31 Mar 2015 01:38:36 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 31 Mar 2015 01:38:36 +0300 From: Gleb Smirnoff To: Emeric POUPON Subject: Re: svn commit: r280759 - head/sys/netinet Message-ID: <20150330223836.GY64665@FreeBSD.org> References: <20150329210757.GA64665@FreeBSD.org> <551943B4.90102@selasky.org> <20150330125115.GI64665@FreeBSD.org> <551948A4.1070408@selasky.org> <5519535C.40608@selasky.org> <20150330141616.GC74532@zxy.spb.ru> <1872802434.26738716.1427729028579.JavaMail.zimbra@stormshield.eu> <20150330152707.GP64665@FreeBSD.org> <964618150.26750606.1427732445799.JavaMail.zimbra@stormshield.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <964618150.26750606.1427732445799.JavaMail.zimbra@stormshield.eu> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: Hans Petter Selasky , Adrian Chadd , src-committers@freebsd.org, Ian Lepore , svn-src-all@freebsd.org, Slawa Olhovchenkov , svn-src-head@freebsd.org, Fabien Thomas X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2015 22:38:45 -0000 On Mon, Mar 30, 2015 at 06:20:45PM +0200, Emeric POUPON wrote: E> Yes, sure! E> E> I will test it tomorrow and tell you the results. E> However, keep in mind I did not see any performance impact with the previous patch. I created a patch that enables RFC6864 and per-CPU ip_id for those packets, that do not qualify for being atomic. It is here: https://reviews.freebsd.org/D2177 -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 22:49:28 2015 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 2C7B694F; Mon, 30 Mar 2015 22:49: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 1884A617; Mon, 30 Mar 2015 22:49: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 t2UMnRnc071223; Mon, 30 Mar 2015 22:49:27 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2UMnRLM071219; Mon, 30 Mar 2015 22:49:27 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201503302249.t2UMnRLM071219@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Mon, 30 Mar 2015 22:49:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280869 - in head/sys: kern 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: Mon, 30 Mar 2015 22:49:28 -0000 Author: glebius Date: Mon Mar 30 22:49:26 2015 New Revision: 280869 URL: https://svnweb.freebsd.org/changeset/base/280869 Log: Catch up on r271387 and remove unused parameter from VOP_GETPAGES_ASYNC(). Modified: head/sys/kern/vnode_if.src head/sys/vm/vnode_pager.c Modified: head/sys/kern/vnode_if.src ============================================================================== --- head/sys/kern/vnode_if.src Mon Mar 30 20:44:08 2015 (r280868) +++ head/sys/kern/vnode_if.src Mon Mar 30 22:49:26 2015 (r280869) @@ -483,7 +483,6 @@ vop_getpages_async { IN vm_page_t *m; IN int count; IN int reqpage; - IN vm_ooffset_t offset; IN vop_getpages_iodone_t *iodone; IN void *arg; }; Modified: head/sys/vm/vnode_pager.c ============================================================================== --- head/sys/vm/vnode_pager.c Mon Mar 30 20:44:08 2015 (r280868) +++ head/sys/vm/vnode_pager.c Mon Mar 30 22:49:26 2015 (r280869) @@ -686,7 +686,7 @@ vnode_pager_getpages_async(vm_object_t o vp = object->handle; VM_OBJECT_WUNLOCK(object); - rtval = VOP_GETPAGES_ASYNC(vp, m, count * PAGE_SIZE, reqpage, 0, + rtval = VOP_GETPAGES_ASYNC(vp, m, count * PAGE_SIZE, reqpage, iodone, arg); KASSERT(rtval != EOPNOTSUPP, ("vnode_pager: FS getpages_async not implemented\n")); From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 00:00:49 2015 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 1CF19EDB; Tue, 31 Mar 2015 00:00: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 088F2E04; Tue, 31 Mar 2015 00:00: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 t2V00mu0005396; Tue, 31 Mar 2015 00:00:48 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2V00mLm005395; Tue, 31 Mar 2015 00:00:48 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201503310000.t2V00mLm005395@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 31 Mar 2015 00:00:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280870 - head/contrib/libarchive/libarchive 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, 31 Mar 2015 00:00:49 -0000 Author: bdrewery Date: Tue Mar 31 00:00:47 2015 New Revision: 280870 URL: https://svnweb.freebsd.org/changeset/base/280870 Log: Fix --one-file-system to include the directory encountered rather than excluding it. This was broken in 3.0.4 (r238856). Obtained from: https://github.com/libarchive/libarchive/commit/fa9e61 MFC after: 3 days Sponsored by: EMC / Isilon Storage Division Modified: head/contrib/libarchive/libarchive/archive_read_disk_posix.c Modified: head/contrib/libarchive/libarchive/archive_read_disk_posix.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_disk_posix.c Mon Mar 30 22:49:26 2015 (r280869) +++ head/contrib/libarchive/libarchive/archive_read_disk_posix.c Tue Mar 31 00:00:47 2015 (r280870) @@ -974,7 +974,7 @@ next_entry(struct archive_read_disk *a, t->initial_filesystem_id = t->current_filesystem_id; if (!a->traverse_mount_points) { if (t->initial_filesystem_id != t->current_filesystem_id) - return (ARCHIVE_RETRY); + descend = 0; } t->descend = descend; From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 00:15:28 2015 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 4B6544D3; Tue, 31 Mar 2015 00:15: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 37678F3B; Tue, 31 Mar 2015 00:15: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 t2V0FSk5014666; Tue, 31 Mar 2015 00:15:28 GMT (envelope-from rrs@FreeBSD.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2V0FSX3014665; Tue, 31 Mar 2015 00:15:28 GMT (envelope-from rrs@FreeBSD.org) Message-Id: <201503310015.t2V0FSX3014665@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rrs set sender to rrs@FreeBSD.org using -f From: Randall Stewart Date: Tue, 31 Mar 2015 00:15:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280871 - 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: Tue, 31 Mar 2015 00:15:28 -0000 Author: rrs Date: Tue Mar 31 00:15:27 2015 New Revision: 280871 URL: https://svnweb.freebsd.org/changeset/base/280871 Log: Change the c_iflags and c_flags fields to short rather then int. This allows us to keep the KPI the same. Discussed and brain-stormed with imp (thanks for the help Warner!) Sponsored by: Netflix Inc. Modified: head/sys/sys/_callout.h Modified: head/sys/sys/_callout.h ============================================================================== --- head/sys/sys/_callout.h Tue Mar 31 00:00:47 2015 (r280870) +++ head/sys/sys/_callout.h Tue Mar 31 00:15:27 2015 (r280871) @@ -57,8 +57,8 @@ struct callout { void *c_arg; /* function argument */ void (*c_func)(void *); /* function to call */ struct lock_object *c_lock; /* lock to handle */ - int c_flags; /* User State */ - int c_iflags; /* Internal State */ + short c_flags; /* User State */ + short c_iflags; /* Internal State */ volatile int c_cpu; /* CPU we're scheduled on */ }; From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 00:18:02 2015 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 7917D84C; Tue, 31 Mar 2015 00:18: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 4C50AF78; Tue, 31 Mar 2015 00:18: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 t2V0I2WF015130; Tue, 31 Mar 2015 00:18:02 GMT (envelope-from rrs@FreeBSD.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2V0I1o7015125; Tue, 31 Mar 2015 00:18:01 GMT (envelope-from rrs@FreeBSD.org) Message-Id: <201503310018.t2V0I1o7015125@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rrs set sender to rrs@FreeBSD.org using -f From: Randall Stewart Date: Tue, 31 Mar 2015 00:18:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280872 - 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: Tue, 31 Mar 2015 00:18:02 -0000 Author: rrs Date: Tue Mar 31 00:18:00 2015 New Revision: 280872 URL: https://svnweb.freebsd.org/changeset/base/280872 Log: Adopt jhb's suggested changes, updated comments and callout_migration() moving to kern/kern_timeout.c This does *not* address his -1 -> NOCPU comment. Sponsored by: Netflix Inc. Modified: head/sys/kern/kern_timeout.c head/sys/sys/callout.h Modified: head/sys/kern/kern_timeout.c ============================================================================== --- head/sys/kern/kern_timeout.c Tue Mar 31 00:15:27 2015 (r280871) +++ head/sys/kern/kern_timeout.c Tue Mar 31 00:18:00 2015 (r280872) @@ -167,6 +167,8 @@ struct callout_cpu { char cc_ktr_event_name[20]; }; +#define callout_migrating(c) ((c)->c_iflags & CALLOUT_DFRMIGRATION) + #define cc_exec_curr(cc, dir) cc->cc_exec_entity[dir].cc_curr #define cc_exec_next(cc) cc->cc_next #define cc_exec_cancel(cc, dir) cc->cc_exec_entity[dir].cc_cancel Modified: head/sys/sys/callout.h ============================================================================== --- head/sys/sys/callout.h Tue Mar 31 00:15:27 2015 (r280871) +++ head/sys/sys/callout.h Tue Mar 31 00:18:00 2015 (r280872) @@ -68,18 +68,18 @@ struct callout_handle { * field is the one that caller operations that may, or may not have * a lock touches i.e. callout_deactivate(). The other, the c_iflags, * is the internal flags that *must* be kept correct on which the - * callout system depend on i.e. callout_migrating() & callout_pending(), - * these are used internally by the callout system to determine which - * list and other critical internal state. Callers *should not* use the - * c_flags field directly but should use the macros! + * callout system depend on e.g. callout_pending(). + * The c_iflag is used internally by the callout system to determine which + * list the callout is on and track internal state. Callers *should not* + * use the c_flags field directly but should use the macros provided. * - * If the caller wants to keep the c_flags field sane they - * should init with a mutex *or* if using the older - * mpsafe option, they *must* lock there own lock - * before calling callout_deactivate(). + * The c_iflags field holds internal flags that are protected by internal + * locks of the callout subsystem. The c_flags field holds external flags. + * The caller must hold its own lock while manipulating or reading external + * flags via callout_active(), callout_deactivate(), callout_reset*(), or + * callout_stop() to avoid races. */ #define callout_active(c) ((c)->c_flags & CALLOUT_ACTIVE) -#define callout_migrating(c) ((c)->c_iflags & CALLOUT_DFRMIGRATION) #define callout_deactivate(c) ((c)->c_flags &= ~CALLOUT_ACTIVE) #define callout_drain(c) _callout_stop_safe(c, 1) void callout_init(struct callout *, int); From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 00:26:27 2015 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 9D7C7A74 for ; Tue, 31 Mar 2015 00:26:27 +0000 (UTC) Received: from mail-pa0-x231.google.com (mail-pa0-x231.google.com [IPv6:2607:f8b0:400e:c03::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 59C86CA for ; Tue, 31 Mar 2015 00:26:27 +0000 (UTC) Received: by patj18 with SMTP id j18so1957184pat.2 for ; Mon, 30 Mar 2015 17:26:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netflix.com; s=google; h=content-type:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=rf6JHv77oYR+8K2kwh9DTBNTo7CnBAP+ZgPEP47NHLA=; b=XgOLI3dA/vY2HSTvHRUlpVayTigvIRtX7svZNFpyfowo4JmniqV/SDNlwbyps/JrQj frN1lFUEwrFW090ky9M8lAQf9xqfnHNG79aLzOY+ekD5Oh8126vwBQIaU1iWI7O+ZTRq oUwOBn5CI350O92DGsa7SHAo0wm4SXeRRKOcY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:content-type:mime-version:subject:from :in-reply-to:date:cc:message-id:references:to; bh=rf6JHv77oYR+8K2kwh9DTBNTo7CnBAP+ZgPEP47NHLA=; b=XX1ZYMoYDZLfY8YSxoo/3yeC09Prv010D/YZtINKHJINv4QtqPQHGU1D7eSRlIDjB8 Bp9lD//iy72qfhpbCkpnQrUWdyYrXkkdV/ls+ORt8d63P1MpKdcQfUWFqrJwNXaW/Iw6 w5xlxUB/HWbmkqohyj8D8MXehKf3Vd4Jh0vrEC5q5Tzv2o+/FdpcdKSRUzgA+nars99U geOcsNEPtPFXzAy05nh8AOk+yt0K81mdZjsWepSq+dpxsxrl2kAsjv/duR+3LiKjxd00 extrKD73in3jOGHVOrMhjPAcC5qoVaIi4wRPbKX823x5oRyTtl/3djQAvvSquwCY5Or2 x/DQ== X-Gm-Message-State: ALoCoQm93rh1UImbqGbS7K3a1i9VjiM8YJNfLOM2I6Bk3cyOf6OWD3cFJ1nfOhVqstxfIgO0Yx9z X-Received: by 10.68.170.133 with SMTP id am5mr63149361pbc.42.1427761586789; Mon, 30 Mar 2015 17:26:26 -0700 (PDT) Received: from ?IPv6:2607:fb10:2:236:6412:7db4:a40e:aec0? ([2607:fb10:2:236:6412:7db4:a40e:aec0]) by mx.google.com with ESMTPSA id km11sm11853047pbd.90.2015.03.30.17.26.24 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 30 Mar 2015 17:26:25 -0700 (PDT) Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r280785 - in head/sys: kern netgraph/atm/sscop netgraph/atm/uni sys From: Randall Stewart In-Reply-To: <32487399.PTq7ESkWJT@ralph.baldwin.cx> Date: Mon, 30 Mar 2015 18:26:25 -0600 Message-Id: <26047F0C-A975-4DAC-9077-31B5EC4902DA@netflix.com> References: <201503281250.t2SCoOkt020297@svn.freebsd.org> <32487399.PTq7ESkWJT@ralph.baldwin.cx> To: John Baldwin X-Mailer: Apple Mail (2.1878.6) Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: svn-src-head@freebsd.org, Randall Stewart , 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, 31 Mar 2015 00:26:27 -0000 On Mar 30, 2015, at 9:16 AM, John Baldwin wrote: > On Saturday, March 28, 2015 12:50:24 PM Randall Stewart wrote: >> Author: rrs >> Date: Sat Mar 28 12:50:24 2015 >> New Revision: 280785 >> URL: https://svnweb.freebsd.org/changeset/base/280785 >>=20 >> Log: >> Change the callout to supply -1 to indicate we are not changing >> CPU, also add protection against invalid CPU's as well as >> split c_flags and c_iflags so that if a user plays with the active >> flag (the one expected to be played with by callers in MPSAFE) = without >> a lock, it won't adversely affect the callout system by causing a = corrupt >> list. This also means that all callers need to use the macros and = *not* >> play with the falgs directly (like netgraph used to). >>=20 >> Differential Revision: htts://reviews.freebsd.org/D1894 >> Reviewed by: .. timed out but looked at by jhb, imp, adrian hselasky >> tested by hiren and netflix. >> Sponsored by: Netflix Inc. >=20 > Please use NOCPU rather than -1 directly for the CPU field when not > moving a callout. >=20 John: I have made *all* of your suggested changes, adopting the comments and moving migration to kern_timeout.c.. thanks.. Now as to the=20 -1 -> NOCPU This is like pulling on a string on your sweater.. the only sensible = solution that I could come up with after chatting with Lawrence is to add=20 #include to everyone that uses the callout.h and does not have it already=85 = (putting it into callout.h does not work) .. sigh.. Now for this cosmetic change I end up with the following changes (and as = yet I have not built LINT or universe so there may be more).. I have spent about 2 = hours on this so far and I can at least build a kernel with the change for amd64 :-0 Here is what has to change, do you really think that this is worth it? Note I did not look into moving NOCPU in proc.h it says it means no CPU = is present which is sort of the meaning we want.. I am not sure if the define could = be moved .. but that too may be yet another string... Is this worth it, or do you have another idea on how best to do this??? R --------------------------- M amd64/vmm/io/vatpit.c M amd64/vmm/io/vhpet.c M amd64/vmm/io/vlapic.c M amd64/vmm/io/vrtc.c M cam/ctl/ctl.c M cam/ctl/ctl_frontend_iscsi.c M cam/ctl/ctl_tpc.c M cam/scsi/scsi_cd.c M cam/scsi/scsi_enc.c M conf/kern.opts.mk M dev/aac/aac.c M dev/aacraid/aacraid.c M dev/advansys/advansys.c M dev/advansys/advlib.c M dev/advansys/adwcam.c M dev/ae/if_ae.c M dev/age/if_age.c M dev/aha/aha.c M dev/ahci/ahci.c M dev/aic/aic.c M dev/aic7xxx/ahc_isa.c M dev/aic7xxx/ahc_pci.c M dev/aic7xxx/aic7770.c M dev/aic7xxx/aic79xx_osm.h M dev/aic7xxx/aic7xxx.c M dev/aic7xxx/aic7xxx_93cx6.c M dev/aic7xxx/aic7xxx_osm.c M dev/aic7xxx/aic7xxx_pci.c M dev/aic7xxx/aic7xxx_reg_print.c M dev/alc/if_alc.c M dev/ale/if_ale.c M dev/ata/ata-all.c M dev/ata/ata-lowlevel.c M dev/ath/if_ath.c M dev/ath/if_ath_led.c M dev/atkbdc/psm.c M dev/bce/if_bce.c M dev/bfe/if_bfe.c M dev/bge/if_bge.c M dev/buslogic/bt.c M dev/bwn/if_bwn.c M dev/bxe/bxe.h M dev/cas/if_cas.c M dev/ciss/ciss.c M dev/cmx/cmx.c M dev/cs/if_cs.c M dev/cxgbe/t4_main.c M dev/cxgbe/t4_sge.c M dev/dc/if_dc.c M dev/de/if_de.c M dev/dpt/dpt_scsi.c M dev/e1000/if_em.c M dev/e1000/if_igb.c M dev/e1000/if_lem.c M dev/ed/if_ed.c M dev/ep/if_ep.c M dev/esp/ncr53c9x.c M dev/fatm/if_fatm.c M dev/fe/if_fe.c M dev/firewire/firewire.c M dev/firewire/sbp.c M dev/firewire/sbp_targ.c M dev/fxp/if_fxp.c M dev/gem/if_gem.c M dev/hme/if_hme.c M dev/hpt27xx/os_bsd.h M dev/hptiop/hptiop.c M dev/hptnr/os_bsd.h M dev/hptrr/os_bsd.h M dev/ida/ida.c M dev/iir/iir.c M dev/ips/ips.c M dev/ipw/if_ipw.c M dev/isci/isci.h M dev/iscsi/iscsi.c M dev/iwn/if_iwn.c M dev/le/lance.c M dev/led/led.c M dev/lge/if_lge.c M dev/lmc/if_lmc.c M dev/malo/if_malo.c M dev/mcd/mcd.c M dev/mlx/mlx.c M dev/mpr/mpr_sas.c M dev/mps/mps_sas.c M dev/mps/mps_sas_lsi.c M dev/msk/if_msk.c M dev/mvs/mvs.c M dev/mwl/if_mwl.c M dev/mxge/if_mxge.c M dev/my/if_my.c M dev/nfe/if_nfe.c M dev/nge/if_nge.c M dev/ntb/if_ntb/if_ntb.c M dev/ntb/ntb_hw/ntb_hw.c M dev/patm/if_patm_tx.c M dev/pcn/if_pcn.c M dev/ppbus/lpt.c M dev/ppbus/pps.c M dev/ral/rt2560.c M dev/ral/rt2661.c M dev/ral/rt2860.c M dev/re/if_re.c M dev/rl/if_rl.c M dev/scd/scd.c M dev/sdhci/sdhci.c M dev/sf/if_sf.c M dev/sge/if_sge.c M dev/siis/siis.c M dev/sis/if_sis.c M dev/sk/if_sk.c M dev/sn/if_sn.c M dev/ste/if_ste.c M dev/stge/if_stge.c M dev/ti/if_ti.c M dev/tl/if_tl.c M dev/twa/tw_osl_freebsd.c M dev/tx/if_tx.c M dev/txp/if_txp.c M dev/uart/uart_core.c M dev/usb/controller/ehci.c M dev/usb/controller/ohci.c M dev/usb/controller/uhci.c M dev/usb/controller/xhci_pci.c M dev/usb/gadget/g_audio.c M dev/usb/gadget/g_keyboard.c M dev/usb/gadget/g_modem.c M dev/usb/gadget/g_mouse.c M dev/usb/input/atp.c M dev/usb/input/ums.c M dev/usb/net/if_usie.c M dev/usb/net/usb_ethernet.c M dev/usb/serial/ulpt.c M dev/usb/serial/uslcom.c M dev/usb/wlan/if_rsu.c M dev/usb/wlan/if_rum.c M dev/usb/wlan/if_run.c M dev/usb/wlan/if_uath.c M dev/usb/wlan/if_upgt.c M dev/usb/wlan/if_ural.c M dev/usb/wlan/if_urtw.c M dev/usb/wlan/if_urtwn.c M dev/usb/wlan/if_zyd.c M dev/vge/if_vge.c M dev/virtio/network/if_vtnet.c M dev/virtio/random/virtio_random.c M dev/virtio/scsi/virtio_scsi.c M dev/vmware/vmxnet3/if_vmx.c M dev/vr/if_vr.c M dev/vte/if_vte.c M dev/vx/if_vx.c M dev/watchdog/watchdog.c M dev/wb/if_wb.c M dev/wpi/if_wpi.c M dev/xe/if_xe.c M dev/xen/netfront/netfront.c M dev/xl/if_xl.c M gdb/gdb_cons.c M geom/cache/g_cache.c M geom/raid/md_ddf.c M geom/raid/md_intel.c M geom/raid/md_jmicron.c M geom/raid/md_nvidia.c M geom/raid/md_promise.c M geom/raid/md_sii.c M kern/subr_vmem.c M kern/uipc_domain.c M net/ieee8023ad_lacp.c M net/if_spppsubr.c M net80211/ieee80211_ht.c M net80211/ieee80211_node.c M net80211/ieee80211_output.c M net80211/ieee80211_proto.c M netgraph/bluetooth/socket/ng_btsocket_l2cap.c M netgraph/bluetooth/socket/ng_btsocket_sco.c M netgraph/netflow/netflow.c M netgraph/netflow/ng_netflow.c M netinet/ip_mroute.c M netinet/sctp_os_bsd.h M netinet/tcp_hostcache.c M netinet6/in6_rmx.c M netinet6/ip6_mroute.c M netinet6/nd6.c M netinet6/nd6_nbr.c M netpfil/pf/if_pfsync.c -------- Randall Stewart rrs@netflix.com 803-317-4952 From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 00:32:46 2015 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 49BF1C47; Tue, 31 Mar 2015 00:32:46 +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 AB55E1B4; Tue, 31 Mar 2015 00:32:45 +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 t2V0WeFH082881 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Tue, 31 Mar 2015 03:32:40 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t2V0WeFH082881 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t2V0WdVe082880; Tue, 31 Mar 2015 03:32:39 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 31 Mar 2015 03:32:39 +0300 From: Konstantin Belousov To: John Baldwin Subject: Re: svn commit: r280279 - head/sys/sys Message-ID: <20150331003239.GK2379@kib.kiev.ua> References: <201503201027.t2KAR6Ze053047@svn.freebsd.org> <2526359.g5B2nXdKeQ@ralph.baldwin.cx> <20150330172434.GG2379@kib.kiev.ua> <1853187.nsx00mfzo7@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1853187.nsx00mfzo7@ralph.baldwin.cx> 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, 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: Tue, 31 Mar 2015 00:32:46 -0000 On Mon, Mar 30, 2015 at 04:37:10PM -0400, John Baldwin wrote: > On Monday, March 30, 2015 08:24:34 PM Konstantin Belousov wrote: > > > That is not what Bruce said. He suggested using bitcount64() for the fallback > > > if the cpuid check fails. He did not say to remove the runtime check to use > > > popcnt if it is available: > > > > > > "Always using [bitcount64] would lose the micro-optimization... [to] keep > > > [it], it seems best to keep the inline asm but replace popcnt_pc_map_elem(elem) > > > by [bitcount64(elem)]." > > Ok, thank you for the clarification. > > > > I updated the pmap patch, see the end of the message. > > I think the pmap change looks fine. If we know which compilers include a > workaround we might also consider specifying "-mno-popcount" for everything > except known-ok compilers in at least kern.mk. Right now the compilers which implement the workaround are gcc 4.9.2 and gcc trunk, to be released as gcc 5.0. In-tree clang 3.6.0 does not try to eliminate the false dependency. > > > > This looks fine to me. It seems to be manually converting certain symbols > > > to use a dynamic lookup that must be explicitly resolved before first > > > use? > > I am not sure what do you mean by dynamic lookup, but possibly it > > was mentioned. I can emulate the ifuncs more sincerely, by requiring > > a resolver function, which is called on the first real function > > invocation. I did not see it as very useful, but it is definitely > > doable. > > I just mean that the effect at runtime is similar to that of dynamic > symbols once they are resolved (a call into a PLT entry (or is it GOT? > I keep getting those confused) that does a jump to the resolved symbol). PLT is slightly more expensive, since after the resolution it gives call symbol@plt jmp *symbol@gotpcrel while this code results in call *symbol_selector From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 00:39:00 2015 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 186A6DDA; Tue, 31 Mar 2015 00:39:00 +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 AE7261DD; Tue, 31 Mar 2015 00:38:59 +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 t2V0cofX084079 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Tue, 31 Mar 2015 03:38:50 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t2V0cofX084079 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t2V0co2t084078; Tue, 31 Mar 2015 03:38:50 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 31 Mar 2015 03:38:50 +0300 From: Konstantin Belousov To: John Baldwin Subject: Re: svn commit: r280866 - in head/sys: amd64/amd64 i386/i386 Message-ID: <20150331003850.GL2379@kib.kiev.ua> References: <201503302013.t2UKDNCo093442@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201503302013.t2UKDNCo093442@svn.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 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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, 31 Mar 2015 00:39:00 -0000 On Mon, Mar 30, 2015 at 08:13:23PM +0000, John Baldwin wrote: > Author: jhb > Date: Mon Mar 30 20:13:22 2015 > New Revision: 280866 > URL: https://svnweb.freebsd.org/changeset/base/280866 > > Log: > Wait 100 microseconds for a local APIC to dispatch each startup-related IPI > rather than 20. The MP 1.4 specification states in Appendix B.2: > > "A period of 20 microseconds should be sufficient for IPI dispatch to > complete under normal operating conditions". > > (Note that this appears to be separate from the 10 millisecond (INIT) and > 200 microsecond (STARTUP) waits after the IPIs are dispatched.) The > Intel SDM is silent on this issue as far as I can tell. > > At least some hardware requires 60 microseconds as noted in the PR, so > bump this to 100 to be on the safe side. > > PR: 197756 > Reported by: zaphod@berentweb.com > MFC after: 1 week > > Modified: > head/sys/amd64/amd64/mp_machdep.c > head/sys/i386/i386/mp_machdep.c > > Modified: head/sys/amd64/amd64/mp_machdep.c > ============================================================================== > --- head/sys/amd64/amd64/mp_machdep.c Mon Mar 30 20:01:41 2015 (r280865) > +++ head/sys/amd64/amd64/mp_machdep.c Mon Mar 30 20:13:22 2015 (r280866) > @@ -1084,7 +1084,7 @@ ipi_startup(int apic_id, int vector) > */ > lapic_ipi_raw(APIC_DEST_DESTFLD | APIC_TRIGMOD_LEVEL | > APIC_LEVEL_ASSERT | APIC_DESTMODE_PHY | APIC_DELMODE_INIT, apic_id); > - lapic_ipi_wait(20); > + lapic_ipi_wait(100); > > /* Explicitly deassert the INIT IPI. */ > lapic_ipi_raw(APIC_DEST_DESTFLD | APIC_TRIGMOD_LEVEL | > @@ -1104,7 +1104,7 @@ ipi_startup(int apic_id, int vector) > lapic_ipi_raw(APIC_DEST_DESTFLD | APIC_TRIGMOD_EDGE | > APIC_LEVEL_ASSERT | APIC_DESTMODE_PHY | APIC_DELMODE_STARTUP | > vector, apic_id); > - if (!lapic_ipi_wait(20)) > + if (!lapic_ipi_wait(100)) > panic("Failed to deliver first STARTUP IPI to APIC %d", > apic_id); > DELAY(200); /* wait ~200uS */ > @@ -1118,7 +1118,7 @@ ipi_startup(int apic_id, int vector) > lapic_ipi_raw(APIC_DEST_DESTFLD | APIC_TRIGMOD_EDGE | > APIC_LEVEL_ASSERT | APIC_DESTMODE_PHY | APIC_DELMODE_STARTUP | > vector, apic_id); > - if (!lapic_ipi_wait(20)) > + if (!lapic_ipi_wait(100)) > panic("Failed to deliver second STARTUP IPI to APIC %d", > apic_id); I initially thought that some x2APIC issues, which are still not understood, are related to changed timing, and esp. to the fact that lapic_ipi_wait() is nop for x2APIC mode. I have the patch that increased all DELAYs, in particular, the delays after the lapic_ipi_wait()s, by two times. But apparently, that did not helped, and it seems that there are sporadic reports of Linux having similar issues with x2APIC on similar mobile SandyBridge, which are proof-less charged to BIOS bugs. Mostly, my question is, should we increase DELAYS() in addition to lapic_ipi_wait() timeouts ? From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 00:55:13 2015 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 A3FF81C4; Tue, 31 Mar 2015 00:55: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 8F070394; Tue, 31 Mar 2015 00:55: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 t2V0tDZP033260; Tue, 31 Mar 2015 00:55:13 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2V0tDWH033259; Tue, 31 Mar 2015 00:55:13 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201503310055.t2V0tDWH033259@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 31 Mar 2015 00:55: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: r280873 - stable/10/sys/x86/iommu 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, 31 Mar 2015 00:55:13 -0000 Author: kib Date: Tue Mar 31 00:55:12 2015 New Revision: 280873 URL: https://svnweb.freebsd.org/changeset/base/280873 Log: MFC r280434: Assert that the mapping loop makes progress. Modified: stable/10/sys/x86/iommu/intel_idpgtbl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/x86/iommu/intel_idpgtbl.c ============================================================================== --- stable/10/sys/x86/iommu/intel_idpgtbl.c Tue Mar 31 00:18:00 2015 (r280872) +++ stable/10/sys/x86/iommu/intel_idpgtbl.c Tue Mar 31 00:55:12 2015 (r280873) @@ -464,6 +464,7 @@ ctx_map_buf_locked(struct dmar_ctx *ctx, KASSERT(size >= pg_sz, ("mapping loop overflow %p %jx %jx %jx", ctx, (uintmax_t)base, (uintmax_t)size, (uintmax_t)pg_sz)); + KASSERT(pg_sz > 0, ("pg_sz 0 lvl %d", lvl)); pte = ctx_pgtbl_map_pte(ctx, base, lvl, flags, &idx, &sf); if (pte == NULL) { KASSERT((flags & DMAR_PGF_WAITOK) == 0, From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 00:57:26 2015 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 20D82304; Tue, 31 Mar 2015 00: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 0B8D13B1; Tue, 31 Mar 2015 00: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 t2V0vP5Q033581; Tue, 31 Mar 2015 00:57:25 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2V0vPql033580; Tue, 31 Mar 2015 00:57:25 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201503310057.t2V0vPql033580@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 31 Mar 2015 00:57:25 +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: r280874 - stable/10/sys/x86/iommu 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, 31 Mar 2015 00:57:26 -0000 Author: kib Date: Tue Mar 31 00:57:25 2015 New Revision: 280874 URL: https://svnweb.freebsd.org/changeset/base/280874 Log: MFC r280435: When mapping an allocated entry, use the entry size, instead of the requested size. If tag restrictions caused split entry, its size is less then requsted. Modified: stable/10/sys/x86/iommu/intel_gas.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/x86/iommu/intel_gas.c ============================================================================== --- stable/10/sys/x86/iommu/intel_gas.c Tue Mar 31 00:55:12 2015 (r280873) +++ stable/10/sys/x86/iommu/intel_gas.c Tue Mar 31 00:57:25 2015 (r280874) @@ -648,7 +648,7 @@ dmar_gas_map(struct dmar_ctx *ctx, const entry->flags |= eflags; DMAR_CTX_UNLOCK(ctx); - error = ctx_map_buf(ctx, entry->start, size, ma, + error = ctx_map_buf(ctx, entry->start, entry->end - entry->start, ma, ((eflags & DMAR_MAP_ENTRY_READ) != 0 ? DMAR_PTE_R : 0) | ((eflags & DMAR_MAP_ENTRY_WRITE) != 0 ? DMAR_PTE_W : 0) | ((eflags & DMAR_MAP_ENTRY_SNOOP) != 0 ? DMAR_PTE_SNP : 0) | From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 00:59:31 2015 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 C7984444; Tue, 31 Mar 2015 00:59: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 B26AC3BC; Tue, 31 Mar 2015 00:59: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 t2V0xVA3033863; Tue, 31 Mar 2015 00:59:31 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2V0xVqu033862; Tue, 31 Mar 2015 00:59:31 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201503310059.t2V0xVqu033862@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 31 Mar 2015 00:59:31 +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: r280875 - 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: Tue, 31 Mar 2015 00:59:31 -0000 Author: kib Date: Tue Mar 31 00:59:30 2015 New Revision: 280875 URL: https://svnweb.freebsd.org/changeset/base/280875 Log: MFC r280780: The #ss fault handler erronously does not check for the fault originated from the return to usermode. #ss must be handled same as #np. Modified: stable/10/sys/amd64/amd64/trap.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/amd64/trap.c ============================================================================== --- stable/10/sys/amd64/amd64/trap.c Tue Mar 31 00:57:25 2015 (r280874) +++ stable/10/sys/amd64/amd64/trap.c Tue Mar 31 00:59:30 2015 (r280875) @@ -457,8 +457,6 @@ trap(struct trapframe *frame) goto out; case T_STKFLT: /* stack fault */ - break; - case T_PROTFLT: /* general protection fault */ case T_SEGNPFLT: /* segment not present fault */ if (td->td_intr_nesting_level != 0) From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 01:05:35 2015 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 C25C05D2; Tue, 31 Mar 2015 01:05: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 AD4E3661; Tue, 31 Mar 2015 01:05: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 t2V15Z1V038153; Tue, 31 Mar 2015 01:05:35 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2V15ZCZ038152; Tue, 31 Mar 2015 01:05:35 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201503310105.t2V15ZCZ038152@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 31 Mar 2015 01:05:35 +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: r280876 - 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: Tue, 31 Mar 2015 01:05:35 -0000 Author: kib Date: Tue Mar 31 01:05:34 2015 New Revision: 280876 URL: https://svnweb.freebsd.org/changeset/base/280876 Log: MFC r280781: Make it possible for the signal handler to act on #ss. Load the canonical user data segment' selector into %ss when calling the handler. Modified: stable/10/sys/amd64/amd64/machdep.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/amd64/machdep.c ============================================================================== --- stable/10/sys/amd64/amd64/machdep.c Tue Mar 31 00:59:30 2015 (r280875) +++ stable/10/sys/amd64/amd64/machdep.c Tue Mar 31 01:05:34 2015 (r280876) @@ -429,6 +429,7 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, regs->tf_rflags &= ~(PSL_T | PSL_D); regs->tf_cs = _ucodesel; regs->tf_ds = _udatasel; + regs->tf_ss = _udatasel; regs->tf_es = _udatasel; regs->tf_fs = _ufssel; regs->tf_gs = _ugssel; From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 01:08:53 2015 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 09514744; Tue, 31 Mar 2015 01:08: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 E86FA690; Tue, 31 Mar 2015 01:08: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 t2V18qbq038560; Tue, 31 Mar 2015 01:08:52 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2V18qQn038559; Tue, 31 Mar 2015 01:08:52 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201503310108.t2V18qQn038559@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 31 Mar 2015 01:08:52 +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: r280877 - stable/9/sys/amd64/amd64 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, 31 Mar 2015 01:08:53 -0000 Author: kib Date: Tue Mar 31 01:08:51 2015 New Revision: 280877 URL: https://svnweb.freebsd.org/changeset/base/280877 Log: MFC r280780: The #ss fault handler erronously does not check for the fault originated from the return to usermode. #ss must be handled same as #np. Modified: stable/9/sys/amd64/amd64/trap.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/amd64/trap.c ============================================================================== --- stable/9/sys/amd64/amd64/trap.c Tue Mar 31 01:05:34 2015 (r280876) +++ stable/9/sys/amd64/amd64/trap.c Tue Mar 31 01:08:51 2015 (r280877) @@ -479,8 +479,6 @@ trap(struct trapframe *frame) goto out; case T_STKFLT: /* stack fault */ - break; - case T_PROTFLT: /* general protection fault */ case T_SEGNPFLT: /* segment not present fault */ if (td->td_intr_nesting_level != 0) From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 01:22:21 2015 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 679EF97F; Tue, 31 Mar 2015 01:22: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 52E76888; Tue, 31 Mar 2015 01:22: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 t2V1MLbl047128; Tue, 31 Mar 2015 01:22:21 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2V1MLYj047127; Tue, 31 Mar 2015 01:22:21 GMT (envelope-from np@FreeBSD.org) Message-Id: <201503310122.t2V1MLYj047127@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Tue, 31 Mar 2015 01:22:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280878 - head/sys/dev/cxgbe/tom 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, 31 Mar 2015 01:22:21 -0000 Author: np Date: Tue Mar 31 01:22:20 2015 New Revision: 280878 URL: https://svnweb.freebsd.org/changeset/base/280878 Log: cxgbe/tom: return rx credits promptly if the socket buffer's low water mark cannot be reached because the window advertised to the peer isn't wide enough. While here, tweak the normal credit return too. MFC after: 1 month Modified: head/sys/dev/cxgbe/tom/t4_cpl_io.c Modified: head/sys/dev/cxgbe/tom/t4_cpl_io.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_cpl_io.c Tue Mar 31 01:08:51 2015 (r280877) +++ head/sys/dev/cxgbe/tom/t4_cpl_io.c Tue Mar 31 01:22:20 2015 (r280878) @@ -390,19 +390,17 @@ t4_rcvd(struct toedev *tod, struct tcpcb toep->rx_credits += toep->sb_cc - sbused(sb); toep->sb_cc = sbused(sb); } - credits = toep->rx_credits; - SOCKBUF_UNLOCK(sb); - - if (credits > 0 && - (credits + 16384 >= tp->rcv_wnd || credits >= 15 * 1024)) { + if (toep->rx_credits > 0 && + (tp->rcv_wnd <= 32 * 1024 || toep->rx_credits >= 64 * 1024 || + (toep->rx_credits >= 16 * 1024 && tp->rcv_wnd <= 128 * 1024) || + toep->sb_cc + tp->rcv_wnd < sb->sb_lowat)) { - credits = send_rx_credits(sc, toep, credits); - SOCKBUF_LOCK(sb); + credits = send_rx_credits(sc, toep, toep->rx_credits); toep->rx_credits -= credits; - SOCKBUF_UNLOCK(sb); tp->rcv_wnd += credits; tp->rcv_adv += credits; } + SOCKBUF_UNLOCK(sb); } /* @@ -1606,6 +1604,14 @@ do_rx_data(struct sge_iq *iq, const stru toep->rx_credits += toep->sb_cc - sbused(sb); sbappendstream_locked(sb, m, 0); toep->sb_cc = sbused(sb); + if (toep->rx_credits > 0 && toep->sb_cc + tp->rcv_wnd < sb->sb_lowat) { + int credits; + + credits = send_rx_credits(sc, toep, toep->rx_credits); + toep->rx_credits -= credits; + tp->rcv_wnd += credits; + tp->rcv_adv += credits; + } sorwakeup_locked(so); SOCKBUF_UNLOCK_ASSERT(sb); From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 01:28:34 2015 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 DC96EE77; Tue, 31 Mar 2015 01:28: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 BD2FE8F4; Tue, 31 Mar 2015 01:28: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 t2V1SYNh048010; Tue, 31 Mar 2015 01:28:34 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2V1SYHR048008; Tue, 31 Mar 2015 01:28:34 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201503310128.t2V1SYHR048008@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Tue, 31 Mar 2015 01:28:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280879 - in head/release: . tools 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, 31 Mar 2015 01:28:35 -0000 Author: cperciva Date: Tue Mar 31 01:28:33 2015 New Revision: 280879 URL: https://svnweb.freebsd.org/changeset/base/280879 Log: Add bits for building EC2 disk images. Make logic for uploading these to create EC2 AMIs will come in a later commit. Added: head/release/tools/ec2.conf (contents, props changed) Modified: head/release/Makefile.vm Modified: head/release/Makefile.vm ============================================================================== --- head/release/Makefile.vm Tue Mar 31 01:22:20 2015 (r280878) +++ head/release/Makefile.vm Tue Mar 31 01:28:33 2015 (r280879) @@ -16,11 +16,15 @@ QCOW2_DESC= Qemu, KVM disk image RAW_DESC= Unformatted raw disk image CLOUDWARE?= AZURE \ + EC2 \ GCE \ OPENSTACK AZURE_FORMAT= vhdf AZURE_DESC= Microsoft Azure platform image AZURE_DISK= ${OSRELEASE}.${AZURE_FORMAT} +EC2_FORMAT= raw +EC2_DESC= Amazon EC2 image +EC2_DISK= ${OSRELEASE}.${EC2_FORMAT} GCE_FORMAT= raw GCE_DESC= Google Compute Engine image GCE_DISK= disk.${GCE_FORMAT} Added: head/release/tools/ec2.conf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/release/tools/ec2.conf Tue Mar 31 01:28:33 2015 (r280879) @@ -0,0 +1,83 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# Packages to install into the image we're creating. This is a deliberately +# minimalist set, providing only the packages necessary to bootstrap further +# package installation as specified via EC2 user-data. +export VM_EXTRA_PACKAGES="ec2-scripts firstboot-freebsd-update firstboot-pkgs" + +# Set to a list of third-party software to enable in rc.conf(5). +export VM_RC_LIST="ec2_configinit ec2_fetchkey ec2_ephemeralswap ec2_loghostkey firstboot_freebsd_update firstboot_pkgs" + +# Build with a 1.5 GB UFS partition; the growfs rc.d script will expand +# the partition to fill the root disk after the EC2 instance is launched. +# Note that if this is set to G, we will end up with an GB disk +# image since VMSIZE is the size of the UFS partition, not the disk which +# it resides within. +export VMSIZE=1536M + +# No swap space; the ec2_ephemeralswap rc.d script will allocate swap +# space on EC2 ephemeral disks. (If they exist -- the T2 low-cost instances +# and the C4 compute-optimized instances don't have ephemeral disks. But +# it would be silly to bloat the image and increase costs for every instance +# just for those two families, especially since instances ranging in size +# from 1 GB of RAM to 60 GB of RAM would need different sizes of swap space +# anyway.) +export NOSWAP=YES + +vm_extra_pre_umount() { + # The firstboot_pkgs rc.d script will download the repository + # catalogue and install or update pkg when the instance first + # launches, so these files would just be replaced anyway; removing + # them from the image allows it to boot faster. + pkg -c ${DESTDIR} delete -f pkg + rm ${DESTDIR}/var/db/pkg/repo-*.sqlite + + # The size of the EC2 root disk can be configured at instance launch + # time; expand our filesystem to fill the disk. + echo 'growfs_enable="YES"' >> ${DESTDIR}/etc/rc.conf + + # EC2 instances use DHCP to get their network configuration. + echo 'ifconfig_DEFAULT="SYNCDHCP"' >> ${DESTDIR}/etc/rc.conf + + # Unless the system has been configured via EC2 user-data, the user + # will need to SSH in to do anything. + echo 'sshd_enable="YES"' >> ${DESTDIR}/etc/rc.conf + + # The AWS CLI tools are generally useful, and small enough that they + # will download quickly; but users will often override this setting + # via EC2 user-data. + echo 'firstboot_pkgs_list="awscli"' >> ${DESTDIR}/etc/rc.conf + + # The EC2 console is output-only, so while printing a backtrace can + # be useful, there's no point dropping into a debugger or waiting + # for a keypress. + echo 'debug.trace_on_panic=1' >> ${DESTDIR}/etc/sysctl.conf + echo 'debug.debugger_on_panic=0' >> ${DESTDIR}/etc/sysctl.conf + echo 'kern.panic_reboot_wait_time=0' >> ${DESTDIR}/etc/sysctl.conf + + # The console is not interactive, so we might as well boot quickly. + echo 'autoboot_delay="-1"' >> ${DESTDIR}/boot/loader.conf + echo 'beastie_disable="YES"' >> ${DESTDIR}/boot/loader.conf + + # The EC2 console is an emulated serial port. + echo 'console="comconsole"' >> ${DESTDIR}/boot/loader.conf + + # Some older EC2 hardware used a version of Xen with a bug in its + # emulated serial port. It is not clear if EC2 still has any such + # nodes, but apply the workaround just in case. + echo 'hw.broken_txfifo="1"' >> ${DESTDIR}/boot/loader.conf + + # The first time the AMI boots, the installed "first boot" scripts + # should be allowed to run: + # * ec2_configinit (download and process EC2 user-data) + # * ec2_fetchkey (arrange for SSH using the EC2-provided public key) + # * growfs (expand the filesystem to fill the provided disk) + # * firstboot_freebsd_update (install critical updates) + # * firstboot_pkgs (install packages) + touch ${DESTDIR}/firstboot + + return 0 +} From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 01:36:58 2015 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 07C8BD4; Tue, 31 Mar 2015 01:36:57 +0000 (UTC) Date: Tue, 31 Mar 2015 01:36:54 +0000 From: Glen Barber To: Colin Percival Subject: Re: svn commit: r280879 - in head/release: . tools Message-ID: <20150331013654.GE1404@hub.FreeBSD.org> References: <201503310128.t2V1SYHR048008@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="WBsA/oQW3eTA3LlM" Content-Disposition: inline In-Reply-To: <201503310128.t2V1SYHR048008@svn.freebsd.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-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, 31 Mar 2015 01:36:58 -0000 --WBsA/oQW3eTA3LlM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Mar 31, 2015 at 01:28:34AM +0000, Colin Percival wrote: > Author: cperciva > Date: Tue Mar 31 01:28:33 2015 > New Revision: 280879 > URL: https://svnweb.freebsd.org/changeset/base/280879 >=20 > Log: > Add bits for building EC2 disk images. Make logic for uploading these > to create EC2 AMIs will come in a later commit. >=20 Thank you! Glen --WBsA/oQW3eTA3LlM Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJVGfowAAoJEAMUWKVHj+KTfnQP/iHA6D87X/0o+d6Rn4CGkLxL udKAsbcg6E5mKJJJSaQVL7X5yvdO0xhMBaYQwEBEy4gLt35+IcNFvsdAhoFAGz0N ZgurWTCG8yC8ygnST2taLfOmOCnVyulWmtHEaBCLHkySJ+qqwGnLuOttMFHK8VO7 knoIW9Dk5zGS9hWGuc25o5wIzb7qc3ZLoX+hROA60aldcs3V8GdqJvmnBKdeWs7S +ZE8u3H4dFTv2ir3k0MjKd+yWb2DiHf5O8mLvoMWovGMwiZMt6rL0DDior6wToei nDyJ8lPtkLTds4NKg5lmCq+wBhwXlPnWVInXE8Yul13CcM9dseoZpRfoHg8XU+mp WfL2SWs8A8nKYwD5McfUyPBqkQMmKhV4T5wbd8HMnDNooP8iti9vgddRgTZSiOPc sni4ouJqKjFpKODpm7wDdBJ4VygIQmpfKCGIzedCxIPpAlc/L7jSZT1oG5cf1hJk yeiNLbtfk/n/xmZ8VbLy1lvFybixLlcr60oI1Ujm/wA0g7QZX1o1ysGIcEHENI+1 a3x53aLFoKzCj7jDfKQaXvd0b/fi7HNIfTFAeDCBnNrY14Ac7L79uS3E8YLbrYAK yGTqULdpvjUpD3YYBBqSEnyw/YQ800H59rKA4E4dJAUvOO5O3fYCSLozV+X4Qgx1 KGdpylMQN2EC1C6r0ikg =pdvv -----END PGP SIGNATURE----- --WBsA/oQW3eTA3LlM-- From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 01:44:09 2015 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 5205929C; Tue, 31 Mar 2015 01:44: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 331AFAAD; Tue, 31 Mar 2015 01:44: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 t2V1i89n056730; Tue, 31 Mar 2015 01:44:08 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2V1i8cq056729; Tue, 31 Mar 2015 01:44:08 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201503310144.t2V1i8cq056729@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 31 Mar 2015 01:44:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280880 - head/sys/amd64/amd64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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, 31 Mar 2015 01:44:09 -0000 Author: kib Date: Tue Mar 31 01:44:07 2015 New Revision: 280880 URL: https://svnweb.freebsd.org/changeset/base/280880 Log: Provide workaround for a performance issue with the popcnt instruction on Intel processors. Clear spurious dependency by explicitely xoring the destination register of popcnt. Use bitcount64() instead of re-implementing SWAR locally, for processors without popcnt instruction. Reviewed by: jhb Discussed with: jilles (previous version) Sponsored by: The FreeBSD Foundation Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Tue Mar 31 01:28:33 2015 (r280879) +++ head/sys/amd64/amd64/pmap.c Tue Mar 31 01:44:07 2015 (r280880) @@ -412,7 +412,7 @@ static caddr_t crashdumpmap; static void free_pv_chunk(struct pv_chunk *pc); static void free_pv_entry(pmap_t pmap, pv_entry_t pv); static pv_entry_t get_pv_entry(pmap_t pmap, struct rwlock **lockp); -static int popcnt_pc_map_elem(uint64_t elem); +static int popcnt_pc_map_elem_pq(uint64_t elem); static vm_page_t reclaim_pv_chunk(pmap_t locked_pmap, struct rwlock **lockp); static void reserve_pv_entries(pmap_t pmap, int needed, struct rwlock **lockp); @@ -2980,20 +2980,27 @@ retry: /* * Returns the number of one bits within the given PV chunk map element. + * + * The erratas for Intel processors state that "POPCNT Instruction May + * Take Longer to Execute Than Expected". It is believed that the + * issue is the spurious dependency on the destination register. + * Provide a hint to the register rename logic that the destination + * value is overwritten, by clearing it, as suggested in the + * optimization manual. It should be cheap for unaffected processors + * as well. + * + * Reference numbers for erratas are + * 4th Gen Core: HSD146 + * 5th Gen Core: BDM85 */ static int -popcnt_pc_map_elem(uint64_t elem) +popcnt_pc_map_elem_pq(uint64_t elem) { - int count; + u_long result; - /* - * This simple method of counting the one bits performs well because - * the given element typically contains more zero bits than one bits. - */ - count = 0; - for (; elem != 0; elem &= elem - 1) - count++; - return (count); + __asm __volatile("xorl %k0,%k0;popcntq %1,%0" + : "=&r" (result) : "rm" (elem)); + return (result); } /* @@ -3025,13 +3032,13 @@ retry: avail = 0; TAILQ_FOREACH(pc, &pmap->pm_pvchunk, pc_list) { if ((cpu_feature2 & CPUID2_POPCNT) == 0) { - free = popcnt_pc_map_elem(pc->pc_map[0]); - free += popcnt_pc_map_elem(pc->pc_map[1]); - free += popcnt_pc_map_elem(pc->pc_map[2]); + free = bitcount64(pc->pc_map[0]); + free += bitcount64(pc->pc_map[1]); + free += bitcount64(pc->pc_map[2]); } else { - free = popcntq(pc->pc_map[0]); - free += popcntq(pc->pc_map[1]); - free += popcntq(pc->pc_map[2]); + free = popcnt_pc_map_elem_pq(pc->pc_map[0]); + free += popcnt_pc_map_elem_pq(pc->pc_map[1]); + free += popcnt_pc_map_elem_pq(pc->pc_map[2]); } if (free == 0) break; From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 01:44:30 2015 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 D341C3DC; Tue, 31 Mar 2015 01:44: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 BE687AB5; Tue, 31 Mar 2015 01:44: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 t2V1iUtS056817; Tue, 31 Mar 2015 01:44:30 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2V1iU9e056816; Tue, 31 Mar 2015 01:44:30 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201503310144.t2V1iU9e056816@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Tue, 31 Mar 2015 01:44:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280881 - head/release/tools 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, 31 Mar 2015 01:44:30 -0000 Author: cperciva Date: Tue Mar 31 01:44:29 2015 New Revision: 280881 URL: https://svnweb.freebsd.org/changeset/base/280881 Log: Partially revert r278118 now that the required logic for deciding whether freebsd-update can be useful has moved into the firstboot_freebsd_update script. Modified: head/release/tools/gce.conf Modified: head/release/tools/gce.conf ============================================================================== --- head/release/tools/gce.conf Tue Mar 31 01:44:07 2015 (r280880) +++ head/release/tools/gce.conf Tue Mar 31 01:44:29 2015 (r280881) @@ -10,7 +10,7 @@ export VM_EXTRA_PACKAGES="firstboot-free # Set to a list of third-party software to enable in rc.conf(5). export VM_RC_LIST="google_accounts_manager ntpd sshd firstboot_growfs \ - firstboot_pkgs google_startup" + firstboot_pkgs firstboot_freebsd_update google_startup" vm_extra_install_base() { echo 'search google.internal' > ${DESTDIR}/etc/resolv.conf @@ -23,13 +23,6 @@ vm_extra_pre_umount() { dumpdev="AUTO" ifconfig_DEFAULT="SYNCDHCP mtu 1460" ntpd_sync_on_start="YES" -case \$(uname -r) in - *-BETA*|*-RC*|*-RELEASE*) - firstboot_freebsd_update_enable="YES" - ;; - *) - ;; -esac # need to fill in something here #firstboot_pkgs_list="" panicmail_autosubmit="YES" From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 02:49:06 2015 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 C62B1FC6; Tue, 31 Mar 2015 02:49: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 B09DC1CB; Tue, 31 Mar 2015 02:49: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 t2V2n6Qd085198; Tue, 31 Mar 2015 02:49:06 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2V2n6Z6085197; Tue, 31 Mar 2015 02:49:06 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201503310249.t2V2n6Z6085197@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 31 Mar 2015 02:49:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280882 - head/cddl/contrib/opensolaris/lib/libdtrace/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, 31 Mar 2015 02:49:06 -0000 Author: markj Date: Tue Mar 31 02:49:05 2015 New Revision: 280882 URL: https://svnweb.freebsd.org/changeset/base/280882 Log: Fix a misparenthesization that could cause a crash if TERM is not set. Reported by: Coverity (internal) MFC after: 3 days Sponsored by: EMC / Isilon Storage Division Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c Tue Mar 31 01:44:29 2015 (r280881) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c Tue Mar 31 02:49:05 2015 (r280882) @@ -727,8 +727,8 @@ dt_print_packed(dtrace_hdl_t *dtp, FILE utf8 = B_TRUE; } else if ((term = getenv("TERM")) != NULL && (strcmp(term, "sun") == 0 || - strcmp(term, "sun-color") == 0) || - strcmp(term, "dumb") == 0) { + strcmp(term, "sun-color") == 0 || + strcmp(term, "dumb") == 0)) { utf8 = B_FALSE; } else { utf8 = B_TRUE; From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 04:31:44 2015 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 68DCECF2; Tue, 31 Mar 2015 04:31: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 391D7E65; Tue, 31 Mar 2015 04:31: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 t2V4VhNl036775; Tue, 31 Mar 2015 04:31:43 GMT (envelope-from amdmi3@FreeBSD.org) Received: (from amdmi3@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2V4Vh8n036774; Tue, 31 Mar 2015 04:31:43 GMT (envelope-from amdmi3@FreeBSD.org) Message-Id: <201503310431.t2V4Vh8n036774@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: amdmi3 set sender to amdmi3@FreeBSD.org using -f From: Dmitry Marakasov Date: Tue, 31 Mar 2015 04:31:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280883 - head/tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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, 31 Mar 2015 04:31:44 -0000 Author: amdmi3 (ports committer) Date: Tue Mar 31 04:31:42 2015 New Revision: 280883 URL: https://svnweb.freebsd.org/changeset/base/280883 Log: - Remove more files when MK_CASPER == no MFC after: 1 week Reviewed by: ngie Approved by: ngie Differential Revision: D1600 Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Tue Mar 31 02:49:05 2015 (r280882) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Tue Mar 31 04:31:42 2015 (r280883) @@ -640,10 +640,57 @@ OLD_FILES+=usr/share/man/man1/calendar.1 .endif .if ${MK_CASPER} == no +OLD_FILES+=etc/casper/system.dns +OLD_FILES+=etc/casper/system.grp +OLD_FILES+=etc/casper/system.pwd +OLD_FILES+=etc/casper/system.random +OLD_FILES+=etc/casper/system.sysctl OLD_FILES+=etc/rc.d/casperd +OLD_LIBS+=lib/libcapsicum.so.0 OLD_LIBS+=lib/libcasper.so.0 +OLD_FILES+=libexec/casper/dns +OLD_FILES+=libexec/casper/grp +OLD_FILES+=libexec/casper/pwd +OLD_FILES+=libexec/casper/random +OLD_FILES+=libexec/casper/sysctl OLD_FILES+=sbin/casper +OLD_FILES+=sbin/casperd +OLD_FILES+=usr/include/libcapsicum.h +OLD_FILES+=usr/include/libcapsicum_dns.h +OLD_FILES+=usr/include/libcapsicum_grp.h +OLD_FILES+=usr/include/libcapsicum_pwd.h +OLD_FILES+=usr/include/libcapsicum_random.h +OLD_FILES+=usr/include/libcapsicum_service.h +OLD_FILES+=usr/include/libcapsicum_sysctl.h +OLD_FILES+=usr/include/libcasper.h +OLD_FILES+=usr/lib/libcapsicum.a +OLD_FILES+=usr/lib/libcapsicum.so +OLD_FILES+=usr/lib/libcapsicum_p.a OLD_FILES+=usr/lib/libcasper.a +OLD_FILES+=usr/lib/libcasper.so +OLD_FILES+=usr/lib/libcasper_p.a +OLD_FILES+=usr/lib32/libcapsicum.a +OLD_FILES+=usr/lib32/libcapsicum.so +OLD_LIBS+=usr/lib32/libcapsicum.so.0 +OLD_FILES+=usr/lib32/libcapsicum_p.a +OLD_FILES+=usr/lib32/libcasper.a +OLD_FILES+=usr/lib32/libcasper.so +OLD_LIBS+=usr/lib32/libcasper.so.0 +OLD_FILES+=usr/lib32/libcasper_p.a +OLD_FILES+=usr/share/man/man3/cap_clone.3.gz +OLD_FILES+=usr/share/man/man3/cap_close.3.gz +OLD_FILES+=usr/share/man/man3/cap_init.3.gz +OLD_FILES+=usr/share/man/man3/cap_limit_get.3.gz +OLD_FILES+=usr/share/man/man3/cap_limit_set.3.gz +OLD_FILES+=usr/share/man/man3/cap_recv_nvlist.3.gz +OLD_FILES+=usr/share/man/man3/cap_send_nvlist.3.gz +OLD_FILES+=usr/share/man/man3/cap_service_open.3.gz +OLD_FILES+=usr/share/man/man3/cap_sock.3.gz +OLD_FILES+=usr/share/man/man3/cap_unwrap.3.gz +OLD_FILES+=usr/share/man/man3/cap_wrap.3.gz +OLD_FILES+=usr/share/man/man3/cap_xfer_nvlist.3.gz +OLD_FILES+=usr/share/man/man3/libcapsicum.3.gz +OLD_FILES+=usr/share/man/man8/casperd.8.gz .endif .if ${MK_CCD} == no From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 04:35:36 2015 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 BD200E65; Tue, 31 Mar 2015 04:35: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 A7D7BF08; Tue, 31 Mar 2015 04:35: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 t2V4ZaLf037353; Tue, 31 Mar 2015 04:35:36 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2V4ZaZk037352; Tue, 31 Mar 2015 04:35:36 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201503310435.t2V4ZaZk037352@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Tue, 31 Mar 2015 04:35:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280884 - head/release/tools 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, 31 Mar 2015 04:35:36 -0000 Author: cperciva Date: Tue Mar 31 04:35:35 2015 New Revision: 280884 URL: https://svnweb.freebsd.org/changeset/base/280884 Log: It would help if I committed the right patch... Modified: head/release/tools/ec2.conf Modified: head/release/tools/ec2.conf ============================================================================== --- head/release/tools/ec2.conf Tue Mar 31 04:31:42 2015 (r280883) +++ head/release/tools/ec2.conf Tue Mar 31 04:35:35 2015 (r280884) @@ -32,7 +32,7 @@ vm_extra_pre_umount() { # catalogue and install or update pkg when the instance first # launches, so these files would just be replaced anyway; removing # them from the image allows it to boot faster. - pkg -c ${DESTDIR} delete -f pkg + pkg -c ${DESTDIR} delete -f -y pkg rm ${DESTDIR}/var/db/pkg/repo-*.sqlite # The size of the EC2 root disk can be configured at instance launch From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 04:36:52 2015 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 93225FAB; Tue, 31 Mar 2015 04:36: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 7DAF4F14; Tue, 31 Mar 2015 04:36: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 t2V4aqBv037558; Tue, 31 Mar 2015 04:36:52 GMT (envelope-from amdmi3@FreeBSD.org) Received: (from amdmi3@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2V4aqV9037557; Tue, 31 Mar 2015 04:36:52 GMT (envelope-from amdmi3@FreeBSD.org) Message-Id: <201503310436.t2V4aqV9037557@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: amdmi3 set sender to amdmi3@FreeBSD.org using -f From: Dmitry Marakasov Date: Tue, 31 Mar 2015 04:36:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280885 - head/tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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, 31 Mar 2015 04:36:52 -0000 Author: amdmi3 (ports committer) Date: Tue Mar 31 04:36:51 2015 New Revision: 280885 URL: https://svnweb.freebsd.org/changeset/base/280885 Log: - Remove more files when MK_JAIL == no MFC after: 1 week Reviewed by: ngie Approved by: ngie Differential Revision: D1600 Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Tue Mar 31 04:35:35 2015 (r280884) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Tue Mar 31 04:36:51 2015 (r280885) @@ -2705,6 +2705,7 @@ OLD_FILES+=etc/rc.d/jail OLD_FILES+=usr/sbin/jail OLD_FILES+=usr/sbin/jexec OLD_FILES+=usr/sbin/jls +OLD_FILES+=usr/share/man/man5/jail.conf.5.gz OLD_FILES+=usr/share/man/man8/jail.8.gz OLD_FILES+=usr/share/man/man8/jexec.8.gz OLD_FILES+=usr/share/man/man8/jls.8.gz From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 04:37:59 2015 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 0DDE8179; Tue, 31 Mar 2015 04:37: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 EC9EDF1F; Tue, 31 Mar 2015 04:37: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 t2V4bwdY037738; Tue, 31 Mar 2015 04:37:58 GMT (envelope-from amdmi3@FreeBSD.org) Received: (from amdmi3@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2V4bwdA037737; Tue, 31 Mar 2015 04:37:58 GMT (envelope-from amdmi3@FreeBSD.org) Message-Id: <201503310437.t2V4bwdA037737@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: amdmi3 set sender to amdmi3@FreeBSD.org using -f From: Dmitry Marakasov Date: Tue, 31 Mar 2015 04:37:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280886 - head/tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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, 31 Mar 2015 04:37:59 -0000 Author: amdmi3 (ports committer) Date: Tue Mar 31 04:37:57 2015 New Revision: 280886 URL: https://svnweb.freebsd.org/changeset/base/280886 Log: - Remove more files when MK_KDUMP == no MFC after: 1 week Reviewed by: ngie Approved by: ngie Differential Revision: D1600 Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Tue Mar 31 04:36:51 2015 (r280885) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Tue Mar 31 04:37:57 2015 (r280886) @@ -2711,6 +2711,13 @@ OLD_FILES+=usr/share/man/man8/jexec.8.gz OLD_FILES+=usr/share/man/man8/jls.8.gz .endif +.if ${MK_KDUMP} == no +OLD_FILES+=usr/bin/kdump +OLD_FILES+=usr/bin/truss +OLD_FILES+=usr/share/man/man1/kdump.1.gz +OLD_FILES+=usr/share/man/man1/truss.1.gz +.endif + .if ${MK_KERBEROS} == no OLD_FILES+=etc/rc.d/ipropd_master OLD_FILES+=etc/rc.d/ipropd_slave From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 04:40:01 2015 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 14DF72DD; Tue, 31 Mar 2015 04:40: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 F37E0F32; Tue, 31 Mar 2015 04:40: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 t2V4e0pm038087; Tue, 31 Mar 2015 04:40:00 GMT (envelope-from amdmi3@FreeBSD.org) Received: (from amdmi3@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2V4e0l6038086; Tue, 31 Mar 2015 04:40:00 GMT (envelope-from amdmi3@FreeBSD.org) Message-Id: <201503310440.t2V4e0l6038086@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: amdmi3 set sender to amdmi3@FreeBSD.org using -f From: Dmitry Marakasov Date: Tue, 31 Mar 2015 04:40:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280887 - head/tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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, 31 Mar 2015 04:40:01 -0000 Author: amdmi3 (ports committer) Date: Tue Mar 31 04:39:59 2015 New Revision: 280887 URL: https://svnweb.freebsd.org/changeset/base/280887 Log: - Remove more files when MK_KERBEROS_SUPPORT == no MFC after: 1 week Reviewed by: ngie Approved by: ngie Differential Revision: D1600 Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Tue Mar 31 04:37:57 2015 (r280886) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Tue Mar 31 04:39:59 2015 (r280887) @@ -3694,6 +3694,22 @@ OLD_FILES+=usr/share/man/man8/string2key OLD_FILES+=usr/share/man/man8/verify_krb5_conf.8.gz .endif +.if ${MK_KERBEROS_SUPPORT} == no +OLD_FILES+=usr/bin/compile_et +OLD_FILES+=usr/include/com_err.h +OLD_FILES+=usr/include/com_right.h +OLD_FILES+=usr/lib/libcom_err.a +OLD_FILES+=usr/lib/libcom_err.so +OLD_LIBS+=usr/lib/libcom_err.so.5 +OLD_FILES+=usr/lib/libcom_err_p.a +OLD_FILES+=usr/lib32/libcom_err.a +OLD_FILES+=usr/lib32/libcom_err.so +OLD_LIBS+=usr/lib32/libcom_err.so.5 +OLD_FILES+=usr/lib32/libcom_err_p.a +OLD_FILES+=usr/share/man/man1/compile_et.1.gz +OLD_FILES+=usr/share/man/man3/com_err.3.gz +.endif + .if ${MK_LDNS} == no OLD_FILES+=usr/lib/private/libldns.a OLD_FILES+=usr/lib/private/libldns.so From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 04:42:01 2015 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 653B54E8; Tue, 31 Mar 2015 04:42: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 4F7D5FE4; Tue, 31 Mar 2015 04:42: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 t2V4g1lR041760; Tue, 31 Mar 2015 04:42:01 GMT (envelope-from amdmi3@FreeBSD.org) Received: (from amdmi3@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2V4g1Gg041758; Tue, 31 Mar 2015 04:42:01 GMT (envelope-from amdmi3@FreeBSD.org) Message-Id: <201503310442.t2V4g1Gg041758@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: amdmi3 set sender to amdmi3@FreeBSD.org using -f From: Dmitry Marakasov Date: Tue, 31 Mar 2015 04:42:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280888 - head/tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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, 31 Mar 2015 04:42:01 -0000 Author: amdmi3 (ports committer) Date: Tue Mar 31 04:42:00 2015 New Revision: 280888 URL: https://svnweb.freebsd.org/changeset/base/280888 Log: - Remove more files when MK_LEGACY_CONSOLE == no MFC after: 1 week Reviewed by: ngie Approved by: ngie Differential Revision: D1600 Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Tue Mar 31 04:39:59 2015 (r280887) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Tue Mar 31 04:42:00 2015 (r280888) @@ -3730,6 +3730,21 @@ OLD_FILES+=usr/bin/host OLD_FILES+=usr/share/man/man1/host.1.gz .endif +.if ${MK_LEGACY_CONSOLE} == no +OLD_FILES+=usr/sbin/kbdcontrol +OLD_FILES+=usr/sbin/kbdmap +OLD_FILES+=usr/sbin/moused +OLD_FILES+=usr/sbin/vidcontrol +OLD_FILES+=usr/sbin/vidfont +OLD_FILES+=usr/share/man/man1/kbdcontrol.1.gz +OLD_FILES+=usr/share/man/man1/kbdmap.1.gz +OLD_FILES+=usr/share/man/man1/vidcontrol.1.gz +OLD_FILES+=usr/share/man/man1/vidfont.1.gz +OLD_FILES+=usr/share/man/man5/kbdmap.5.gz +OLD_FILES+=usr/share/man/man5/keymap.5.gz +OLD_FILES+=usr/share/man/man8/moused.8.gz +.endif + #.if ${MK_LIB32} == no # to be filled in #.endif From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 04:43:26 2015 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 BEB126A2; Tue, 31 Mar 2015 04:43: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 A908A77; Tue, 31 Mar 2015 04:43: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 t2V4hQ5k041982; Tue, 31 Mar 2015 04:43:26 GMT (envelope-from amdmi3@FreeBSD.org) Received: (from amdmi3@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2V4hQbP041981; Tue, 31 Mar 2015 04:43:26 GMT (envelope-from amdmi3@FreeBSD.org) Message-Id: <201503310443.t2V4hQbP041981@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: amdmi3 set sender to amdmi3@FreeBSD.org using -f From: Dmitry Marakasov Date: Tue, 31 Mar 2015 04:43:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280889 - head/tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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, 31 Mar 2015 04:43:26 -0000 Author: amdmi3 (ports committer) Date: Tue Mar 31 04:43:25 2015 New Revision: 280889 URL: https://svnweb.freebsd.org/changeset/base/280889 Log: - Remove more files when MK_TESTS_SUPPORT == no MFC after: 1 week Reviewed by: ngie Approved by: ngie Differential Revision: D1600 Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Tue Mar 31 04:42:00 2015 (r280888) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Tue Mar 31 04:43:25 2015 (r280889) @@ -7398,6 +7398,81 @@ OLD_FILES+=${TESTS_FILES} . endif .endif # Test suite. +.if ${MK_TESTS_SUPPORT} == no +OLD_FILES+=usr/include/atf-c++.hpp +OLD_FILES+=usr/include/atf-c++/build.hpp +OLD_FILES+=usr/include/atf-c++/check.hpp +OLD_FILES+=usr/include/atf-c++/macros.hpp +OLD_FILES+=usr/include/atf-c++/tests.hpp +OLD_FILES+=usr/include/atf-c++/utils.hpp +OLD_FILES+=usr/include/atf-c.h +OLD_FILES+=usr/include/atf-c/build.h +OLD_FILES+=usr/include/atf-c/check.h +OLD_FILES+=usr/include/atf-c/defs.h +OLD_FILES+=usr/include/atf-c/error.h +OLD_FILES+=usr/include/atf-c/error_fwd.h +OLD_FILES+=usr/include/atf-c/macros.h +OLD_FILES+=usr/include/atf-c/tc.h +OLD_FILES+=usr/include/atf-c/tp.h +OLD_FILES+=usr/include/atf-c/utils.h +OLD_LIBS+=usr/lib/private/libatf-c++.so.2 +OLD_LIBS+=usr/lib/private/libatf-c.so.1 +OLD_FILES+=usr/share/man/man3/atf-c++.3.gz +OLD_FILES+=usr/share/man/man3/atf-c-api++.3.gz +OLD_FILES+=usr/share/man/man3/atf-c-api.3.gz +OLD_FILES+=usr/share/man/man3/atf-c.3.gz +OLD_FILES+=usr/tests/lib/atf/Kyuafile +OLD_FILES+=usr/tests/lib/atf/libatf-c++/Kyuafile +OLD_FILES+=usr/tests/lib/atf/libatf-c++/atf_c++_test +OLD_FILES+=usr/tests/lib/atf/libatf-c++/build_test +OLD_FILES+=usr/tests/lib/atf/libatf-c++/check_test +OLD_FILES+=usr/tests/lib/atf/libatf-c++/detail/Kyuafile +OLD_FILES+=usr/tests/lib/atf/libatf-c++/detail/application_test +OLD_FILES+=usr/tests/lib/atf/libatf-c++/detail/env_test +OLD_FILES+=usr/tests/lib/atf/libatf-c++/detail/exceptions_test +OLD_FILES+=usr/tests/lib/atf/libatf-c++/detail/fs_test +OLD_FILES+=usr/tests/lib/atf/libatf-c++/detail/process_test +OLD_FILES+=usr/tests/lib/atf/libatf-c++/detail/text_test +OLD_FILES+=usr/tests/lib/atf/libatf-c++/detail/version_helper +OLD_FILES+=usr/tests/lib/atf/libatf-c++/macros_hpp_test.cpp +OLD_FILES+=usr/tests/lib/atf/libatf-c++/macros_test +OLD_FILES+=usr/tests/lib/atf/libatf-c++/tests_test +OLD_FILES+=usr/tests/lib/atf/libatf-c++/unused_test.cpp +OLD_FILES+=usr/tests/lib/atf/libatf-c++/utils_test +OLD_FILES+=usr/tests/lib/atf/libatf-c/Kyuafile +OLD_FILES+=usr/tests/lib/atf/libatf-c/atf_c_test +OLD_FILES+=usr/tests/lib/atf/libatf-c/build_test +OLD_FILES+=usr/tests/lib/atf/libatf-c/check_test +OLD_FILES+=usr/tests/lib/atf/libatf-c/detail/Kyuafile +OLD_FILES+=usr/tests/lib/atf/libatf-c/detail/dynstr_test +OLD_FILES+=usr/tests/lib/atf/libatf-c/detail/env_test +OLD_FILES+=usr/tests/lib/atf/libatf-c/detail/fs_test +OLD_FILES+=usr/tests/lib/atf/libatf-c/detail/list_test +OLD_FILES+=usr/tests/lib/atf/libatf-c/detail/map_test +OLD_FILES+=usr/tests/lib/atf/libatf-c/detail/process_helpers +OLD_FILES+=usr/tests/lib/atf/libatf-c/detail/process_test +OLD_FILES+=usr/tests/lib/atf/libatf-c/detail/sanity_test +OLD_FILES+=usr/tests/lib/atf/libatf-c/detail/text_test +OLD_FILES+=usr/tests/lib/atf/libatf-c/detail/user_test +OLD_FILES+=usr/tests/lib/atf/libatf-c/detail/version_helper +OLD_FILES+=usr/tests/lib/atf/libatf-c/error_test +OLD_FILES+=usr/tests/lib/atf/libatf-c/macros_h_test.c +OLD_FILES+=usr/tests/lib/atf/libatf-c/macros_test +OLD_FILES+=usr/tests/lib/atf/libatf-c/tc_test +OLD_FILES+=usr/tests/lib/atf/libatf-c/tp_test +OLD_FILES+=usr/tests/lib/atf/libatf-c/unused_test.c +OLD_FILES+=usr/tests/lib/atf/libatf-c/utils_test +OLD_FILES+=usr/tests/lib/atf/test-programs/Kyuafile +OLD_FILES+=usr/tests/lib/atf/test-programs/c_helpers +OLD_FILES+=usr/tests/lib/atf/test-programs/config_test +OLD_FILES+=usr/tests/lib/atf/test-programs/cpp_helpers +OLD_FILES+=usr/tests/lib/atf/test-programs/expect_test +OLD_FILES+=usr/tests/lib/atf/test-programs/meta_data_test +OLD_FILES+=usr/tests/lib/atf/test-programs/result_test +OLD_FILES+=usr/tests/lib/atf/test-programs/sh_helpers +OLD_FILES+=usr/tests/lib/atf/test-programs/srcdir_test +.endif + .if ${MK_TEXTPROC} == no OLD_FILES+=usr/bin/checknr OLD_FILES+=usr/bin/colcrt From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 04:44:47 2015 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 D4A6381F; Tue, 31 Mar 2015 04:44: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 BEE2599; Tue, 31 Mar 2015 04:44: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 t2V4ilnF042281; Tue, 31 Mar 2015 04:44:47 GMT (envelope-from amdmi3@FreeBSD.org) Received: (from amdmi3@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2V4ilxr042280; Tue, 31 Mar 2015 04:44:47 GMT (envelope-from amdmi3@FreeBSD.org) Message-Id: <201503310444.t2V4ilxr042280@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: amdmi3 set sender to amdmi3@FreeBSD.org using -f From: Dmitry Marakasov Date: Tue, 31 Mar 2015 04:44:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280890 - head/tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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, 31 Mar 2015 04:44:48 -0000 Author: amdmi3 (ports committer) Date: Tue Mar 31 04:44:46 2015 New Revision: 280890 URL: https://svnweb.freebsd.org/changeset/base/280890 Log: - Remove more files when MK_ZONEINFO == no MFC after: 1 week Reviewed by: ngie Approved by: ngie Differential Revision: D1600 Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Tue Mar 31 04:43:25 2015 (r280889) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Tue Mar 31 04:44:46 2015 (r280890) @@ -7951,3 +7951,475 @@ OLD_FILES+=usr/libexec/hyperv/hv_get_dhc OLD_FILES+=usr/sbin/hv_kvp_daemon OLD_FILES+=usr/share/man/man8/hv_kvp_daemon.8.gz .endif + +.if ${MK_ZONEINFO} == no +OLD_FILES+=usr/share/zoneinfo/Africa/Abidjan +OLD_FILES+=usr/share/zoneinfo/Africa/Accra +OLD_FILES+=usr/share/zoneinfo/Africa/Addis_Ababa +OLD_FILES+=usr/share/zoneinfo/Africa/Algiers +OLD_FILES+=usr/share/zoneinfo/Africa/Asmara +OLD_FILES+=usr/share/zoneinfo/Africa/Bamako +OLD_FILES+=usr/share/zoneinfo/Africa/Bangui +OLD_FILES+=usr/share/zoneinfo/Africa/Banjul +OLD_FILES+=usr/share/zoneinfo/Africa/Bissau +OLD_FILES+=usr/share/zoneinfo/Africa/Blantyre +OLD_FILES+=usr/share/zoneinfo/Africa/Brazzaville +OLD_FILES+=usr/share/zoneinfo/Africa/Bujumbura +OLD_FILES+=usr/share/zoneinfo/Africa/Cairo +OLD_FILES+=usr/share/zoneinfo/Africa/Casablanca +OLD_FILES+=usr/share/zoneinfo/Africa/Ceuta +OLD_FILES+=usr/share/zoneinfo/Africa/Conakry +OLD_FILES+=usr/share/zoneinfo/Africa/Dakar +OLD_FILES+=usr/share/zoneinfo/Africa/Dar_es_Salaam +OLD_FILES+=usr/share/zoneinfo/Africa/Djibouti +OLD_FILES+=usr/share/zoneinfo/Africa/Douala +OLD_FILES+=usr/share/zoneinfo/Africa/El_Aaiun +OLD_FILES+=usr/share/zoneinfo/Africa/Freetown +OLD_FILES+=usr/share/zoneinfo/Africa/Gaborone +OLD_FILES+=usr/share/zoneinfo/Africa/Harare +OLD_FILES+=usr/share/zoneinfo/Africa/Johannesburg +OLD_FILES+=usr/share/zoneinfo/Africa/Juba +OLD_FILES+=usr/share/zoneinfo/Africa/Kampala +OLD_FILES+=usr/share/zoneinfo/Africa/Khartoum +OLD_FILES+=usr/share/zoneinfo/Africa/Kigali +OLD_FILES+=usr/share/zoneinfo/Africa/Kinshasa +OLD_FILES+=usr/share/zoneinfo/Africa/Lagos +OLD_FILES+=usr/share/zoneinfo/Africa/Libreville +OLD_FILES+=usr/share/zoneinfo/Africa/Lome +OLD_FILES+=usr/share/zoneinfo/Africa/Luanda +OLD_FILES+=usr/share/zoneinfo/Africa/Lubumbashi +OLD_FILES+=usr/share/zoneinfo/Africa/Lusaka +OLD_FILES+=usr/share/zoneinfo/Africa/Malabo +OLD_FILES+=usr/share/zoneinfo/Africa/Maputo +OLD_FILES+=usr/share/zoneinfo/Africa/Maseru +OLD_FILES+=usr/share/zoneinfo/Africa/Mbabane +OLD_FILES+=usr/share/zoneinfo/Africa/Mogadishu +OLD_FILES+=usr/share/zoneinfo/Africa/Monrovia +OLD_FILES+=usr/share/zoneinfo/Africa/Nairobi +OLD_FILES+=usr/share/zoneinfo/Africa/Ndjamena +OLD_FILES+=usr/share/zoneinfo/Africa/Niamey +OLD_FILES+=usr/share/zoneinfo/Africa/Nouakchott +OLD_FILES+=usr/share/zoneinfo/Africa/Ouagadougou +OLD_FILES+=usr/share/zoneinfo/Africa/Porto-Novo +OLD_FILES+=usr/share/zoneinfo/Africa/Sao_Tome +OLD_FILES+=usr/share/zoneinfo/Africa/Tripoli +OLD_FILES+=usr/share/zoneinfo/Africa/Tunis +OLD_FILES+=usr/share/zoneinfo/Africa/Windhoek +OLD_FILES+=usr/share/zoneinfo/America/Adak +OLD_FILES+=usr/share/zoneinfo/America/Anchorage +OLD_FILES+=usr/share/zoneinfo/America/Anguilla +OLD_FILES+=usr/share/zoneinfo/America/Antigua +OLD_FILES+=usr/share/zoneinfo/America/Araguaina +OLD_FILES+=usr/share/zoneinfo/America/Argentina/Buenos_Aires +OLD_FILES+=usr/share/zoneinfo/America/Argentina/Catamarca +OLD_FILES+=usr/share/zoneinfo/America/Argentina/Cordoba +OLD_FILES+=usr/share/zoneinfo/America/Argentina/Jujuy +OLD_FILES+=usr/share/zoneinfo/America/Argentina/La_Rioja +OLD_FILES+=usr/share/zoneinfo/America/Argentina/Mendoza +OLD_FILES+=usr/share/zoneinfo/America/Argentina/Rio_Gallegos +OLD_FILES+=usr/share/zoneinfo/America/Argentina/Salta +OLD_FILES+=usr/share/zoneinfo/America/Argentina/San_Juan +OLD_FILES+=usr/share/zoneinfo/America/Argentina/San_Luis +OLD_FILES+=usr/share/zoneinfo/America/Argentina/Tucuman +OLD_FILES+=usr/share/zoneinfo/America/Argentina/Ushuaia +OLD_FILES+=usr/share/zoneinfo/America/Aruba +OLD_FILES+=usr/share/zoneinfo/America/Asuncion +OLD_FILES+=usr/share/zoneinfo/America/Atikokan +OLD_FILES+=usr/share/zoneinfo/America/Bahia +OLD_FILES+=usr/share/zoneinfo/America/Bahia_Banderas +OLD_FILES+=usr/share/zoneinfo/America/Barbados +OLD_FILES+=usr/share/zoneinfo/America/Belem +OLD_FILES+=usr/share/zoneinfo/America/Belize +OLD_FILES+=usr/share/zoneinfo/America/Blanc-Sablon +OLD_FILES+=usr/share/zoneinfo/America/Boa_Vista +OLD_FILES+=usr/share/zoneinfo/America/Bogota +OLD_FILES+=usr/share/zoneinfo/America/Boise +OLD_FILES+=usr/share/zoneinfo/America/Cambridge_Bay +OLD_FILES+=usr/share/zoneinfo/America/Campo_Grande +OLD_FILES+=usr/share/zoneinfo/America/Cancun +OLD_FILES+=usr/share/zoneinfo/America/Caracas +OLD_FILES+=usr/share/zoneinfo/America/Cayenne +OLD_FILES+=usr/share/zoneinfo/America/Cayman +OLD_FILES+=usr/share/zoneinfo/America/Chicago +OLD_FILES+=usr/share/zoneinfo/America/Chihuahua +OLD_FILES+=usr/share/zoneinfo/America/Costa_Rica +OLD_FILES+=usr/share/zoneinfo/America/Creston +OLD_FILES+=usr/share/zoneinfo/America/Cuiaba +OLD_FILES+=usr/share/zoneinfo/America/Curacao +OLD_FILES+=usr/share/zoneinfo/America/Danmarkshavn +OLD_FILES+=usr/share/zoneinfo/America/Dawson +OLD_FILES+=usr/share/zoneinfo/America/Dawson_Creek +OLD_FILES+=usr/share/zoneinfo/America/Denver +OLD_FILES+=usr/share/zoneinfo/America/Detroit +OLD_FILES+=usr/share/zoneinfo/America/Dominica +OLD_FILES+=usr/share/zoneinfo/America/Edmonton +OLD_FILES+=usr/share/zoneinfo/America/Eirunepe +OLD_FILES+=usr/share/zoneinfo/America/El_Salvador +OLD_FILES+=usr/share/zoneinfo/America/Fortaleza +OLD_FILES+=usr/share/zoneinfo/America/Glace_Bay +OLD_FILES+=usr/share/zoneinfo/America/Godthab +OLD_FILES+=usr/share/zoneinfo/America/Goose_Bay +OLD_FILES+=usr/share/zoneinfo/America/Grand_Turk +OLD_FILES+=usr/share/zoneinfo/America/Grenada +OLD_FILES+=usr/share/zoneinfo/America/Guadeloupe +OLD_FILES+=usr/share/zoneinfo/America/Guatemala +OLD_FILES+=usr/share/zoneinfo/America/Guayaquil +OLD_FILES+=usr/share/zoneinfo/America/Guyana +OLD_FILES+=usr/share/zoneinfo/America/Halifax +OLD_FILES+=usr/share/zoneinfo/America/Havana +OLD_FILES+=usr/share/zoneinfo/America/Hermosillo +OLD_FILES+=usr/share/zoneinfo/America/Indiana/Indianapolis +OLD_FILES+=usr/share/zoneinfo/America/Indiana/Knox +OLD_FILES+=usr/share/zoneinfo/America/Indiana/Marengo +OLD_FILES+=usr/share/zoneinfo/America/Indiana/Petersburg +OLD_FILES+=usr/share/zoneinfo/America/Indiana/Tell_City +OLD_FILES+=usr/share/zoneinfo/America/Indiana/Vevay +OLD_FILES+=usr/share/zoneinfo/America/Indiana/Vincennes +OLD_FILES+=usr/share/zoneinfo/America/Indiana/Winamac +OLD_FILES+=usr/share/zoneinfo/America/Inuvik +OLD_FILES+=usr/share/zoneinfo/America/Iqaluit +OLD_FILES+=usr/share/zoneinfo/America/Jamaica +OLD_FILES+=usr/share/zoneinfo/America/Juneau +OLD_FILES+=usr/share/zoneinfo/America/Kentucky/Louisville +OLD_FILES+=usr/share/zoneinfo/America/Kentucky/Monticello +OLD_FILES+=usr/share/zoneinfo/America/Kralendijk +OLD_FILES+=usr/share/zoneinfo/America/La_Paz +OLD_FILES+=usr/share/zoneinfo/America/Lima +OLD_FILES+=usr/share/zoneinfo/America/Los_Angeles +OLD_FILES+=usr/share/zoneinfo/America/Lower_Princes +OLD_FILES+=usr/share/zoneinfo/America/Maceio +OLD_FILES+=usr/share/zoneinfo/America/Managua +OLD_FILES+=usr/share/zoneinfo/America/Manaus +OLD_FILES+=usr/share/zoneinfo/America/Marigot +OLD_FILES+=usr/share/zoneinfo/America/Martinique +OLD_FILES+=usr/share/zoneinfo/America/Matamoros +OLD_FILES+=usr/share/zoneinfo/America/Mazatlan +OLD_FILES+=usr/share/zoneinfo/America/Menominee +OLD_FILES+=usr/share/zoneinfo/America/Merida +OLD_FILES+=usr/share/zoneinfo/America/Metlakatla +OLD_FILES+=usr/share/zoneinfo/America/Mexico_City +OLD_FILES+=usr/share/zoneinfo/America/Miquelon +OLD_FILES+=usr/share/zoneinfo/America/Moncton +OLD_FILES+=usr/share/zoneinfo/America/Monterrey +OLD_FILES+=usr/share/zoneinfo/America/Montevideo +OLD_FILES+=usr/share/zoneinfo/America/Montreal +OLD_FILES+=usr/share/zoneinfo/America/Montserrat +OLD_FILES+=usr/share/zoneinfo/America/Nassau +OLD_FILES+=usr/share/zoneinfo/America/New_York +OLD_FILES+=usr/share/zoneinfo/America/Nipigon +OLD_FILES+=usr/share/zoneinfo/America/Nome +OLD_FILES+=usr/share/zoneinfo/America/Noronha +OLD_FILES+=usr/share/zoneinfo/America/North_Dakota/Beulah +OLD_FILES+=usr/share/zoneinfo/America/North_Dakota/Center +OLD_FILES+=usr/share/zoneinfo/America/North_Dakota/New_Salem +OLD_FILES+=usr/share/zoneinfo/America/Ojinaga +OLD_FILES+=usr/share/zoneinfo/America/Panama +OLD_FILES+=usr/share/zoneinfo/America/Pangnirtung +OLD_FILES+=usr/share/zoneinfo/America/Paramaribo +OLD_FILES+=usr/share/zoneinfo/America/Phoenix +OLD_FILES+=usr/share/zoneinfo/America/Port-au-Prince +OLD_FILES+=usr/share/zoneinfo/America/Port_of_Spain +OLD_FILES+=usr/share/zoneinfo/America/Porto_Velho +OLD_FILES+=usr/share/zoneinfo/America/Puerto_Rico +OLD_FILES+=usr/share/zoneinfo/America/Rainy_River +OLD_FILES+=usr/share/zoneinfo/America/Rankin_Inlet +OLD_FILES+=usr/share/zoneinfo/America/Recife +OLD_FILES+=usr/share/zoneinfo/America/Regina +OLD_FILES+=usr/share/zoneinfo/America/Resolute +OLD_FILES+=usr/share/zoneinfo/America/Rio_Branco +OLD_FILES+=usr/share/zoneinfo/America/Santa_Isabel +OLD_FILES+=usr/share/zoneinfo/America/Santarem +OLD_FILES+=usr/share/zoneinfo/America/Santiago +OLD_FILES+=usr/share/zoneinfo/America/Santo_Domingo +OLD_FILES+=usr/share/zoneinfo/America/Sao_Paulo +OLD_FILES+=usr/share/zoneinfo/America/Scoresbysund +OLD_FILES+=usr/share/zoneinfo/America/Sitka +OLD_FILES+=usr/share/zoneinfo/America/St_Barthelemy +OLD_FILES+=usr/share/zoneinfo/America/St_Johns +OLD_FILES+=usr/share/zoneinfo/America/St_Kitts +OLD_FILES+=usr/share/zoneinfo/America/St_Lucia +OLD_FILES+=usr/share/zoneinfo/America/St_Thomas +OLD_FILES+=usr/share/zoneinfo/America/St_Vincent +OLD_FILES+=usr/share/zoneinfo/America/Swift_Current +OLD_FILES+=usr/share/zoneinfo/America/Tegucigalpa +OLD_FILES+=usr/share/zoneinfo/America/Thule +OLD_FILES+=usr/share/zoneinfo/America/Thunder_Bay +OLD_FILES+=usr/share/zoneinfo/America/Tijuana +OLD_FILES+=usr/share/zoneinfo/America/Toronto +OLD_FILES+=usr/share/zoneinfo/America/Tortola +OLD_FILES+=usr/share/zoneinfo/America/Vancouver +OLD_FILES+=usr/share/zoneinfo/America/Whitehorse +OLD_FILES+=usr/share/zoneinfo/America/Winnipeg +OLD_FILES+=usr/share/zoneinfo/America/Yakutat +OLD_FILES+=usr/share/zoneinfo/America/Yellowknife +OLD_FILES+=usr/share/zoneinfo/Antarctica/Casey +OLD_FILES+=usr/share/zoneinfo/Antarctica/Davis +OLD_FILES+=usr/share/zoneinfo/Antarctica/DumontDUrville +OLD_FILES+=usr/share/zoneinfo/Antarctica/Macquarie +OLD_FILES+=usr/share/zoneinfo/Antarctica/Mawson +OLD_FILES+=usr/share/zoneinfo/Antarctica/McMurdo +OLD_FILES+=usr/share/zoneinfo/Antarctica/Palmer +OLD_FILES+=usr/share/zoneinfo/Antarctica/Rothera +OLD_FILES+=usr/share/zoneinfo/Antarctica/Syowa +OLD_FILES+=usr/share/zoneinfo/Antarctica/Troll +OLD_FILES+=usr/share/zoneinfo/Antarctica/Vostok +OLD_FILES+=usr/share/zoneinfo/Arctic/Longyearbyen +OLD_FILES+=usr/share/zoneinfo/Asia/Aden +OLD_FILES+=usr/share/zoneinfo/Asia/Almaty +OLD_FILES+=usr/share/zoneinfo/Asia/Amman +OLD_FILES+=usr/share/zoneinfo/Asia/Anadyr +OLD_FILES+=usr/share/zoneinfo/Asia/Aqtau +OLD_FILES+=usr/share/zoneinfo/Asia/Aqtobe +OLD_FILES+=usr/share/zoneinfo/Asia/Ashgabat +OLD_FILES+=usr/share/zoneinfo/Asia/Baghdad +OLD_FILES+=usr/share/zoneinfo/Asia/Bahrain +OLD_FILES+=usr/share/zoneinfo/Asia/Baku +OLD_FILES+=usr/share/zoneinfo/Asia/Bangkok +OLD_FILES+=usr/share/zoneinfo/Asia/Beirut +OLD_FILES+=usr/share/zoneinfo/Asia/Bishkek +OLD_FILES+=usr/share/zoneinfo/Asia/Brunei +OLD_FILES+=usr/share/zoneinfo/Asia/Chita +OLD_FILES+=usr/share/zoneinfo/Asia/Choibalsan +OLD_FILES+=usr/share/zoneinfo/Asia/Colombo +OLD_FILES+=usr/share/zoneinfo/Asia/Damascus +OLD_FILES+=usr/share/zoneinfo/Asia/Dhaka +OLD_FILES+=usr/share/zoneinfo/Asia/Dili +OLD_FILES+=usr/share/zoneinfo/Asia/Dubai +OLD_FILES+=usr/share/zoneinfo/Asia/Dushanbe +OLD_FILES+=usr/share/zoneinfo/Asia/Gaza +OLD_FILES+=usr/share/zoneinfo/Asia/Hebron +OLD_FILES+=usr/share/zoneinfo/Asia/Ho_Chi_Minh +OLD_FILES+=usr/share/zoneinfo/Asia/Hong_Kong +OLD_FILES+=usr/share/zoneinfo/Asia/Hovd +OLD_FILES+=usr/share/zoneinfo/Asia/Irkutsk +OLD_FILES+=usr/share/zoneinfo/Asia/Istanbul +OLD_FILES+=usr/share/zoneinfo/Asia/Jakarta +OLD_FILES+=usr/share/zoneinfo/Asia/Jayapura +OLD_FILES+=usr/share/zoneinfo/Asia/Jerusalem +OLD_FILES+=usr/share/zoneinfo/Asia/Kabul +OLD_FILES+=usr/share/zoneinfo/Asia/Kamchatka +OLD_FILES+=usr/share/zoneinfo/Asia/Karachi +OLD_FILES+=usr/share/zoneinfo/Asia/Kathmandu +OLD_FILES+=usr/share/zoneinfo/Asia/Khandyga +OLD_FILES+=usr/share/zoneinfo/Asia/Kolkata +OLD_FILES+=usr/share/zoneinfo/Asia/Krasnoyarsk +OLD_FILES+=usr/share/zoneinfo/Asia/Kuala_Lumpur +OLD_FILES+=usr/share/zoneinfo/Asia/Kuching +OLD_FILES+=usr/share/zoneinfo/Asia/Kuwait +OLD_FILES+=usr/share/zoneinfo/Asia/Macau +OLD_FILES+=usr/share/zoneinfo/Asia/Magadan +OLD_FILES+=usr/share/zoneinfo/Asia/Makassar +OLD_FILES+=usr/share/zoneinfo/Asia/Manila +OLD_FILES+=usr/share/zoneinfo/Asia/Muscat +OLD_FILES+=usr/share/zoneinfo/Asia/Nicosia +OLD_FILES+=usr/share/zoneinfo/Asia/Novokuznetsk +OLD_FILES+=usr/share/zoneinfo/Asia/Novosibirsk +OLD_FILES+=usr/share/zoneinfo/Asia/Omsk +OLD_FILES+=usr/share/zoneinfo/Asia/Oral +OLD_FILES+=usr/share/zoneinfo/Asia/Phnom_Penh +OLD_FILES+=usr/share/zoneinfo/Asia/Pontianak +OLD_FILES+=usr/share/zoneinfo/Asia/Pyongyang +OLD_FILES+=usr/share/zoneinfo/Asia/Qatar +OLD_FILES+=usr/share/zoneinfo/Asia/Qyzylorda +OLD_FILES+=usr/share/zoneinfo/Asia/Rangoon +OLD_FILES+=usr/share/zoneinfo/Asia/Riyadh +OLD_FILES+=usr/share/zoneinfo/Asia/Sakhalin +OLD_FILES+=usr/share/zoneinfo/Asia/Samarkand +OLD_FILES+=usr/share/zoneinfo/Asia/Seoul +OLD_FILES+=usr/share/zoneinfo/Asia/Shanghai +OLD_FILES+=usr/share/zoneinfo/Asia/Singapore +OLD_FILES+=usr/share/zoneinfo/Asia/Srednekolymsk +OLD_FILES+=usr/share/zoneinfo/Asia/Taipei +OLD_FILES+=usr/share/zoneinfo/Asia/Tashkent +OLD_FILES+=usr/share/zoneinfo/Asia/Tbilisi +OLD_FILES+=usr/share/zoneinfo/Asia/Tehran +OLD_FILES+=usr/share/zoneinfo/Asia/Thimphu +OLD_FILES+=usr/share/zoneinfo/Asia/Tokyo +OLD_FILES+=usr/share/zoneinfo/Asia/Ulaanbaatar +OLD_FILES+=usr/share/zoneinfo/Asia/Urumqi +OLD_FILES+=usr/share/zoneinfo/Asia/Ust-Nera +OLD_FILES+=usr/share/zoneinfo/Asia/Vientiane +OLD_FILES+=usr/share/zoneinfo/Asia/Vladivostok +OLD_FILES+=usr/share/zoneinfo/Asia/Yakutsk +OLD_FILES+=usr/share/zoneinfo/Asia/Yekaterinburg +OLD_FILES+=usr/share/zoneinfo/Asia/Yerevan +OLD_FILES+=usr/share/zoneinfo/Atlantic/Azores +OLD_FILES+=usr/share/zoneinfo/Atlantic/Bermuda +OLD_FILES+=usr/share/zoneinfo/Atlantic/Canary +OLD_FILES+=usr/share/zoneinfo/Atlantic/Cape_Verde +OLD_FILES+=usr/share/zoneinfo/Atlantic/Faroe +OLD_FILES+=usr/share/zoneinfo/Atlantic/Madeira +OLD_FILES+=usr/share/zoneinfo/Atlantic/Reykjavik +OLD_FILES+=usr/share/zoneinfo/Atlantic/South_Georgia +OLD_FILES+=usr/share/zoneinfo/Atlantic/St_Helena +OLD_FILES+=usr/share/zoneinfo/Atlantic/Stanley +OLD_FILES+=usr/share/zoneinfo/Australia/Adelaide +OLD_FILES+=usr/share/zoneinfo/Australia/Brisbane +OLD_FILES+=usr/share/zoneinfo/Australia/Broken_Hill +OLD_FILES+=usr/share/zoneinfo/Australia/Currie +OLD_FILES+=usr/share/zoneinfo/Australia/Darwin +OLD_FILES+=usr/share/zoneinfo/Australia/Eucla +OLD_FILES+=usr/share/zoneinfo/Australia/Hobart +OLD_FILES+=usr/share/zoneinfo/Australia/Lindeman +OLD_FILES+=usr/share/zoneinfo/Australia/Lord_Howe +OLD_FILES+=usr/share/zoneinfo/Australia/Melbourne +OLD_FILES+=usr/share/zoneinfo/Australia/Perth +OLD_FILES+=usr/share/zoneinfo/Australia/Sydney +OLD_FILES+=usr/share/zoneinfo/CET +OLD_FILES+=usr/share/zoneinfo/CST6CDT +OLD_FILES+=usr/share/zoneinfo/EET +OLD_FILES+=usr/share/zoneinfo/EST +OLD_FILES+=usr/share/zoneinfo/EST5EDT +OLD_FILES+=usr/share/zoneinfo/Etc/GMT +OLD_FILES+=usr/share/zoneinfo/Etc/GMT+0 +OLD_FILES+=usr/share/zoneinfo/Etc/GMT+1 +OLD_FILES+=usr/share/zoneinfo/Etc/GMT+10 +OLD_FILES+=usr/share/zoneinfo/Etc/GMT+11 +OLD_FILES+=usr/share/zoneinfo/Etc/GMT+12 +OLD_FILES+=usr/share/zoneinfo/Etc/GMT+2 +OLD_FILES+=usr/share/zoneinfo/Etc/GMT+3 +OLD_FILES+=usr/share/zoneinfo/Etc/GMT+4 +OLD_FILES+=usr/share/zoneinfo/Etc/GMT+5 +OLD_FILES+=usr/share/zoneinfo/Etc/GMT+6 +OLD_FILES+=usr/share/zoneinfo/Etc/GMT+7 +OLD_FILES+=usr/share/zoneinfo/Etc/GMT+8 +OLD_FILES+=usr/share/zoneinfo/Etc/GMT+9 +OLD_FILES+=usr/share/zoneinfo/Etc/GMT-0 +OLD_FILES+=usr/share/zoneinfo/Etc/GMT-1 +OLD_FILES+=usr/share/zoneinfo/Etc/GMT-10 +OLD_FILES+=usr/share/zoneinfo/Etc/GMT-11 +OLD_FILES+=usr/share/zoneinfo/Etc/GMT-12 +OLD_FILES+=usr/share/zoneinfo/Etc/GMT-13 +OLD_FILES+=usr/share/zoneinfo/Etc/GMT-14 +OLD_FILES+=usr/share/zoneinfo/Etc/GMT-2 +OLD_FILES+=usr/share/zoneinfo/Etc/GMT-3 +OLD_FILES+=usr/share/zoneinfo/Etc/GMT-4 +OLD_FILES+=usr/share/zoneinfo/Etc/GMT-5 +OLD_FILES+=usr/share/zoneinfo/Etc/GMT-6 +OLD_FILES+=usr/share/zoneinfo/Etc/GMT-7 +OLD_FILES+=usr/share/zoneinfo/Etc/GMT-8 +OLD_FILES+=usr/share/zoneinfo/Etc/GMT-9 +OLD_FILES+=usr/share/zoneinfo/Etc/GMT0 +OLD_FILES+=usr/share/zoneinfo/Etc/Greenwich +OLD_FILES+=usr/share/zoneinfo/Etc/UCT +OLD_FILES+=usr/share/zoneinfo/Etc/UTC +OLD_FILES+=usr/share/zoneinfo/Etc/Universal +OLD_FILES+=usr/share/zoneinfo/Etc/Zulu +OLD_FILES+=usr/share/zoneinfo/Europe/Amsterdam +OLD_FILES+=usr/share/zoneinfo/Europe/Andorra +OLD_FILES+=usr/share/zoneinfo/Europe/Athens +OLD_FILES+=usr/share/zoneinfo/Europe/Belgrade +OLD_FILES+=usr/share/zoneinfo/Europe/Berlin +OLD_FILES+=usr/share/zoneinfo/Europe/Bratislava +OLD_FILES+=usr/share/zoneinfo/Europe/Brussels +OLD_FILES+=usr/share/zoneinfo/Europe/Bucharest +OLD_FILES+=usr/share/zoneinfo/Europe/Budapest +OLD_FILES+=usr/share/zoneinfo/Europe/Busingen +OLD_FILES+=usr/share/zoneinfo/Europe/Chisinau +OLD_FILES+=usr/share/zoneinfo/Europe/Copenhagen +OLD_FILES+=usr/share/zoneinfo/Europe/Dublin +OLD_FILES+=usr/share/zoneinfo/Europe/Gibraltar +OLD_FILES+=usr/share/zoneinfo/Europe/Guernsey +OLD_FILES+=usr/share/zoneinfo/Europe/Helsinki +OLD_FILES+=usr/share/zoneinfo/Europe/Isle_of_Man +OLD_FILES+=usr/share/zoneinfo/Europe/Istanbul +OLD_FILES+=usr/share/zoneinfo/Europe/Jersey +OLD_FILES+=usr/share/zoneinfo/Europe/Kaliningrad +OLD_FILES+=usr/share/zoneinfo/Europe/Kiev +OLD_FILES+=usr/share/zoneinfo/Europe/Lisbon +OLD_FILES+=usr/share/zoneinfo/Europe/Ljubljana +OLD_FILES+=usr/share/zoneinfo/Europe/London +OLD_FILES+=usr/share/zoneinfo/Europe/Luxembourg +OLD_FILES+=usr/share/zoneinfo/Europe/Madrid +OLD_FILES+=usr/share/zoneinfo/Europe/Malta +OLD_FILES+=usr/share/zoneinfo/Europe/Mariehamn +OLD_FILES+=usr/share/zoneinfo/Europe/Minsk +OLD_FILES+=usr/share/zoneinfo/Europe/Monaco +OLD_FILES+=usr/share/zoneinfo/Europe/Moscow +OLD_FILES+=usr/share/zoneinfo/Europe/Nicosia +OLD_FILES+=usr/share/zoneinfo/Europe/Oslo +OLD_FILES+=usr/share/zoneinfo/Europe/Paris +OLD_FILES+=usr/share/zoneinfo/Europe/Podgorica +OLD_FILES+=usr/share/zoneinfo/Europe/Prague +OLD_FILES+=usr/share/zoneinfo/Europe/Riga +OLD_FILES+=usr/share/zoneinfo/Europe/Rome +OLD_FILES+=usr/share/zoneinfo/Europe/Samara +OLD_FILES+=usr/share/zoneinfo/Europe/San_Marino +OLD_FILES+=usr/share/zoneinfo/Europe/Sarajevo +OLD_FILES+=usr/share/zoneinfo/Europe/Simferopol +OLD_FILES+=usr/share/zoneinfo/Europe/Skopje +OLD_FILES+=usr/share/zoneinfo/Europe/Sofia +OLD_FILES+=usr/share/zoneinfo/Europe/Stockholm +OLD_FILES+=usr/share/zoneinfo/Europe/Tallinn +OLD_FILES+=usr/share/zoneinfo/Europe/Tirane +OLD_FILES+=usr/share/zoneinfo/Europe/Uzhgorod +OLD_FILES+=usr/share/zoneinfo/Europe/Vaduz +OLD_FILES+=usr/share/zoneinfo/Europe/Vatican +OLD_FILES+=usr/share/zoneinfo/Europe/Vienna +OLD_FILES+=usr/share/zoneinfo/Europe/Vilnius +OLD_FILES+=usr/share/zoneinfo/Europe/Volgograd +OLD_FILES+=usr/share/zoneinfo/Europe/Warsaw +OLD_FILES+=usr/share/zoneinfo/Europe/Zagreb +OLD_FILES+=usr/share/zoneinfo/Europe/Zaporozhye +OLD_FILES+=usr/share/zoneinfo/Europe/Zurich +OLD_FILES+=usr/share/zoneinfo/Factory +OLD_FILES+=usr/share/zoneinfo/HST +OLD_FILES+=usr/share/zoneinfo/Indian/Antananarivo +OLD_FILES+=usr/share/zoneinfo/Indian/Chagos +OLD_FILES+=usr/share/zoneinfo/Indian/Christmas +OLD_FILES+=usr/share/zoneinfo/Indian/Cocos +OLD_FILES+=usr/share/zoneinfo/Indian/Comoro +OLD_FILES+=usr/share/zoneinfo/Indian/Kerguelen +OLD_FILES+=usr/share/zoneinfo/Indian/Mahe +OLD_FILES+=usr/share/zoneinfo/Indian/Maldives +OLD_FILES+=usr/share/zoneinfo/Indian/Mauritius +OLD_FILES+=usr/share/zoneinfo/Indian/Mayotte +OLD_FILES+=usr/share/zoneinfo/Indian/Reunion +OLD_FILES+=usr/share/zoneinfo/MET +OLD_FILES+=usr/share/zoneinfo/MST +OLD_FILES+=usr/share/zoneinfo/MST7MDT +OLD_FILES+=usr/share/zoneinfo/PST8PDT +OLD_FILES+=usr/share/zoneinfo/Pacific/Apia +OLD_FILES+=usr/share/zoneinfo/Pacific/Auckland +OLD_FILES+=usr/share/zoneinfo/Pacific/Bougainville +OLD_FILES+=usr/share/zoneinfo/Pacific/Chatham +OLD_FILES+=usr/share/zoneinfo/Pacific/Chuuk +OLD_FILES+=usr/share/zoneinfo/Pacific/Easter +OLD_FILES+=usr/share/zoneinfo/Pacific/Efate +OLD_FILES+=usr/share/zoneinfo/Pacific/Enderbury +OLD_FILES+=usr/share/zoneinfo/Pacific/Fakaofo +OLD_FILES+=usr/share/zoneinfo/Pacific/Fiji +OLD_FILES+=usr/share/zoneinfo/Pacific/Funafuti +OLD_FILES+=usr/share/zoneinfo/Pacific/Galapagos +OLD_FILES+=usr/share/zoneinfo/Pacific/Gambier +OLD_FILES+=usr/share/zoneinfo/Pacific/Guadalcanal +OLD_FILES+=usr/share/zoneinfo/Pacific/Guam +OLD_FILES+=usr/share/zoneinfo/Pacific/Honolulu +OLD_FILES+=usr/share/zoneinfo/Pacific/Johnston +OLD_FILES+=usr/share/zoneinfo/Pacific/Kiritimati +OLD_FILES+=usr/share/zoneinfo/Pacific/Kosrae +OLD_FILES+=usr/share/zoneinfo/Pacific/Kwajalein +OLD_FILES+=usr/share/zoneinfo/Pacific/Majuro +OLD_FILES+=usr/share/zoneinfo/Pacific/Marquesas +OLD_FILES+=usr/share/zoneinfo/Pacific/Midway +OLD_FILES+=usr/share/zoneinfo/Pacific/Nauru +OLD_FILES+=usr/share/zoneinfo/Pacific/Niue +OLD_FILES+=usr/share/zoneinfo/Pacific/Norfolk +OLD_FILES+=usr/share/zoneinfo/Pacific/Noumea +OLD_FILES+=usr/share/zoneinfo/Pacific/Pago_Pago +OLD_FILES+=usr/share/zoneinfo/Pacific/Palau +OLD_FILES+=usr/share/zoneinfo/Pacific/Pitcairn +OLD_FILES+=usr/share/zoneinfo/Pacific/Pohnpei +OLD_FILES+=usr/share/zoneinfo/Pacific/Port_Moresby +OLD_FILES+=usr/share/zoneinfo/Pacific/Rarotonga +OLD_FILES+=usr/share/zoneinfo/Pacific/Saipan +OLD_FILES+=usr/share/zoneinfo/Pacific/Tahiti +OLD_FILES+=usr/share/zoneinfo/Pacific/Tarawa +OLD_FILES+=usr/share/zoneinfo/Pacific/Tongatapu +OLD_FILES+=usr/share/zoneinfo/Pacific/Wake +OLD_FILES+=usr/share/zoneinfo/Pacific/Wallis +OLD_FILES+=usr/share/zoneinfo/UTC +OLD_FILES+=usr/share/zoneinfo/WET +OLD_FILES+=usr/share/zoneinfo/posixrules +OLD_FILES+=usr/share/zoneinfo/zone.tab +.endif From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 04:49:34 2015 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 174819DB; Tue, 31 Mar 2015 04:49:34 +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 B50D6D6; Tue, 31 Mar 2015 04:49:33 +0000 (UTC) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail108.syd.optusnet.com.au (Postfix) with ESMTPS id 6ECC01A313B; Tue, 31 Mar 2015 15:49:29 +1100 (AEDT) Date: Tue, 31 Mar 2015 15:49:28 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Konstantin Belousov Subject: Re: svn commit: r280279 - head/sys/sys In-Reply-To: <20150330172434.GG2379@kib.kiev.ua> Message-ID: <20150331144411.R3908@besplex.bde.org> References: <201503201027.t2KAR6Ze053047@svn.freebsd.org> <20150322080015.O955@besplex.bde.org> <20150322093251.GY2379@kib.kiev.ua> <2526359.g5B2nXdKeQ@ralph.baldwin.cx> <20150330172434.GG2379@kib.kiev.ua> 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=A5NVYcmG c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=vCzcZbI6Uukqd2lmVT4A:9 a=kQzxLxV5hyVXWBHF:21 a=2J-hOSGCcJ9z3Sc1:21 a=CjuIK1q_8ugA:10 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Bruce Evans , John Baldwin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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, 31 Mar 2015 04:49:34 -0000 On Mon, 30 Mar 2015, Konstantin Belousov wrote: > On Mon, Mar 30, 2015 at 11:57:08AM -0400, John Baldwin wrote: >> On Sunday, March 22, 2015 11:32:51 AM Konstantin Belousov wrote: >>> ... >>> So anybody has to compile his own kernel to get popcnt optimization ? >>> We do care about trivial things that improve time. I'm not sure we do. The microoptimizations give speed improvements in the 1-10% range, while general bloat gives speed unimprovements in the 10-500% range. > I updated the pmap patch, see the end of the message. Seems OK, except for verbose names. >>> BTW, I have the following WIP change, which popcnt xorl is a piece of. >>> It emulates the ifuncs with some preprocessing mess. It is much better >>> than runtime patching, and is a prerequisite to properly support more >>> things, like SMAP. I did not published it earlier, since I wanted to >>> convert TLB flush code to this. >> >> This looks fine to me. It seems to be manually converting certain symbols >> to use a dynamic lookup that must be explicitly resolved before first >> use? It looks a bit overengineered to me. A bit like my function pointers for the bcopy() family on i386. bcopy() is a bulk operation, so in theory you can do it much faster by selecting the best available version at runtime. In practice, the gains were not large and are too machine-dependent to maintain. It is even harder to get large gains and maintain them by selecting individual instructions at runtime. > diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c > index 6a4077c..fcfba56 100644 > --- a/sys/amd64/amd64/pmap.c > +++ b/sys/amd64/amd64/pmap.c > @@ -412,7 +416,7 @@ static caddr_t crashdumpmap; > static void free_pv_chunk(struct pv_chunk *pc); > static void free_pv_entry(pmap_t pmap, pv_entry_t pv); > static pv_entry_t get_pv_entry(pmap_t pmap, struct rwlock **lockp); > -static int popcnt_pc_map_elem(uint64_t elem); > +static int popcnt_pc_map_elem_pq(uint64_t elem); popcnt_pc_map_elem_pq() is the most verbose name used here. It is not necessary to encrypt a function's man page in its name. > @@ -2980,20 +3002,27 @@ retry: > > /* > * Returns the number of one bits within the given PV chunk map element. > + * > + * The erratas for Intel processors state that "POPCNT Instruction May > + * Take Longer to Execute Than Expected". It is believed that the > + * issue is the spurious dependency on the destination register. > + * Provide a hint to the register rename logic that the destination > + * value is overwritten, by clearing it, as suggested in the > + * optimization manual. It should be cheap for unaffected processors > + * as well. > + * > + * Reference numbers for erratas are > + * 4th Gen Core: HSD146 > + * 5th Gen Core: BDM85 > */ > static int > -popcnt_pc_map_elem(uint64_t elem) > +popcnt_pc_map_elem_pq(uint64_t elem) Here the function has a specialized use, but internally it is just the popcntq() cpufunc, except that doesn't have the xorl workaround or the above documentation for the workaround. > { > - int count; > + u_long result; > > - /* > - * This simple method of counting the one bits performs well because > - * the given element typically contains more zero bits than one bits. > - */ > - count = 0; > - for (; elem != 0; elem &= elem - 1) > - count++; > - return (count); > + __asm __volatile("xorl %k0,%k0;popcntq %1,%0" > + : "=&r" (result) : "rm" (elem)); > + return (result); > } Style: - there should be a space after ";" in the asm. - loading 0 should be in the operands. Then you don't need the "k" modification. It should be able to load 0 using xorl iff that is best for the current arch. Perhaps a register is already 0, and it is best to do a null load so as to use that register. The patch is missing removal of the popcntq() cpufunc. This function was only used here, and is now unused. cpufunc.h is supposed to contain only wrappers for single instructions, to be combined if necessary to create larger functions. popcntq() follows this rule (some other functions are broken). popcntq() with the load of 0 wouldn't satisify it strictly, but there is no other way to fix it since register allocation is unavailable across inline asms. Actually, if you move the load to the operands, it would follow the rule strictly enough -- many of the asms need more than a single instruction to load things. Bruce From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 05:26:31 2015 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 823E5E86; Tue, 31 Mar 2015 05:26: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 6CDD1680; Tue, 31 Mar 2015 05:26: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 t2V5QVWQ061340; Tue, 31 Mar 2015 05:26:31 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2V5QVGx061339; Tue, 31 Mar 2015 05:26:31 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201503310526.t2V5QVGx061339@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Tue, 31 Mar 2015 05:26:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280891 - head/sys/dev/nand 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, 31 Mar 2015 05:26:31 -0000 Author: jhibbits Date: Tue Mar 31 05:26:30 2015 New Revision: 280891 URL: https://svnweb.freebsd.org/changeset/base/280891 Log: machine/fdt.h no longer exists for powerpc. MFC after: 1 month Modified: head/sys/dev/nand/nfc_fsl.c Modified: head/sys/dev/nand/nfc_fsl.c ============================================================================== --- head/sys/dev/nand/nfc_fsl.c Tue Mar 31 04:44:46 2015 (r280890) +++ head/sys/dev/nand/nfc_fsl.c Tue Mar 31 05:26:30 2015 (r280891) @@ -50,7 +50,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 05:29:45 2015 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 E712DFF1; Tue, 31 Mar 2015 05:29: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 D1998697; Tue, 31 Mar 2015 05:29: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 t2V5TjXq061757; Tue, 31 Mar 2015 05:29:45 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2V5TjIM061756; Tue, 31 Mar 2015 05:29:45 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201503310529.t2V5TjIM061756@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Tue, 31 Mar 2015 05:29:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280892 - head/sys/powerpc/booke 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, 31 Mar 2015 05:29:46 -0000 Author: jhibbits Date: Tue Mar 31 05:29:44 2015 New Revision: 280892 URL: https://svnweb.freebsd.org/changeset/base/280892 Log: CCSRBAR_VA is mpc85xx-specific, so add guards, and include the proper header file for it. MFC after: 1 month Modified: head/sys/powerpc/booke/machdep.c Modified: head/sys/powerpc/booke/machdep.c ============================================================================== --- head/sys/powerpc/booke/machdep.c Tue Mar 31 05:26:30 2015 (r280891) +++ head/sys/powerpc/booke/machdep.c Tue Mar 31 05:29:44 2015 (r280892) @@ -141,6 +141,10 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef MPC85XX +#include +#endif + #ifdef DDB #include #endif @@ -464,7 +468,9 @@ booke_init(uint32_t arg1, uint32_t arg2) debugf(" arg3 mdp = 0x%08x\n", (u_int32_t)mdp); debugf(" end = 0x%08x\n", (u_int32_t)end); debugf(" boothowto = 0x%08x\n", boothowto); +#ifdef MPC85XX debugf(" kernel ccsrbar = 0x%08x\n", CCSRBAR_VA); +#endif debugf(" MSR = 0x%08x\n", mfmsr()); #if defined(BOOKE_E500) debugf(" HID0 = 0x%08x\n", mfspr(SPR_HID0)); From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 06:43:56 2015 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 BB2C212F; Tue, 31 Mar 2015 06:43: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 A50BAEFC; Tue, 31 Mar 2015 06:43: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 t2V6hu5J099360; Tue, 31 Mar 2015 06:43:56 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2V6htK1099358; Tue, 31 Mar 2015 06:43:55 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201503310643.t2V6htK1099358@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Tue, 31 Mar 2015 06:43:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280893 - head/tools/regression/aio/aiotest 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, 31 Mar 2015 06:43:56 -0000 Author: ngie Date: Tue Mar 31 06:43:55 2015 New Revision: 280893 URL: https://svnweb.freebsd.org/changeset/base/280893 Log: Cleanup and do minor refactoring before converting testcases to ATF - Convert errx(-1, ..) to errx(1, ..) - Move the aio(4) checks to a single function (aio_available); use modfind(2) instead of depending on SIGSYS (doesn't work when aio(4) support is missing, not documented in the aio syscall manpages). - Use aio_available liberally in the testcase functions - Use mkstemp(3) + unlink(2) instead of mktemp(3) - Fix some -Wunused warnings - Bump WARNS to 6 MFC after: 1 week Submitted by: mjohnston [*] Sponsored by: EMC / Isilon Storage Division Modified: head/tools/regression/aio/aiotest/Makefile head/tools/regression/aio/aiotest/aiotest.c Modified: head/tools/regression/aio/aiotest/Makefile ============================================================================== --- head/tools/regression/aio/aiotest/Makefile Tue Mar 31 05:29:44 2015 (r280892) +++ head/tools/regression/aio/aiotest/Makefile Tue Mar 31 06:43:55 2015 (r280893) @@ -6,4 +6,6 @@ MAN= DPADD= ${LIBUTIL} LDADD= -lutil +WARNS?= 6 + .include Modified: head/tools/regression/aio/aiotest/aiotest.c ============================================================================== --- head/tools/regression/aio/aiotest/aiotest.c Tue Mar 31 05:29:44 2015 (r280892) +++ head/tools/regression/aio/aiotest/aiotest.c Tue Mar 31 06:43:55 2015 (r280893) @@ -38,7 +38,8 @@ * basic operations work on some basic object types. */ -#include +#include +#include #include #include #include @@ -79,25 +80,15 @@ struct aio_context { }; static int aio_timedout; -static int aio_notpresent; - -/* - * Attempt to provide a cleaner failure mode in the event AIO support is not - * present by catching and reporting SIGSYS. - */ -static void -aio_sigsys(int sig) -{ - - aio_notpresent = 1; -} static void -aio_sigsys_setup(void) +aio_available(void) { - if (signal(SIGSYS, aio_sigsys) == SIG_ERR) - errx(-1, "FAIL: signal(SIGSYS): %s", strerror(errno)); + if (modfind("aio") == -1) + errx(0, + "aio support not available in the kernel; skipping " + "testcases"); } /* @@ -105,7 +96,7 @@ aio_sigsys_setup(void) * signal(3) and alarm(3) APIs to set this up. */ static void -aio_timeout_signal(int sig) +aio_timeout_signal(int sig __unused) { aio_timedout = 1; @@ -117,7 +108,7 @@ aio_timeout_start(const char *string1, c aio_timedout = 0; if (signal(SIGALRM, aio_timeout_signal) == SIG_ERR) - errx(-1, "FAIL: %s: %s: aio_timeout_set: signal(SIGALRM): %s", + errx(1, "FAIL: %s: %s: aio_timeout_set: signal(SIGALRM): %s", string1, string2, strerror(errno)); alarm(seconds); } @@ -127,7 +118,7 @@ aio_timeout_stop(const char *string1, co { if (signal(SIGALRM, NULL) == SIG_ERR) - errx(-1, "FAIL: %s: %s: aio_timeout_stop: signal(NULL): %s", + errx(1, "FAIL: %s: %s: aio_timeout_stop: signal(NULL): %s", string1, string2, strerror(errno)); alarm(0); } @@ -179,7 +170,7 @@ aio_context_init(struct aio_context *ac, { if (buflen > BUFFER_MAX) - errx(-1, "FAIL: %s: aio_context_init: buffer too large", + errx(1, "FAIL: %s: aio_context_init: buffer too large", test); bzero(ac, sizeof(*ac)); ac->ac_test = test; @@ -190,7 +181,7 @@ aio_context_init(struct aio_context *ac, ac->ac_seed = random(); aio_fill_buffer(ac->ac_buffer, buflen, ac->ac_seed); if (aio_test_buffer(ac->ac_buffer, buflen, ac->ac_seed) == 0) - errx(-1, "%s: aio_context_init: aio_test_buffer: internal " + errx(1, "%s: aio_context_init: aio_test_buffer: internal " "error", test); ac->ac_seconds = seconds; ac->ac_cleanup = cleanup; @@ -223,7 +214,8 @@ aio_write_test(struct aio_context *ac) { struct aiocb aio, *aiop; ssize_t len; - int error; + + aio_available(); bzero(&aio, sizeof(aio)); aio.aio_buf = ac->ac_buffer; @@ -235,33 +227,29 @@ aio_write_test(struct aio_context *ac) if (aio_write(&aio) < 0) { if (errno == EINTR) { - if (aio_notpresent) - errno = EOPNOTSUPP; if (aio_timedout) { aio_cleanup(ac); - errx(-1, "FAIL: %s: aio_write_test: " + errx(1, "FAIL: %s: aio_write_test: " "aio_write: timed out", ac->ac_test); } } aio_cleanup(ac); - errx(-1, "FAIL: %s: aio_write_test: aio_write: %s", + errx(1, "FAIL: %s: aio_write_test: aio_write: %s", ac->ac_test, strerror(errno)); } len = aio_waitcomplete(&aiop, NULL); if (len < 0) { if (errno == EINTR) { - if (aio_notpresent) - errno = EOPNOTSUPP; if (aio_timedout) { aio_cleanup(ac); - errx(-1, "FAIL: %s: aio_write_test: " + errx(1, "FAIL: %s: aio_write_test: " "aio_waitcomplete: timed out", ac->ac_test); } } aio_cleanup(ac); - errx(-1, "FAIL: %s: aio_write_test: aio_waitcomplete: %s", + errx(1, "FAIL: %s: aio_write_test: aio_waitcomplete: %s", ac->ac_test, strerror(errno)); } @@ -269,7 +257,7 @@ aio_write_test(struct aio_context *ac) if (len != ac->ac_buflen) { aio_cleanup(ac); - errx(-1, "FAIL: %s: aio_write_test: aio_waitcomplete: short " + errx(1, "FAIL: %s: aio_write_test: aio_waitcomplete: short " "write (%jd)", ac->ac_test, (intmax_t)len); } } @@ -284,6 +272,8 @@ aio_read_test(struct aio_context *ac) struct aiocb aio, *aiop; ssize_t len; + aio_available(); + bzero(ac->ac_buffer, ac->ac_buflen); bzero(&aio, sizeof(aio)); aio.aio_buf = ac->ac_buffer; @@ -295,33 +285,29 @@ aio_read_test(struct aio_context *ac) if (aio_read(&aio) < 0) { if (errno == EINTR) { - if (aio_notpresent) - errno = EOPNOTSUPP; if (aio_timedout) { aio_cleanup(ac); - errx(-1, "FAIL: %s: aio_read_test: " + errx(1, "FAIL: %s: aio_read_test: " "aio_read: timed out", ac->ac_test); } } aio_cleanup(ac); - errx(-1, "FAIL: %s: aio_read_test: aio_read %s", ac->ac_test, + errx(1, "FAIL: %s: aio_read_test: aio_read %s", ac->ac_test, strerror(errno)); } len = aio_waitcomplete(&aiop, NULL); if (len < 0) { if (errno == EINTR) { - if (aio_notpresent) - errno = EOPNOTSUPP; if (aio_timedout) { aio_cleanup(ac); - errx(-1, "FAIL: %s: aio_read_test: " + errx(1, "FAIL: %s: aio_read_test: " "aio_waitcomplete: timed out", ac->ac_test); } } aio_cleanup(ac); - errx(-1, "FAIL: %s: aio_read_test: aio_waitcomplete: %s", + errx(1, "FAIL: %s: aio_read_test: aio_waitcomplete: %s", ac->ac_test, strerror(errno)); } @@ -329,13 +315,13 @@ aio_read_test(struct aio_context *ac) if (len != ac->ac_buflen) { aio_cleanup(ac); - errx(-1, "FAIL: %s: aio_read_test: aio_waitcomplete: short " + errx(1, "FAIL: %s: aio_read_test: aio_waitcomplete: short " "read (%jd)", ac->ac_test, (intmax_t)len); } if (aio_test_buffer(ac->ac_buffer, ac->ac_buflen, ac->ac_seed) == 0) { aio_cleanup(ac); - errx(-1, "FAIL: %s: aio_read_test: buffer mismatch", + errx(1, "FAIL: %s: aio_read_test: buffer mismatch", ac->ac_test); } } @@ -375,10 +361,12 @@ aio_file_test(void) struct aio_context ac; int fd; + aio_available(); + strcpy(pathname, PATH_TEMPLATE); fd = mkstemp(pathname); if (fd == -1) - errx(-1, "FAIL: aio_file_test: mkstemp: %s", + errx(1, "FAIL: aio_file_test: mkstemp: %s", strerror(errno)); arg.afa_fd = fd; @@ -423,15 +411,20 @@ aio_fifo_test(void) char pathname[PATH_MAX]; struct aio_context ac; + aio_available(); + /* - * In theory, mktemp() can return a name that is then collided with. + * In theory, mkstemp() can return a name that is then collided with. * Because this is a regression test, we treat that as a test failure * rather than retrying. */ strcpy(pathname, PATH_TEMPLATE); - mktemp(pathname); + if (mkstemp(pathname) == -1) + err(1, "FAIL: aio_fifo_test: mkstemp failed"); + if (unlink(pathname) == -1) + err(1, "FAIL: aio_fifo_test: unlink failed"); if (mkfifo(pathname, 0600) == -1) - errx(-1, "FAIL: aio_fifo_test: mkfifo: %s", strerror(errno)); + errx(1, "FAIL: aio_fifo_test: mkfifo: %s", strerror(errno)); arg.afa_pathname = pathname; arg.afa_read_fd = -1; arg.afa_write_fd = -1; @@ -441,7 +434,7 @@ aio_fifo_test(void) error = errno; aio_fifo_cleanup(&arg); errno = error; - errx(-1, "FAIL: aio_fifo_test: read_fd open: %s", + errx(1, "FAIL: aio_fifo_test: read_fd open: %s", strerror(errno)); } arg.afa_read_fd = read_fd; @@ -451,7 +444,7 @@ aio_fifo_test(void) error = errno; aio_fifo_cleanup(&arg); errno = error; - errx(-1, "FAIL: aio_fifo_test: write_fd open: %s", + errx(1, "FAIL: aio_fifo_test: write_fd open: %s", strerror(errno)); } arg.afa_write_fd = write_fd; @@ -489,8 +482,10 @@ aio_unix_socketpair_test(void) struct aio_context ac; int sockets[2]; + aio_available(); + if (socketpair(PF_UNIX, SOCK_STREAM, 0, sockets) < 0) - errx(-1, "FAIL: aio_socketpair_test: socketpair: %s", + errx(1, "FAIL: aio_socketpair_test: socketpair: %s", strerror(errno)); arg.asa_sockets[0] = sockets[0]; @@ -532,8 +527,10 @@ aio_pty_test(void) struct termios ts; int error; + aio_available(); + if (openpty(&read_fd, &write_fd, NULL, NULL, NULL) < 0) - errx(-1, "FAIL: aio_pty_test: openpty: %s", strerror(errno)); + errx(1, "FAIL: aio_pty_test: openpty: %s", strerror(errno)); arg.apa_read_fd = read_fd; arg.apa_write_fd = write_fd; @@ -542,7 +539,7 @@ aio_pty_test(void) error = errno; aio_pty_cleanup(&arg); errno = error; - errx(-1, "FAIL: aio_pty_test: tcgetattr: %s", + errx(1, "FAIL: aio_pty_test: tcgetattr: %s", strerror(errno)); } cfmakeraw(&ts); @@ -550,7 +547,7 @@ aio_pty_test(void) error = errno; aio_pty_cleanup(&arg); errno = error; - errx(-1, "FAIL: aio_pty_test: tcsetattr: %s", + errx(1, "FAIL: aio_pty_test: tcsetattr: %s", strerror(errno)); } @@ -581,8 +578,10 @@ aio_pipe_test(void) struct aio_context ac; int pipes[2]; + aio_available(); + if (pipe(pipes) < 0) - errx(-1, "FAIL: aio_pipe_test: pipe: %s", strerror(errno)); + errx(1, "FAIL: aio_pipe_test: pipe: %s", strerror(errno)); aio_context_init(&ac, "aio_file_test", pipes[0], pipes[1], PIPE_LEN, PIPE_TIMEOUT, aio_pipe_cleanup, pipes); @@ -633,15 +632,23 @@ aio_md_cleanup(void *arg) static void aio_md_test(void) { - int error, fd, i, mdctl_fd, unit; + int error, fd, mdctl_fd, unit; char pathname[PATH_MAX]; struct aio_md_arg arg; struct aio_context ac; struct md_ioctl mdio; + aio_available(); + + if (geteuid() != 0) { + fprintf(stderr, "WARNING: aio_md_test: skipped as euid " + "!= 0\n"); + return; + } + mdctl_fd = open("/dev/" MDCTL_NAME, O_RDWR, 0); if (mdctl_fd < 0) - errx(-1, "FAIL: aio_md_test: open(/dev/%s): %s", MDCTL_NAME, + errx(1, "FAIL: aio_md_test: open(/dev/%s): %s", MDCTL_NAME, strerror(errno)); bzero(&mdio, sizeof(mdio)); @@ -658,7 +665,7 @@ aio_md_test(void) error = errno; aio_md_cleanup(&arg); errno = error; - errx(-1, "FAIL: aio_md_test: MDIOCATTACH: %s", + errx(1, "FAIL: aio_md_test: MDIOCATTACH: %s", strerror(errno)); } @@ -669,7 +676,7 @@ aio_md_test(void) error = errno; aio_md_cleanup(&arg); errno = error; - errx(-1, "FAIL: aio_md_test: open(%s): %s", pathname, + errx(1, "FAIL: aio_md_test: open(%s): %s", pathname, strerror(errno)); } arg.ama_fd = fd; @@ -685,18 +692,15 @@ aio_md_test(void) } int -main(int argc, char *argv[]) +main(void) { - aio_sigsys_setup(); aio_file_test(); aio_fifo_test(); aio_unix_socketpair_test(); aio_pty_test(); aio_pipe_test(); - if (geteuid() == 0) - aio_md_test(); - else - fprintf(stderr, "WARNING: aio_md_test: skipped as euid " - "!= 0\n"); + aio_md_test(); + + return (0); } From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 06:50:30 2015 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 56CBF370; Tue, 31 Mar 2015 06:50: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 3BF15F47; Tue, 31 Mar 2015 06:50: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 t2V6oTAU001112; Tue, 31 Mar 2015 06:50:29 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2V6oTBp000660; Tue, 31 Mar 2015 06:50:29 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201503310650.t2V6oTBp000660@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Tue, 31 Mar 2015 06:50:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280894 - head/tools/regression/aio/kqueue/lio 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, 31 Mar 2015 06:50:30 -0000 Author: ngie Date: Tue Mar 31 06:50:28 2015 New Revision: 280894 URL: https://svnweb.freebsd.org/changeset/base/280894 Log: Minor cleanup before converting to ATF testcases - Remove blank (tab-only) lines. - Fix -Wunused warnings. - Bump up to WARNS= 6 Modified: head/tools/regression/aio/kqueue/lio/Makefile head/tools/regression/aio/kqueue/lio/lio_kqueue.c Modified: head/tools/regression/aio/kqueue/lio/Makefile ============================================================================== --- head/tools/regression/aio/kqueue/lio/Makefile Tue Mar 31 06:43:55 2015 (r280893) +++ head/tools/regression/aio/kqueue/lio/Makefile Tue Mar 31 06:50:28 2015 (r280894) @@ -3,4 +3,6 @@ PROG= lio_kqueue MAN= +WARNS?= 6 + .include Modified: head/tools/regression/aio/kqueue/lio/lio_kqueue.c ============================================================================== --- head/tools/regression/aio/kqueue/lio/lio_kqueue.c Tue Mar 31 06:43:55 2015 (r280893) +++ head/tools/regression/aio/kqueue/lio/lio_kqueue.c Tue Mar 31 06:50:28 2015 (r280894) @@ -37,13 +37,15 @@ * http://www.ambrisko.com/doug/listio_kqueue/listio_kqueue.patch */ -#include -#include -#include -#include #include #include #include +#include +#include +#include +#include +#include +#include #include #define PATH_TEMPLATE "/tmp/aio.XXXXXXXXXX" @@ -52,9 +54,10 @@ #define MAX LIO_MAX * 16 #define MAX_RUNS 300 +int main(int argc, char *argv[]){ int fd; - struct aiocb *iocb[MAX], *kq_iocb; + struct aiocb *iocb[MAX]; struct aiocb **lio[LIO_MAX], **lio_element, **kq_lio; int i, result, run, error, j, k; char buffer[32768]; @@ -65,7 +68,7 @@ main(int argc, char *argv[]){ time_t time1, time2; char *file, pathname[sizeof(PATH_TEMPLATE)-1]; int tmp_file = 0, failed = 0; - + if (kq < 0) { perror("No kqeueue\n"); exit(1); @@ -89,7 +92,7 @@ main(int argc, char *argv[]){ #ifdef DEBUG printf("Hello kq %d fd %d\n", kq, fd); #endif - + for (run = 0; run < MAX_RUNS; run++){ #ifdef DEBUG printf("Run %d\n", run); @@ -137,13 +140,13 @@ main(int argc, char *argv[]){ printf("write %d is at %p\n", j, lio[j]); #endif } - + for(i = 0; i < LIO_MAX; i++) { for(j = LIO_MAX - 1; j >=0; j--) { if (lio[j]) break; } - + for(;;) { bzero(&ke, sizeof(ke)); bzero(&kq_returned, sizeof(ke)); @@ -169,18 +172,18 @@ main(int argc, char *argv[]){ kq_returned.udata, lio[j]); #endif - + if(kq_lio) break; #ifdef DEBUG printf("Try again\n"); #endif - } - + } + #ifdef DEBUG printf("lio %p\n", lio); #endif - + for (j = 0; j < LIO_MAX; j++) { if (lio[j] == kq_lio) { break; @@ -201,12 +204,12 @@ main(int argc, char *argv[]){ printf("PASS: run %d, operation %d result %d \n", run, LIO_MAX - i -1, result); } for(k = 0; k < MAX / LIO_MAX; k++){ - result = aio_return(kq_lio[k]); + result = aio_return(kq_lio[k]); #ifdef DEBUG printf("Return Resulto for %d %d is %d\n", j, k, result); #endif if (result != sizeof(buffer)) { - printf("FAIL: run %d, operation %d sub-opt %d result %d (errno=%d) should be %d\n", + printf("FAIL: run %d, operation %d sub-opt %d result %d (errno=%d) should be %zu\n", run, LIO_MAX - i -1, k, result, errno, sizeof(buffer)); } else { printf("PASS: run %d, operation %d sub-opt %d result %d\n", @@ -216,13 +219,13 @@ main(int argc, char *argv[]){ #ifdef DEBUG printf("\n"); #endif - + for(k = 0; k < MAX / LIO_MAX; k++) { free(lio[j][k]); } free(lio[j]); lio[j] = NULL; - } + } } #ifdef DEBUG printf("Done\n"); From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 06:51:14 2015 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 854C6588; Tue, 31 Mar 2015 06:51: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 7030AFE3; Tue, 31 Mar 2015 06:51: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 t2V6pE1F002265; Tue, 31 Mar 2015 06:51:14 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2V6pDMH002261; Tue, 31 Mar 2015 06:51:13 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201503310651.t2V6pDMH002261@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Tue, 31 Mar 2015 06:51:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280895 - head/tools/regression/aio/kqueue 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, 31 Mar 2015 06:51:14 -0000 Author: ngie Date: Tue Mar 31 06:51:13 2015 New Revision: 280895 URL: https://svnweb.freebsd.org/changeset/base/280895 Log: - Fix -Wsign issue - Bump up to WARNS=6 Modified: head/tools/regression/aio/kqueue/Makefile head/tools/regression/aio/kqueue/aio_kqueue.c Modified: head/tools/regression/aio/kqueue/Makefile ============================================================================== --- head/tools/regression/aio/kqueue/Makefile Tue Mar 31 06:50:28 2015 (r280894) +++ head/tools/regression/aio/kqueue/Makefile Tue Mar 31 06:51:13 2015 (r280895) @@ -3,4 +3,8 @@ PROG= aio_kqueue MAN= +WARNS?= 6 + +SUBDIR+= lio + .include Modified: head/tools/regression/aio/kqueue/aio_kqueue.c ============================================================================== --- head/tools/regression/aio/kqueue/aio_kqueue.c Tue Mar 31 06:50:28 2015 (r280894) +++ head/tools/regression/aio/kqueue/aio_kqueue.c Tue Mar 31 06:51:13 2015 (r280895) @@ -177,7 +177,7 @@ main (int argc, char *argv[]) #endif if (result != sizeof(buffer)) { printf("FAIL: run %d, operation %d, result %d " - " (errno=%d) should be %d\n", run, pending, + " (errno=%d) should be %zu\n", run, pending, result, errno, sizeof(buffer)); failed++; } else From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 07:21:54 2015 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 DEC5BE31; Tue, 31 Mar 2015 07:21: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 AF68C37D; Tue, 31 Mar 2015 07:21: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 t2V7LsOs020393; Tue, 31 Mar 2015 07:21:54 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2V7Ls1U020392; Tue, 31 Mar 2015 07:21:54 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201503310721.t2V7Ls1U020392@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 31 Mar 2015 07:21:54 +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: r280896 - stable/10/sbin/camcontrol 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, 31 Mar 2015 07:21:55 -0000 Author: mav Date: Tue Mar 31 07:21:53 2015 New Revision: 280896 URL: https://svnweb.freebsd.org/changeset/base/280896 Log: MFC r280166: Make ATA power management commands to work on SCSI HBAs via PASS THROUGH. Modified: stable/10/sbin/camcontrol/camcontrol.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/camcontrol/camcontrol.c ============================================================================== --- stable/10/sbin/camcontrol/camcontrol.c Tue Mar 31 06:51:13 2015 (r280895) +++ stable/10/sbin/camcontrol/camcontrol.c Tue Mar 31 07:21:53 2015 (r280896) @@ -7968,39 +7968,21 @@ atapm(struct cam_device *device, int arg else sc = 253; - cam_fill_ataio(&ccb->ataio, - retry_count, - NULL, - /*flags*/CAM_DIR_NONE, - MSG_SIMPLE_Q_TAG, - /*data_ptr*/NULL, - /*dxfer_len*/0, - timeout ? timeout : 30 * 1000); - ata_28bit_cmd(&ccb->ataio, cmd, 0, 0, sc); - - /* Disable freezing the device queue */ - ccb->ccb_h.flags |= CAM_DEV_QFRZDIS; - - if (arglist & CAM_ARG_ERR_RECOVER) - ccb->ccb_h.flags |= CAM_PASS_ERR_RECOVER; - - if (cam_send_ccb(device, ccb) < 0) { - warn("error sending command"); - - if (arglist & CAM_ARG_VERBOSE) - cam_error_print(device, ccb, CAM_ESF_ALL, - CAM_EPF_ALL, stderr); - - retval = 1; - goto bailout; - } + retval = ata_do_28bit_cmd(device, + ccb, + /*retries*/retry_count, + /*flags*/CAM_DIR_NONE, + /*protocol*/AP_PROTO_NON_DATA, + /*tag_action*/MSG_SIMPLE_Q_TAG, + /*command*/cmd, + /*features*/0, + /*lba*/0, + /*sector_count*/sc, + /*data_ptr*/NULL, + /*dxfer_len*/0, + /*timeout*/timeout ? timeout : 30 * 1000, + /*quiet*/1); - if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { - cam_error_print(device, ccb, CAM_ESF_ALL, CAM_EPF_ALL, stderr); - retval = 1; - goto bailout; - } -bailout: cam_freeccb(ccb); return (retval); } From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 07:22:55 2015 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 048CFF6E; Tue, 31 Mar 2015 07:22: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 C923938E; Tue, 31 Mar 2015 07:22: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 t2V7MsaG020654; Tue, 31 Mar 2015 07:22:54 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2V7Ms70020653; Tue, 31 Mar 2015 07:22:54 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201503310722.t2V7Ms70020653@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 31 Mar 2015 07:22: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: r280897 - stable/9/sbin/camcontrol 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, 31 Mar 2015 07:22:55 -0000 Author: mav Date: Tue Mar 31 07:22:53 2015 New Revision: 280897 URL: https://svnweb.freebsd.org/changeset/base/280897 Log: MFC r280166: Make ATA power management commands to work on SCSI HBAs via PASS THROUGH. Modified: stable/9/sbin/camcontrol/camcontrol.c Directory Properties: stable/9/ (props changed) stable/9/sbin/ (props changed) stable/9/sbin/camcontrol/ (props changed) Modified: stable/9/sbin/camcontrol/camcontrol.c ============================================================================== --- stable/9/sbin/camcontrol/camcontrol.c Tue Mar 31 07:21:53 2015 (r280896) +++ stable/9/sbin/camcontrol/camcontrol.c Tue Mar 31 07:22:53 2015 (r280897) @@ -7707,39 +7707,21 @@ atapm(struct cam_device *device, int arg else sc = 253; - cam_fill_ataio(&ccb->ataio, - retry_count, - NULL, - /*flags*/CAM_DIR_NONE, - MSG_SIMPLE_Q_TAG, - /*data_ptr*/NULL, - /*dxfer_len*/0, - timeout ? timeout : 30 * 1000); - ata_28bit_cmd(&ccb->ataio, cmd, 0, 0, sc); - - /* Disable freezing the device queue */ - ccb->ccb_h.flags |= CAM_DEV_QFRZDIS; - - if (arglist & CAM_ARG_ERR_RECOVER) - ccb->ccb_h.flags |= CAM_PASS_ERR_RECOVER; - - if (cam_send_ccb(device, ccb) < 0) { - warn("error sending command"); - - if (arglist & CAM_ARG_VERBOSE) - cam_error_print(device, ccb, CAM_ESF_ALL, - CAM_EPF_ALL, stderr); + retval = ata_do_28bit_cmd(device, + ccb, + /*retries*/retry_count, + /*flags*/CAM_DIR_NONE, + /*protocol*/AP_PROTO_NON_DATA, + /*tag_action*/MSG_SIMPLE_Q_TAG, + /*command*/cmd, + /*features*/0, + /*lba*/0, + /*sector_count*/sc, + /*data_ptr*/NULL, + /*dxfer_len*/0, + /*timeout*/timeout ? timeout : 30 * 1000, + /*quiet*/1); - retval = 1; - goto bailout; - } - - if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { - cam_error_print(device, ccb, CAM_ESF_ALL, CAM_EPF_ALL, stderr); - retval = 1; - goto bailout; - } -bailout: cam_freeccb(ccb); return (retval); } From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 07:26:41 2015 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 427EE168; Tue, 31 Mar 2015 07: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 2CFC13C5; Tue, 31 Mar 2015 07: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 t2V7Qf64021256; Tue, 31 Mar 2015 07:26:41 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2V7QeCN021254; Tue, 31 Mar 2015 07:26:40 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201503310726.t2V7QeCN021254@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 31 Mar 2015 07:26:40 +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: r280898 - in stable/10/sys/cam: ata scsi 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, 31 Mar 2015 07:26:41 -0000 Author: mav Date: Tue Mar 31 07:26:39 2015 New Revision: 280898 URL: https://svnweb.freebsd.org/changeset/base/280898 Log: MFC r280172: Improve ATA and SCSI versions printing. There is no "SCSI-6" and "ATA-9", but there is "SPC-4" and "ACS-2". Modified: stable/10/sys/cam/ata/ata_all.c stable/10/sys/cam/scsi/scsi_all.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ata/ata_all.c ============================================================================== --- stable/10/sys/cam/ata/ata_all.c Tue Mar 31 07:22:53 2015 (r280897) +++ stable/10/sys/cam/ata/ata_all.c Tue Mar 31 07:26:39 2015 (r280898) @@ -275,28 +275,38 @@ ata_res_sbuf(struct ccb_ataio *ataio, st void ata_print_ident(struct ata_params *ident_data) { - char product[48], revision[16]; + const char *proto; + char product[48], revision[16], ata[12], sata[12]; cam_strvis(product, ident_data->model, sizeof(ident_data->model), sizeof(product)); cam_strvis(revision, ident_data->revision, sizeof(ident_data->revision), sizeof(revision)); - printf("<%s %s> %s-%d", - product, revision, - (ident_data->config == ATA_PROTO_CFA) ? "CFA" : - (ident_data->config & ATA_PROTO_ATAPI) ? "ATAPI" : "ATA", - ata_version(ident_data->version_major)); + proto = (ident_data->config == ATA_PROTO_CFA) ? "CFA" : + (ident_data->config & ATA_PROTO_ATAPI) ? "ATAPI" : "ATA"; + if (ata_version(ident_data->version_major) == 0) { + snprintf(ata, sizeof(ata), "%s", proto); + } else if (ata_version(ident_data->version_major) <= 7) { + snprintf(ata, sizeof(ata), "%s-%d", proto, + ata_version(ident_data->version_major)); + } else if (ata_version(ident_data->version_major) == 8) { + snprintf(ata, sizeof(ata), "%s8-ACS", proto); + } else { + snprintf(ata, sizeof(ata), "ACS-%d %s", + ata_version(ident_data->version_major) - 7, proto); + } if (ident_data->satacapabilities && ident_data->satacapabilities != 0xffff) { if (ident_data->satacapabilities & ATA_SATA_GEN3) - printf(" SATA 3.x"); + snprintf(sata, sizeof(sata), " SATA 3.x"); else if (ident_data->satacapabilities & ATA_SATA_GEN2) - printf(" SATA 2.x"); + snprintf(sata, sizeof(sata), " SATA 2.x"); else if (ident_data->satacapabilities & ATA_SATA_GEN1) - printf(" SATA 1.x"); + snprintf(sata, sizeof(sata), " SATA 1.x"); else - printf(" SATA"); - } - printf(" device\n"); + snprintf(sata, sizeof(sata), " SATA"); + } else + sata[0] = 0; + printf("<%s %s> %s%s device\n", product, revision, ata, sata); } void Modified: stable/10/sys/cam/scsi/scsi_all.c ============================================================================== --- stable/10/sys/cam/scsi/scsi_all.c Tue Mar 31 07:22:53 2015 (r280897) +++ stable/10/sys/cam/scsi/scsi_all.c Tue Mar 31 07:26:39 2015 (r280898) @@ -5149,7 +5149,7 @@ scsi_print_inquiry(struct scsi_inquiry_d { u_int8_t type; char *dtype, *qtype; - char vendor[16], product[48], revision[16], rstr[4]; + char vendor[16], product[48], revision[16], rstr[12]; type = SID_TYPE(inq_data); @@ -5157,7 +5157,7 @@ scsi_print_inquiry(struct scsi_inquiry_d * Figure out basic device type and qualifier. */ if (SID_QUAL_IS_VENDOR_UNIQUE(inq_data)) { - qtype = "(vendor-unique qualifier)"; + qtype = " (vendor-unique qualifier)"; } else { switch (SID_QUAL(inq_data)) { case SID_QUAL_LU_CONNECTED: @@ -5165,15 +5165,15 @@ scsi_print_inquiry(struct scsi_inquiry_d break; case SID_QUAL_LU_OFFLINE: - qtype = "(offline)"; + qtype = " (offline)"; break; case SID_QUAL_RSVD: - qtype = "(reserved qualifier)"; + qtype = " (reserved qualifier)"; break; default: case SID_QUAL_BAD_LU: - qtype = "(LUN not supported)"; + qtype = " (LUN not supported)"; break; } } @@ -5242,11 +5242,16 @@ scsi_print_inquiry(struct scsi_inquiry_d cam_strvis(revision, inq_data->revision, sizeof(inq_data->revision), sizeof(revision)); - if (SID_ANSI_REV(inq_data) == SCSI_REV_CCS) - bcopy("CCS", rstr, 4); - else - snprintf(rstr, sizeof (rstr), "%d", SID_ANSI_REV(inq_data)); - printf("<%s %s %s> %s %s SCSI-%s device %s\n", + if (SID_ANSI_REV(inq_data) == SCSI_REV_0) + snprintf(rstr, sizeof(rstr), "SCSI"); + else if (SID_ANSI_REV(inq_data) <= SCSI_REV_SPC) { + snprintf(rstr, sizeof(rstr), "SCSI-%d", + SID_ANSI_REV(inq_data)); + } else { + snprintf(rstr, sizeof(rstr), "SPC-%d SCSI", + SID_ANSI_REV(inq_data) - 2); + } + printf("<%s %s %s> %s %s %s device%s\n", vendor, product, revision, SID_IS_REMOVABLE(inq_data) ? "Removable" : "Fixed", dtype, rstr, qtype); From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 07:27:31 2015 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 40ACA2AC; Tue, 31 Mar 2015 07: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 2B19F3CD; Tue, 31 Mar 2015 07: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 t2V7RVYh021432; Tue, 31 Mar 2015 07:27:31 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2V7RUh6021430; Tue, 31 Mar 2015 07:27:30 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201503310727.t2V7RUh6021430@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 31 Mar 2015 07:27:30 +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: r280899 - in stable/9/sys/cam: ata scsi 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, 31 Mar 2015 07:27:31 -0000 Author: mav Date: Tue Mar 31 07:27:29 2015 New Revision: 280899 URL: https://svnweb.freebsd.org/changeset/base/280899 Log: MFC r280172: Improve ATA and SCSI versions printing. There is no "SCSI-6" and "ATA-9", but there is "SPC-4" and "ACS-2". Modified: stable/9/sys/cam/ata/ata_all.c stable/9/sys/cam/scsi/scsi_all.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/cam/ata/ata_all.c ============================================================================== --- stable/9/sys/cam/ata/ata_all.c Tue Mar 31 07:26:39 2015 (r280898) +++ stable/9/sys/cam/ata/ata_all.c Tue Mar 31 07:27:29 2015 (r280899) @@ -272,28 +272,38 @@ ata_res_sbuf(struct ccb_ataio *ataio, st void ata_print_ident(struct ata_params *ident_data) { - char product[48], revision[16]; + const char *proto; + char product[48], revision[16], ata[12], sata[12]; cam_strvis(product, ident_data->model, sizeof(ident_data->model), sizeof(product)); cam_strvis(revision, ident_data->revision, sizeof(ident_data->revision), sizeof(revision)); - printf("<%s %s> %s-%d", - product, revision, - (ident_data->config == ATA_PROTO_CFA) ? "CFA" : - (ident_data->config & ATA_PROTO_ATAPI) ? "ATAPI" : "ATA", - ata_version(ident_data->version_major)); + proto = (ident_data->config == ATA_PROTO_CFA) ? "CFA" : + (ident_data->config & ATA_PROTO_ATAPI) ? "ATAPI" : "ATA"; + if (ata_version(ident_data->version_major) == 0) { + snprintf(ata, sizeof(ata), "%s", proto); + } else if (ata_version(ident_data->version_major) <= 7) { + snprintf(ata, sizeof(ata), "%s-%d", proto, + ata_version(ident_data->version_major)); + } else if (ata_version(ident_data->version_major) == 8) { + snprintf(ata, sizeof(ata), "%s8-ACS", proto); + } else { + snprintf(ata, sizeof(ata), "ACS-%d %s", + ata_version(ident_data->version_major) - 7, proto); + } if (ident_data->satacapabilities && ident_data->satacapabilities != 0xffff) { if (ident_data->satacapabilities & ATA_SATA_GEN3) - printf(" SATA 3.x"); + snprintf(sata, sizeof(sata), " SATA 3.x"); else if (ident_data->satacapabilities & ATA_SATA_GEN2) - printf(" SATA 2.x"); + snprintf(sata, sizeof(sata), " SATA 2.x"); else if (ident_data->satacapabilities & ATA_SATA_GEN1) - printf(" SATA 1.x"); + snprintf(sata, sizeof(sata), " SATA 1.x"); else - printf(" SATA"); - } - printf(" device\n"); + snprintf(sata, sizeof(sata), " SATA"); + } else + sata[0] = 0; + printf("<%s %s> %s%s device\n", product, revision, ata, sata); } void Modified: stable/9/sys/cam/scsi/scsi_all.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_all.c Tue Mar 31 07:26:39 2015 (r280898) +++ stable/9/sys/cam/scsi/scsi_all.c Tue Mar 31 07:27:29 2015 (r280899) @@ -5146,7 +5146,7 @@ scsi_print_inquiry(struct scsi_inquiry_d { u_int8_t type; char *dtype, *qtype; - char vendor[16], product[48], revision[16], rstr[4]; + char vendor[16], product[48], revision[16], rstr[12]; type = SID_TYPE(inq_data); @@ -5154,7 +5154,7 @@ scsi_print_inquiry(struct scsi_inquiry_d * Figure out basic device type and qualifier. */ if (SID_QUAL_IS_VENDOR_UNIQUE(inq_data)) { - qtype = "(vendor-unique qualifier)"; + qtype = " (vendor-unique qualifier)"; } else { switch (SID_QUAL(inq_data)) { case SID_QUAL_LU_CONNECTED: @@ -5162,15 +5162,15 @@ scsi_print_inquiry(struct scsi_inquiry_d break; case SID_QUAL_LU_OFFLINE: - qtype = "(offline)"; + qtype = " (offline)"; break; case SID_QUAL_RSVD: - qtype = "(reserved qualifier)"; + qtype = " (reserved qualifier)"; break; default: case SID_QUAL_BAD_LU: - qtype = "(LUN not supported)"; + qtype = " (LUN not supported)"; break; } } @@ -5239,11 +5239,16 @@ scsi_print_inquiry(struct scsi_inquiry_d cam_strvis(revision, inq_data->revision, sizeof(inq_data->revision), sizeof(revision)); - if (SID_ANSI_REV(inq_data) == SCSI_REV_CCS) - bcopy("CCS", rstr, 4); - else - snprintf(rstr, sizeof (rstr), "%d", SID_ANSI_REV(inq_data)); - printf("<%s %s %s> %s %s SCSI-%s device %s\n", + if (SID_ANSI_REV(inq_data) == SCSI_REV_0) + snprintf(rstr, sizeof(rstr), "SCSI"); + else if (SID_ANSI_REV(inq_data) <= SCSI_REV_SPC) { + snprintf(rstr, sizeof(rstr), "SCSI-%d", + SID_ANSI_REV(inq_data)); + } else { + snprintf(rstr, sizeof(rstr), "SPC-%d SCSI", + SID_ANSI_REV(inq_data) - 2); + } + printf("<%s %s %s> %s %s %s device%s\n", vendor, product, revision, SID_IS_REMOVABLE(inq_data) ? "Removable" : "Fixed", dtype, rstr, qtype); From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 08:00:21 2015 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 8185EE08; Tue, 31 Mar 2015 08:00: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 52324977; Tue, 31 Mar 2015 08:00: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 t2V80Lcm036469; Tue, 31 Mar 2015 08:00:21 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2V80LQD036468; Tue, 31 Mar 2015 08:00:21 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503310800.t2V80LQD036468@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Tue, 31 Mar 2015 08:00: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: r280900 - 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: Tue, 31 Mar 2015 08:00:21 -0000 Author: arybchik Date: Tue Mar 31 08:00:20 2015 New Revision: 280900 URL: https://svnweb.freebsd.org/changeset/base/280900 Log: MFC: 279268 sfxge: add to config files Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/conf/files Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Tue Mar 31 07:27:29 2015 (r280899) +++ stable/10/sys/conf/files Tue Mar 31 08:00:20 2015 (r280900) @@ -2120,6 +2120,37 @@ dev/sdhci/sdhci.c optional sdhci dev/sdhci/sdhci_if.m optional sdhci dev/sdhci/sdhci_pci.c optional sdhci pci dev/sf/if_sf.c optional sf pci +dev/sfxge/common/efx_bootcfg.c optional sfxge pci +dev/sfxge/common/efx_ev.c optional sfxge pci +dev/sfxge/common/efx_filter.c optional sfxge pci +dev/sfxge/common/efx_intr.c optional sfxge pci +dev/sfxge/common/efx_mac.c optional sfxge pci +dev/sfxge/common/efx_mcdi.c optional sfxge pci +dev/sfxge/common/efx_mon.c optional sfxge pci +dev/sfxge/common/efx_nic.c optional sfxge pci +dev/sfxge/common/efx_nvram.c optional sfxge pci +dev/sfxge/common/efx_phy.c optional sfxge pci +dev/sfxge/common/efx_port.c optional sfxge pci +dev/sfxge/common/efx_rx.c optional sfxge pci +dev/sfxge/common/efx_sram.c optional sfxge pci +dev/sfxge/common/efx_tx.c optional sfxge pci +dev/sfxge/common/efx_vpd.c optional sfxge pci +dev/sfxge/common/efx_wol.c optional sfxge pci +dev/sfxge/common/siena_mac.c optional sfxge pci +dev/sfxge/common/siena_mon.c optional sfxge pci +dev/sfxge/common/siena_nic.c optional sfxge pci +dev/sfxge/common/siena_nvram.c optional sfxge pci +dev/sfxge/common/siena_phy.c optional sfxge pci +dev/sfxge/common/siena_sram.c optional sfxge pci +dev/sfxge/common/siena_vpd.c optional sfxge pci +dev/sfxge/sfxge.c optional sfxge pci +dev/sfxge/sfxge_dma.c optional sfxge pci +dev/sfxge/sfxge_ev.c optional sfxge pci +dev/sfxge/sfxge_intr.c optional sfxge pci +dev/sfxge/sfxge_mcdi.c optional sfxge pci +dev/sfxge/sfxge_port.c optional sfxge pci +dev/sfxge/sfxge_rx.c optional sfxge pci +dev/sfxge/sfxge_tx.c optional sfxge pci dev/sge/if_sge.c optional sge pci dev/si/si.c optional si dev/si/si2_z280.c optional si From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 08:05:30 2015 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 55B36118; Tue, 31 Mar 2015 08:05: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 402CCA42; Tue, 31 Mar 2015 08:05: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 t2V85UpV040590; Tue, 31 Mar 2015 08:05:30 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2V85UWX040589; Tue, 31 Mar 2015 08:05:30 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503310805.t2V85UWX040589@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Tue, 31 Mar 2015 08:05: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: r280901 - stable/10/sys/dev/sfxge 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, 31 Mar 2015 08:05:30 -0000 Author: arybchik Date: Tue Mar 31 08:05:29 2015 New Revision: 280901 URL: https://svnweb.freebsd.org/changeset/base/280901 Log: MFC: r280807 sfxge: fix bug in TSO when a DMA segment has both header and data Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/dev/sfxge/sfxge_tx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_tx.c Tue Mar 31 08:00:20 2015 (r280900) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Tue Mar 31 08:05:29 2015 (r280901) @@ -1024,7 +1024,7 @@ sfxge_tx_queue_tso(struct sfxge_txq *txq KASSERT(n_dma_seg, ("no payload found in TSO packet")); ++dma_seg; } - tso.in_len = dma_seg->ds_len + (tso.header_len - skipped); + tso.in_len = dma_seg->ds_len - (tso.header_len - skipped); tso.dma_addr = dma_seg->ds_addr + (tso.header_len - skipped); id = txq->added & txq->ptr_mask; From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 08:44:48 2015 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 08722ADA; Tue, 31 Mar 2015 08:44: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 E7A91ED1; Tue, 31 Mar 2015 08:44: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 t2V8il3T059379; Tue, 31 Mar 2015 08:44:47 GMT (envelope-from stas@FreeBSD.org) Received: (from stas@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2V8ilJb059378; Tue, 31 Mar 2015 08:44:47 GMT (envelope-from stas@FreeBSD.org) Message-Id: <201503310844.t2V8ilJb059378@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: stas set sender to stas@FreeBSD.org using -f From: Stanislav Sedov Date: Tue, 31 Mar 2015 08:44:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r280902 - 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: Tue, 31 Mar 2015 08:44:48 -0000 Author: stas Date: Tue Mar 31 08:44:46 2015 New Revision: 280902 URL: https://svnweb.freebsd.org/changeset/base/280902 Log: Release ganbold from mentorship. He won't have to wait patiently for my approvals anymore. Modified: svnadmin/conf/mentors Modified: svnadmin/conf/mentors ============================================================================== --- svnadmin/conf/mentors Tue Mar 31 08:05:29 2015 (r280901) +++ svnadmin/conf/mentors Tue Mar 31 08:44:46 2015 (r280902) @@ -17,7 +17,6 @@ carl jimharris cherry gibbs eri gnn Co-mentor: thompsa erj gnn Co-mentor: jfv -ganbold stas jah kib jceel wkoszek Co-mentor: cognet jch jhb From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 09:51:21 2015 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 DE7EEA4C; Tue, 31 Mar 2015 09:51: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 C842D886; Tue, 31 Mar 2015 09:51: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 t2V9pLRP089323; Tue, 31 Mar 2015 09:51:21 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2V9pKJX089319; Tue, 31 Mar 2015 09:51:20 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201503310951.t2V9pKJX089319@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 31 Mar 2015 09:51:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280903 - in head/libexec/rtld-elf: . aarch64 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, 31 Mar 2015 09:51:22 -0000 Author: andrew Date: Tue Mar 31 09:51:19 2015 New Revision: 280903 URL: https://svnweb.freebsd.org/changeset/base/280903 Log: Add the arm64 code to the runtime linker. It's not able to be built as we still need libc_pic for a few things, but this is expected to be ready soon. Differential Revision: https://reviews.freebsd.org/D2136 Reviewed by: kib Sponsored by: The FreeBSD Foundation Added: head/libexec/rtld-elf/aarch64/ head/libexec/rtld-elf/aarch64/reloc.c (contents, props changed) head/libexec/rtld-elf/aarch64/rtld_machdep.h (contents, props changed) head/libexec/rtld-elf/aarch64/rtld_start.S (contents, props changed) Modified: head/libexec/rtld-elf/rtld.c Added: head/libexec/rtld-elf/aarch64/reloc.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/libexec/rtld-elf/aarch64/reloc.c Tue Mar 31 09:51:19 2015 (r280903) @@ -0,0 +1,317 @@ +/*- + * Copytight (c) 2014-2015 The FreeBSD Foundation + * All rights reserved. + * + * Portions of this software were developed by Andrew Turner + * under sponsorship from the FreeBSD Foundation. + * + * 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 "debug.h" +#include "rtld.h" +#include "rtld_printf.h" + +/* + * It is possible for the compiler to emit relocations for unaligned data. + * We handle this situation with these inlines. + */ +#define RELOC_ALIGNED_P(x) \ + (((uintptr_t)(x) & (sizeof(void *) - 1)) == 0) + +/* + * This is not the correct prototype, but we only need it for + * a function pointer to a simple asm function. + */ +void *_rtld_tlsdesc(void *); +void _exit(int); + +void +init_pltgot(Obj_Entry *obj) +{ + + if (obj->pltgot != NULL) { + obj->pltgot[1] = (Elf_Addr) obj; + obj->pltgot[2] = (Elf_Addr) &_rtld_bind_start; + } +} + +int +do_copy_relocations(Obj_Entry *dstobj) +{ + const Obj_Entry *srcobj, *defobj; + const Elf_Rela *relalim; + const Elf_Rela *rela; + const Elf_Sym *srcsym; + const Elf_Sym *dstsym; + const void *srcaddr; + const char *name; + void *dstaddr; + SymLook req; + size_t size; + int res; + + /* + * COPY relocs are invalid outside of the main program + */ + assert(dstobj->mainprog); + + relalim = (const Elf_Rela *)((char *)dstobj->rela + + dstobj->relasize); + for (rela = dstobj->rela; rela < relalim; rela++) { + if (ELF_R_TYPE(rela->r_info) != R_AARCH64_COPY) + continue; + + dstaddr = (void *)(dstobj->relocbase + rela->r_offset); + dstsym = dstobj->symtab + ELF_R_SYM(rela->r_info); + name = dstobj->strtab + dstsym->st_name; + size = dstsym->st_size; + + symlook_init(&req, name); + req.ventry = fetch_ventry(dstobj, ELF_R_SYM(rela->r_info)); + req.flags = SYMLOOK_EARLY; + + for (srcobj = dstobj->next; srcobj != NULL; + srcobj = srcobj->next) { + res = symlook_obj(&req, srcobj); + if (res == 0) { + srcsym = req.sym_out; + defobj = req.defobj_out; + break; + } + } + if (srcobj == NULL) { + _rtld_error( +"Undefined symbol \"%s\" referenced from COPY relocation in %s", + name, dstobj->path); + return (-1); + } + + srcaddr = (const void *)(defobj->relocbase + srcsym->st_value); + memcpy(dstaddr, srcaddr, size); + } + + return (0); +} + +/* + * Process the PLT relocations. + */ +int +reloc_plt(Obj_Entry *obj) +{ + const Elf_Rela *relalim; + const Elf_Rela *rela; + + relalim = (const Elf_Rela *)((char *)obj->pltrela + obj->pltrelasize); + for (rela = obj->pltrela; rela < relalim; rela++) { + Elf_Addr *where; + + where = (Elf_Addr *)(obj->relocbase + rela->r_offset); + + switch(ELF_R_TYPE(rela->r_info)) { + case R_AARCH64_JUMP_SLOT: + *where += (Elf_Addr)obj->relocbase; + break; + case R_AARCH64_TLSDESC: + if (ELF_R_SYM(rela->r_info) == 0) { + where[0] = (Elf_Addr)_rtld_tlsdesc; + where[1] = rela->r_addend; + } else { + _rtld_error("Unable to handle " + "R_AARCH64_TLSDESC with a symbol set"); + return (-1); + } + break; + default: + _rtld_error("Unknown relocation type %u in PLT", + (unsigned int)ELF_R_TYPE(rela->r_info)); + return (-1); + } + } + + return (0); +} + +/* + * LD_BIND_NOW was set - force relocation for all jump slots + */ +int +reloc_jmpslots(Obj_Entry *obj, int flags, RtldLockState *lockstate) +{ + const Obj_Entry *defobj; + const Elf_Rela *relalim; + const Elf_Rela *rela; + const Elf_Sym *def; + + relalim = (const Elf_Rela *)((char *)obj->pltrela + obj->pltrelasize); + for (rela = obj->pltrela; rela < relalim; rela++) { + Elf_Addr *where; + + switch(ELF_R_TYPE(rela->r_info)) { + case R_AARCH64_JUMP_SLOT: + where = (Elf_Addr *)(obj->relocbase + rela->r_offset); + def = find_symdef(ELF_R_SYM(rela->r_info), obj, + &defobj, SYMLOOK_IN_PLT | flags, NULL, lockstate); + if (def == NULL) { + dbg("reloc_jmpslots: sym not found"); + return (-1); + } + + *where = (Elf_Addr)(defobj->relocbase + def->st_value); + break; + case R_AARCH64_TLSDESC: + break; + default: + _rtld_error("Unknown relocation type %x in jmpslot", + (unsigned int)ELF_R_TYPE(rela->r_info)); + return (-1); + } + } + + return (0); +} + +int +reloc_iresolve(Obj_Entry *obj, struct Struct_RtldLockState *lockstate) +{ + + /* XXX not implemented */ + return (0); +} + +int +reloc_gnu_ifunc(Obj_Entry *obj, int flags, + struct Struct_RtldLockState *lockstate) +{ + + /* XXX not implemented */ + return (0); +} + +Elf_Addr +reloc_jmpslot(Elf_Addr *where, Elf_Addr target, const Obj_Entry *defobj, + const Obj_Entry *obj, const Elf_Rel *rel) +{ + + assert(ELF_R_TYPE(rel->r_info) == R_AARCH64_JUMP_SLOT); + + if (*where != target) + *where = target; + + return target; +} + +/* + * Process non-PLT relocations + */ +int +reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld, int flags, + RtldLockState *lockstate) +{ + const Obj_Entry *defobj; + const Elf_Rela *relalim; + const Elf_Rela *rela; + const Elf_Sym *def; + SymCache *cache; + Elf_Addr *where; + unsigned long symnum; + + if ((flags & SYMLOOK_IFUNC) != 0) + /* XXX not implemented */ + return (0); + + /* + * The dynamic loader may be called from a thread, we have + * limited amounts of stack available so we cannot use alloca(). + */ + if (obj == obj_rtld) + cache = NULL; + else + cache = calloc(obj->dynsymcount, sizeof(SymCache)); + /* No need to check for NULL here */ + + relalim = (const Elf_Rela *)((caddr_t)obj->rela + obj->relasize); + for (rela = obj->rela; rela < relalim; rela++) { + where = (Elf_Addr *)(obj->relocbase + rela->r_offset); + symnum = ELF_R_SYM(rela->r_info); + + switch (ELF_R_TYPE(rela->r_info)) { + case R_AARCH64_ABS64: + case R_AARCH64_GLOB_DAT: + def = find_symdef(symnum, obj, &defobj, flags, cache, + lockstate); + if (def == NULL) + return (-1); + + *where = (Elf_Addr)defobj->relocbase + def->st_value; + break; + case R_AARCH64_COPY: + /* + * These are deferred until all other relocations have + * been done. All we do here is make sure that the + * COPY relocation is not in a shared library. They + * are allowed only in executable files. + */ + if (!obj->mainprog) { + _rtld_error("%s: Unexpected R_AARCH64_COPY " + "relocation in shared library", obj->path); + return (-1); + } + break; + case R_AARCH64_RELATIVE: + *where = (Elf_Addr)(obj->relocbase + rela->r_addend); + break; + default: + rtld_printf("%s: Unhandled relocation %lu\n", + obj->path, ELF_R_TYPE(rela->r_info)); + return (-1); + } + } + + return (0); +} + +void +allocate_initial_tls(Obj_Entry *objs) +{ + Elf_Addr **tp; + + /* + * Fix the size of the static TLS block by using the maximum + * offset allocated so far and adding a bit for dynamic modules to + * use. + */ + tls_static_space = tls_last_offset + tls_last_size + + RTLD_STATIC_TLS_EXTRA; + + tp = (Elf_Addr **) allocate_tls(objs, NULL, TLS_TCB_SIZE, 16); + + asm volatile("msr tpidr_el0, %0" : : "r"(tp)); +} Added: head/libexec/rtld-elf/aarch64/rtld_machdep.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/libexec/rtld-elf/aarch64/rtld_machdep.h Tue Mar 31 09:51:19 2015 (r280903) @@ -0,0 +1,83 @@ +/*- + * Copyright (c) 1999, 2000 John D. Polstra. + * Copyright (c) 2014 the FreeBSD Foundation + * All rights reserved. + * + * Portions of this software were developed by Andrew Turner + * under sponsorship from the FreeBSD Foundation. + * + * 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 RTLD_MACHDEP_H +#define RTLD_MACHDEP_H 1 + +#include +#include + +struct Struct_Obj_Entry; + +/* Return the address of the .dynamic section in the dynamic linker. */ +#define rtld_dynamic(obj) \ +({ \ + Elf_Addr _dynamic_addr; \ + asm volatile("adr %0, _DYNAMIC" : "=&r"(_dynamic_addr)); \ + (const Elf_Dyn *)_dynamic_addr; \ +}) +#define RTLD_IS_DYNAMIC() (1) + +Elf_Addr reloc_jmpslot(Elf_Addr *where, Elf_Addr target, + const struct Struct_Obj_Entry *defobj, + const struct Struct_Obj_Entry *obj, + const Elf_Rel *rel); + +#define make_function_pointer(def, defobj) \ + ((defobj)->relocbase + (def)->st_value) + +#define call_initfini_pointer(obj, target) \ + (((InitFunc)(target))()) + +#define call_init_pointer(obj, target) \ + (((InitArrFunc)(target))(main_argc, main_argv, environ)) + +#define round(size, align) \ + (((size) + (align) - 1) & ~((align) - 1)) +#define calculate_first_tls_offset(size, align) \ + round(size, align) +#define calculate_tls_offset(prev_offset, prev_size, size, align) \ + round((prev_offset) + (size), align) +#define calculate_tls_end(off, size) ((off) + (size)) + +#define TLS_TCB_SIZE 8 +typedef struct { + unsigned long ti_module; + unsigned long ti_offset; +} tls_index; + +extern void *__tls_get_addr(tls_index *ti); + +#define RTLD_DEFAULT_STACK_PF_EXEC PF_X +#define RTLD_DEFAULT_STACK_EXEC PROT_EXEC + +#endif Added: head/libexec/rtld-elf/aarch64/rtld_start.S ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/libexec/rtld-elf/aarch64/rtld_start.S Tue Mar 31 09:51:19 2015 (r280903) @@ -0,0 +1,113 @@ +/*- + * Copyright (c) 2014 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Andrew Turner under + * sponsorship from the FreeBSD Foundation. + * + * 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$"); + +ENTRY(.rtld_start) + mov x19, x0 /* Put ps_strings in a callee-saved register */ + mov x20, sp /* And the stack pointer */ + + sub x8, x20, #16 /* Make room for obj_main & exit proc */ + mov sp, x8 /* Update the stack pointer */ + + mov x0, x20 /* Pass the stack we were given to _rtld */ + mov x1, sp /* exit_proc */ + add x2, x1, #8 /* obj_main */ + bl _rtld /* Call the loader */ + mov x8, x0 /* Backup the entry point */ + + ldr x2, [sp] /* Load cleanup */ + ldr x1, [sp, #8] /* Load obj_main */ + mov x0, x19 /* Restore ps_strings */ + mov sp, x20 /* Restore the stack pointer */ + br x8 /* Jump to the entry point */ +END(.rtld_start) + +/* + * sp + 0 = &GOT[x + 3] + * sp + 8 = RA + * x16 = &GOT[2] + * x17 = &_rtld_bind_start + */ +ENTRY(_rtld_bind_start) + mov x17, sp + + /* Save the arguments */ + stp x0, x1, [sp, #-16]! + stp x2, x3, [sp, #-16]! + stp x4, x5, [sp, #-16]! + stp x6, x7, [sp, #-16]! + + /* Calculate reloff */ + ldr x2, [x17, #0] /* Get the address of the entry */ + sub x1, x2, x16 /* Find its offset */ + sub x1, x1, #8 /* Adjust for x16 not being at offset 0 */ + /* Each rela item has 3 entriesso we need reloff = 3 * index */ + lsl x3, x1, #1 /* x3 = 2 * offset */ + add x1, x1, x3 /* x1 = x3 + offset = 3 * offset */ + + /* Load obj */ + ldr x0, [x16, #-8] + + /* Call into rtld */ + bl _rtld_bind + + /* Restore the registers saved by the plt code */ + ldp xzr, x30, [sp, #(4 * 16)] + + /* Backup the address to branch to */ + mov x16, x0 + + /* restore the arguments */ + ldp x6, x7, [sp], #16 + ldp x4, x5, [sp], #16 + ldp x2, x3, [sp], #16 + ldp x0, x1, [sp], #16 + /* And the part of the stack the plt entry handled */ + add sp, sp, #16 + + /* Call into the correct function */ + br x16 +END(_rtld_bind_start) + +/* + * uint64_t _rtld_tlsdesc(struct tlsdesc *); + * + * struct tlsdesc { + * uint64_t ptr; + * uint64_t data; + * }; + * + * Returns the data. + */ +ENTRY(_rtld_tlsdesc) + ldr x0, [x0, #8] + RET +END(_rtld_tlsdesc) Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Tue Mar 31 08:44:46 2015 (r280902) +++ head/libexec/rtld-elf/rtld.c Tue Mar 31 09:51:19 2015 (r280903) @@ -4368,7 +4368,8 @@ tls_get_addr_common(Elf_Addr **dtvp, int return (tls_get_addr_slow(dtvp, index, offset)); } -#if defined(__arm__) || defined(__mips__) || defined(__powerpc__) +#if defined(__aarch64__) || defined(__arm__) || defined(__mips__) || \ + defined(__powerpc__) /* * Allocate Static TLS using the Variant I method. From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 10:17:15 2015 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 58A82E22; Tue, 31 Mar 2015 10:17: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 4354FAD0; Tue, 31 Mar 2015 10:17: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 t2VAHE9E001920; Tue, 31 Mar 2015 10:17:14 GMT (envelope-from jch@FreeBSD.org) Received: (from jch@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2VAHEa2001919; Tue, 31 Mar 2015 10:17:14 GMT (envelope-from jch@FreeBSD.org) Message-Id: <201503311017.t2VAHEa2001919@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jch set sender to jch@FreeBSD.org using -f From: Julien Charbon Date: Tue, 31 Mar 2015 10:17:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280904 - 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, 31 Mar 2015 10:17:15 -0000 Author: jch Date: Tue Mar 31 10:17:13 2015 New Revision: 280904 URL: https://svnweb.freebsd.org/changeset/base/280904 Log: Use appropriate timeout_t* instead of void* in tcp_timer_activate() Suggested by: imp Differential Revision: https://reviews.freebsd.org/D2154 Reviewed by: imp, jhb Approved by: jhb Modified: head/sys/netinet/tcp_timer.c Modified: head/sys/netinet/tcp_timer.c ============================================================================== --- head/sys/netinet/tcp_timer.c Tue Mar 31 09:51:19 2015 (r280903) +++ head/sys/netinet/tcp_timer.c Tue Mar 31 10:17:13 2015 (r280904) @@ -853,7 +853,7 @@ void tcp_timer_activate(struct tcpcb *tp, int timer_type, u_int delta) { struct callout *t_callout; - void *f_callout; + timeout_t *f_callout; struct inpcb *inp = tp->t_inpcb; int cpu = inp_to_cpuid(inp); From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 10:46:27 2015 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 9D1CA316; Tue, 31 Mar 2015 10:46:27 +0000 (UTC) Received: from work.netasq.com (gwlille.netasq.com [91.212.116.1]) by mx1.freebsd.org (Postfix) with ESMTP id 542B8DF9; Tue, 31 Mar 2015 10:46:26 +0000 (UTC) Received: from work.netasq.com (localhost.localdomain [127.0.0.1]) by work.netasq.com (Postfix) with ESMTP id AA954270474B; Tue, 31 Mar 2015 12:46:22 +0200 (CEST) Received: from localhost (localhost.localdomain [127.0.0.1]) by work.netasq.com (Postfix) with ESMTP id 89AAD2704749; Tue, 31 Mar 2015 12:46:22 +0200 (CEST) Received: from work.netasq.com ([127.0.0.1]) by localhost (work.netasq.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id KOhET76beb1z; Tue, 31 Mar 2015 12:46:22 +0200 (CEST) Received: from work.netasq.com (localhost.localdomain [127.0.0.1]) by work.netasq.com (Postfix) with ESMTP id 3E8682700468; Tue, 31 Mar 2015 12:46:22 +0200 (CEST) Date: Tue, 31 Mar 2015 12:46:21 +0200 (CEST) From: Emeric POUPON To: Gleb Smirnoff Message-ID: <571890548.26848580.1427798781891.JavaMail.zimbra@stormshield.eu> In-Reply-To: <20150330223836.GY64665@FreeBSD.org> References: <20150329210757.GA64665@FreeBSD.org> <551948A4.1070408@selasky.org> <5519535C.40608@selasky.org> <20150330141616.GC74532@zxy.spb.ru> <1872802434.26738716.1427729028579.JavaMail.zimbra@stormshield.eu> <20150330152707.GP64665@FreeBSD.org> <964618150.26750606.1427732445799.JavaMail.zimbra@stormshield.eu> <20150330223836.GY64665@FreeBSD.org> Subject: Re: svn commit: r280759 - head/sys/netinet MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Thread-Topic: svn commit: r280759 - head/sys/netinet Thread-Index: wMwmtlpWTxjswvglfhgjgUq0AgYb4w== Cc: Hans Petter Selasky , Adrian Chadd , src-committers@freebsd.org, Ian Lepore , svn-src-all@freebsd.org, Slawa Olhovchenkov , svn-src-head@freebsd.org, Fabien Thomas X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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, 31 Mar 2015 10:46:27 -0000 I tested it on a 4 core system: - I still can't see any duplicated id in my tests, so this is good. - as already discussed before, I don't see any performance impact So for me it is good! Emeric ----- Mail original ----- De: "Gleb Smirnoff" =C3=80: "Emeric POUPON" Cc: "Slawa Olhovchenkov" , "Hans Petter Selasky" , "Adrian Chadd" , src-committers@freebsd.org, "= Ian Lepore" , svn-src-all@freebsd.org, svn-src-head@freebs= d.org, "Fabien Thomas" Envoy=C3=A9: Mardi 31 Mars 2015 00:38:36 Objet: Re: svn commit: r280759 - head/sys/netinet On Mon, Mar 30, 2015 at 06:20:45PM +0200, Emeric POUPON wrote: E> Yes, sure! E>=20 E> I will test it tomorrow and tell you the results. E> However, keep in mind I did not see any performance impact with the prev= ious patch. I created a patch that enables RFC6864 and per-CPU ip_id for those packets, that do not qualify for being atomic. It is here: https://reviews.freebsd.org/D2177 --=20 Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 11:50:49 2015 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 188E0193; Tue, 31 Mar 2015 11:50: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 0096967E; Tue, 31 Mar 2015 11:50: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 t2VBomoR045478; Tue, 31 Mar 2015 11:50:48 GMT (envelope-from ganbold@FreeBSD.org) Received: (from ganbold@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2VBolGm044903; Tue, 31 Mar 2015 11:50:47 GMT (envelope-from ganbold@FreeBSD.org) Message-Id: <201503311150.t2VBolGm044903@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ganbold set sender to ganbold@FreeBSD.org using -f From: Ganbold Tsagaankhuu Date: Tue, 31 Mar 2015 11:50:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280905 - in head/sys: arm/amlogic arm/amlogic/aml8726 arm/arm conf dev/mmc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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, 31 Mar 2015 11:50:49 -0000 Author: ganbold Date: Tue Mar 31 11:50:46 2015 New Revision: 280905 URL: https://svnweb.freebsd.org/changeset/base/280905 Log: Add necessary changes to support various Amlogic SoC devices specially aml8726-m6 and aml8726-m8b SoC based devices. aml8726-m6 SoC exist in devices such as Visson ATV-102. Hardkernel ODROID-C1 board has aml8726-m8b SoC. The following support is included: Basic machdep code SMP Interrupt controller Clock control driver (aka gate) Pinctrl Timer Real time clock UART GPIO I2C SD controller SDXC controller USB Watchdog Random number generator PLL / Clock frequency measurement Frame buffer Submitted by: John Wehle Approved by: stas (mentor) Added: head/sys/arm/amlogic/ head/sys/arm/amlogic/aml8726/ head/sys/arm/amlogic/aml8726/aml8726_ccm.c (contents, props changed) head/sys/arm/amlogic/aml8726/aml8726_ccm.h (contents, props changed) head/sys/arm/amlogic/aml8726/aml8726_clkmsr.c (contents, props changed) head/sys/arm/amlogic/aml8726/aml8726_clkmsr.h (contents, props changed) head/sys/arm/amlogic/aml8726/aml8726_fb.c (contents, props changed) head/sys/arm/amlogic/aml8726/aml8726_fb.h (contents, props changed) head/sys/arm/amlogic/aml8726/aml8726_gpio.c (contents, props changed) head/sys/arm/amlogic/aml8726/aml8726_i2c.c (contents, props changed) head/sys/arm/amlogic/aml8726/aml8726_identsoc.c (contents, props changed) head/sys/arm/amlogic/aml8726/aml8726_l2cache.c (contents, props changed) head/sys/arm/amlogic/aml8726/aml8726_machdep.c (contents, props changed) head/sys/arm/amlogic/aml8726/aml8726_machdep.h (contents, props changed) head/sys/arm/amlogic/aml8726/aml8726_mmc.c (contents, props changed) head/sys/arm/amlogic/aml8726/aml8726_mmc.h (contents, props changed) head/sys/arm/amlogic/aml8726/aml8726_mp.c (contents, props changed) head/sys/arm/amlogic/aml8726/aml8726_pic.c (contents, props changed) head/sys/arm/amlogic/aml8726/aml8726_pinctrl.c (contents, props changed) head/sys/arm/amlogic/aml8726/aml8726_pinctrl.h (contents, props changed) head/sys/arm/amlogic/aml8726/aml8726_rng.c (contents, props changed) head/sys/arm/amlogic/aml8726/aml8726_rtc.c (contents, props changed) head/sys/arm/amlogic/aml8726/aml8726_sdxc-m8.c (contents, props changed) head/sys/arm/amlogic/aml8726/aml8726_sdxc-m8.h (contents, props changed) head/sys/arm/amlogic/aml8726/aml8726_soc.h (contents, props changed) head/sys/arm/amlogic/aml8726/aml8726_timer.c (contents, props changed) head/sys/arm/amlogic/aml8726/aml8726_uart.h (contents, props changed) head/sys/arm/amlogic/aml8726/aml8726_uart_console.c (contents, props changed) head/sys/arm/amlogic/aml8726/aml8726_usb_phy-m6.c (contents, props changed) head/sys/arm/amlogic/aml8726/aml8726_wdt.c (contents, props changed) head/sys/arm/amlogic/aml8726/files.aml8726 (contents, props changed) head/sys/arm/amlogic/aml8726/files.smp (contents, props changed) head/sys/arm/amlogic/aml8726/std.aml8726 (contents, props changed) head/sys/arm/amlogic/aml8726/std.odroidc1 (contents, props changed) head/sys/arm/amlogic/aml8726/std.vsatv102-m6 (contents, props changed) head/sys/arm/amlogic/aml8726/uart_dev_aml8726.c (contents, props changed) Modified: head/sys/arm/arm/gic.c head/sys/conf/options.arm head/sys/dev/mmc/mmc.c Added: head/sys/arm/amlogic/aml8726/aml8726_ccm.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/amlogic/aml8726/aml8726_ccm.c Tue Mar 31 11:50:46 2015 (r280905) @@ -0,0 +1,231 @@ +/*- + * Copyright 2015 John Wehle + * 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. + */ + +/* + * Amlogic aml8726 clock control module driver. + * + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include + +#include +#include + + +struct aml8726_ccm_softc { + device_t dev; + struct aml8726_ccm_function *soc; + struct resource *res[1]; + struct mtx mtx; +}; + +static struct resource_spec aml8726_ccm_spec[] = { + { SYS_RES_MEMORY, 0, RF_ACTIVE }, + { -1, 0 } +}; + +#define AML_CCM_LOCK(sc) mtx_lock(&(sc)->mtx) +#define AML_CCM_UNLOCK(sc) mtx_unlock(&(sc)->mtx) +#define AML_CCM_LOCK_INIT(sc) \ + mtx_init(&(sc)->mtx, device_get_nameunit((sc)->dev), \ + "ccm", MTX_DEF) +#define AML_CCM_LOCK_DESTROY(sc) mtx_destroy(&(sc)->mtx); + +#define CSR_WRITE_4(sc, reg, val) bus_write_4((sc)->res[0], reg, (val)) +#define CSR_READ_4(sc, reg) bus_read_4((sc)->res[0], reg) + +static int +aml8726_ccm_configure_gates(struct aml8726_ccm_softc *sc) +{ + struct aml8726_ccm_function *f; + struct aml8726_ccm_gate *g; + char *function_name; + char *functions; + phandle_t node; + ssize_t len; + uint32_t value; + + node = ofw_bus_get_node(sc->dev); + + len = OF_getprop_alloc(node, "functions", sizeof(char), + (void **)&functions); + + if (len < 0) { + device_printf(sc->dev, "missing functions attribute in FDT\n"); + return (ENXIO); + } + + function_name = functions; + + while (len) { + for (f = sc->soc; f->name != NULL; f++) + if (strncmp(f->name, function_name, len) == 0) + break; + + if (f->name == NULL) { + /* display message prior to queuing up next string */ + device_printf(sc->dev, + "unknown function attribute %.*s in FDT\n", + len, function_name); + } + + /* queue up next string */ + while (*function_name && len) { + function_name++; + len--; + } + if (len) { + function_name++; + len--; + } + + if (f->name == NULL) + continue; + + AML_CCM_LOCK(sc); + + /* + * Enable the clock gates necessary for the function. + * + * In some cases a clock may be shared across functions + * (meaning don't disable a clock without ensuring that + * it's not required by someone else). + */ + for (g = f->gates; g->bits != 0x00000000; g++) { + value = CSR_READ_4(sc, g->addr); + value |= g->bits; + CSR_WRITE_4(sc, g->addr, value); + } + + AML_CCM_UNLOCK(sc); + } + + free(functions, M_OFWPROP); + + return (0); +} + +static int +aml8726_ccm_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (!ofw_bus_is_compatible(dev, "amlogic,aml8726-ccm")) + return (ENXIO); + + device_set_desc(dev, "Amlogic aml8726 ccm"); + + return (BUS_PROBE_DEFAULT); +} + +static int +aml8726_ccm_attach(device_t dev) +{ + struct aml8726_ccm_softc *sc = device_get_softc(dev); + + sc->dev = dev; + + switch (aml8726_soc_hw_rev) { + case AML_SOC_HW_REV_M3: + sc->soc = aml8726_m3_ccm; + break; + case AML_SOC_HW_REV_M6: + sc->soc = aml8726_m6_ccm; + break; + case AML_SOC_HW_REV_M8: + sc->soc = aml8726_m8_ccm; + break; + case AML_SOC_HW_REV_M8B: + sc->soc = aml8726_m8b_ccm; + break; + default: + device_printf(dev, "unsupported SoC\n"); + return (ENXIO); + /* NOTREACHED */ + break; + } + + if (bus_alloc_resources(dev, aml8726_ccm_spec, sc->res)) { + device_printf(dev, "can not allocate resources for device\n"); + return (ENXIO); + } + + AML_CCM_LOCK_INIT(sc); + + return (aml8726_ccm_configure_gates(sc)); +} + +static int +aml8726_ccm_detach(device_t dev) +{ + struct aml8726_ccm_softc *sc = device_get_softc(dev); + + AML_CCM_LOCK_DESTROY(sc); + + bus_release_resources(dev, aml8726_ccm_spec, sc->res); + + return (0); +} + +static device_method_t aml8726_ccm_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, aml8726_ccm_probe), + DEVMETHOD(device_attach, aml8726_ccm_attach), + DEVMETHOD(device_detach, aml8726_ccm_detach), + + DEVMETHOD_END +}; + +static driver_t aml8726_ccm_driver = { + "ccm", + aml8726_ccm_methods, + sizeof(struct aml8726_ccm_softc), +}; + +static devclass_t aml8726_ccm_devclass; + +EARLY_DRIVER_MODULE(ccm, simplebus, aml8726_ccm_driver, + aml8726_ccm_devclass, 0, 0, BUS_PASS_CPU + BUS_PASS_ORDER_LATE); Added: head/sys/arm/amlogic/aml8726/aml8726_ccm.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/amlogic/aml8726/aml8726_ccm.h Tue Mar 31 11:50:46 2015 (r280905) @@ -0,0 +1,325 @@ +/*- + * Copyright 2015 John Wehle + * 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 _ARM_AMLOGIC_AML8726_CCM_H +#define _ARM_AMLOGIC_AML8726_CCM_H + + +struct aml8726_ccm_gate { + uint32_t addr; + uint32_t bits; +}; + +struct aml8726_ccm_function { + const char *name; + struct aml8726_ccm_gate *gates; +}; + + +/* + * aml8726-m3 + */ + +static struct aml8726_ccm_gate aml8726_m3_ethernet[] = { + { 4, 0x00000008 }, + { 0, 0x00000000 } +}; + +static struct aml8726_ccm_gate aml8726_m3_i2c[] = { + { 0, 0x00000200 }, + { 0, 0x00000000 } +}; + +static struct aml8726_ccm_gate aml8726_m3_rng[] = { + { 0, 0x00001000 }, + { 0, 0x00000000 } +}; + +static struct aml8726_ccm_gate aml8726_m3_sdio[] = { + { 0, 0x00020000 }, + { 0, 0x00000000 } +}; + +static struct aml8726_ccm_gate aml8726_m3_sdxc[] = { + { 0, 0x00004000 }, + { 0, 0x00000000 } +}; + +static struct aml8726_ccm_gate aml8726_m3_uart_a[] = { + { 0, 0x00002000 }, + { 0, 0x00000000 } +}; + +static struct aml8726_ccm_gate aml8726_m3_uart_b[] = { + { 4, 0x00010000 }, + { 0, 0x00000000 } +}; + +static struct aml8726_ccm_gate aml8726_m3_uart_c[] = { + { 8, 0x00008000 }, + { 0, 0x00000000 } +}; + +static struct aml8726_ccm_gate aml8726_m3_usb_a[] = { + { 4, 0x00200000 }, + { 0, 0x00000000 } +}; + +static struct aml8726_ccm_gate aml8726_m3_usb_b[] = { + { 4, 0x00400000 }, + { 0, 0x00000000 } +}; + +struct aml8726_ccm_function aml8726_m3_ccm[] = { + { "ethernet", aml8726_m3_ethernet }, + { "i2c", aml8726_m3_i2c }, + { "rng", aml8726_m3_rng }, + { "sdio", aml8726_m3_sdio }, + { "sdxc", aml8726_m3_sdxc }, + { "uart-a", aml8726_m3_uart_a }, + { "uart-b", aml8726_m3_uart_b }, + { "uart-c", aml8726_m3_uart_c }, + { "usb-a", aml8726_m3_usb_a }, + { "usb-b", aml8726_m3_usb_b }, + { NULL } +}; + + +/* + * aml8726-m6 + */ + +static struct aml8726_ccm_gate aml8726_m6_ethernet[] = { + { 4, 0x00000008 }, + { 0, 0x00000000 } +}; + +static struct aml8726_ccm_gate aml8726_m6_i2c[] = { + { 0, 0x00000200 }, + { 0, 0x00000000 } +}; + +static struct aml8726_ccm_gate aml8726_m6_rng[] = { + { 0, 0x00001000 }, + { 0, 0x00000000 } +}; + +static struct aml8726_ccm_gate aml8726_m6_sdio[] = { + { 0, 0x00020000 }, + { 0, 0x00000000 } +}; + +static struct aml8726_ccm_gate aml8726_m6_sdxc[] = { + { 0, 0x00004000 }, + { 0, 0x00000000 } +}; + +static struct aml8726_ccm_gate aml8726_m6_uart_a[] = { + { 0, 0x00002000 }, + { 0, 0x00000000 } +}; + +static struct aml8726_ccm_gate aml8726_m6_uart_b[] = { + { 4, 0x00010000 }, + { 0, 0x00000000 } +}; + +static struct aml8726_ccm_gate aml8726_m6_uart_c[] = { + { 8, 0x00008000 }, + { 0, 0x00000000 } +}; + +static struct aml8726_ccm_gate aml8726_m6_usb_a[] = { + { 4, 0x00200000 }, + { 0, 0x00000000 } +}; + +static struct aml8726_ccm_gate aml8726_m6_usb_b[] = { + { 4, 0x00400000 }, + { 0, 0x00000000 } +}; + +struct aml8726_ccm_function aml8726_m6_ccm[] = { + { "ethernet", aml8726_m6_ethernet }, + { "i2c", aml8726_m6_i2c }, + { "rng", aml8726_m6_rng }, + { "sdio", aml8726_m6_sdio }, + { "sdxc", aml8726_m6_sdxc }, + { "uart-a", aml8726_m6_uart_a }, + { "uart-b", aml8726_m6_uart_b }, + { "uart-c", aml8726_m6_uart_c }, + { "usb-a", aml8726_m6_usb_a }, + { "usb-b", aml8726_m6_usb_b }, + { NULL } +}; + + +/* + * aml8726-m8 + */ + +static struct aml8726_ccm_gate aml8726_m8_ethernet[] = { + { 4, 0x00000008 }, + { 0, 0x00000000 } +}; + +static struct aml8726_ccm_gate aml8726_m8_i2c[] = { + { 0, 0x00000200 }, + { 0, 0x00000000 } +}; + +static struct aml8726_ccm_gate aml8726_m8_rng[] = { + { 0, 0x00001000 }, + { 16, 0x00200000 }, + { 0, 0x00000000 } +}; + +static struct aml8726_ccm_gate aml8726_m8_sdio[] = { + { 0, 0x00020000 }, + { 0, 0x00000000 } +}; + +static struct aml8726_ccm_gate aml8726_m8_sdxc[] = { + { 0, 0x00004000 }, + { 0, 0x00000000 } +}; + +static struct aml8726_ccm_gate aml8726_m8_uart_a[] = { + { 0, 0x00002000 }, + { 0, 0x00000000 } +}; + +static struct aml8726_ccm_gate aml8726_m8_uart_b[] = { + { 4, 0x00010000 }, + { 0, 0x00000000 } +}; + +static struct aml8726_ccm_gate aml8726_m8_uart_c[] = { + { 8, 0x00008000 }, + { 0, 0x00000000 } +}; + +static struct aml8726_ccm_gate aml8726_m8_usb_a[] = { + { 4, 0x00200000 }, + { 4, 0x04000000 }, + { 0, 0x00000000 } +}; + +static struct aml8726_ccm_gate aml8726_m8_usb_b[] = { + { 4, 0x00400000 }, + { 4, 0x04000000 }, + { 0, 0x00000000 } +}; + +struct aml8726_ccm_function aml8726_m8_ccm[] = { + { "ethernet", aml8726_m8_ethernet }, + { "i2c", aml8726_m8_i2c }, + { "rng", aml8726_m8_rng }, + { "sdio", aml8726_m8_sdio }, + { "sdxc", aml8726_m8_sdxc }, + { "uart-a", aml8726_m8_uart_a }, + { "uart-b", aml8726_m8_uart_b }, + { "uart-c", aml8726_m8_uart_c }, + { "usb-a", aml8726_m8_usb_a }, + { "usb-b", aml8726_m8_usb_b }, + { NULL } +}; + + +/* + * aml8726-m8b + */ + +static struct aml8726_ccm_gate aml8726_m8b_ethernet[] = { + { 4, 0x00000008 }, + { 0, 0x00000000 } +}; + +static struct aml8726_ccm_gate aml8726_m8b_i2c[] = { + { 0, 0x00000200 }, + { 0, 0x00000000 } +}; + +static struct aml8726_ccm_gate aml8726_m8b_rng[] = { + { 0, 0x00001000 }, + { 16, 0x00200000 }, + { 0, 0x00000000 } +}; + +static struct aml8726_ccm_gate aml8726_m8b_sdio[] = { + { 0, 0x00020000 }, + { 0, 0x00000000 } +}; + +static struct aml8726_ccm_gate aml8726_m8b_sdxc[] = { + { 0, 0x00004000 }, + { 0, 0x00000000 } +}; + +static struct aml8726_ccm_gate aml8726_m8b_uart_a[] = { + { 0, 0x00002000 }, + { 0, 0x00000000 } +}; + +static struct aml8726_ccm_gate aml8726_m8b_uart_b[] = { + { 4, 0x00010000 }, + { 0, 0x00000000 } +}; + +static struct aml8726_ccm_gate aml8726_m8b_uart_c[] = { + { 8, 0x00008000 }, + { 0, 0x00000000 } +}; + +static struct aml8726_ccm_gate aml8726_m8b_usb_a[] = { + { 4, 0x00200000 }, + { 4, 0x04000000 }, + { 0, 0x00000000 } +}; + +static struct aml8726_ccm_gate aml8726_m8b_usb_b[] = { + { 4, 0x00400000 }, + { 4, 0x04000000 }, + { 0, 0x00000000 } +}; + +struct aml8726_ccm_function aml8726_m8b_ccm[] = { + { "ethernet", aml8726_m8b_ethernet }, + { "i2c", aml8726_m8b_i2c }, + { "rng", aml8726_m8b_rng }, + { "sdio", aml8726_m8b_sdio }, + { "sdxc", aml8726_m8b_sdxc }, + { "uart-a", aml8726_m8b_uart_a }, + { "uart-b", aml8726_m8b_uart_b }, + { "uart-c", aml8726_m8b_uart_c }, + { "usb-a", aml8726_m8b_usb_a }, + { "usb-b", aml8726_m8b_usb_b }, + { NULL } +}; + +#endif /* _ARM_AMLOGIC_AML8726_CCM_H */ Added: head/sys/arm/amlogic/aml8726/aml8726_clkmsr.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/amlogic/aml8726/aml8726_clkmsr.c Tue Mar 31 11:50:46 2015 (r280905) @@ -0,0 +1,271 @@ +/*- + * Copyright 2014-2015 John Wehle + * 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. + * + */ + +/* + * Amlogic aml8726 clock measurement driver. + * + * This allows various clock rates to be determine at runtime. + * The measurements are done once and are not expected to change + * (i.e. FDT fixup provides clk81 as bus-frequency to the MMC + * and UART drivers which use the value when programming the + * hardware). + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include + +#include + + +static struct aml8726_clkmsr_clk { + const char * name; + uint32_t mux; +} aml8726_clkmsr_clks[] = { + { "clk81", 7 }, +}; + +#define AML_CLKMSR_CLK81 0 + +#define AML_CLKMSR_NCLKS (sizeof(aml8726_clkmsr_clks) \ + / sizeof(aml8726_clkmsr_clks[0])) + +struct aml8726_clkmsr_softc { + device_t dev; + struct resource * res[1]; +}; + +static struct resource_spec aml8726_clkmsr_spec[] = { + { SYS_RES_MEMORY, 0, RF_ACTIVE }, + { -1, 0 } +}; + +/* + * Duration can range from 1uS to 65535 uS and should be chosen + * based on the expected frequency result so to maximize resolution + * and avoid overflowing the 16 bit result counter. + */ +#define AML_CLKMSR_DURATION 32 + +#define AML_CLKMSR_DUTY_REG 0 +#define AML_CLKMSR_0_REG 4 +#define AML_CLKMSR_0_BUSY (1U << 31) +#define AML_CLKMSR_0_MUX_MASK (0x3f << 20) +#define AML_CLKMSR_0_MUX_SHIFT 20 +#define AML_CLKMSR_0_MUX_EN (1 << 19) +#define AML_CLKMSR_0_MEASURE (1 << 16) +#define AML_CLKMSR_0_DURATION_MASK 0xffff +#define AML_CLKMSR_0_DURATION_SHIFT 0 +#define AML_CLKMSR_1_REG 8 +#define AML_CLKMSR_2_REG 12 +#define AML_CLKMSR_2_RESULT_MASK 0xffff +#define AML_CLKMSR_2_RESULT_SHIFT 0 + +#define CSR_WRITE_4(sc, reg, val) bus_write_4((sc)->res[0], reg, (val)) +#define CSR_READ_4(sc, reg) bus_read_4((sc)->res[0], reg) +#define CSR_BARRIER(sc, reg) bus_barrier((sc)->res[0], reg, 4, \ + (BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE)) + +static int +aml8726_clkmsr_clock_frequency(struct aml8726_clkmsr_softc *sc, unsigned clock) +{ + uint32_t value; + + if (clock >= AML_CLKMSR_NCLKS) + return (0); + + /* + * Locking is not used as this is only expected to be called from + * FDT fixup (which occurs prior to driver initialization) or attach. + */ + + CSR_WRITE_4(sc, AML_CLKMSR_0_REG, 0); + + CSR_BARRIER(sc, AML_CLKMSR_0_REG); + + value = (aml8726_clkmsr_clks[clock].mux << AML_CLKMSR_0_MUX_SHIFT) + | ((AML_CLKMSR_DURATION - 1) << AML_CLKMSR_0_DURATION_SHIFT) + | AML_CLKMSR_0_MUX_EN + | AML_CLKMSR_0_MEASURE; + CSR_WRITE_4(sc, AML_CLKMSR_0_REG, value); + + CSR_BARRIER(sc, AML_CLKMSR_0_REG); + + while ((CSR_READ_4(sc, AML_CLKMSR_0_REG) & AML_CLKMSR_0_BUSY) != 0) + cpu_spinwait(); + + value &= ~AML_CLKMSR_0_MEASURE; + CSR_WRITE_4(sc, AML_CLKMSR_0_REG, value); + + CSR_BARRIER(sc, AML_CLKMSR_0_REG); + + value = (((CSR_READ_4(sc, AML_CLKMSR_2_REG) & AML_CLKMSR_2_RESULT_MASK) + >> AML_CLKMSR_2_RESULT_SHIFT) + AML_CLKMSR_DURATION / 2) / + AML_CLKMSR_DURATION; + + return value; +} + +static int +aml8726_clkmsr_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (!ofw_bus_is_compatible(dev, "amlogic,aml8726-clkmsr")) + return (ENXIO); + + device_set_desc(dev, "Amlogic aml8726 clkmsr"); + + return (BUS_PROBE_DEFAULT); +} + +static int +aml8726_clkmsr_attach(device_t dev) +{ + struct aml8726_clkmsr_softc *sc = device_get_softc(dev); + int freq; + + sc->dev = dev; + + if (bus_alloc_resources(dev, aml8726_clkmsr_spec, sc->res)) { + device_printf(dev, "can not allocate resources for device\n"); + return (ENXIO); + } + + freq = aml8726_clkmsr_clock_frequency(sc, AML_CLKMSR_CLK81); + device_printf(sc->dev, "bus clock %u MHz\n", freq); + + return (0); +} + +static int +aml8726_clkmsr_detach(device_t dev) +{ + struct aml8726_clkmsr_softc *sc = device_get_softc(dev); + + bus_release_resources(dev, aml8726_clkmsr_spec, sc->res); + + return (0); +} + + +static device_method_t aml8726_clkmsr_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, aml8726_clkmsr_probe), + DEVMETHOD(device_attach, aml8726_clkmsr_attach), + DEVMETHOD(device_detach, aml8726_clkmsr_detach), + + DEVMETHOD_END +}; + +static driver_t aml8726_clkmsr_driver = { + "clkmsr", + aml8726_clkmsr_methods, + sizeof(struct aml8726_clkmsr_softc), +}; + +static devclass_t aml8726_clkmsr_devclass; + +DRIVER_MODULE(clkmsr, simplebus, aml8726_clkmsr_driver, + aml8726_clkmsr_devclass, 0, 0); + +int +aml8726_clkmsr_bus_frequency() +{ + struct resource mem; + struct aml8726_clkmsr_softc sc; + phandle_t node; + u_long pbase, psize; + u_long start, size; + int freq; + + /* + * Try to access the clkmsr node directly i.e. through /aliases/. + */ + + if ((node = OF_finddevice("clkmsr")) != 0) + if (fdt_is_compatible_strict(node, "amlogic,aml8726-clkmsr")) + goto moveon; + + /* + * Find the node the long way. + */ + if ((node = OF_finddevice("/soc")) == 0) + return (0); + + if ((node = fdt_find_compatible(node, + "amlogic,aml8726-clkmsr", 1)) == 0) + return (0); + +moveon: + if (fdt_get_range(OF_parent(node), 0, &pbase, &psize) != 0 + || fdt_regsize(node, &start, &size) != 0) + return (0); + + start += pbase; + + memset(&mem, 0, sizeof(mem)); + + mem.r_bustag = fdtbus_bs_tag; + + if (bus_space_map(mem.r_bustag, start, size, 0, &mem.r_bushandle) != 0) + return (0); + + /* + * Build an incomplete (however sufficient for the purpose + * of calling aml8726_clkmsr_clock_frequency) softc. + */ + + memset(&sc, 0, sizeof(sc)); + + sc.res[0] = &mem; + + freq = aml8726_clkmsr_clock_frequency(&sc, AML_CLKMSR_CLK81) * 1000000; + + bus_space_unmap(mem.r_bustag, mem.r_bushandle, size); + + return (freq); +} Added: head/sys/arm/amlogic/aml8726/aml8726_clkmsr.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/amlogic/aml8726/aml8726_clkmsr.h Tue Mar 31 11:50:46 2015 (r280905) @@ -0,0 +1,34 @@ +/*- + * Copyright 2014 John Wehle + * 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 _ARM_AMLOGIC_AML8726_CLKMSR_H +#define _ARM_AMLOGIC_AML8726_CLKMSR_H + +int aml8726_clkmsr_bus_frequency(void); + +#endif /* _ARM_AMLOGIC_AML8726_CLKMSR_H */ Added: head/sys/arm/amlogic/aml8726/aml8726_fb.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/amlogic/aml8726/aml8726_fb.c Tue Mar 31 11:50:46 2015 (r280905) @@ -0,0 +1,468 @@ +/*- + * Copyright 2013-2014 John Wehle + * 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. + */ + +/* + * Amlogic aml8726 frame buffer driver. + * + * The current implementation has limited flexibility. + * For example only progressive scan is supported when + * using HDMI and the resolution / frame rate is not + * negotiated. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include + +#include +#include +#include + +#include +#include + +#include + +#include "fb_if.h" + + +enum aml8726_fb_output { + aml8726_unknown_fb_output, + aml8726_cvbs_fb_output, + aml8726_hdmi_fb_output, + aml8726_lcd_fb_output +}; + +struct aml8726_fb_clk { + uint32_t freq; + uint32_t video_pre; + uint32_t video_post; + uint32_t video_x; + uint32_t hdmi_tx; + uint32_t encp; + uint32_t enci; + uint32_t enct; + uint32_t encl; + uint32_t vdac0; + uint32_t vdac1; +}; + +struct aml8726_fb_softc { + device_t dev; + struct resource *res[4]; + struct mtx mtx; + void *ih_cookie; + struct fb_info info; + enum aml8726_fb_output output; + struct aml8726_fb_clk clk; +}; + +static struct resource_spec aml8726_fb_spec[] = { + { SYS_RES_MEMORY, 0, RF_ACTIVE }, /* CANVAS */ + { SYS_RES_MEMORY, 1, RF_ACTIVE }, /* VIU */ + { SYS_RES_MEMORY, 2, RF_ACTIVE }, /* VPP */ + { SYS_RES_IRQ, 1, RF_ACTIVE }, /* INT_VIU_VSYNC */ + { -1, 0 } +}; + +#define AML_FB_LOCK(sc) mtx_lock(&(sc)->mtx) +#define AML_FB_UNLOCK(sc) mtx_unlock(&(sc)->mtx) +#define AML_FB_LOCK_INIT(sc) \ + mtx_init(&(sc)->mtx, device_get_nameunit((sc)->dev), \ + "fb", MTX_DEF) +#define AML_FB_LOCK_DESTROY(sc) mtx_destroy(&(sc)->mtx); + +#define CAV_WRITE_4(sc, reg, val) bus_write_4((sc)->res[0], reg, (val)) +#define CAV_READ_4(sc, reg) bus_read_4((sc)->res[0], reg) +#define CAV_BARRIER(sc, reg) bus_barrier((sc)->res[0], reg, 4, \ + (BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE)) + +#define VIU_WRITE_4(sc, reg, val) bus_write_4((sc)->res[1], reg, (val)) +#define VIU_READ_4(sc, reg) bus_read_4((sc)->res[1], reg) + +#define VPP_WRITE_4(sc, reg, val) bus_write_4((sc)->res[2], reg, (val)) +#define VPP_READ_4(sc, reg) bus_read_4((sc)->res[2], reg) + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 11:55:58 2015 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 52822557; Tue, 31 Mar 2015 11:55: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 3B9517AF; Tue, 31 Mar 2015 11:55: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 t2VBtwnT047871; Tue, 31 Mar 2015 11:55:58 GMT (envelope-from ganbold@FreeBSD.org) Received: (from ganbold@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2VBtvKS047869; Tue, 31 Mar 2015 11:55:57 GMT (envelope-from ganbold@FreeBSD.org) Message-Id: <201503311155.t2VBtvKS047869@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ganbold set sender to ganbold@FreeBSD.org using -f From: Ganbold Tsagaankhuu Date: Tue, 31 Mar 2015 11:55:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280906 - head/sys/boot/fdt/dts/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, 31 Mar 2015 11:55:58 -0000 Author: ganbold Date: Tue Mar 31 11:55:56 2015 New Revision: 280906 URL: https://svnweb.freebsd.org/changeset/base/280906 Log: Add device tree files for Hardkernel Odroid-C1 and Visson ATV-102 devices. Submitted by: John Wehle Approved by: stas (mentor) Added: head/sys/boot/fdt/dts/arm/odroidc1.dts (contents, props changed) head/sys/boot/fdt/dts/arm/vsatv102-m6.dts (contents, props changed) Added: head/sys/boot/fdt/dts/arm/odroidc1.dts ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/fdt/dts/arm/odroidc1.dts Tue Mar 31 11:55:56 2015 (r280906) @@ -0,0 +1,497 @@ +/*- + * Copyright (c) 2015 John Wehle + * 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$ + */ + +/* + * The ordering of certain devices is significant (e.g. usb depends on + * usb-phy which depends on gpio, also the timer should appear early on + * to provide a reasonably accurate DELAY implementation). + * + * Both usb-phys devices must be configured to prevent the usb controller + * from hanging during initialization. + */ + +/dts-v1/; + +/memreserve/ 0x7900000 0x00600000; /* 6MB frame buffer */ + +/ { + model = "hardkernel,odroid-c1"; + compatible = "hardkernel,odroid-c1", "amlogic,s805"; + + #address-cells = <1>; + #size-cells = <1>; + + interrupt-parent = <&gic>; + + aliases { + soc = &soc; + screen = &screen; + uart0 = &uart0; + }; + + cpus { + #address-cells = <1>; + #size-cells = <0>; + + cpu@0 { + device_type = "cpu"; + compatible = "arm,cortex-a5"; + reg = <0x0>; + }; + + cpu@1 { + device_type = "cpu"; + compatible = "arm,cortex-a5"; + reg = <0x1>; + }; + + cpu@2 { + device_type = "cpu"; + compatible = "arm,cortex-a5"; + reg = <0x2>; + }; + + cpu@3 { + device_type = "cpu"; + compatible = "arm,cortex-a5"; + reg = <0x3>; + }; + }; + + memory { + device_type = "memory"; + reg = <0x0 0x40000000>; /* 1GB RAM */ + }; + + soc: soc@c0000000 { + device_type = "soc"; + compatible = "simple-bus"; + bus-frequency = <0>; + + #address-cells = <1>; + #size-cells = <1>; + + ranges = <0x0 0xc0000000 0x1a100000>; + + gic: gic@4301000 { + device_type = "interrupt-controller"; + compatible = "arm,gic"; + reg = <0x4301000 0x1000>, // distributer registers + <0x4300100 0x0100>; // CPU if registers + + interrupt-controller; + #interrupt-cells = <1>; + }; + + scu: scu@4300000 { + compatible = "arm,cortex-a5-scu"; + reg = <0x4300000 0x1000>; + }; + + cpuconfig: cpuconfig@1901ff80 { + compatible = "amlogic,aml8726-cpuconfig"; + reg = <0x1901ff80 16>; + }; + + pl310@4200000 { + compatible = "arm,pl310"; + reg = <0x4200000 0x1000>; + interrupts = <61>; + interrupt-parent = <&gic>; + }; + + ccm@1104140 { + compatible = "amlogic,aml8726-ccm"; + reg = <0x1104140 20>; /* cbus 0x1050 */ + + functions = "ethernet", "i2c", "rng", "sdio", "sdxc", + "uart-a", "uart-b", "uart-c", + "usb-a", "usb-b"; + }; + + pinctrl@11080b0 { + compatible = "amlogic,aml8726-pinctrl"; + reg = <0x11080b0 40>, /* mux */ + <0x11080e8 24>, /* pu/pd */ + <0x1108120 24>, /* pull enable */ + <0x8100014 4>, /* ao mux */ + <0x810002c 4>, /* ao pu/pd */ + <0x810002c 4>; /* ao pull enable */ + + /* + * Currently only pin muxing that deviates + * from the power on default of gpio is + * specified here. + */ + + pinctrl-names = "default"; + pinctrl-0 = <&pins_uartao &pins_ethernet &pins_hdmi>; + + pins_ethernet: ethernet { + amlogic,pins = "ref_clk", + "tx_clk", "tx_en", + "tx_d0", "tx_d1", + "tx_d2", "tx_d3", + "rx_clk", "rx_dv", + "rx_d0", "rx_d1", + "rx_d2", "rx_d3", + "mdc", "mdio"; + amlogic,function = "ethernet"; + }; + + pins_hdmi: hdmi { + amlogic,pins = "cec", "hpd", + "scl", "sda"; + amlogic,function = "hdmi"; + }; + + pins_sdio_b: sdio_b { + amlogic,pins = "clk", "cmd", + "d0", "d1", + "d2", "d3"; + amlogic,function = "sdio-b"; + amlogic,pull = "up"; + }; + + pins_sdxc_b: sdxc_b { + amlogic,pins = "clk", "cmd", + "d0", "d1", + "d2", "d3"; + amlogic,function = "sdxc-b"; + amlogic,pull = "up"; + }; + + pins_sdio_c: sdio_c { + amlogic,pins = "clk", "cmd", + "d0", "d1", + "d2", "d3"; + amlogic,function = "sdio-c"; + amlogic,pull = "up"; + }; + + pins_sdxc_c: sdxc_c { + amlogic,pins = "clk", "cmd", + "d0", "d1", + "d2", "d3", + "d4", "d5", + "d6", "d7"; + amlogic,function = "sdxc-c"; + amlogic,pull = "up"; + }; + + pins_i2c_a: i2c_a { + amlogic,pins = "scl", "sda"; + amlogic,function = "i2c-a"; + }; + + pins_i2c_b: i2c_b { + amlogic,pins = "scl", "sda"; + amlogic,function = "i2c-b"; + }; + + pins_uarta: uarta { + amlogic,pins = "tx", "rx", "cts", "rts"; + amlogic,function = "uart-a"; + }; + + pins_uartb: uartb { + + /* + * gpiox18 appears to have special + * meaning to the bootloader making + * hardware handshaking unavailable. + */ + + amlogic,pins = "tx", "rx"; + amlogic,function = "uart-b"; + }; + + pins_uartc: uartc { + amlogic,pins = "tx", "rx", "cts", "rts"; + amlogic,function = "uart-c"; + }; + + pins_uartao: uartao { + amlogic,pins = "tx", "rx"; + amlogic,function = "uart-ao"; + }; + }; + + watchdog@1109900 { + compatible = "amlogic,aml8726-wdt"; + reg = <0x1109900 8>; /* cbus 0x2640 */ + interrupts = <0>; + interrupt-parent = <&gic>; + }; + + timer@1109940 { + compatible = "amlogic,aml8726-timer"; + reg = <0x1109940 24>; /* cbus 0x2650 */ + interrupts = <10 11 6 29>; + interrupt-parent = <&gic>; + }; + + rtc@8100740 { + compatible = "amlogic,aml8726-rtc"; + reg = <0x8100740 20>; /* aobus 0x1d0 */ + interrupts = <72>; + interrupt-parent = <&gic>; + + init-always = "false"; + xo-init = <0x180a>; + gpo-init = <0x500000>; + }; + + clkmsr: clkmsr@1108758 { + compatible = "amlogic,aml8726-clkmsr"; + reg = <0x1108758 16>; /* cbus 0x21d6 */ + }; + + uart0: uart@81004c0 { + /* uart-ao */ + device_type = "serial"; + compatible = "amlogic,aml8726-uart"; + clock-frequency = <0>; + current-speed = <115200>; + reg = <0x81004c0 20>; /* aobus 0x130 */ + interrupts = <90>; + interrupt-parent = <&gic>; + }; + + gpioao: gpio@8100024 { + /* gpio unit 7 */ + compatible = "amlogic,aml8726-gpio"; + reg = <0x8100024 4>, /* oen aobus 0x9 */ + <0x8100024 4>, /* out */ + <0x8100028 4>; /* in */ + + gpio-controller; + #gpio-cells = <1>; + pin-count = <14>; + }; + + gpio3: gpio@1108054 { + compatible = "amlogic,aml8726-gpio"; + reg = <0x1108054 4>, /* oen cbus 0x2015 */ + <0x1108058 4>, /* out */ + <0x110805c 4>; /* in */ + + gpio-controller; + #gpio-cells = <1>; + pin-count = <32>; + }; + + gpio5: gpio@110806c { + compatible = "amlogic,aml8726-gpio"; + reg = <0x110806c 4>, /* oen cbus 0x201b */ + <0x1108070 4>, /* out */ + <0x1108074 4>; /* in */ + + gpio-controller; + #gpio-cells = <1>; + pin-count = <32>; + }; + + mmc@1108c20 { + compatible = "amlogic,aml8726-mmc"; + reg = <0x1108c20 32>; /* cbus 0x2308 */ + interrupts = <28>; + interrupt-parent = <&gic>; + + pinctrl-names = "default"; + pinctrl-0 = <&pins_sdio_b>; + + /* + * Ordering is significant. + * + * mmc-vselect low sets first voltage + * mmc-vselect high sets second voltage + * + * If mmc-vselect is not present, then + * only one voltage should be specified. + */ + mmc-voltages = "3.3", "1.8"; + mmc-vselect = <&gpioao 3>; /* gpioao_3 */ + + mmc-pwr-en = <&gpio5 31 0>; /* card_8 */ + ins-detect = <&gpio5 29 0>; /* card_6 */ + }; + + sdxc@1108e00 { + compatible = "amlogic,aml8726-sdxc-m8"; + clock-frequency = <1275000000>; + reg = <0x1108e00 60>; /* cbus 0x2380 */ + interrupts = <78>; + interrupt-parent = <&gic>; + + pinctrl-names = "default"; + pinctrl-0 = <&pins_sdxc_c>; + + mmc-voltages = "1.8"; + + mmc-rst = <&gpio3 9 0>; /* boot_9 emmc-rst */ + }; + + rng@1108100 { + compatible = "amlogic,aml8726-rng"; + reg = <0x1108100 8>; /* cbus 0x2040 */ + }; + + i2c@1108500 { + /* i2c-a */ + compatible = "amlogic,aml8726-i2c"; + reg = <0x1108500 32>; /* cbus 0x2140 */ + interrupts = <21>; + interrupt-parent = <&gic>; + }; + + i2c@11087c0 { + /* i2c-b */ + compatible = "amlogic,aml8726-i2c"; + reg = <0x11087c0 32>; /* cbus 0x21f0 */ + interrupts = <128>; + interrupt-parent = <&gic>; + }; + + uart@11084c0 { + /* uart-a */ + device_type = "serial"; + compatible = "amlogic,aml8726-uart"; + clock-frequency = <0>; + current-speed = <115200>; + reg = <0x11084c0 20>; /* cbus 0x2130 */ + interrupts = <26>; + interrupt-parent = <&gic>; + }; + + uart@11084dc { + /* uart-b */ + device_type = "serial"; + compatible = "amlogic,aml8726-uart"; + clock-frequency = <0>; + current-speed = <115200>; + reg = <0x11084dc 20>; /* cbus 0x2137 */ + interrupts = <75>; + interrupt-parent = <&gic>; + }; + + uart@1108700 { + /* uart-c */ + device_type = "serial"; + compatible = "amlogic,aml8726-uart"; + clock-frequency = <0>; + current-speed = <115200>; + reg = <0x1108700 20>; /* cbus 0x21c0 */ + interrupts = <93>; + interrupt-parent = <&gic>; + }; + + usb-phy@1108800 { + /* usb-a phy */ + compatible = "amlogic,aml8726-m8-usb-phy"; + reg = <0x1108800 32>; /* cbus 0x2200 */ + + usb-pwr-en = <&gpioao 5 1>; /* gpioao_5 vbus */ + }; + + usb-phy@1108820 { + /* usb-b phy */ + compatible = "amlogic,aml8726-m8-usb-phy"; + reg = <0x1108820 32>; /* cbus 0x2208 */ + + force-aca = "true"; + usb-hub-rst = <&gpioao 4 0>; /* gpioao_4 hub-rst */ + }; + + usb@9040000 { + /* usb-a */ + compatible = "synopsys,designware-hs-otg2"; + reg = <0x9040000 0x40000>; /* ahbbus 0x40000*/ + interrupts = <30>; + interrupt-parent = <&gic>; + #address-cells = <1>; + #size-cells = <0>; + + dr_mode = "host"; + }; + + usb@90c0000 { + /* usb-b */ + compatible = "synopsys,designware-hs-otg2"; + reg = <0x90c0000 0x40000>; /* ahbbus 0xc0000 */ + interrupts = <31>; + interrupt-parent = <&gic>; + #address-cells = <1>; + #size-cells = <0>; + + dr_mode = "host"; + }; + + eth@9410000 { + /* ethernet */ + compatible = "snps,dwmac"; + reg = <0x9410000 0x2000>; /* ahbbus 0x410000 */ + interrupts = <8>; + interrupt-parent = <&gic>; + #address-cells = <1>; + #size-cells = <0>; + + eth-phy-rst = <&gpio3 23 0>; /* gpioh_4 phy-rst */ + }; + + screen: fb@8006020 { + device_type = "display"; + compatible = "amlogic,aml8726-fb"; + reg = <0x8006048 12>, /* CANVAS */ + <0x1106800 1024>, /* VIU */ + <0x1107400 1024>; /* VPP */ + interrupts = <2 3 12 13>; + interrupt-parent = <&gic>; + + address = <0x7900000>; /* match memreserve */ + width = <720>; + height = <480>; + depth = <24>; + linebytes = <2160>; + }; + }; + + leds { + compatible = "gpio-leds"; + + sys_led { + gpios = <&gpioao 13>; /* gpioao_13 sys_led */ + label = "sys_led"; + }; + }; + + chosen { + stdin = "uart0"; + stdout = "uart0"; + }; +}; Added: head/sys/boot/fdt/dts/arm/vsatv102-m6.dts ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/fdt/dts/arm/vsatv102-m6.dts Tue Mar 31 11:55:56 2015 (r280906) @@ -0,0 +1,412 @@ +/*- + * Copyright (c) 2013-2015 John Wehle + * 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$ + */ + +/* + * The ordering of certain devices is significant (e.g. usb depends on + * usb-phy which depends on gpio, also the timer should appear early on + * to provide a reasonably accurate DELAY implementation). + * + * Both usb-phys devices must be configured to prevent the usb controller + * from hanging during initialization. + */ + +/dts-v1/; + +/memreserve/ 0x84900000 0x00600000; /* 6MB frame buffer */ + +/ { + /* + * My development unit visually appears to be a Visson ATV-102 + * and the specs for both my unit and the Visson ATV-102 say + * the SoC is an aml8726-m3. However the uboot prompt says + * m6_mbx_v1, the RTC is located on SECBUS2 instead of AOBUS, + * and there are two cores so it seems my unit is a newer + * version using the later processor. + */ + + model = "visson,atv-102"; + compatible = "visson,atv-102", "amlogic,aml8726-m6"; + + #address-cells = <1>; + #size-cells = <1>; + + interrupt-parent = <&gic>; + + aliases { + soc = &soc; + screen = &screen; + uart0 = &uart0; + }; + + cpus { + #address-cells = <1>; + #size-cells = <0>; + + cpu@0 { + device_type = "cpu"; + compatible = "arm,cortex-a9"; + reg = <0x0>; + }; + + cpu@1 { + device_type = "cpu"; + compatible = "arm,cortex-a9"; + reg = <0x1>; + }; + }; + + memory { + device_type = "memory"; + reg = <0x80000000 0x40000000>; /* 1GB RAM */ + }; + + soc: soc@c0000000 { + device_type = "soc"; + compatible = "simple-bus"; + bus-frequency = <0>; + + #address-cells = <1>; + #size-cells = <1>; + + ranges = <0x0 0xc0000000 0x1a100000>; + + pic: pic@1109a40 { + device_type = "interrupt-controller"; + compatible = "amlogic,aml8726-pic"; + reg = <0x1109a40 128>; /* cbus 0x2690 */ + + interrupt-controller; + #interrupt-cells = <1>; + }; + + gic: gic@4301000 { + device_type = "interrupt-controller"; + compatible = "arm,gic"; + reg = <0x4301000 0x1000>, /* distributer registers */ + <0x4300100 0x0100>; /* CPU if registers */ + + interrupt-controller; + #interrupt-cells = <1>; + }; + + scu: scu@4300000 { + compatible = "arm,cortex-a9-scu"; + reg = <0x4300000 0x1000>; + }; + + cpuconfig: cpuconfig@1901ff80 { + compatible = "amlogic,aml8726-cpuconfig"; + reg = <0x1901ff80 8>; + }; + + pl310@4200000 { + compatible = "arm,pl310"; + reg = <0x4200000 0x1000>; + interrupts = <61>; /* AM_IRQ1(29) */ + interrupt-parent = <&gic>; + }; + + ccm@1104140 { + compatible = "amlogic,aml8726-ccm"; + reg = <0x1104140 20>; /* cbus 0x1050 */ + + functions = "ethernet", "i2c", "rng", "sdio", + "uart-a", "uart-b", "uart-c", + "usb-a", "usb-b"; + }; + + pinctrl: pinctrl@11080b0 { + compatible = "amlogic,aml8726-pinctrl"; + reg = <0x11080b0 40>, /* mux */ + <0x11080e8 24>, /* pu/pd */ + <0x11080e8 24>, /* pull enable */ + <0x8100014 4>, /* ao mux */ + <0x810002c 4>, /* ao pu/pd */ + <0x810002c 4>; /* ao pull enable */ + + /* + * Currently only pin muxing that deviates + * from the power on default of gpio is + * specified here. + */ + + pinctrl-names = "default"; + pinctrl-0 = <&pins_uartao &pins_ethernet &pins_hdmi>; + + pins_ethernet: ethernet { + amlogic,pins = "ref_clk_in", + "tx_clk", "tx_en", + "tx_d0", "tx_d1", + "tx_d2", "tx_d3", + "rx_clk", "rx_dv", + "rx_d0", "rx_d1", + "rx_d2", "rx_d3", + "mdc", "mdio"; + amlogic,function = "ethernet"; + }; + + pins_hdmi: hdmi { + amlogic,pins = "cec", "hpd", + "scl", "sda"; + amlogic,function = "hdmi"; + }; + + pins_sdio_b: sdio_b { + amlogic,pins = "clk", "cmd", + "d0", "d1", + "d2", "d3"; + amlogic,function = "sdio-b"; + }; + + pins_uartao: uartao { + amlogic,pins = "tx", "rx"; + amlogic,function = "uart-ao"; + }; + }; + + watchdog@1109900 { + compatible = "amlogic,aml8726-wdt"; + reg = <0x1109900 8>; /* cbus 0x2640 */ + interrupts = <0>; /* AM_IRQ0(0) */ + interrupt-parent = <&gic>; + }; + + timer@1109940 { + compatible = "amlogic,aml8726-timer"; + reg = <0x1109940 24>; /* cbus 0x2650 */ + interrupts = <10 /* AM_IRQ0(10) */ + 11 /* AM_IRQ0(11) */ + 6 /* AM_IRQ0(6) */ + 29>; /* AM_IRQ0(29) */ + interrupt-parent = <&gic>; + }; + + rtc@1a004340 { + compatible = "amlogic,aml8726-rtc"; + reg = <0x1a004340 20>; /* secbus2 0xd0 */ + interrupts = <72>; /* AM_IRQ2(8) */ + interrupt-parent = <&gic>; + + init-always = "false"; + xo-init = <0x180a>; + gpo-init = <0x500000>; + }; + + clkmsr: clkmsr@1108758 { + compatible = "amlogic,aml8726-clkmsr"; + reg = <0x1108758 16>; /* cbus 0x21d6 */ + }; + + uart0: uart@81004c0 { + /* uart-ao */ + device_type = "serial"; + compatible = "amlogic,aml8726-uart"; + clock-frequency = <0>; + current-speed = <115200>; + reg = <0x81004c0 20>; /* aobus 0x130 */ + interrupts = <90>; /* AM_IRQ2(26) */ + interrupt-parent = <&gic>; + }; + + gpioao: gpio@8100024 { + /* gpio unit 7 */ + compatible = "amlogic,aml8726-gpio"; + reg = <0x8100024 4>, /* oen aobus 0x9 */ + <0x8100024 4>, /* out */ + <0x8100028 4>; /* in */ + + gpio-controller; + #gpio-cells = <1>; + pin-count = <12>; + }; + + gpio5: gpio@110806c { + compatible = "amlogic,aml8726-gpio"; + reg = <0x110806c 4>, /* oen cbus 0x201b */ + <0x1108070 4>, /* out */ + <0x1108074 4>; /* in */ + + gpio-controller; + #gpio-cells = <1>; + pin-count = <32>; + }; + + gpio6: gpio@1108020 { + compatible = "amlogic,aml8726-gpio"; + reg = <0x1108020 4>, /* oen cbus 0x2008 */ + <0x1108024 4>, /* out */ + <0x1108028 4>; /* in */ + + gpio-controller; + #gpio-cells = <1>; + pin-count = <29>; + }; + + mmc@1108c20 { + compatible = "amlogic,aml8726-mmc"; + reg = <0x1108c20 32>; /* cbus 0x2308 */ + interrupts = <28>; /* AM_IRQ0(28) */ + interrupt-parent = <&gic>; + + pinctrl-names = "default"; + pinctrl-0 = <&pins_sdio_b>; + + mmc-voltages = "3.3"; + + mmc-pwr-en = <&gpio5 31 0>; /* card_8 */ + ins-detect = <&gpio5 29 0>; /* card_6 */ + }; + + rng@1108100 { + compatible = "amlogic,aml8726-rng"; + reg = <0x1108100 8>; /* cbus 0x2040 */ + }; + + i2c@1108500 { + /* i2c-a */ + compatible = "amlogic,aml8726-i2c"; + reg = <0x1108500 32>; /* cbus 0x2140 */ + interrupts = <21>; + interrupt-parent = <&gic>; + }; + + i2c@11087c0 { + /* i2c-b */ + compatible = "amlogic,aml8726-i2c"; + reg = <0x11087c0 32>; /* cbus 0x21f0 */ + interrupts = <128>; + interrupt-parent = <&gic>; + }; + + uart@11084c0 { + /* uart-a */ + device_type = "serial"; + compatible = "amlogic,aml8726-uart"; + clock-frequency = <0>; + current-speed = <115200>; + reg = <0x11084c0 20>; /* cbus 0x2130 */ + interrupts = <26>; + interrupt-parent = <&gic>; + }; + + uart@11084dc { + /* uart-b */ + device_type = "serial"; + compatible = "amlogic,aml8726-uart"; + clock-frequency = <0>; + current-speed = <115200>; + reg = <0x11084dc 20>; /* cbus 0x2137 */ + interrupts = <75>; + interrupt-parent = <&gic>; + }; + + uart@1108700 { + /* uart-c */ + device_type = "serial"; + compatible = "amlogic,aml8726-uart"; + clock-frequency = <0>; + current-speed = <115200>; + reg = <0x1108700 20>; /* cbus 0x21c0 */ + interrupts = <93>; + interrupt-parent = <&gic>; + }; + + usb-phy@1108400 { + /* usb-a phy */ + compatible = "amlogic,aml8726-m6-usb-phy"; + reg = <0x1108400 32>; /* cbus 0x2100 */ + }; + + usb-phy@1108420 { + /* usb-b phy */ + compatible = "amlogic,aml8726-m6-usb-phy"; + reg = <0x1108420 32>; /* cbus 0x2108 */ + + usb-pwr-en = <&gpioao 3 1>, /* gpioao_3 vbus */ + <&gpio6 11 0>; /* gpioe_11 wifi */ + }; + + usb@9040000 { + /* usb-a */ + compatible = "synopsys,designware-hs-otg2"; + reg = <0x9040000 0x40000>; /* ahbbus 0x40000*/ + interrupts = <30>; /* AM_IRQ0(30) */ + interrupt-parent = <&gic>; + #address-cells = <1>; + #size-cells = <0>; + }; + + usb@90c0000 { + /* usb-b */ + compatible = "synopsys,designware-hs-otg2"; + reg = <0x90c0000 0x40000>; /* ahbbus 0xc0000 */ + interrupts = <31>; /* AM_IRQ0(31) */ + interrupt-parent = <&gic>; + #address-cells = <1>; + #size-cells = <0>; + + dr_mode = "host"; + }; + + eth@9410000 { + /* ethernet */ + compatible = "snps,dwmac"; + reg = <0x9410000 0x2000>; /* ahbbus 0x410000 */ + interrupts = <8>; /* AM_IRQ0(8) */ + interrupt-parent = <&gic>; + #address-cells = <1>; + #size-cells = <0>; + + eth-phy-rst = <&gpio5 15 0>; /* gpioy_15 phy-rst */ + }; + + screen: fb@8006324 { + device_type = "display"; + compatible = "amlogic,aml8726-fb"; + reg = <0x8006324 12>, /* CANVAS */ + <0x1106800 1024>, /* VIU */ + <0x1107400 1024>; /* VPP */ + interrupts = <2 /* AM_IRQ0(2) */ + 3 /* AM_IRQ0(3) */ + 12 /* AM_IRQ0(12) */ + 13>; /* AM_IRQ0(13) */ + interrupt-parent = <&gic>; + + address = <0x84900000>; /* match memreserve */ + width = <720>; + height = <480>; + depth = <24>; + linebytes = <2160>; + }; + }; + + chosen { + stdin = "uart0"; + stdout = "uart0"; + }; +}; From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 11:59:59 2015 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 6BCBE722; Tue, 31 Mar 2015 11:59: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 558D07E3; Tue, 31 Mar 2015 11:59: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 t2VBxxRp048348; Tue, 31 Mar 2015 11:59:59 GMT (envelope-from ganbold@FreeBSD.org) Received: (from ganbold@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2VBxwqM048346; Tue, 31 Mar 2015 11:59:58 GMT (envelope-from ganbold@FreeBSD.org) Message-Id: <201503311159.t2VBxwqM048346@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ganbold set sender to ganbold@FreeBSD.org using -f From: Ganbold Tsagaankhuu Date: Tue, 31 Mar 2015 11:59:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280907 - head/sys/arm/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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, 31 Mar 2015 11:59:59 -0000 Author: ganbold Date: Tue Mar 31 11:59:57 2015 New Revision: 280907 URL: https://svnweb.freebsd.org/changeset/base/280907 Log: Add kernel config files for Hardkernel Odroid-C1 and Visson ATV-102 devices. Submitted by: John Wehle Approved by: stas (mentor) Added: head/sys/arm/conf/ODROIDC1 (contents, props changed) head/sys/arm/conf/VSATV102 (contents, props changed) Added: head/sys/arm/conf/ODROIDC1 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/conf/ODROIDC1 Tue Mar 31 11:59:57 2015 (r280907) @@ -0,0 +1,133 @@ +# ODROIDC1 -- Custom configuration for the HardKernel ODROID-C1 SBC +# +# For more information on this file, please read the handbook section on +# Kernel Configuration Files: +# +# http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# +# The handbook is also available locally in /usr/share/doc/handbook +# if you've installed the doc distribution, otherwise always see the +# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the +# latest information. +# +# An exhaustive list of options and more detailed explanations of the +# device lines is also present in the ../../conf/NOTES and NOTES files. +# If you are in doubt as to the purpose or necessity of a line, check first +# in NOTES. +# +# $FreeBSD$ + +ident ODROIDC1 + +include "../amlogic/aml8726/std.odroidc1" + +options HZ=100 +options SCHED_ULE # ULE scheduler +options PREEMPTION # Enable kernel thread preemption +options INET # InterNETworking +options INET6 # IPv6 communications protocols +options FFS # Berkeley Fast Filesystem +options SOFTUPDATES # Enable FFS soft updates support +options UFS_ACL # Support for access control lists +options UFS_DIRHASH # Improve performance on big directories +options PROCFS # Process filesystem (requires PSEUDOFS) +options PSEUDOFS # Pseudo-filesystem framework +options GEOM_PART_BSD # BSD partition scheme +options GEOM_PART_MBR # MBR partition scheme +options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI +options KTRACE # ktrace(1) support +options SYSVSHM # SYSV-style shared memory +options SYSVMSG # SYSV-style message queues +options SYSVSEM # SYSV-style semaphores +options _KPOSIX_PRIORITY_SCHEDULING # Posix P1003_1B real-time extensions +options PRINTF_BUFR_SIZE=128 # Prevent printf output being interspersed. +options KBD_INSTALL_CDEV # install a CDEV entry in /dev +options LINUX_BOOT_ABI +options VFP # vfp/neon + +# Debugging +makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols +options ALT_BREAK_TO_DEBUGGER +#options VERBOSE_SYSINIT # Enable verbose sysinit messages +options BOOTVERBOSE=1 +options KDB +options DDB # Enable the kernel debugger +options INVARIANTS # Enable calls of extra sanity checking +options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS +options WITNESS # Enable checks to detect deadlocks and cycles +options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed +#options DIAGNOSTIC + +# NFS support +#options NFSCL # New Network Filesystem Client +#options NFSLOCKD # Network Lock Manager +#options NFS_ROOT # NFS usable as /, requires NFSCL + +# NFS root from boopt/dhcp +#options BOOTP +#options BOOTP_NFSROOT +#options BOOTP_COMPAT +#options BOOTP_NFSV3 +#options BOOTP_WIRED_TO=axe0 + +# MMC/SD/SDIO card slot support +device mmc # mmc/sd bus +device mmcsd # mmc/sd flash cards + +# Boot device is 2nd slice on MMC/SD card +options ROOTDEVNAME=\"ufs:mmcsd0s2\" + +# GPIO +device gpio +device gpioled + +# I2C support +device iicbus +device iicbb +device iic + +# vt is the default console driver, resembling an SCO console +device vt +#device kbdmux + +# Serial (COM) ports +device uart # Generic UART driver + +# Pseudo devices. +device loop # Network loopback +device random # Entropy device +device ether # Ethernet support +device pty # BSD-style compatibility pseudo ttys + +# 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 + +# USB support +device usb # General USB code (mandatory for USB) +device dwcotg # DWC OTG controller +options USB_HOST_ALIGN=64 # Cacheline size is 64 +options USB_DEBUG +#options USB_REQ_DEBUG +#options USB_VERBOSE + +#device ukbd # USB keyboard +#device ums # USB mouse + +device scbus # SCSI bus (required for ATA/SCSI) +device da # Direct Access (disks) +device umass # Disks/Mass storage - Requires scbus and da + +# Ethernet support +device miibus # MII bus support + +# SoC Ethernet, requires miibus +device dwc + +# USB Ethernet, requires miibus +device axe # ASIX Electronics USB Ethernet + +# Flattened Device Tree +options FDT +options FDT_DTB_STATIC Added: head/sys/arm/conf/VSATV102 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/conf/VSATV102 Tue Mar 31 11:59:57 2015 (r280907) @@ -0,0 +1,133 @@ +# VSATV102 -- Custom configuration for the Visson ATV-102 media player +# +# For more information on this file, please read the handbook section on +# Kernel Configuration Files: +# +# http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# +# The handbook is also available locally in /usr/share/doc/handbook +# if you've installed the doc distribution, otherwise always see the +# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the +# latest information. +# +# An exhaustive list of options and more detailed explanations of the +# device lines is also present in the ../../conf/NOTES and NOTES files. +# If you are in doubt as to the purpose or necessity of a line, check first +# in NOTES. +# +# $FreeBSD$ + +ident VSATV102 + +include "../amlogic/aml8726/std.vsatv102-m6" + +options HZ=100 +options SCHED_ULE # ULE scheduler +options PREEMPTION # Enable kernel thread preemption +options INET # InterNETworking +options INET6 # IPv6 communications protocols +options FFS # Berkeley Fast Filesystem +options SOFTUPDATES # Enable FFS soft updates support +options UFS_ACL # Support for access control lists +options UFS_DIRHASH # Improve performance on big directories +options PROCFS # Process filesystem (requires PSEUDOFS) +options PSEUDOFS # Pseudo-filesystem framework +options GEOM_PART_BSD # BSD partition scheme +options GEOM_PART_MBR # MBR partition scheme +options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI +options KTRACE # ktrace(1) support +options SYSVSHM # SYSV-style shared memory +options SYSVMSG # SYSV-style message queues +options SYSVSEM # SYSV-style semaphores +options _KPOSIX_PRIORITY_SCHEDULING # Posix P1003_1B real-time extensions +options PRINTF_BUFR_SIZE=128 # Prevent printf output being interspersed. +options KBD_INSTALL_CDEV # install a CDEV entry in /dev +options LINUX_BOOT_ABI +options VFP # vfp/neon + +# Debugging +makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols +options ALT_BREAK_TO_DEBUGGER +#options VERBOSE_SYSINIT # Enable verbose sysinit messages +options BOOTVERBOSE=1 +options KDB +options DDB # Enable the kernel debugger +options INVARIANTS # Enable calls of extra sanity checking +options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS +options WITNESS # Enable checks to detect deadlocks and cycles +options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed +#options DIAGNOSTIC + +# NFS support +#options NFSCL # New Network Filesystem Client +#options NFSLOCKD # Network Lock Manager +#options NFS_ROOT # NFS usable as /, requires NFSCL + +# NFS root from boopt/dhcp +#options BOOTP +#options BOOTP_NFSROOT +#options BOOTP_COMPAT +#options BOOTP_NFSV3 +#options BOOTP_WIRED_TO=axe0 + +# MMC/SD/SDIO card slot support +device mmc # mmc/sd bus +device mmcsd # mmc/sd flash cards + +# Boot device is 2nd slice on MMC/SD card +options ROOTDEVNAME=\"ufs:mmcsd0s2\" + +# GPIO +device gpio +device gpioled + +# I2C support +device iicbus +device iicbb +device iic + +# vt is the default console driver, resembling an SCO console +device vt +#device kbdmux + +# Serial (COM) ports +device uart # Generic UART driver + +# Pseudo devices. +device loop # Network loopback +device random # Entropy device +device ether # Ethernet support +device pty # BSD-style compatibility pseudo ttys + +# 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 + +# USB support +device usb # General USB code (mandatory for USB) +device dwcotg # DWC OTG controller +options USB_HOST_ALIGN=64 # Cacheline size is 64 +options USB_DEBUG +#options USB_REQ_DEBUG +#options USB_VERBOSE + +#device ukbd # USB keyboard +#device ums # USB mouse + +device scbus # SCSI bus (required for ATA/SCSI) +device da # Direct Access (disks) +device umass # Disks/Mass storage - Requires scbus and da + +# Ethernet support +device miibus # MII bus support + +# SoC Ethernet, requires miibus +device dwc + +# USB Ethernet, requires miibus +device axe # ASIX Electronics USB Ethernet + +# Flattened Device Tree +options FDT +options FDT_DTB_STATIC From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 12:53:08 2015 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 87DF5689; Tue, 31 Mar 2015 12:53: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 72DDBE40; Tue, 31 Mar 2015 12:53: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 t2VCr8s1075805; Tue, 31 Mar 2015 12:53:08 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2VCr8p0075804; Tue, 31 Mar 2015 12:53:08 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201503311253.t2VCr8p0075804@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 31 Mar 2015 12:53:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280908 - head/libexec/rtld-elf/aarch64 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, 31 Mar 2015 12:53:08 -0000 Author: emaste Date: Tue Mar 31 12:53:07 2015 New Revision: 280908 URL: https://svnweb.freebsd.org/changeset/base/280908 Log: Correct copyright typo Modified: head/libexec/rtld-elf/aarch64/reloc.c Modified: head/libexec/rtld-elf/aarch64/reloc.c ============================================================================== --- head/libexec/rtld-elf/aarch64/reloc.c Tue Mar 31 11:59:57 2015 (r280907) +++ head/libexec/rtld-elf/aarch64/reloc.c Tue Mar 31 12:53:07 2015 (r280908) @@ -1,5 +1,5 @@ /*- - * Copytight (c) 2014-2015 The FreeBSD Foundation + * Copyright (c) 2014-2015 The FreeBSD Foundation * All rights reserved. * * Portions of this software were developed by Andrew Turner From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 13:37:33 2015 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 351139FA; Tue, 31 Mar 2015 13:37: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 20FC33D9; Tue, 31 Mar 2015 13:37: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 t2VDbW18095809; Tue, 31 Mar 2015 13:37:32 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2VDbWpJ095808; Tue, 31 Mar 2015 13:37:32 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201503311337.t2VDbWpJ095808@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 31 Mar 2015 13:37:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280909 - head/contrib/gcc 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, 31 Mar 2015 13:37:33 -0000 Author: emaste Date: Tue Mar 31 13:37:32 2015 New Revision: 280909 URL: https://svnweb.freebsd.org/changeset/base/280909 Log: unwind-d2 build workaround for arm64 The __builtin_init_dwarf_reg_size_table function is unimplemented in clang 3.6 for AArch64. Comment it out for now and replace it with a message and abort. Tracked in upstream LLVM PR 22997 https://llvm.org/bugs/show_bug.cgi?id=22997 Submitted by: andrew Modified: head/contrib/gcc/unwind-dw2.c Modified: head/contrib/gcc/unwind-dw2.c ============================================================================== --- head/contrib/gcc/unwind-dw2.c Tue Mar 31 12:53:07 2015 (r280908) +++ head/contrib/gcc/unwind-dw2.c Tue Mar 31 13:37:32 2015 (r280909) @@ -1393,7 +1393,16 @@ uw_advance_context (struct _Unwind_Conte static inline void init_dwarf_reg_size_table (void) { +/* + * ARM64TODO: http://llvm.org/pr22997 + * llvm 3.6 doesn't support __builtin_init_dwarf_reg_size_table on AArch64. + */ +#ifdef __aarch64__ + printf("Unimplemented: init_dwarf_reg_size_table\n"); + abort(); +#else __builtin_init_dwarf_reg_size_table (dwarf_reg_size_table); +#endif } static void From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 14:41:31 2015 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 235651E0; Tue, 31 Mar 2015 14:41: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 0F5A1E6D; Tue, 31 Mar 2015 14:41: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 t2VEfUUt028422; Tue, 31 Mar 2015 14:41:30 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2VEfUA1028421; Tue, 31 Mar 2015 14:41:30 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201503311441.t2VEfUA1028421@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Tue, 31 Mar 2015 14:41:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280910 - 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: Tue, 31 Mar 2015 14:41:31 -0000 Author: ae Date: Tue Mar 31 14:41:29 2015 New Revision: 280910 URL: https://svnweb.freebsd.org/changeset/base/280910 Log: The offset variable has been cleared all bits except IP6F_OFF_MASK. Use ip6f_mf variable instead of checking its bits. Modified: head/sys/netpfil/ipfw/ip_fw_log.c Modified: head/sys/netpfil/ipfw/ip_fw_log.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_log.c Tue Mar 31 13:37:32 2015 (r280909) +++ head/sys/netpfil/ipfw/ip_fw_log.c Tue Mar 31 14:41:29 2015 (r280910) @@ -525,7 +525,7 @@ ipfw_log(struct ip_fw_chain *chain, stru #ifdef INET6 if (IS_IP6_FLOW_ID(&(args->f_id))) { - if (offset & (IP6F_OFF_MASK | IP6F_MORE_FRAG)) + if (offset || ip6f_mf) snprintf(SNPARGS(fragment, 0), " (frag %08x:%d@%d%s)", args->f_id.extra, From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 15:04:00 2015 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 F3DC2BD8; Tue, 31 Mar 2015 15:03: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 D59D2131; Tue, 31 Mar 2015 15:03: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 t2VF3xGN039039; Tue, 31 Mar 2015 15:03:59 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2VF3xAR039037; Tue, 31 Mar 2015 15:03:59 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201503311503.t2VF3xAR039037@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Tue, 31 Mar 2015 15:03:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280911 - in head/usr.bin: col column 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, 31 Mar 2015 15:04:00 -0000 Author: kevlo Date: Tue Mar 31 15:03:58 2015 New Revision: 280911 URL: https://svnweb.freebsd.org/changeset/base/280911 Log: Remove bogus cast. Modified: head/usr.bin/col/col.c head/usr.bin/column/column.c Modified: head/usr.bin/col/col.c ============================================================================== --- head/usr.bin/col/col.c Tue Mar 31 14:41:29 2015 (r280910) +++ head/usr.bin/col/col.c Tue Mar 31 15:03:58 2015 (r280911) @@ -290,7 +290,7 @@ main(int argc, char **argv) need = l->l_lsize ? l->l_lsize * 2 : 90; if ((l->l_line = realloc(l->l_line, (unsigned)need * sizeof(CHAR))) == NULL) - err(1, (char *)NULL); + err(1, NULL); l->l_lsize = need; } c = &l->l_line[l->l_line_len++]; @@ -410,13 +410,13 @@ flush_line(LINE *l) sorted_size = l->l_lsize; if ((sorted = realloc(sorted, (unsigned)sizeof(CHAR) * sorted_size)) == NULL) - err(1, (char *)NULL); + err(1, NULL); } if (l->l_max_col >= count_size) { count_size = l->l_max_col + 1; if ((count = realloc(count, (unsigned)sizeof(int) * count_size)) == NULL) - err(1, (char *)NULL); + err(1, NULL); } memset(count, 0, sizeof(int) * l->l_max_col + 1); for (i = nchars, c = l->l_line; --i >= 0; c++) @@ -510,7 +510,7 @@ alloc_line(void) if (!line_freelist) { if ((l = realloc(NULL, sizeof(LINE) * NALLOC)) == NULL) - err(1, (char *)NULL); + err(1, NULL); line_freelist = l; for (i = 1; i < NALLOC; i++, l++) l->l_next = l + 1; Modified: head/usr.bin/column/column.c ============================================================================== --- head/usr.bin/column/column.c Tue Mar 31 14:41:29 2015 (r280910) +++ head/usr.bin/column/column.c Tue Mar 31 15:03:58 2015 (r280911) @@ -233,11 +233,11 @@ maketbl(void) wchar_t *last; if ((t = tbl = calloc(entries, sizeof(TBL))) == NULL) - err(1, (char *)NULL); + err(1, NULL); if ((cols = calloc((maxcols = DEFCOLS), sizeof(*cols))) == NULL) - err(1, (char *)NULL); + err(1, NULL); if ((lens = calloc(maxcols, sizeof(int))) == NULL) - err(1, (char *)NULL); + err(1, NULL); for (cnt = 0, lp = list; cnt < entries; ++cnt, ++lp, ++t) { for (coloff = 0, p = *lp; (cols[coloff] = wcstok(p, separator, &last)); @@ -253,9 +253,9 @@ maketbl(void) maxcols += DEFCOLS; } if ((t->list = calloc(coloff, sizeof(*t->list))) == NULL) - err(1, (char *)NULL); + err(1, NULL); if ((t->len = calloc(coloff, sizeof(int))) == NULL) - err(1, (char *)NULL); + err(1, NULL); for (t->cols = coloff; --coloff >= 0;) { t->list[coloff] = cols[coloff]; t->len[coloff] = width(cols[coloff]); @@ -284,7 +284,7 @@ input(FILE *fp) if (!list) if ((list = calloc((maxentry = DEFNUM), sizeof(*list))) == NULL) - err(1, (char *)NULL); + err(1, NULL); while (fgetws(buf, MAXLINELEN, fp)) { for (p = buf; *p && iswspace(*p); ++p); if (!*p) From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 15:37:03 2015 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 A140A73D; Tue, 31 Mar 2015 15:37:03 +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 768226D7; Tue, 31 Mar 2015 15:37:03 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 53FF1B9B0; Tue, 31 Mar 2015 11:37:02 -0400 (EDT) From: John Baldwin To: Randall Stewart Subject: Re: svn commit: r280785 - in head/sys: kern netgraph/atm/sscop netgraph/atm/uni sys Date: Tue, 31 Mar 2015 09:36:39 -0400 Message-ID: <3203943.oAr2O9rG4a@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: References: <201503281250.t2SCoOkt020297@svn.freebsd.org> <3218826.nq4nR2EqCz@ralph.baldwin.cx> 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); Tue, 31 Mar 2015 11:37:02 -0400 (EDT) Cc: Davide Italiano , "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, 31 Mar 2015 15:37:03 -0000 On Monday, March 30, 2015 04:21:03 PM Randall Stewart wrote: > John: > > As I just said, Warner and I feel we can get by with making the int -> short/short so > we preserver the KPI and at the same time achieve the objective .. > > My big concern was no intel platforms but Warner gave me a green light there ;-) Technically this still breaks the KBI (in that existing drivers using callout_pending(), callout_active(), and callout_deactivate() will not do the correct thing). OTOH, you can't preserve that and still fix the race (well, unless you do locking in callout_deactivate() which you might consider for an MFC even if you didn't do it in HEAD if the KBI breakage is severe enough). -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 15:37:02 2015 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 B8C8A73B; Tue, 31 Mar 2015 15:37:02 +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 8E7436D6; Tue, 31 Mar 2015 15:37:02 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 7EB0DB976; Tue, 31 Mar 2015 11:37:01 -0400 (EDT) From: John Baldwin To: Randall Stewart Subject: Re: svn commit: r280785 - in head/sys: kern netgraph/atm/sscop netgraph/atm/uni sys Date: Tue, 31 Mar 2015 09:40:58 -0400 Message-ID: <5710983.pHS9DoOdY8@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: <26047F0C-A975-4DAC-9077-31B5EC4902DA@netflix.com> References: <201503281250.t2SCoOkt020297@svn.freebsd.org> <32487399.PTq7ESkWJT@ralph.baldwin.cx> <26047F0C-A975-4DAC-9077-31B5EC4902DA@netflix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 31 Mar 2015 11:37:01 -0400 (EDT) Cc: svn-src-head@freebsd.org, Randall Stewart , 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, 31 Mar 2015 15:37:02 -0000 On Monday, March 30, 2015 06:26:25 PM Randall Stewart wrote: >=20 > On Mar 30, 2015, at 9:16 AM, John Baldwin wrote: >=20 > > On Saturday, March 28, 2015 12:50:24 PM Randall Stewart wrote: > >> Author: rrs > >> Date: Sat Mar 28 12:50:24 2015 > >> New Revision: 280785 > >> URL: https://svnweb.freebsd.org/changeset/base/280785 > >>=20 > >> Log: > >> Change the callout to supply -1 to indicate we are not changing > >> CPU, also add protection against invalid CPU's as well as > >> split c_flags and c_iflags so that if a user plays with the activ= e > >> flag (the one expected to be played with by callers in MPSAFE) wi= thout > >> a lock, it won't adversely affect the callout system by causing a= corrupt > >> list. This also means that all callers need to use the macros and= *not* > >> play with the falgs directly (like netgraph used to). > >>=20 > >> Differential Revision: htts://reviews.freebsd.org/D1894 > >> Reviewed by: .. timed out but looked at by jhb, imp, adrian hsela= sky > >> tested by hiren and netflix. > >> Sponsored by:=09Netflix Inc. > >=20 > > Please use NOCPU rather than -1 directly for the CPU field when not= > > moving a callout. > >=20 >=20 > John: >=20 > I have made *all* of your suggested changes, adopting the comments an= d > moving migration to kern_timeout.c.. thanks.. >=20 > Now as to the=20 >=20 > -1 -> NOCPU >=20 > This is like pulling on a string on your sweater.. the only sensible = solution that > I could come up with after chatting with Lawrence is to add=20 > #include > to everyone that uses the callout.h and does not have it already=E2=80= =A6 (putting it into callout.h does not work) .. sigh.. >=20 > Now for this cosmetic change I end up with the following changes (and= as yet I have > not built LINT or universe so there may be more).. I have spent about= 2 hours on this > so far and I can at least build a kernel with the change for amd64 :-= 0 >=20 > Here is what has to change, do you really think that this is worth it= ? >=20 > Note I did not look into moving NOCPU in proc.h it says it means no C= PU is present > which is sort of the meaning we want.. I am not sure if the define co= uld be moved .. but > that too may be yet another string... >=20 > Is this worth it, or do you have another idea on how best to do this?= ?? Ugh. :( I guess leave it at -1 for now. Another alternative would be = to move NOCPU to (at least for the kernel) if bde@ would all= ow it. I don't think changing all those files is appropriate. (Also, seems like an odd place for NOCPU now, it should re= ally be in if not param.h. I understand why it was first added in = proc.h, but it is now used in many more places than just td_oncpu.) --=20 John Baldwin From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 15:37:26 2015 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 213999D0; Tue, 31 Mar 2015 15:37: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 E69A56E4; Tue, 31 Mar 2015 15:37: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 t2VFbPps054093; Tue, 31 Mar 2015 15:37:25 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2VFbP7A054092; Tue, 31 Mar 2015 15:37:25 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201503311537.t2VFbP7A054092@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 31 Mar 2015 15:37:25 +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: r280912 - in stable: 10/sys/kern 9/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: Tue, 31 Mar 2015 15:37:26 -0000 Author: jhb Date: Tue Mar 31 15:37:24 2015 New Revision: 280912 URL: https://svnweb.freebsd.org/changeset/base/280912 Log: MFC 278760: Add two new counters for vnode life cycle events: - vfs.recycles counts the number of vnodes forcefully recycled to avoid exceeding kern.maxvnodes. - vfs.vnodes_created counts the number of vnodes created by successful calls to getnewvnode(). Modified: stable/10/sys/kern/vfs_subr.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/kern/vfs_subr.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/10/sys/kern/vfs_subr.c ============================================================================== --- stable/10/sys/kern/vfs_subr.c Tue Mar 31 15:03:58 2015 (r280911) +++ stable/10/sys/kern/vfs_subr.c Tue Mar 31 15:37:24 2015 (r280912) @@ -122,6 +122,10 @@ static unsigned long numvnodes; SYSCTL_ULONG(_vfs, OID_AUTO, numvnodes, CTLFLAG_RD, &numvnodes, 0, "Number of vnodes in existence"); +static u_long vnodes_created; +SYSCTL_ULONG(_vfs, OID_AUTO, vnodes_created, CTLFLAG_RD, &vnodes_created, + 0, "Number of vnodes created by getnewvnode"); + /* * Conversion tables for conversion from vnode types to inode formats * and back. @@ -156,6 +160,10 @@ static int vlru_allow_cache_src; SYSCTL_INT(_vfs, OID_AUTO, vlru_allow_cache_src, CTLFLAG_RW, &vlru_allow_cache_src, 0, "Allow vlru to reclaim source vnode"); +static u_long recycles_count; +SYSCTL_ULONG(_vfs, OID_AUTO, recycles, CTLFLAG_RD, &recycles_count, 0, + "Number of vnodes recycled to avoid exceding kern.maxvnodes"); + /* * Various variables used for debugging the new implementation of * reassignbuf(). @@ -788,6 +796,7 @@ vlrureclaim(struct mount *mp) } KASSERT((vp->v_iflag & VI_DOOMED) == 0, ("VI_DOOMED unexpectedly detected in vlrureclaim()")); + atomic_add_long(&recycles_count, 1); vgonel(vp); VOP_UNLOCK(vp, 0); vdropl(vp); @@ -988,8 +997,10 @@ vtryrecycle(struct vnode *vp) __func__, vp); return (EBUSY); } - if ((vp->v_iflag & VI_DOOMED) == 0) + if ((vp->v_iflag & VI_DOOMED) == 0) { + atomic_add_long(&recycles_count, 1); vgonel(vp); + } VOP_UNLOCK(vp, LK_INTERLOCK); vn_finished_write(vnmp); return (0); @@ -1093,6 +1104,7 @@ getnewvnode(const char *tag, struct moun atomic_add_long(&numvnodes, 1); mtx_unlock(&vnode_free_list_mtx); alloc: + atomic_add_long(&vnodes_created, 1); vp = (struct vnode *) uma_zalloc(vnode_zone, M_WAITOK|M_ZERO); /* * Setup locks. From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 15:37:26 2015 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 E25409D1; Tue, 31 Mar 2015 15:37: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 B4D166E5; Tue, 31 Mar 2015 15:37: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 t2VFbQj9054100; Tue, 31 Mar 2015 15:37:26 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2VFbQLH054099; Tue, 31 Mar 2015 15:37:26 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201503311537.t2VFbQLH054099@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 31 Mar 2015 15:37:26 +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: r280912 - in stable: 10/sys/kern 9/sys/kern 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, 31 Mar 2015 15:37:27 -0000 Author: jhb Date: Tue Mar 31 15:37:24 2015 New Revision: 280912 URL: https://svnweb.freebsd.org/changeset/base/280912 Log: MFC 278760: Add two new counters for vnode life cycle events: - vfs.recycles counts the number of vnodes forcefully recycled to avoid exceeding kern.maxvnodes. - vfs.vnodes_created counts the number of vnodes created by successful calls to getnewvnode(). Modified: stable/9/sys/kern/vfs_subr.c Directory Properties: stable/9/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/kern/vfs_subr.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/kern/vfs_subr.c ============================================================================== --- stable/9/sys/kern/vfs_subr.c Tue Mar 31 15:03:58 2015 (r280911) +++ stable/9/sys/kern/vfs_subr.c Tue Mar 31 15:37:24 2015 (r280912) @@ -123,6 +123,10 @@ static unsigned long numvnodes; SYSCTL_ULONG(_vfs, OID_AUTO, numvnodes, CTLFLAG_RD, &numvnodes, 0, "Number of vnodes in existence"); +static u_long vnodes_created; +SYSCTL_ULONG(_vfs, OID_AUTO, vnodes_created, CTLFLAG_RD, &vnodes_created, + 0, "Number of vnodes created by getnewvnode"); + /* * Conversion tables for conversion from vnode types to inode formats * and back. @@ -157,6 +161,10 @@ static int vlru_allow_cache_src; SYSCTL_INT(_vfs, OID_AUTO, vlru_allow_cache_src, CTLFLAG_RW, &vlru_allow_cache_src, 0, "Allow vlru to reclaim source vnode"); +static u_long recycles_count; +SYSCTL_ULONG(_vfs, OID_AUTO, recycles, CTLFLAG_RD, &recycles_count, 0, + "Number of vnodes recycled to avoid exceding kern.maxvnodes"); + /* * Various variables used for debugging the new implementation of * reassignbuf(). @@ -769,6 +777,7 @@ vlrureclaim(struct mount *mp) } KASSERT((vp->v_iflag & VI_DOOMED) == 0, ("VI_DOOMED unexpectedly detected in vlrureclaim()")); + atomic_add_long(&recycles_count, 1); vgonel(vp); VOP_UNLOCK(vp, 0); vdropl(vp); @@ -964,8 +973,10 @@ vtryrecycle(struct vnode *vp) __func__, vp); return (EBUSY); } - if ((vp->v_iflag & VI_DOOMED) == 0) + if ((vp->v_iflag & VI_DOOMED) == 0) { + atomic_add_long(&recycles_count, 1); vgonel(vp); + } VOP_UNLOCK(vp, LK_INTERLOCK); vn_finished_write(vnmp); return (0); @@ -1069,6 +1080,7 @@ getnewvnode(const char *tag, struct moun atomic_add_long(&numvnodes, 1); mtx_unlock(&vnode_free_list_mtx); alloc: + atomic_add_long(&vnodes_created, 1); vp = (struct vnode *) uma_zalloc(vnode_zone, M_WAITOK|M_ZERO); /* * Setup locks. From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 16:02:28 2015 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 7DF32949; Tue, 31 Mar 2015 16:02:28 +0000 (UTC) Received: from smtp.vangyzen.net (hotblack.vangyzen.net [IPv6:2607:fc50:1000:7400:216:3eff:fe72:314f]) by mx1.freebsd.org (Postfix) with ESMTP id 5D391A86; Tue, 31 Mar 2015 16:02:28 +0000 (UTC) Received: from marvin.lab.vangyzen.net (c-73-147-253-17.hsd1.va.comcast.net [73.147.253.17]) by smtp.vangyzen.net (Postfix) with ESMTPSA id 2F93256467; Tue, 31 Mar 2015 11:02:27 -0500 (CDT) Message-ID: <551AC4BF.40106@FreeBSD.org> Date: Tue, 31 Mar 2015 12:01:03 -0400 From: Eric van Gyzen User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: John Baldwin , Randall Stewart Subject: Re: svn commit: r280785 - in head/sys: kern netgraph/atm/sscop netgraph/atm/uni sys References: <201503281250.t2SCoOkt020297@svn.freebsd.org> <32487399.PTq7ESkWJT@ralph.baldwin.cx> <26047F0C-A975-4DAC-9077-31B5EC4902DA@netflix.com> <5710983.pHS9DoOdY8@ralph.baldwin.cx> In-Reply-To: <5710983.pHS9DoOdY8@ralph.baldwin.cx> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Cc: svn-src-head@freebsd.org, Randall Stewart , 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, 31 Mar 2015 16:02:28 -0000 >> Now as to the >> >> -1 -> NOCPU >> >> This is like pulling on a string on your sweater.. the only sensible solution that >> I could come up with after chatting with Lawrence is to add >> #include >> to everyone that uses the callout.h and does not have it already… (putting it into callout.h does not work) .. sigh.. >> >> Now for this cosmetic change I end up with the following changes (and as yet I have >> not built LINT or universe so there may be more).. I have spent about 2 hours on this >> so far and I can at least build a kernel with the change for amd64 :-0 >> >> Here is what has to change, do you really think that this is worth it? >> >> Note I did not look into moving NOCPU in proc.h it says it means no CPU is present >> which is sort of the meaning we want.. I am not sure if the define could be moved .. but >> that too may be yet another string... >> >> Is this worth it, or do you have another idea on how best to do this??? > > Ugh. :( I guess leave it at -1 for now. If you leave it as -1, you might add a /* NOCPU */ comment, for the sake of grep. (This could be a lost cause, for all I know, but it can't hurt.) > Another alternative would be to > move NOCPU to (at least for the kernel) if bde@ would allow it. > I don't think changing all those files is appropriate. > > (Also, seems like an odd place for NOCPU now, it should really be > in if not param.h. I understand why it was first added in proc.h, > but it is now used in many more places than just td_oncpu.) +1 Eric From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 16:17:29 2015 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 A5B87A0; Tue, 31 Mar 2015 16:17:29 +0000 (UTC) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps1.elischer.org", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 7CE1AC59; Tue, 31 Mar 2015 16:17:29 +0000 (UTC) Received: from Julian-MBP3.local (ppp121-45-255-201.lns20.per4.internode.on.net [121.45.255.201]) (authenticated bits=0) by vps1.elischer.org (8.14.9/8.14.9) with ESMTP id t2VGHI6R019853 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Tue, 31 Mar 2015 09:17:23 -0700 (PDT) (envelope-from julian@freebsd.org) Message-ID: <551AC889.2020708@freebsd.org> Date: Wed, 01 Apr 2015 00:17:13 +0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Randall Stewart , John Baldwin Subject: Re: svn commit: r280785 - in head/sys: kern netgraph/atm/sscop netgraph/atm/uni sys References: <201503281250.t2SCoOkt020297@svn.freebsd.org> <32487399.PTq7ESkWJT@ralph.baldwin.cx> <26047F0C-A975-4DAC-9077-31B5EC4902DA@netflix.com> In-Reply-To: <26047F0C-A975-4DAC-9077-31B5EC4902DA@netflix.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: svn-src-head@freebsd.org, Randall Stewart , 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, 31 Mar 2015 16:17:29 -0000 On 3/31/15 8:26 AM, Randall Stewart wrote: > > On Mar 30, 2015, at 9:16 AM, John Baldwin > wrote: > >> On Saturday, March 28, 2015 12:50:24 PM Randall Stewart wrote: >>> Author: rrs >>> Date: Sat Mar 28 12:50:24 2015 >>> New Revision: 280785 >>> URL: https://svnweb.freebsd.org/changeset/base/280785 >>> >>> Log: >>> Change the callout to supply -1 to indicate we are not changing >>> CPU, also add protection against invalid CPU's as well as >>> split c_flags and c_iflags so that if a user plays with the active >>> flag (the one expected to be played with by callers in MPSAFE) >>> without >>> a lock, it won't adversely affect the callout system by causing a >>> corrupt >>> list. This also means that all callers need to use the macros and >>> *not* >>> play with the falgs directly (like netgraph used to). >>> >>> Differential Revision: htts://reviews.freebsd.org/D1894 >>> Reviewed by: .. timed out but looked at by jhb, imp, adrian hselasky >>> tested by hiren and netflix. >>> Sponsored by:Netflix Inc. >> >> Please use NOCPU rather than -1 directly for the CPU field when not >> moving a callout. >> > > John: > > I have made *all* of your suggested changes, adopting the comments and > moving migration to kern_timeout.c.. thanks.. > > Now as to the > > -1 -> NOCPU > > This is like pulling on a string on your sweater.. the only sensible > solution that > I could come up with after chatting with Lawrence is to add > #include > to everyone that uses the callout.h and does not have it already… > (putting it into callout.h does not work) .. sigh.. > > Now for this cosmetic change I end up with the following changes > (and as yet I have > not built LINT or universe so there may be more).. I have spent > about 2 hours on this > so far and I can at least build a kernel with the change for amd64 :-0 > > Here is what has to change, do you really think that this is worth it? > > Note I did not look into moving NOCPU in proc.h it says it means no > CPU is present > which is sort of the meaning we want.. I am not sure if the define > could be moved .. but > that too may be yet another string... sounds like NOCPU should be defined somewhere else. > > Is this worth it, or do you have another idea on how best to do this??? > > R > > ------ From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 16:19:44 2015 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 17E1B217; Tue, 31 Mar 2015 16:19:44 +0000 (UTC) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps1.elischer.org", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id BDBF0C74; Tue, 31 Mar 2015 16:19:43 +0000 (UTC) Received: from Julian-MBP3.local (ppp121-45-255-201.lns20.per4.internode.on.net [121.45.255.201]) (authenticated bits=0) by vps1.elischer.org (8.14.9/8.14.9) with ESMTP id t2VGJW3w019861 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Tue, 31 Mar 2015 09:19:38 -0700 (PDT) (envelope-from julian@freebsd.org) Message-ID: <551AC90E.3070109@freebsd.org> Date: Wed, 01 Apr 2015 00:19:26 +0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Eric van Gyzen , John Baldwin , Randall Stewart Subject: Re: svn commit: r280785 - in head/sys: kern netgraph/atm/sscop netgraph/atm/uni sys References: <201503281250.t2SCoOkt020297@svn.freebsd.org> <32487399.PTq7ESkWJT@ralph.baldwin.cx> <26047F0C-A975-4DAC-9077-31B5EC4902DA@netflix.com> <5710983.pHS9DoOdY8@ralph.baldwin.cx> <551AC4BF.40106@FreeBSD.org> In-Reply-To: <551AC4BF.40106@FreeBSD.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Cc: svn-src-head@freebsd.org, Randall Stewart , 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, 31 Mar 2015 16:19:44 -0000 On 4/1/15 12:01 AM, Eric van Gyzen wrote: >>> Now as to the >>> >>> -1 -> NOCPU >>> >>> This is like pulling on a string on your sweater.. the only sensible solution that >>> I could come up with after chatting with Lawrence is to add >>> #include >>> to everyone that uses the callout.h and does not have it already… (putting it into callout.h does not work) .. sigh.. >>> >>> Now for this cosmetic change I end up with the following changes (and as yet I have >>> not built LINT or universe so there may be more).. I have spent about 2 hours on this >>> so far and I can at least build a kernel with the change for amd64 :-0 >>> >>> Here is what has to change, do you really think that this is worth it? >>> >>> Note I did not look into moving NOCPU in proc.h it says it means no CPU is present >>> which is sort of the meaning we want.. I am not sure if the define could be moved .. but >>> that too may be yet another string... >>> >>> Is this worth it, or do you have another idea on how best to do this??? >> Ugh. :( I guess leave it at -1 for now. > If you leave it as -1, you might add a /* NOCPU */ comment, for the sake of > grep. (This could be a lost cause, for all I know, but it can't hurt.) > >> Another alternative would be to >> move NOCPU to (at least for the kernel) if bde@ would allow it. >> I don't think changing all those files is appropriate. >> >> (Also, seems like an odd place for NOCPU now, it should really be >> in if not param.h. I understand why it was first added in proc.h, >> but it is now used in many more places than just td_oncpu.) > +1 move it.. I think I may have added it for td_oncpu but I'm not going to look it up. > > Eric > > > From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 16:54:31 2015 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 C3F56DA5; Tue, 31 Mar 2015 16:54:31 +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 8E420172; Tue, 31 Mar 2015 16:54:31 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 24FBFB91F; Tue, 31 Mar 2015 12:54:30 -0400 (EDT) From: John Baldwin To: Konstantin Belousov Subject: Re: svn commit: r280866 - in head/sys: amd64/amd64 i386/i386 Date: Tue, 31 Mar 2015 12:51:04 -0400 Message-ID: <3149031.gmIvmB3vKt@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: <20150331003850.GL2379@kib.kiev.ua> References: <201503302013.t2UKDNCo093442@svn.freebsd.org> <20150331003850.GL2379@kib.kiev.ua> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 31 Mar 2015 12:54:30 -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: Tue, 31 Mar 2015 16:54:32 -0000 On Tuesday, March 31, 2015 03:38:50 AM Konstantin Belousov wrote: > But apparently, that did not helped, and it seems that there are > sporadic reports of Linux having similar issues with x2APIC on simila= r > mobile SandyBridge, which are proof-less charged to BIOS bugs. >=20 > Mostly, my question is, should we increase DELAYS() in addition to > lapic_ipi_wait() timeouts ? Hmm, those delays also come from the MP 1.4 spec. The INIT delay is already quite long (10 ms). The STARTUP delays are more a matter of how long our mpboot code takes to get to the point of incrementing mp_ncpus from my understanding. In the MP spec the delays are only mentioned in the psuedo-code in B.4, not in the text: BSP sends AP an INIT IPI BSP DELAYs (10mSec) If (APIC_VERSION is not an 82489DX) { BSP sends AP a STARTUP IPI BSP DELAYs (200=CE=BCSEC) BSP sends AP a STARTUP IPI BSP DELAYs (200=CE=BCSEC) } BSP verifies synchronization with executing AP Example B-1. Universal Start-up Algorithm Hmm, the SDM also mentions similar delays in Vol3 8.4.4 (Feb 2014 version): 8.4.4.1 Typical BSP Initialization Sequence ... 14. Performs the following operation to set up the BSP to detect the pr= esence of APs in the system and the number of processors: =E2=80=94 Sets the value of the COUNT variable to 1. =E2=80=94 Starts a timer (set for an approximate interval of 100 mi= lliseconds). In the AP BIOS initialization code, the AP will increment the COU= NT variable to indicate its presence. When the timer expires, the B= SP checks the value of the COUNT variable. If the timer expires and= the COUNT variable has not been incremented, no APs are present or so= me error has occurred. 15. Broadcasts an INIT-SIPI-SIPI IPI sequence to the APs to wake them u= p and initialize them: MOV ESI, ICR_LOW; Load address of ICR low dword into ESI. MOV EAX, 000C4500H; Load ICR encoding for broadcast INIT IPI ; to all APs into EAX. MOV [ESI], EAX; Broadcast INIT IPI to all APs ; 10-millisecond delay loop. MOV EAX, 000C46XXH; Load ICR encoding for broadcast SIPI IP ; to all APs into EAX, where xx is the vector computed in step 10= . MOV [ESI], EAX; Broadcast SIPI IPI to all APs ; 200-microsecond delay loop MOV [ESI], EAX; Broadcast second SIPI IPI to all APs ; 200-microsecond delay loop 16. Waits for the timer interrupt. 17. Reads and evaluates the COUNT variable and establishes a processor = count. ... Note that this algorithm specifically refers to BIOS startup and not OS= startup. I can't find any clear mention in the SDM of what the OS is s= upposed to do to bootstrap APs. One bread crumb is that 8.4.3 it implies that = the BIOS should leave APs in a state that requires an INIT during OS bootstrap w= hich implies that OS's have to use INIT as well: 9. While the BSP is executing operating-system boot-strap and start-up = code, the APs remain in the halted state. In this state they will respond = only to INITs, NMIs, and SMIs. They will also respond to snoops and to asser= tions of the STPCLK# pin. Also, I believe that the 100 millisecond timer referred to in step 14 a= bove is a timeout on the entire AP-enumeration process and is the timer waited = for in step 16. It also seems that the BIOS uses broadcast (all-but-self) IPI= s, whereas FreeBSD uses targeted (wake up a single AP at a time) IPIs. I don't really know if we need to increase the delays or not. I have n= o idea what Intel's source for those numbers in the two documents are. I don'= t think I've ever seen a rationale for why they were chosen. BTW, Linux seems to use the equivalent of 100 milliseconds for the lapic_ipi_wait() stage before doing the other delays (see native_safe_apic_wait_icr_idle() for the non-X2APIC case). --=20 John Baldwin From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 18:39:01 2015 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 ED3D81D5; Tue, 31 Mar 2015 18:39:01 +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 54363147; Tue, 31 Mar 2015 18:39:01 +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 t2VIcu0R059217 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Tue, 31 Mar 2015 21:38:56 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t2VIcu0R059217 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t2VIcuTo059216; Tue, 31 Mar 2015 21:38:56 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 31 Mar 2015 21:38:56 +0300 From: Konstantin Belousov To: John Baldwin Subject: Re: svn commit: r280866 - in head/sys: amd64/amd64 i386/i386 Message-ID: <20150331183856.GT2379@kib.kiev.ua> References: <201503302013.t2UKDNCo093442@svn.freebsd.org> <20150331003850.GL2379@kib.kiev.ua> <3149031.gmIvmB3vKt@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3149031.gmIvmB3vKt@ralph.baldwin.cx> 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 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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, 31 Mar 2015 18:39:02 -0000 On Tue, Mar 31, 2015 at 12:51:04PM -0400, John Baldwin wrote: > Also, I believe that the 100 millisecond timer referred to in step 14 above is > a timeout on the entire AP-enumeration process and is the timer waited for in > step 16. It also seems that the BIOS uses broadcast (all-but-self) IPIs, > whereas FreeBSD uses targeted (wake up a single AP at a time) IPIs. Yes, I also noted that when I tried to understand why x2APIC fails in AP startup sequence. > > I don't really know if we need to increase the delays or not. I have no idea > what Intel's source for those numbers in the two documents are. I don't think > I've ever seen a rationale for why they were chosen. It might beia time to run BIST + some sloppiness for the actual initialization code. Intel claims 9.1.2 Processor Built-In Self-Test (BIST) The overhead for performing a BIST varies between processor families. For example, the BIST takes approximately 30 million processor clock periods to execute on the Pentium 4 processor. This clock count is model-specific; Intel reserves the right to change the number of periods for any Intel 64 or IA-32 processor, without notification. > > BTW, Linux seems to use the equivalent of 100 milliseconds for the > lapic_ipi_wait() stage before doing the other delays (see > native_safe_apic_wait_icr_idle() for the non-X2APIC case). My main observation is that we allow almost twice as much time for AP to start in the xAPIC mode vs. x2APIC. But increasing the delays did not helped the machines where it fails. From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 18:50:56 2015 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 339A15F4; Tue, 31 Mar 2015 18:50:56 +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 AF359268; Tue, 31 Mar 2015 18:50:55 +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 t2VIonTE062463 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Tue, 31 Mar 2015 21:50:49 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t2VIonTE062463 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t2VIonL3062456; Tue, 31 Mar 2015 21:50:49 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 31 Mar 2015 21:50:48 +0300 From: Konstantin Belousov To: Bruce Evans Subject: Re: svn commit: r280279 - head/sys/sys Message-ID: <20150331185048.GU2379@kib.kiev.ua> References: <201503201027.t2KAR6Ze053047@svn.freebsd.org> <20150322080015.O955@besplex.bde.org> <20150322093251.GY2379@kib.kiev.ua> <2526359.g5B2nXdKeQ@ralph.baldwin.cx> <20150330172434.GG2379@kib.kiev.ua> <20150331144411.R3908@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150331144411.R3908@besplex.bde.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, John Baldwin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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, 31 Mar 2015 18:50:56 -0000 On Tue, Mar 31, 2015 at 03:49:28PM +1100, Bruce Evans wrote: > It looks a bit overengineered to me. A bit like my function pointers > for the bcopy() family on i386. bcopy() is a bulk operation, so in > theory you can do it much faster by selecting the best available > version at runtime. In practice, the gains were not large and are > too machine-dependent to maintain. It is even harder to get large > gains and maintain them by selecting individual instructions at runtime. > Yes, it is similar to bcopy. The difference in motivation is that the IFUNCs are for features, not for speed. The existing patch already demostrates this WRT self-snoop and different methods of saving FPU state. From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 18:57:39 2015 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 9FE417E7; Tue, 31 Mar 2015 18:57:39 +0000 (UTC) Received: from mail-qg0-x231.google.com (mail-qg0-x231.google.com [IPv6:2607:f8b0:400d:c04::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5DAC0367; Tue, 31 Mar 2015 18:57:39 +0000 (UTC) Received: by qgep97 with SMTP id p97so23253366qge.1; Tue, 31 Mar 2015 11:57:38 -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=N0WHYaFv9usuxcZ/gKNwd+rXyWjpy6sCKD9d9ZucPv0=; b=LWfA6/2YuMKhlXoDuNKDRHiqDSlIEPnpjP5avjlHAip+hbWfaRzgAHIIYUbb/Sg3JE 1i9vjPw3CKH+sUjH52+lyPMK07fmM5/9x/KaBNEpaYpmtGa+ouIzfJU4r+rb6N8mbYuT +nznqbsYWZWb7EauKvn2FI6ArarYxcN0neKgU9sBbWXlrjJ+3+JOnlREwO33QC+VTXGv tlM8f8FzA8K2I8f0awencH+H82CQr/8PHB3bcSr5ajk7QiXQVy4S4nhXmOZu+EW/Pd99 9nv0pnJIrnW+YWZHlB+uJu6oc3zy6FjIglyet8fVqk7SDquW0SFg70IoEpIFy/lNm9xF O/7Q== MIME-Version: 1.0 X-Received: by 10.55.53.137 with SMTP id c131mr17912298qka.102.1427828258528; Tue, 31 Mar 2015 11:57:38 -0700 (PDT) Received: by 10.140.94.99 with HTTP; Tue, 31 Mar 2015 11:57:38 -0700 (PDT) In-Reply-To: <201503301330.t2UDUHpI094651@svn.freebsd.org> References: <201503301330.t2UDUHpI094651@svn.freebsd.org> Date: Tue, 31 Mar 2015 11:57:38 -0700 Message-ID: Subject: Re: svn commit: r280849 - in head: contrib/ntp contrib/ntp/adjtimed contrib/ntp/arlib contrib/ntp/clockstuff contrib/ntp/conf contrib/ntp/html contrib/ntp/html/build contrib/ntp/html/drivers contrib/nt... From: NGie Cooper To: Cy Schubert 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, 31 Mar 2015 18:57:39 -0000 On Mon, Mar 30, 2015 at 6:30 AM, Cy Schubert wrote: > Author: cy > Date: Mon Mar 30 13:30:15 2015 > New Revision: 280849 > URL: https://svnweb.freebsd.org/changeset/base/280849 > > Log: > MFV ntp 4.2.8p1 (r258945, r275970, r276091, r276092, r276093, r278284) > > Thanks to roberto for providing pointers to wedge this into HEAD. > > Approved by: roberto This change broke the build. Please fix :(. From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 19:07:29 2015 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 118CDD7D; Tue, 31 Mar 2015 19:07: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 E7A396B3; Tue, 31 Mar 2015 19:07: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 t2VJ7SXB053918; Tue, 31 Mar 2015 19:07:28 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2VJ7SFF053917; Tue, 31 Mar 2015 19:07:28 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201503311907.t2VJ7SFF053917@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 31 Mar 2015 19:07:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280913 - head/lib/msun/aarch64 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, 31 Mar 2015 19:07:29 -0000 Author: andrew Date: Tue Mar 31 19:07:28 2015 New Revision: 280913 URL: https://svnweb.freebsd.org/changeset/base/280913 Log: Add the fe* symbols to libm for arm64. Sponsored by: The FreeBSD Foundation Added: head/lib/msun/aarch64/fenv.c (contents, props changed) Added: head/lib/msun/aarch64/fenv.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/msun/aarch64/fenv.c Tue Mar 31 19:07:28 2015 (r280913) @@ -0,0 +1,56 @@ +/*- + * Copyright (c) 2004 David Schultz + * Copyright (c) 2013 Andrew Turner + * 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$ + */ + +#define __fenv_static +#include "fenv.h" + +/* + * Hopefully the system ID byte is immutable, so it's valid to use + * this as a default environment. + */ +const fenv_t __fe_dfl_env = 0; + +#ifdef __GNUC_GNU_INLINE__ +#error "This file must be compiled with C99 'inline' semantics" +#endif + +extern inline int feclearexcept(int __excepts); +extern inline int fegetexceptflag(fexcept_t *__flagp, int __excepts); +extern inline int fesetexceptflag(const fexcept_t *__flagp, int __excepts); +extern inline int feraiseexcept(int __excepts); +extern inline int fetestexcept(int __excepts); +extern inline int fegetround(void); +extern inline int fesetround(int __round); +extern inline int fegetenv(fenv_t *__envp); +extern inline int feholdexcept(fenv_t *__envp); +extern inline int fesetenv(const fenv_t *__envp); +extern inline int feupdateenv(const fenv_t *__envp); +extern inline int feenableexcept(int __mask); +extern inline int fedisableexcept(int __mask); +extern inline int fegetexcept(void); From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 19:12:14 2015 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 AAF001F1; Tue, 31 Mar 2015 19:12: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 7C650800; Tue, 31 Mar 2015 19:12: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 t2VJCEP5058645; Tue, 31 Mar 2015 19:12:14 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2VJCEpD058644; Tue, 31 Mar 2015 19:12:14 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201503311912.t2VJCEpD058644@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 31 Mar 2015 19:12:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280914 - head/sbin/md5 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, 31 Mar 2015 19:12:14 -0000 Author: delphij Date: Tue Mar 31 19:12:13 2015 New Revision: 280914 URL: https://svnweb.freebsd.org/changeset/base/280914 Log: Constify. Suggested by: rdivacky MFC after: 2 weeks Modified: head/sbin/md5/md5.c Modified: head/sbin/md5/md5.c ============================================================================== --- head/sbin/md5/md5.c Tue Mar 31 19:07:28 2015 (r280913) +++ head/sbin/md5/md5.c Tue Mar 31 19:12:13 2015 (r280914) @@ -70,11 +70,11 @@ typedef struct Algorithm_t { } Algorithm_t; static void MD5_Update(MD5_CTX *, const unsigned char *, size_t); -static void MDString(Algorithm_t *, const char *); -static void MDTimeTrial(Algorithm_t *); -static void MDTestSuite(Algorithm_t *); -static void MDFilter(Algorithm_t *, int); -static void usage(Algorithm_t *); +static void MDString(const Algorithm_t *, const char *); +static void MDTimeTrial(const Algorithm_t *); +static void MDTestSuite(const Algorithm_t *); +static void MDFilter(const Algorithm_t *, int); +static void usage(const Algorithm_t *); typedef union { MD5_CTX md5; @@ -91,7 +91,7 @@ typedef union { /* algorithm function table */ -static struct Algorithm_t Algorithm[] = { +static const struct Algorithm_t Algorithm[] = { { "md5", "MD5", &MD5TestOutput, (DIGEST_Init*)&MD5Init, (DIGEST_Update*)&MD5_Update, (DIGEST_End*)&MD5End, &MD5Data, &MD5File }, @@ -216,7 +216,7 @@ main(int argc, char *argv[]) * Digests a string and prints the result. */ static void -MDString(Algorithm_t *alg, const char *string) +MDString(const Algorithm_t *alg, const char *string) { size_t len = strlen(string); char buf[HEX_DIGEST_LENGTH]; @@ -240,7 +240,7 @@ MDString(Algorithm_t *alg, const char *s * Measures the time to digest TEST_BLOCK_COUNT TEST_BLOCK_LEN-byte blocks. */ static void -MDTimeTrial(Algorithm_t *alg) +MDTimeTrial(const Algorithm_t *alg) { DIGEST_CTX context; struct rusage before, after; @@ -350,7 +350,7 @@ const char *RIPEMD160_TestOutput[MDTESTC }; static void -MDTestSuite(Algorithm_t *alg) +MDTestSuite(const Algorithm_t *alg) { int i; char buffer[HEX_DIGEST_LENGTH]; @@ -370,7 +370,7 @@ MDTestSuite(Algorithm_t *alg) * Digests the standard input and prints the result. */ static void -MDFilter(Algorithm_t *alg, int tee) +MDFilter(const Algorithm_t *alg, int tee) { DIGEST_CTX context; unsigned int len; @@ -387,7 +387,7 @@ MDFilter(Algorithm_t *alg, int tee) } static void -usage(Algorithm_t *alg) +usage(const Algorithm_t *alg) { fprintf(stderr, "usage: %s [-pqrtx] [-c string] [-s string] [files ...]\n", alg->progname); From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 19:35:33 2015 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 BFB0BD06; Tue, 31 Mar 2015 19:35: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 ABFECA48; Tue, 31 Mar 2015 19:35: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 t2VJZXXD068496; Tue, 31 Mar 2015 19:35:33 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2VJZXhC068495; Tue, 31 Mar 2015 19:35:33 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201503311935.t2VJZXhC068495@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Tue, 31 Mar 2015 19:35:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280915 - head/contrib/ntp/ntpd 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, 31 Mar 2015 19:35:33 -0000 Author: cy Date: Tue Mar 31 19:35:32 2015 New Revision: 280915 URL: https://svnweb.freebsd.org/changeset/base/280915 Log: Fix build. Modified: head/contrib/ntp/ntpd/ntp_parser.y Modified: head/contrib/ntp/ntpd/ntp_parser.y ============================================================================== --- head/contrib/ntp/ntpd/ntp_parser.y Tue Mar 31 19:12:13 2015 (r280914) +++ head/contrib/ntp/ntpd/ntp_parser.y Tue Mar 31 19:35:32 2015 (r280915) @@ -8,8 +8,8 @@ * Copyright (c) 2006 */ -%parse-param {struct FILE_INFO *ip_file} -%lex-param {struct FILE_INFO *ip_file} +%parse-param { struct FILE_INFO *ip_file } +%lex-param { struct FILE_INFO *ip_file } %{ #ifdef HAVE_CONFIG_H From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 19:42:33 2015 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 6B71D227; Tue, 31 Mar 2015 19:42:33 +0000 (UTC) Received: from smtp-out-02.shaw.ca (smtp-out-02.shaw.ca [64.59.136.138]) by mx1.freebsd.org (Postfix) with ESMTP id 14DE2BBD; Tue, 31 Mar 2015 19:42:32 +0000 (UTC) X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.1 cv=UbGOdjJMTOnDdlSKs4VLEv47Nwxh2hlhayjdFxkzNJk= c=1 sm=1 a=BLceEmwcHowA:10 a=ICAaq7hcmGcA:10 a=kj9zAlcOel0A:10 a=hEcWSgSdC89mznESgQJhGw==:17 a=6I5d2MoRAAAA:8 a=BWvPGDcYAAAA:8 a=YxBL1-UpAAAA:8 a=ndOxABPCjEcXHiHL_UEA:9 a=CjuIK1q_8ugA:10 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 Received: from unknown (HELO slippy.cwsent.com) ([24.68.134.59]) by smtp-out-02.shaw.ca with ESMTP; 31 Mar 2015 13:42:30 -0600 Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.14.9/8.14.9) with ESMTP id t2VJgUHT049267; Tue, 31 Mar 2015 12:42:30 -0700 (PDT) (envelope-from Cy.Schubert@komquats.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.14.9/8.14.8/Submit) with ESMTP id t2VJgUXf049264; Tue, 31 Mar 2015 12:42:30 -0700 (PDT) (envelope-from Cy.Schubert@komquats.com) Message-Id: <201503311942.t2VJgUXf049264@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.komquats.com/ To: NGie Cooper Subject: Re: svn commit: r280849 - in head: contrib/ntp contrib/ntp/adjtimed contrib/ntp/arlib contrib/ntp/clockstuff contrib/ntp/conf contrib/ntp/html contrib/ntp/html/build contrib/ntp/html/drivers contrib/nt... In-Reply-To: Message from NGie Cooper of "Tue, 31 Mar 2015 11:57:38 -0700." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 31 Mar 2015 12:42:30 -0700 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Cy Schubert X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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, 31 Mar 2015 19:42:33 -0000 In message , NGie Cooper writes: > On Mon, Mar 30, 2015 at 6:30 AM, Cy Schubert wrote: > > Author: cy > > Date: Mon Mar 30 13:30:15 2015 > > New Revision: 280849 > > URL: https://svnweb.freebsd.org/changeset/base/280849 > > > > Log: > > MFV ntp 4.2.8p1 (r258945, r275970, r276091, r276092, r276093, r278284) > > > > Thanks to roberto for providing pointers to wedge this into HEAD. > > > > Approved by: roberto > > This change broke the build. Please fix :(. > IIRC this is the fix. Index: ntp_parser.y =================================================================== --- ntp_parser.y (revision 280914) +++ ntp_parser.y (revision 280915) @@ -8,8 +8,8 @@ * Copyright (c) 2006 */ -%parse-param {struct FILE_INFO *ip_file} -%lex-param {struct FILE_INFO *ip_file} +%parse-param { struct FILE_INFO *ip_file } +%lex-param { struct FILE_INFO *ip_file } %{ #ifdef HAVE_CONFIG_H -- Cheers, Cy Schubert or FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 19:56:48 2015 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 7A3255BE; Tue, 31 Mar 2015 19:56: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 66A7BD0A; Tue, 31 Mar 2015 19:56: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 t2VJulNj078167; Tue, 31 Mar 2015 19:56:47 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2VJulYW078166; Tue, 31 Mar 2015 19:56:47 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201503311956.t2VJulYW078166@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 31 Mar 2015 19:56:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280916 - 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: Tue, 31 Mar 2015 19:56:48 -0000 Author: delphij Date: Tue Mar 31 19:56:46 2015 New Revision: 280916 URL: https://svnweb.freebsd.org/changeset/base/280916 Log: Add limited to the default restrictions. X-MFC-with: r280849 Modified: head/etc/ntp.conf Modified: head/etc/ntp.conf ============================================================================== --- head/etc/ntp.conf Tue Mar 31 19:35:32 2015 (r280915) +++ head/etc/ntp.conf Tue Mar 31 19:56:46 2015 (r280916) @@ -43,8 +43,8 @@ server 2.freebsd.pool.ntp.org iburst # See http://support.ntp.org/bin/view/Support/AccessRestrictions # for more information. # -restrict default kod nomodify notrap nopeer noquery -restrict -6 default kod nomodify notrap nopeer noquery +restrict default limited kod nomodify notrap nopeer noquery +restrict -6 default limited kod nomodify notrap nopeer noquery # # Alternatively, the following rules would block all unauthorized access. # From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 20:01:52 2015 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 08CD27F0; Tue, 31 Mar 2015 20:01: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 E4E9FDF5; Tue, 31 Mar 2015 20:01: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 t2VK1pqs082484; Tue, 31 Mar 2015 20:01:51 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2VK1cYc082228; Tue, 31 Mar 2015 20:01:38 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201503312001.t2VK1cYc082228@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 31 Mar 2015 20:01:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r280917 - in vendor/elftoolchain/dist: . addr2line ar brandelf common cxxfilt elfcopy elfdump findtextrel ld libdwarf libelf libelftc nm readelf size strings test/libelf/tset/common tes... 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: Tue, 31 Mar 2015 20:01:52 -0000 Author: emaste Date: Tue Mar 31 20:01:37 2015 New Revision: 280917 URL: https://svnweb.freebsd.org/changeset/base/280917 Log: Import ELF toolchain rev 3179 From http://svn.code.sf.net/p/elftoolchain/code Modified: vendor/elftoolchain/dist/INSTALL vendor/elftoolchain/dist/addr2line/addr2line.c vendor/elftoolchain/dist/ar/acplex.l vendor/elftoolchain/dist/ar/acpyacc.y vendor/elftoolchain/dist/ar/ar.c vendor/elftoolchain/dist/ar/read.c vendor/elftoolchain/dist/ar/util.c vendor/elftoolchain/dist/ar/write.c vendor/elftoolchain/dist/brandelf/brandelf.c vendor/elftoolchain/dist/common/_elftc.h vendor/elftoolchain/dist/common/elfdefinitions.h vendor/elftoolchain/dist/common/native-elf-format vendor/elftoolchain/dist/cxxfilt/cxxfilt.c vendor/elftoolchain/dist/elfcopy/archive.c vendor/elftoolchain/dist/elfcopy/ascii.c vendor/elftoolchain/dist/elfcopy/binary.c vendor/elftoolchain/dist/elfcopy/elfcopy.1 vendor/elftoolchain/dist/elfcopy/elfcopy.h vendor/elftoolchain/dist/elfcopy/main.c vendor/elftoolchain/dist/elfcopy/sections.c vendor/elftoolchain/dist/elfcopy/segments.c vendor/elftoolchain/dist/elfcopy/symbols.c vendor/elftoolchain/dist/elfdump/elfdump.c vendor/elftoolchain/dist/findtextrel/findtextrel.c vendor/elftoolchain/dist/ld/ld.h vendor/elftoolchain/dist/libdwarf/_libdwarf.h vendor/elftoolchain/dist/libdwarf/libdwarf.h vendor/elftoolchain/dist/libdwarf/libdwarf_lineno.c vendor/elftoolchain/dist/libelf/_libelf.h vendor/elftoolchain/dist/libelf/_libelf_config.h vendor/elftoolchain/dist/libelf/elf_data.c vendor/elftoolchain/dist/libelf/elf_end.c vendor/elftoolchain/dist/libelf/elf_errmsg.c vendor/elftoolchain/dist/libelf/elf_errno.c vendor/elftoolchain/dist/libelf/elf_fill.c vendor/elftoolchain/dist/libelf/elf_flag.c vendor/elftoolchain/dist/libelf/elf_getarhdr.c vendor/elftoolchain/dist/libelf/elf_getarsym.c vendor/elftoolchain/dist/libelf/elf_getbase.c vendor/elftoolchain/dist/libelf/elf_getident.c vendor/elftoolchain/dist/libelf/elf_hash.c vendor/elftoolchain/dist/libelf/elf_kind.c vendor/elftoolchain/dist/libelf/elf_next.c vendor/elftoolchain/dist/libelf/elf_phnum.c vendor/elftoolchain/dist/libelf/elf_rand.c vendor/elftoolchain/dist/libelf/elf_rawfile.c vendor/elftoolchain/dist/libelf/elf_scn.c vendor/elftoolchain/dist/libelf/elf_shnum.c vendor/elftoolchain/dist/libelf/elf_shstrndx.c vendor/elftoolchain/dist/libelf/elf_version.c vendor/elftoolchain/dist/libelf/gelf.h vendor/elftoolchain/dist/libelf/gelf_cap.c vendor/elftoolchain/dist/libelf/gelf_checksum.c vendor/elftoolchain/dist/libelf/gelf_dyn.c vendor/elftoolchain/dist/libelf/gelf_ehdr.c vendor/elftoolchain/dist/libelf/gelf_fsize.c vendor/elftoolchain/dist/libelf/gelf_getclass.c vendor/elftoolchain/dist/libelf/gelf_move.c vendor/elftoolchain/dist/libelf/gelf_phdr.c vendor/elftoolchain/dist/libelf/gelf_rel.c vendor/elftoolchain/dist/libelf/gelf_rela.c vendor/elftoolchain/dist/libelf/gelf_shdr.c vendor/elftoolchain/dist/libelf/gelf_sym.c vendor/elftoolchain/dist/libelf/gelf_syminfo.c vendor/elftoolchain/dist/libelf/gelf_symshndx.c vendor/elftoolchain/dist/libelf/gelf_xlate.c vendor/elftoolchain/dist/libelf/libelf.h vendor/elftoolchain/dist/libelf/libelf_align.c vendor/elftoolchain/dist/libelf/libelf_allocate.c vendor/elftoolchain/dist/libelf/libelf_ar.c vendor/elftoolchain/dist/libelf/libelf_ar_util.c vendor/elftoolchain/dist/libelf/libelf_checksum.c vendor/elftoolchain/dist/libelf/libelf_convert.m4 vendor/elftoolchain/dist/libelf/libelf_data.c vendor/elftoolchain/dist/libelf/libelf_ehdr.c vendor/elftoolchain/dist/libelf/libelf_extended.c vendor/elftoolchain/dist/libelf/libelf_msize.m4 vendor/elftoolchain/dist/libelf/libelf_phdr.c vendor/elftoolchain/dist/libelf/libelf_shdr.c vendor/elftoolchain/dist/libelf/libelf_xlate.c vendor/elftoolchain/dist/libelftc/_libelftc.h vendor/elftoolchain/dist/libelftc/elftc_bfdtarget.c vendor/elftoolchain/dist/libelftc/elftc_demangle.c vendor/elftoolchain/dist/libelftc/libelftc.h vendor/elftoolchain/dist/libelftc/libelftc_bfdtarget.c vendor/elftoolchain/dist/nm/nm.c vendor/elftoolchain/dist/readelf/readelf.c vendor/elftoolchain/dist/size/size.c vendor/elftoolchain/dist/strings/strings.c vendor/elftoolchain/dist/test/libelf/tset/common/ehdr_template.m4 vendor/elftoolchain/dist/test/libelf/tset/common/gelf_ehdr_template.h vendor/elftoolchain/dist/test/libelf/tset/common/phdr_template.c vendor/elftoolchain/dist/test/libelf/tset/common/xlate_template.c vendor/elftoolchain/dist/test/libelf/tset/elf32_getehdr/ehdr.m4 vendor/elftoolchain/dist/test/libelf/tset/elf32_getphdr/phdr.m4 vendor/elftoolchain/dist/test/libelf/tset/elf32_newehdr/ehdr.m4 vendor/elftoolchain/dist/test/libelf/tset/elf64_getehdr/ehdr.m4 vendor/elftoolchain/dist/test/libelf/tset/elf64_getphdr/phdr.m4 vendor/elftoolchain/dist/test/libelf/tset/elf64_newehdr/ehdr.m4 vendor/elftoolchain/dist/test/libelf/tset/gelf_getehdr/ehdr.m4 vendor/elftoolchain/dist/test/libelf/tset/gelf_newehdr/ehdr.m4 vendor/elftoolchain/dist/test/libelf/tset/gelf_xlate/xlate.m4 Modified: vendor/elftoolchain/dist/INSTALL ============================================================================== --- vendor/elftoolchain/dist/INSTALL Tue Mar 31 19:56:46 2015 (r280916) +++ vendor/elftoolchain/dist/INSTALL Tue Mar 31 20:01:37 2015 (r280917) @@ -171,13 +171,14 @@ Prerequisites ``pmake`` A ``make`` that uses BSD-make syntax. ``python-yaml`` A YAML library for Python. ``sharutils`` For ``uudecode``. + ``zlib1g-dev`` Compression library. =================== ===================================== The following command line may be used to install the necessary pre-requisites:: % sudo apt-get install binutils bison flex gcc libarchive-dev \ - libc6-dev m4 pmake + libc6-dev m4 pmake zlib1g-dev - To build and run the test suite: @@ -211,13 +212,14 @@ Prerequisites ``pmake`` A ``make`` that uses BSD-make syntax. ``python-yaml`` A YAML library for Python. ``sharutils`` For ``uudecode``. + ``zlib1g-dev`` Compression library. =================== ===================================== The following command line may be used to install the necessary pre-requisites:: % sudo apt-get install bison build-essential flex libarchive-dev \ - m4 pmake + m4 pmake zlib1g-dev - To build and run the test suite: @@ -297,7 +299,7 @@ website`_. .. _project website: http://elftoolchain.sourceforge.net/ -.. $Id: INSTALL 3020 2014-04-17 15:52:31Z jkoshy $ +.. $Id: INSTALL 3165 2015-02-20 20:52:18Z emaste $ .. Local Variables: .. mode: rst Modified: vendor/elftoolchain/dist/addr2line/addr2line.c ============================================================================== --- vendor/elftoolchain/dist/addr2line/addr2line.c Tue Mar 31 19:56:46 2015 (r280916) +++ vendor/elftoolchain/dist/addr2line/addr2line.c Tue Mar 31 20:01:37 2015 (r280917) @@ -24,7 +24,6 @@ * SUCH DAMAGE. */ -#include #include #include #include @@ -40,7 +39,7 @@ #include "_elftc.h" -ELFTC_VCSID("$Id: addr2line.c 3148 2015-02-15 18:47:39Z emaste $"); +ELFTC_VCSID("$Id: addr2line.c 3174 2015-03-27 17:13:41Z emaste $"); static struct option longopts[] = { {"target" , required_argument, NULL, 'b'}, Modified: vendor/elftoolchain/dist/ar/acplex.l ============================================================================== --- vendor/elftoolchain/dist/ar/acplex.l Tue Mar 31 19:56:46 2015 (r280916) +++ vendor/elftoolchain/dist/ar/acplex.l Tue Mar 31 20:01:37 2015 (r280917) @@ -25,8 +25,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include - #include #include #include @@ -34,7 +32,7 @@ #include "_elftc.h" -ELFTC_VCSID("$Id: acplex.l 3162 2015-02-15 21:43:41Z emaste $"); +ELFTC_VCSID("$Id: acplex.l 3174 2015-03-27 17:13:41Z emaste $"); #include "acpyacc.h" Modified: vendor/elftoolchain/dist/ar/acpyacc.y ============================================================================== --- vendor/elftoolchain/dist/ar/acpyacc.y Tue Mar 31 19:56:46 2015 (r280916) +++ vendor/elftoolchain/dist/ar/acpyacc.y Tue Mar 31 20:01:37 2015 (r280917) @@ -25,8 +25,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include - #include #include #include Modified: vendor/elftoolchain/dist/ar/ar.c ============================================================================== --- vendor/elftoolchain/dist/ar/ar.c Tue Mar 31 19:56:46 2015 (r280916) +++ vendor/elftoolchain/dist/ar/ar.c Tue Mar 31 20:01:37 2015 (r280917) @@ -58,8 +58,6 @@ * SUCH DAMAGE. */ -#include - #include #include #include @@ -74,7 +72,7 @@ #include "ar.h" -ELFTC_VCSID("$Id: ar.c 2485 2012-04-07 15:54:59Z kaiwang27 $"); +ELFTC_VCSID("$Id: ar.c 3174 2015-03-27 17:13:41Z emaste $"); enum options { Modified: vendor/elftoolchain/dist/ar/read.c ============================================================================== --- vendor/elftoolchain/dist/ar/read.c Tue Mar 31 19:56:46 2015 (r280916) +++ vendor/elftoolchain/dist/ar/read.c Tue Mar 31 20:01:37 2015 (r280917) @@ -25,7 +25,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include #include #include @@ -39,7 +38,7 @@ #include "ar.h" -ELFTC_VCSID("$Id: read.c 3163 2015-02-15 21:43:51Z emaste $"); +ELFTC_VCSID("$Id: read.c 3174 2015-03-27 17:13:41Z emaste $"); /* * Handle read modes: 'x', 't' and 'p'. @@ -175,7 +174,15 @@ ar_read_archive(struct bsdar *bsdar, int if (bsdar->options & AR_V) (void)fprintf(out, "x - %s\n", name); - flags = 0; + /* Disallow absolute paths. */ + if (name[0] == '/') { + bsdar_warnc(bsdar, 0, + "Absolute path '%s'", name); + continue; + } + /* Basic path security flags. */ + flags = ARCHIVE_EXTRACT_SECURE_SYMLINKS | \ + ARCHIVE_EXTRACT_SECURE_NODOTDOT; if (bsdar->options & AR_O) flags |= ARCHIVE_EXTRACT_TIME; Modified: vendor/elftoolchain/dist/ar/util.c ============================================================================== --- vendor/elftoolchain/dist/ar/util.c Tue Mar 31 19:56:46 2015 (r280916) +++ vendor/elftoolchain/dist/ar/util.c Tue Mar 31 20:01:37 2015 (r280917) @@ -24,7 +24,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include #include #include #include @@ -38,7 +37,7 @@ #include "ar.h" -ELFTC_VCSID("$Id: util.c 2130 2011-11-10 06:56:46Z jkoshy $"); +ELFTC_VCSID("$Id: util.c 3174 2015-03-27 17:13:41Z emaste $"); static void bsdar_vwarnc(struct bsdar *, int code, const char *fmt, va_list ap); Modified: vendor/elftoolchain/dist/ar/write.c ============================================================================== --- vendor/elftoolchain/dist/ar/write.c Tue Mar 31 19:56:46 2015 (r280916) +++ vendor/elftoolchain/dist/ar/write.c Tue Mar 31 20:01:37 2015 (r280917) @@ -24,7 +24,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include #include #include @@ -41,7 +40,7 @@ #include "ar.h" -ELFTC_VCSID("$Id: write.c 3102 2014-10-29 21:09:01Z jkoshy $"); +ELFTC_VCSID("$Id: write.c 3174 2015-03-27 17:13:41Z emaste $"); #define _ARMAG_LEN 8 /* length of the magic string */ #define _ARHDR_LEN 60 /* length of the archive header */ Modified: vendor/elftoolchain/dist/brandelf/brandelf.c ============================================================================== --- vendor/elftoolchain/dist/brandelf/brandelf.c Tue Mar 31 19:56:46 2015 (r280916) +++ vendor/elftoolchain/dist/brandelf/brandelf.c Tue Mar 31 20:01:37 2015 (r280917) @@ -28,8 +28,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include - #include #include #include @@ -46,7 +44,7 @@ #include "_elftc.h" -ELFTC_VCSID("$Id: brandelf.c 3101 2014-10-27 22:24:40Z jkoshy $"); +ELFTC_VCSID("$Id: brandelf.c 3174 2015-03-27 17:13:41Z emaste $"); static int elftype(const char *); static const char *iselftype(int); Modified: vendor/elftoolchain/dist/common/_elftc.h ============================================================================== --- vendor/elftoolchain/dist/common/_elftc.h Tue Mar 31 19:56:46 2015 (r280916) +++ vendor/elftoolchain/dist/common/_elftc.h Tue Mar 31 20:01:37 2015 (r280917) @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: _elftc.h 3139 2015-01-05 03:17:06Z kaiwang27 $ + * $Id: _elftc.h 3175 2015-03-27 17:21:24Z emaste $ */ /** @@ -294,7 +294,8 @@ struct name { \ #define ELFTC_VCSID(ID) __FBSDID(ID) #endif -#if defined(__linux__) || defined(__GNU__) || defined(__GLIBC__) +#if defined(__APPLE__) || defined(__GLIBC__) || defined(__GNU__) || \ + defined(__linux__) #if defined(__GNUC__) #define ELFTC_VCSID(ID) __asm__(".ident\t\"" ID "\"") #else @@ -330,8 +331,8 @@ struct name { \ #ifndef ELFTC_GETPROGNAME -#if defined(__DragonFly__) || defined(__FreeBSD__) || defined(__minix) || \ - defined(__NetBSD__) +#if defined(__APPLE__) || defined(__DragonFly__) || defined(__FreeBSD__) || \ + defined(__minix) || defined(__NetBSD__) #include @@ -340,7 +341,7 @@ struct name { \ #endif /* __DragonFly__ || __FreeBSD__ || __minix || __NetBSD__ */ -#if defined(__GLIBC__) +#if defined(__GLIBC__) || defined(__linux__) /* * GLIBC based systems have a global 'char *' pointer referencing @@ -350,7 +351,7 @@ extern const char *program_invocation_sh #define ELFTC_GETPROGNAME() program_invocation_short_name -#endif /* __GLIBC__ */ +#endif /* __GLIBC__ || __linux__ */ #if defined(__OpenBSD__) @@ -368,6 +369,21 @@ extern const char *__progname; ** Per-OS configuration. **/ +#if defined(__APPLE__) + +#include +#define roundup2 roundup + +#define ELFTC_BYTE_ORDER _BYTE_ORDER +#define ELFTC_BYTE_ORDER_LITTLE_ENDIAN _LITTLE_ENDIAN +#define ELFTC_BYTE_ORDER_BIG_ENDIAN _BIG_ENDIAN + +#define ELFTC_HAVE_MMAP 1 +#define ELFTC_HAVE_STRMODE 1 + +#endif /* __APPLE__ */ + + #if defined(__DragonFly__) #include @@ -381,7 +397,7 @@ extern const char *__progname; #endif -#if defined(__GLIBC__) +#if defined(__GLIBC__) || defined(__linux__) #include @@ -401,7 +417,7 @@ extern const char *__progname; #define roundup2 roundup -#endif /* __GLIBC__ */ +#endif /* __GLIBC__ || __linux__ */ #if defined(__FreeBSD__) Modified: vendor/elftoolchain/dist/common/elfdefinitions.h ============================================================================== --- vendor/elftoolchain/dist/common/elfdefinitions.h Tue Mar 31 19:56:46 2015 (r280916) +++ vendor/elftoolchain/dist/common/elfdefinitions.h Tue Mar 31 20:01:37 2015 (r280917) @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: elfdefinitions.h 3149 2015-02-15 19:00:06Z emaste $ + * $Id: elfdefinitions.h 3178 2015-03-30 18:29:13Z emaste $ */ /* @@ -171,7 +171,7 @@ _ELF_DEFINE_DT(DT_MOVEENT, 0x6F "size of DT_MOVETAB entries") \ _ELF_DEFINE_DT(DT_MOVESZ, 0x6FFFFDFBUL, \ "total size of the MOVETAB table") \ -_ELF_DEFINE_DT(DT_FEATURE_1, 0x6FFFFDFCUL, "feature values") \ +_ELF_DEFINE_DT(DT_FEATURE, 0x6FFFFDFCUL, "feature values") \ _ELF_DEFINE_DT(DT_POSFLAG_1, 0x6FFFFDFDUL, \ "dynamic position flags") \ _ELF_DEFINE_DT(DT_SYMINSZ, 0x6FFFFDFEUL, \ Modified: vendor/elftoolchain/dist/common/native-elf-format ============================================================================== --- vendor/elftoolchain/dist/common/native-elf-format Tue Mar 31 19:56:46 2015 (r280916) +++ vendor/elftoolchain/dist/common/native-elf-format Tue Mar 31 20:01:37 2015 (r280917) @@ -1,6 +1,6 @@ #!/bin/sh # -# $Id: native-elf-format 2064 2011-10-26 15:12:32Z jkoshy $ +# $Id: native-elf-format 3167 2015-02-24 19:10:08Z emaste $ # # Find the native ELF format for a host platform by compiling a # test object and examining the resulting object. @@ -19,7 +19,7 @@ touch ${tmp_c} echo "/* Generated by ${program} on `date` */" cc -c ${tmp_c} -o ${tmp_o} -readelf -h ${tmp_o} | awk ' +LC_ALL=C readelf -h ${tmp_o} | awk ' $1 ~ "Class:" { sub("ELF","",$2); elfclass = $2; } Modified: vendor/elftoolchain/dist/cxxfilt/cxxfilt.c ============================================================================== --- vendor/elftoolchain/dist/cxxfilt/cxxfilt.c Tue Mar 31 19:56:46 2015 (r280916) +++ vendor/elftoolchain/dist/cxxfilt/cxxfilt.c Tue Mar 31 20:01:37 2015 (r280917) @@ -24,7 +24,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include #include #include #include @@ -36,7 +35,7 @@ #include "_elftc.h" -ELFTC_VCSID("$Id: cxxfilt.c 2185 2011-11-19 16:07:16Z jkoshy $"); +ELFTC_VCSID("$Id: cxxfilt.c 3174 2015-03-27 17:13:41Z emaste $"); #define STRBUFSZ 8192 Modified: vendor/elftoolchain/dist/elfcopy/archive.c ============================================================================== --- vendor/elftoolchain/dist/elfcopy/archive.c Tue Mar 31 19:56:46 2015 (r280916) +++ vendor/elftoolchain/dist/elfcopy/archive.c Tue Mar 31 20:01:37 2015 (r280917) @@ -24,8 +24,6 @@ * SUCH DAMAGE. */ -#include - #include #include #include @@ -40,7 +38,7 @@ #include "elfcopy.h" -ELFTC_VCSID("$Id: archive.c 3102 2014-10-29 21:09:01Z jkoshy $"); +ELFTC_VCSID("$Id: archive.c 3174 2015-03-27 17:13:41Z emaste $"); #define _ARMAG_LEN 8 /* length of ar magic string */ #define _ARHDR_LEN 60 /* length of ar header */ Modified: vendor/elftoolchain/dist/elfcopy/ascii.c ============================================================================== --- vendor/elftoolchain/dist/elfcopy/ascii.c Tue Mar 31 19:56:46 2015 (r280916) +++ vendor/elftoolchain/dist/elfcopy/ascii.c Tue Mar 31 20:01:37 2015 (r280917) @@ -24,11 +24,11 @@ * SUCH DAMAGE. */ -#include #include #include #include #include +#include #include #include #include @@ -36,7 +36,7 @@ #include "elfcopy.h" -ELFTC_VCSID("$Id: ascii.c 2358 2011-12-19 18:22:32Z kaiwang27 $"); +ELFTC_VCSID("$Id: ascii.c 3177 2015-03-30 18:19:41Z emaste $"); static void append_data(struct section *s, const void *buf, size_t sz); static char hex_digit(uint8_t n); Modified: vendor/elftoolchain/dist/elfcopy/binary.c ============================================================================== --- vendor/elftoolchain/dist/elfcopy/binary.c Tue Mar 31 19:56:46 2015 (r280916) +++ vendor/elftoolchain/dist/elfcopy/binary.c Tue Mar 31 20:01:37 2015 (r280917) @@ -24,7 +24,6 @@ * SUCH DAMAGE. */ -#include #include #include #include @@ -36,7 +35,7 @@ #include "elfcopy.h" -ELFTC_VCSID("$Id: binary.c 2358 2011-12-19 18:22:32Z kaiwang27 $"); +ELFTC_VCSID("$Id: binary.c 3174 2015-03-27 17:13:41Z emaste $"); /* * Convert ELF object to `binary'. Sections with SHF_ALLOC flag set Modified: vendor/elftoolchain/dist/elfcopy/elfcopy.1 ============================================================================== --- vendor/elftoolchain/dist/elfcopy/elfcopy.1 Tue Mar 31 19:56:46 2015 (r280916) +++ vendor/elftoolchain/dist/elfcopy/elfcopy.1 Tue Mar 31 20:01:37 2015 (r280917) @@ -21,9 +21,9 @@ .\" out of the use of this software, even if advised of the possibility of .\" such damage. .\" -.\" $Id: elfcopy.1 2373 2011-12-30 07:13:44Z jkoshy $ +.\" $Id: elfcopy.1 3173 2015-03-27 16:46:13Z emaste $ .\" -.Dd October 03, 2011 +.Dd March 27, 2015 .Os .Dt ELFCOPY 1 .Sh NAME @@ -63,7 +63,9 @@ .Op Fl -adjust-warnings | Fl -change-warnings .Op Fl -change-section-lma Ar section Ns {+|-|=} Ns Ar val .Op Fl -change-section-vma Ar section Ns {+|-|=} Ns Ar val +.Op Fl -extract-dwo .Op Fl -gap-fill Ns = Ns Ar val +.Op Fl -localize-hidden .Op Fl -no-adjust-warnings | Fl -no-change-warnings .Op Fl -only-keep-debug .Op Fl -pad-to Ns = Ns Ar address @@ -75,6 +77,7 @@ .Op Fl -set-start Ns = Ns Ar address .Op Fl -srec-forceS3 .Op Fl -srec-len Ns = Ns Ar val +.Op Fl -strip-dwo .Op Fl -strip-unneeded .Ar infile .Op Ar outfile @@ -220,10 +223,15 @@ Depending on the operator specified, the .Ar val will be used as an increment, a decrement or as the new value of the virtual memory address. +.It Fl -extract-dwo +Copy only .dwo debug sections to the output file. .It Fl -gap-fill Ns = Ns Ar val Fill the gaps between sections with the byte value specified by the argument .Ar val . +.It Fl -localize-hidden +Make all hidden symbols local to the output file. +This includes symbols with internal visiblity. .It Fl -no-adjust-warnings | Fl -no-change-warnings Do not issue a warning if the section specified by the options .Fl -change-section-address , @@ -304,6 +312,8 @@ Set the maximum length of an S-record li .Ar val . This option is only meaningful when the output target is set to .Dq srec . +.It Fl -strip-dwo +Do not copy .dwo debug sections to the output file. .It Fl -strip-unneeded Do not copy symbols that are not needed for relocation processing. .El Modified: vendor/elftoolchain/dist/elfcopy/elfcopy.h ============================================================================== --- vendor/elftoolchain/dist/elfcopy/elfcopy.h Tue Mar 31 19:56:46 2015 (r280916) +++ vendor/elftoolchain/dist/elfcopy/elfcopy.h Tue Mar 31 20:01:37 2015 (r280917) @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: elfcopy.h 3134 2014-12-23 10:43:59Z kaiwang27 $ + * $Id: elfcopy.h 3173 2015-03-27 16:46:13Z emaste $ */ #include @@ -190,7 +190,9 @@ struct elfcopy { STRIP_NONE = 0, STRIP_ALL, STRIP_DEBUG, + STRIP_DWO, STRIP_NONDEBUG, + STRIP_NONDWO, STRIP_UNNEEDED } strip; @@ -216,6 +218,7 @@ struct elfcopy { #define SEC_REMOVE 0x00800000U #define SEC_COPY 0x01000000U #define DISCARD_LLABEL 0x02000000U +#define LOCALIZE_HIDDEN 0x04000000U int flags; /* elfcopy run control flags. */ int64_t change_addr; /* Section address adjustment. */ Modified: vendor/elftoolchain/dist/elfcopy/main.c ============================================================================== --- vendor/elftoolchain/dist/elfcopy/main.c Tue Mar 31 19:56:46 2015 (r280916) +++ vendor/elftoolchain/dist/elfcopy/main.c Tue Mar 31 20:01:37 2015 (r280917) @@ -24,7 +24,6 @@ * SUCH DAMAGE. */ -#include #include #include @@ -40,7 +39,7 @@ #include "elfcopy.h" -ELFTC_VCSID("$Id: main.c 3156 2015-02-15 21:40:01Z emaste $"); +ELFTC_VCSID("$Id: main.c 3174 2015-03-27 17:13:41Z emaste $"); enum options { @@ -57,9 +56,11 @@ enum options ECP_GLOBALIZE_SYMBOLS, ECP_KEEP_SYMBOLS, ECP_KEEP_GLOBAL_SYMBOLS, + ECP_LOCALIZE_HIDDEN, ECP_LOCALIZE_SYMBOLS, ECP_NO_CHANGE_WARN, ECP_ONLY_DEBUG, + ECP_ONLY_DWO, ECP_PAD_TO, ECP_PREFIX_ALLOC, ECP_PREFIX_SEC, @@ -72,6 +73,7 @@ enum options ECP_SET_START, ECP_SREC_FORCE_S3, ECP_SREC_LEN, + ECP_STRIP_DWO, ECP_STRIP_SYMBOLS, ECP_STRIP_UNNEEDED, ECP_WEAKEN_ALL, @@ -124,6 +126,7 @@ static struct option elfcopy_longopts[] {"change-warnings", no_argument, NULL, ECP_CHANGE_WARN}, {"discard-all", no_argument, NULL, 'x'}, {"discard-locals", no_argument, NULL, 'X'}, + {"extract-dwo", no_argument, NULL, ECP_ONLY_DWO}, {"gap-fill", required_argument, NULL, ECP_GAP_FILL}, {"globalize-symbol", required_argument, NULL, ECP_GLOBALIZE_SYMBOL}, {"globalize-symbols", required_argument, NULL, ECP_GLOBALIZE_SYMBOLS}, @@ -134,6 +137,7 @@ static struct option elfcopy_longopts[] {"keep-global-symbol", required_argument, NULL, 'G'}, {"keep-global-symbols", required_argument, NULL, ECP_KEEP_GLOBAL_SYMBOLS}, + {"localize-hidden", no_argument, NULL, ECP_LOCALIZE_HIDDEN}, {"localize-symbol", required_argument, NULL, 'L'}, {"localize-symbols", required_argument, NULL, ECP_LOCALIZE_SYMBOLS}, {"no-adjust-warnings", no_argument, NULL, ECP_NO_CHANGE_WARN}, @@ -157,6 +161,7 @@ static struct option elfcopy_longopts[] {"srec-len", required_argument, NULL, ECP_SREC_LEN}, {"strip-all", no_argument, NULL, 'S'}, {"strip-debug", no_argument, 0, 'g'}, + {"strip-dwo", no_argument, NULL, ECP_STRIP_DWO}, {"strip-symbol", required_argument, NULL, 'N'}, {"strip-symbols", required_argument, NULL, ECP_STRIP_SYMBOLS}, {"strip-unneeded", no_argument, NULL, ECP_STRIP_UNNEEDED}, @@ -348,6 +353,7 @@ create_elf(struct elfcopy *ecp) if (ecp->strip == STRIP_DEBUG || ecp->strip == STRIP_UNNEEDED || ecp->flags & WEAKEN_ALL || + ecp->flags & LOCALIZE_HIDDEN || ecp->flags & DISCARD_LOCAL || ecp->flags & DISCARD_LLABEL || ecp->prefix_sym != NULL || @@ -870,6 +876,9 @@ elfcopy_main(struct elfcopy *ecp, int ar case ECP_KEEP_GLOBAL_SYMBOLS: parse_symlist_file(ecp, optarg, SYMOP_KEEPG); break; + case ECP_LOCALIZE_HIDDEN: + ecp->flags |= LOCALIZE_HIDDEN; + break; case ECP_LOCALIZE_SYMBOLS: parse_symlist_file(ecp, optarg, SYMOP_LOCALIZE); break; @@ -879,6 +888,9 @@ elfcopy_main(struct elfcopy *ecp, int ar case ECP_ONLY_DEBUG: ecp->strip = STRIP_NONDEBUG; break; + case ECP_ONLY_DWO: + ecp->strip = STRIP_NONDWO; + break; case ECP_PAD_TO: ecp->pad_to = (uint64_t) strtoull(optarg, NULL, 0); break; @@ -939,6 +951,9 @@ elfcopy_main(struct elfcopy *ecp, int ar ecp->flags |= SREC_FORCE_LEN; ecp->srec_len = strtoul(optarg, NULL, 0); break; + case ECP_STRIP_DWO: + ecp->strip = STRIP_DWO; + break; case ECP_STRIP_SYMBOLS: parse_symlist_file(ecp, optarg, SYMOP_STRIP); break; @@ -1379,6 +1394,8 @@ Usage: %s [options] infile [outfile]\n\ section by VAL.\n\ --gap-fill=VAL Fill the gaps between sections with bytes\n\ of value VAL.\n\ + --localize-hidden Make all hidden symbols local to the output\n\ + file.\n\ --no-adjust-warning| --no-change-warnings\n\ Do not issue warnings for non-existent\n\ sections.\n\ Modified: vendor/elftoolchain/dist/elfcopy/sections.c ============================================================================== --- vendor/elftoolchain/dist/elfcopy/sections.c Tue Mar 31 19:56:46 2015 (r280916) +++ vendor/elftoolchain/dist/elfcopy/sections.c Tue Mar 31 20:01:37 2015 (r280917) @@ -24,7 +24,6 @@ * SUCH DAMAGE. */ -#include #include #include #include @@ -35,7 +34,7 @@ #include "elfcopy.h" -ELFTC_VCSID("$Id: sections.c 3150 2015-02-15 19:07:46Z emaste $"); +ELFTC_VCSID("$Id: sections.c 3174 2015-03-27 17:13:41Z emaste $"); static void add_gnu_debuglink(struct elfcopy *ecp); static uint32_t calc_crc32(const char *p, size_t len, uint32_t crc); @@ -47,6 +46,7 @@ static void insert_to_strtab(struct sect static int is_append_section(struct elfcopy *ecp, const char *name); static int is_compress_section(struct elfcopy *ecp, const char *name); static int is_debug_section(const char *name); +static int is_dwo_section(const char *name); static int is_modify_section(struct elfcopy *ecp, const char *name); static int is_print_section(struct elfcopy *ecp, const char *name); static int lookup_string(struct section *t, const char *s); @@ -73,6 +73,11 @@ is_remove_section(struct elfcopy *ecp, c return (0); } + if (ecp->strip == STRIP_DWO && is_dwo_section(name)) + return (1); + if (ecp->strip == STRIP_NONDWO && !is_dwo_section(name)) + return (1); + if (is_debug_section(name)) { if (ecp->strip == STRIP_ALL || ecp->strip == STRIP_DEBUG || @@ -234,6 +239,16 @@ is_debug_section(const char *name) } static int +is_dwo_section(const char *name) +{ + size_t len; + + if ((len = strlen(name)) > 4 && strcmp(name + len - 4, ".dwo") == 0) + return (1); + return (0); +} + +static int is_print_section(struct elfcopy *ecp, const char *name) { struct sec_action *sac; Modified: vendor/elftoolchain/dist/elfcopy/segments.c ============================================================================== --- vendor/elftoolchain/dist/elfcopy/segments.c Tue Mar 31 19:56:46 2015 (r280916) +++ vendor/elftoolchain/dist/elfcopy/segments.c Tue Mar 31 20:01:37 2015 (r280917) @@ -24,17 +24,17 @@ * SUCH DAMAGE. */ -#include #include #include #include +#include #include #include #include #include "elfcopy.h" -ELFTC_VCSID("$Id: segments.c 3134 2014-12-23 10:43:59Z kaiwang27 $"); +ELFTC_VCSID("$Id: segments.c 3177 2015-03-30 18:19:41Z emaste $"); static void insert_to_inseg_list(struct segment *seg, struct section *sec); Modified: vendor/elftoolchain/dist/elfcopy/symbols.c ============================================================================== --- vendor/elftoolchain/dist/elfcopy/symbols.c Tue Mar 31 19:56:46 2015 (r280916) +++ vendor/elftoolchain/dist/elfcopy/symbols.c Tue Mar 31 20:01:37 2015 (r280917) @@ -24,7 +24,6 @@ * SUCH DAMAGE. */ -#include #include #include #include @@ -34,7 +33,7 @@ #include "elfcopy.h" -ELFTC_VCSID("$Id: symbols.c 3135 2014-12-24 08:22:43Z kaiwang27 $"); +ELFTC_VCSID("$Id: symbols.c 3174 2015-03-27 17:13:41Z emaste $"); /* Symbol table buffer structure. */ struct symbuf { @@ -129,6 +128,17 @@ is_local_symbol(unsigned char st_info) } static int +is_hidden_symbol(unsigned char st_other) +{ + + if (GELF_ST_VISIBILITY(st_other) == STV_HIDDEN || + GELF_ST_VISIBILITY(st_other) == STV_INTERNAL) + return (1); + + return (0); +} + +static int is_local_label(const char *name) { @@ -457,6 +467,11 @@ generate_symbols(struct elfcopy *ecp) lookup_symop_list(ecp, name, SYMOP_KEEPG) == NULL) sym.st_info = GELF_ST_INFO(STB_LOCAL, GELF_ST_TYPE(sym.st_info)); + if (ecp->flags & LOCALIZE_HIDDEN && + sym.st_shndx != SHN_UNDEF && + is_hidden_symbol(sym.st_other)) + sym.st_info = GELF_ST_INFO(STB_LOCAL, + GELF_ST_TYPE(sym.st_info)); } else { /* STB_LOCAL binding. */ if (lookup_symop_list(ecp, name, SYMOP_GLOBALIZE) != @@ -1036,10 +1051,8 @@ match_wildcard(const char *name, const c } match = 0; - if (!fnmatch(pattern, name, 0)) { + if (!fnmatch(pattern, name, 0)) match = 1; - printf("string '%s' match to pattern '%s'\n", name, pattern); - } return (reverse ? !match : match); } Modified: vendor/elftoolchain/dist/elfdump/elfdump.c ============================================================================== --- vendor/elftoolchain/dist/elfdump/elfdump.c Tue Mar 31 19:56:46 2015 (r280916) +++ vendor/elftoolchain/dist/elfdump/elfdump.c Tue Mar 31 20:01:37 2015 (r280917) @@ -26,7 +26,6 @@ * SUCH DAMAGE. */ -#include #include #include #include @@ -51,7 +50,7 @@ #include "_elftc.h" -ELFTC_VCSID("$Id: elfdump.c 3146 2015-02-15 18:20:03Z emaste $"); +ELFTC_VCSID("$Id: elfdump.c 3174 2015-03-27 17:13:41Z emaste $"); #if defined(ELFTC_NEED_ELF_NOTE_DEFINITION) #include "native-elf-format.h" Modified: vendor/elftoolchain/dist/findtextrel/findtextrel.c ============================================================================== --- vendor/elftoolchain/dist/findtextrel/findtextrel.c Tue Mar 31 19:56:46 2015 (r280916) +++ vendor/elftoolchain/dist/findtextrel/findtextrel.c Tue Mar 31 20:01:37 2015 (r280917) @@ -24,7 +24,6 @@ * SUCH DAMAGE. */ -#include #include #include #include @@ -39,7 +38,7 @@ #include "_elftc.h" -ELFTC_VCSID("$Id: findtextrel.c 2185 2011-11-19 16:07:16Z jkoshy $"); +ELFTC_VCSID("$Id: findtextrel.c 3174 2015-03-27 17:13:41Z emaste $"); static struct option longopts[] = { {"help", no_argument, NULL, 'H'}, Modified: vendor/elftoolchain/dist/ld/ld.h ============================================================================== --- vendor/elftoolchain/dist/ld/ld.h Tue Mar 31 19:56:46 2015 (r280916) +++ vendor/elftoolchain/dist/ld/ld.h Tue Mar 31 20:01:37 2015 (r280917) @@ -23,10 +23,9 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: ld.h 2940 2013-05-04 22:22:10Z kaiwang27 $ + * $Id: ld.h 3174 2015-03-27 17:13:41Z emaste $ */ -#include #include #include #include Modified: vendor/elftoolchain/dist/libdwarf/_libdwarf.h ============================================================================== --- vendor/elftoolchain/dist/libdwarf/_libdwarf.h Tue Mar 31 19:56:46 2015 (r280916) +++ vendor/elftoolchain/dist/libdwarf/_libdwarf.h Tue Mar 31 20:01:37 2015 (r280917) @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: _libdwarf.h 3161 2015-02-15 21:43:36Z emaste $ + * $Id: _libdwarf.h 3164 2015-02-19 01:20:12Z kaiwang27 $ */ #ifndef __LIBDWARF_H_ @@ -190,6 +190,7 @@ struct _Dwarf_LineInfo { Dwarf_Half li_version; /* Version of line info. */ Dwarf_Unsigned li_hdrlen; /* Length of line info header. */ Dwarf_Small li_minlen; /* Minimum instrutction length. */ + Dwarf_Small li_maxop; /* Maximum operations per inst. */ Dwarf_Small li_defstmt; /* Default value of is_stmt. */ int8_t li_lbase; /* Line base for special opcode. */ Dwarf_Small li_lrange; /* Line range for special opcode. */ Modified: vendor/elftoolchain/dist/libdwarf/libdwarf.h ============================================================================== --- vendor/elftoolchain/dist/libdwarf/libdwarf.h Tue Mar 31 19:56:46 2015 (r280916) +++ vendor/elftoolchain/dist/libdwarf/libdwarf.h Tue Mar 31 20:01:37 2015 (r280917) @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: libdwarf.h 3149 2015-02-15 19:00:06Z emaste $ + * $Id: libdwarf.h 3174 2015-03-27 17:13:41Z emaste $ */ #ifndef _LIBDWARF_H_ @@ -444,7 +444,9 @@ enum Dwarf_ISA { }; /* Function prototype definitions. */ -__BEGIN_DECLS +#ifdef __cplusplus +extern "C" { +#endif Dwarf_P_Attribute dwarf_add_AT_comp_dir(Dwarf_P_Die, char *, Dwarf_Error *); Dwarf_P_Attribute dwarf_add_AT_const_value_signedint(Dwarf_P_Die, Dwarf_Signed, Dwarf_Error *); @@ -831,6 +833,8 @@ int dwarf_whatattr(Dwarf_Attribute, Dwa int dwarf_whatform(Dwarf_Attribute, Dwarf_Half *, Dwarf_Error *); int dwarf_whatform_direct(Dwarf_Attribute, Dwarf_Half *, Dwarf_Error *); -__END_DECLS +#ifdef __cplusplus +} +#endif #endif /* !_LIBDWARF_H_ */ Modified: vendor/elftoolchain/dist/libdwarf/libdwarf_lineno.c ============================================================================== --- vendor/elftoolchain/dist/libdwarf/libdwarf_lineno.c Tue Mar 31 19:56:46 2015 (r280916) +++ vendor/elftoolchain/dist/libdwarf/libdwarf_lineno.c Tue Mar 31 20:01:37 2015 (r280917) @@ -26,7 +26,7 @@ #include "_libdwarf.h" -ELFTC_VCSID("$Id: libdwarf_lineno.c 3100 2014-10-25 20:34:29Z jkoshy $"); +ELFTC_VCSID("$Id: libdwarf_lineno.c 3164 2015-02-19 01:20:12Z kaiwang27 $"); static int _dwarf_lineno_add_file(Dwarf_LineInfo li, uint8_t **p, const char *compdir, @@ -315,6 +315,8 @@ _dwarf_lineno_init(Dwarf_Die die, uint64 li->li_hdrlen = dbg->read(ds->ds_data, &offset, dwarf_size); hdroff = offset; li->li_minlen = dbg->read(ds->ds_data, &offset, 1); + if (li->li_version == 4) + li->li_maxop = dbg->read(ds->ds_data, &offset, 1); li->li_defstmt = dbg->read(ds->ds_data, &offset, 1); li->li_lbase = dbg->read(ds->ds_data, &offset, 1); li->li_lrange = dbg->read(ds->ds_data, &offset, 1); Modified: vendor/elftoolchain/dist/libelf/_libelf.h ============================================================================== --- vendor/elftoolchain/dist/libelf/_libelf.h Tue Mar 31 19:56:46 2015 (r280916) +++ vendor/elftoolchain/dist/libelf/_libelf.h Tue Mar 31 20:01:37 2015 (r280917) @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: _libelf.h 3011 2014-03-23 03:32:42Z jkoshy $ + * $Id: _libelf.h 3174 2015-03-27 17:13:41Z emaste $ */ #ifndef __LIBELF_H_ @@ -194,7 +194,9 @@ enum { * Function Prototypes. */ -__BEGIN_DECLS +#ifdef __cplusplus +extern "C" { +#endif struct _Libelf_Data *_libelf_allocate_data(Elf_Scn *_s); Elf *_libelf_allocate_elf(void); Elf_Scn *_libelf_allocate_scn(Elf *_e, size_t _ndx); @@ -230,6 +232,8 @@ int _libelf_setshstrndx(Elf *_e, void *_ Elf_Data *_libelf_xlate(Elf_Data *_d, const Elf_Data *_s, unsigned int _encoding, int _elfclass, int _direction); int _libelf_xlate_shtype(uint32_t _sht); -__END_DECLS +#ifdef __cplusplus +} +#endif #endif /* __LIBELF_H_ */ Modified: vendor/elftoolchain/dist/libelf/_libelf_config.h ============================================================================== --- vendor/elftoolchain/dist/libelf/_libelf_config.h Tue Mar 31 19:56:46 2015 (r280916) +++ vendor/elftoolchain/dist/libelf/_libelf_config.h Tue Mar 31 20:01:37 2015 (r280917) @@ -23,10 +23,10 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: _libelf_config.h 3143 2015-02-15 17:57:38Z emaste $ + * $Id: _libelf_config.h 3168 2015-02-24 19:17:47Z emaste $ */ -#ifdef __DragonFly__ +#if defined(__APPLE__) || defined(__DragonFly__) #if defined(__amd64__) #define LIBELF_ARCH EM_X86_64 Modified: vendor/elftoolchain/dist/libelf/elf_data.c ============================================================================== --- vendor/elftoolchain/dist/libelf/elf_data.c Tue Mar 31 19:56:46 2015 (r280916) +++ vendor/elftoolchain/dist/libelf/elf_data.c Tue Mar 31 20:01:37 2015 (r280917) @@ -27,11 +27,12 @@ #include #include #include +#include #include #include "_libelf.h" -ELFTC_VCSID("$Id: elf_data.c 3009 2014-03-23 01:49:59Z jkoshy $"); +ELFTC_VCSID("$Id: elf_data.c 3177 2015-03-30 18:19:41Z emaste $"); Elf_Data * elf_getdata(Elf_Scn *s, Elf_Data *ed) Modified: vendor/elftoolchain/dist/libelf/elf_end.c ============================================================================== --- vendor/elftoolchain/dist/libelf/elf_end.c Tue Mar 31 19:56:46 2015 (r280916) +++ vendor/elftoolchain/dist/libelf/elf_end.c Tue Mar 31 20:01:37 2015 (r280917) @@ -24,8 +24,6 @@ * SUCH DAMAGE. */ -#include - #include #include #include @@ -36,7 +34,7 @@ #include #endif -ELFTC_VCSID("$Id: elf_end.c 2240 2011-11-28 06:36:48Z jkoshy $"); +ELFTC_VCSID("$Id: elf_end.c 3174 2015-03-27 17:13:41Z emaste $"); int elf_end(Elf *e) Modified: vendor/elftoolchain/dist/libelf/elf_errmsg.c ============================================================================== --- vendor/elftoolchain/dist/libelf/elf_errmsg.c Tue Mar 31 19:56:46 2015 (r280916) +++ vendor/elftoolchain/dist/libelf/elf_errmsg.c Tue Mar 31 20:01:37 2015 (r280917) @@ -24,15 +24,13 @@ * SUCH DAMAGE. */ -#include - #include #include #include #include "_libelf.h" -ELFTC_VCSID("$Id: elf_errmsg.c 3012 2014-03-23 03:41:38Z jkoshy $"); +ELFTC_VCSID("$Id: elf_errmsg.c 3174 2015-03-27 17:13:41Z emaste $"); /* * Retrieve a human readable translation for an error message. Modified: vendor/elftoolchain/dist/libelf/elf_errno.c ============================================================================== --- vendor/elftoolchain/dist/libelf/elf_errno.c Tue Mar 31 19:56:46 2015 (r280916) +++ vendor/elftoolchain/dist/libelf/elf_errno.c Tue Mar 31 20:01:37 2015 (r280917) @@ -24,13 +24,11 @@ * SUCH DAMAGE. */ -#include - #include #include "_libelf.h" -ELFTC_VCSID("$Id: elf_errno.c 2225 2011-11-26 18:55:54Z jkoshy $"); +ELFTC_VCSID("$Id: elf_errno.c 3174 2015-03-27 17:13:41Z emaste $"); int elf_errno(void) Modified: vendor/elftoolchain/dist/libelf/elf_fill.c ============================================================================== --- vendor/elftoolchain/dist/libelf/elf_fill.c Tue Mar 31 19:56:46 2015 (r280916) +++ vendor/elftoolchain/dist/libelf/elf_fill.c Tue Mar 31 20:01:37 2015 (r280917) @@ -24,13 +24,11 @@ * SUCH DAMAGE. */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 20:03:05 2015 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 6808793E; Tue, 31 Mar 2015 20:03: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 3A1D3E0C; Tue, 31 Mar 2015 20:03: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 t2VK35qq082728; Tue, 31 Mar 2015 20:03:05 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2VK35bn082727; Tue, 31 Mar 2015 20:03:05 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201503312003.t2VK35bn082727@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 31 Mar 2015 20:03:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r280918 - vendor/elftoolchain/elftoolchain-r3179 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: Tue, 31 Mar 2015 20:03:05 -0000 Author: emaste Date: Tue Mar 31 20:03:04 2015 New Revision: 280918 URL: https://svnweb.freebsd.org/changeset/base/280918 Log: Tag elftoolchain-r3179 Added: vendor/elftoolchain/elftoolchain-r3179/ - copied from r280917, vendor/elftoolchain/dist/ From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 20:51:02 2015 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 6499B46A; Tue, 31 Mar 2015 20:51: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 5071C5FD; Tue, 31 Mar 2015 20:51: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 t2VKp2d7004931; Tue, 31 Mar 2015 20:51:02 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2VKp27P004915; Tue, 31 Mar 2015 20:51:02 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201503312051.t2VKp27P004915@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Tue, 31 Mar 2015 20:51:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280919 - head/lib/libc/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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, 31 Mar 2015 20:51:02 -0000 Author: jilles Date: Tue Mar 31 20:51:01 2015 New Revision: 280919 URL: https://svnweb.freebsd.org/changeset/base/280919 Log: wordexp: Explicitly pass along IFS. Per Austin group issue #884, sh should not import IFS from the environment but always set it to $' \t\n'. For wordexp(), however, it is documented and useful for it to use IFS from the environment. Since sh currently imports IFS from the environment, this change has no functional effect. MFC after: 1 week Modified: head/lib/libc/gen/wordexp.c Modified: head/lib/libc/gen/wordexp.c ============================================================================== --- head/lib/libc/gen/wordexp.c Tue Mar 31 20:03:04 2015 (r280918) +++ head/lib/libc/gen/wordexp.c Tue Mar 31 20:51:01 2015 (r280919) @@ -118,8 +118,10 @@ we_askshell(const char *words, wordexp_t char *nstrings; /* Temporary for realloc() */ char **nwv; /* Temporary for realloc() */ sigset_t newsigblock, oldsigblock; + const char *ifs; serrno = errno; + ifs = getenv("IFS"); if (pipe2(pdes, O_CLOEXEC) < 0) return (WRDE_NOSPACE); /* XXX */ @@ -145,7 +147,8 @@ we_askshell(const char *words, wordexp_t _fcntl(pdes[1], F_SETFD, 0)) < 0) _exit(1); execl(_PATH_BSHELL, "sh", flags & WRDE_UNDEF ? "-u" : "+u", - "-c", "eval \"$1\";eval \"wordexp $2\"", "", + "-c", "IFS=$1;eval \"$2\";eval \"wordexp $3\"", "", + ifs != NULL ? ifs : " \t\n", flags & WRDE_SHOWERR ? "" : "exec 2>/dev/null", words, (char *)NULL); _exit(1); From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 20:59:39 2015 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 9D75284B; Tue, 31 Mar 2015 20: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 88B2B671; Tue, 31 Mar 2015 20: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 t2VKxdAR007721; Tue, 31 Mar 2015 20:59:39 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2VKxcsp007716; Tue, 31 Mar 2015 20:59:38 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201503312059.t2VKxcsp007716@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Tue, 31 Mar 2015 20:59:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280920 - head/bin/sh/tests/expansion 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, 31 Mar 2015 20:59:39 -0000 Author: jilles Date: Tue Mar 31 20:59:37 2015 New Revision: 280920 URL: https://svnweb.freebsd.org/changeset/base/280920 Log: sh: Add more tests for exotic IFS splitting. Added: head/bin/sh/tests/expansion/ifs6.0 (contents, props changed) head/bin/sh/tests/expansion/ifs7.0 (contents, props changed) Modified: head/bin/sh/tests/expansion/Makefile Modified: head/bin/sh/tests/expansion/Makefile ============================================================================== --- head/bin/sh/tests/expansion/Makefile Tue Mar 31 20:51:01 2015 (r280919) +++ head/bin/sh/tests/expansion/Makefile Tue Mar 31 20:59:37 2015 (r280920) @@ -49,6 +49,8 @@ FILES+= ifs2.0 FILES+= ifs3.0 FILES+= ifs4.0 FILES+= ifs5.0 +FILES+= ifs6.0 +FILES+= ifs7.0 FILES+= length1.0 FILES+= length2.0 FILES+= length3.0 Added: head/bin/sh/tests/expansion/ifs6.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/sh/tests/expansion/ifs6.0 Tue Mar 31 20:59:37 2015 (r280920) @@ -0,0 +1,6 @@ +# $FreeBSD$ + +IFS=': ' +x=': :' +set -- $x +[ "$#|$1|$2|$3" = "2|||" ] Added: head/bin/sh/tests/expansion/ifs7.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/sh/tests/expansion/ifs7.0 Tue Mar 31 20:59:37 2015 (r280920) @@ -0,0 +1,5 @@ +# $FreeBSD$ + +IFS=2 +set -- $((123)) +[ "$#|$1|$2|$3" = "2|1|3|" ] From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 21:34:43 2015 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 9B19F779; Tue, 31 Mar 2015 21:34: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 86964B67; Tue, 31 Mar 2015 21:34: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 t2VLYhdC026738; Tue, 31 Mar 2015 21:34:43 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2VLYheB026737; Tue, 31 Mar 2015 21:34:43 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201503312134.t2VLYheB026737@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Tue, 31 Mar 2015 21:34:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280921 - head/usr.sbin/bsdconfig/share X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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, 31 Mar 2015 21:34:43 -0000 Author: dteske Date: Tue Mar 31 21:34:42 2015 New Revision: 280921 URL: https://svnweb.freebsd.org/changeset/base/280921 Log: Fix typo in a comment. MFC after: 3 days X-MFC-to: stable/10 stable/9 Modified: head/usr.sbin/bsdconfig/share/geom.subr Modified: head/usr.sbin/bsdconfig/share/geom.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/geom.subr Tue Mar 31 20:59:37 2015 (r280920) +++ head/usr.sbin/bsdconfig/share/geom.subr Tue Mar 31 21:34:42 2015 (r280921) @@ -409,7 +409,7 @@ f_geom_parent() ############################################################ MAIN # -# Parse GEOM configuration unless requeted otherwise +# Parse GEOM configuration unless requested otherwise # f_dprintf "%s: GEOM_SELF_SCAN_ALL=[%s]" geom.subr "$GEOM_SELF_SCAN_ALL" case "$GEOM_SELF_SCAN_ALL" in From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 21:46:46 2015 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 1331CC62; Tue, 31 Mar 2015 21:46: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 F2F82C8E; Tue, 31 Mar 2015 21:46: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 t2VLkjCa032042; Tue, 31 Mar 2015 21:46:45 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2VLkj4C032041; Tue, 31 Mar 2015 21:46:45 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201503312146.t2VLkj4C032041@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Tue, 31 Mar 2015 21:46:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280922 - head/sys/boot/forth X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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, 31 Mar 2015 21:46:46 -0000 Author: dteske Date: Tue Mar 31 21:46:44 2015 New Revision: 280922 URL: https://svnweb.freebsd.org/changeset/base/280922 Log: Change contents of the exec variable in loader.conf to be friendly to both Ficl/Forth and Lua. No visible change for Forth while enabling Lua support. Submitted by: rpaulo Modified: head/sys/boot/forth/loader.conf Modified: head/sys/boot/forth/loader.conf ============================================================================== --- head/sys/boot/forth/loader.conf Tue Mar 31 21:34:42 2015 (r280921) +++ head/sys/boot/forth/loader.conf Tue Mar 31 21:46:44 2015 (r280922) @@ -12,7 +12,7 @@ ### Basic configuration options ############################ ############################################################## -exec=".( Loading /boot/defaults/loader.conf ) cr" +exec="echo Loading /boot/defaults/loader.conf" kernel="kernel" # /boot sub-directory containing kernel and modules bootfile="kernel" # Kernel name (possibly absolute path) From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 22:10:42 2015 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 984695BB; Tue, 31 Mar 2015 22:10: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 6A66CEEB; Tue, 31 Mar 2015 22:10: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 t2VMAgQe042650; Tue, 31 Mar 2015 22:10:42 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2VMAf3l042648; Tue, 31 Mar 2015 22:10:41 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201503312210.t2VMAf3l042648@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Tue, 31 Mar 2015 22:10:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280923 - head/sys/boot/forth X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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, 31 Mar 2015 22:10:42 -0000 Author: dteske Date: Tue Mar 31 22:10:40 2015 New Revision: 280923 URL: https://svnweb.freebsd.org/changeset/base/280923 Log: Whitespace. No functional change(s). MFC after: 3 days MFH: stable/10 Modified: head/sys/boot/forth/beastie.4th head/sys/boot/forth/brand.4th Modified: head/sys/boot/forth/beastie.4th ============================================================================== --- head/sys/boot/forth/beastie.4th Tue Mar 31 21:46:44 2015 (r280922) +++ head/sys/boot/forth/beastie.4th Tue Mar 31 22:10:40 2015 (r280923) @@ -1,6 +1,6 @@ \ Copyright (c) 2003 Scott Long \ Copyright (c) 2003 Aleksander Fafula -\ Copyright (c) 2006-2013 Devin Teske +\ Copyright (c) 2006-2015 Devin Teske \ All rights reserved. \ \ Redistribution and use in source and binary forms, with or without @@ -193,14 +193,10 @@ variable logoY s" loader_logo_x" getenv dup -1 <> if ?number 1 = if logoX ! then - else - drop - then + else drop then s" loader_logo_y" getenv dup -1 <> if ?number 1 = if logoY ! then - else - drop - then + else drop then s" loader_logo" getenv dup -1 <> if dup 5 + allocate if ENOMEM throw then @@ -247,8 +243,7 @@ variable logoY s" set beastie_disable=YES" evaluate then else drop then - s" beastie_disable" getenv - dup -1 <> if + s" beastie_disable" getenv dup -1 <> if s" YES" compare-insensitive 0= if any_conf_read? if load_xen_throw @@ -257,12 +252,9 @@ variable logoY then exit \ to autoboot (default) then - else - drop - then + else drop then - s" loader_delay" getenv - -1 = if + s" loader_delay" getenv -1 = if s" include /boot/menu.rc" evaluate else drop Modified: head/sys/boot/forth/brand.4th ============================================================================== --- head/sys/boot/forth/brand.4th Tue Mar 31 21:46:44 2015 (r280922) +++ head/sys/boot/forth/brand.4th Tue Mar 31 22:10:40 2015 (r280923) @@ -1,4 +1,4 @@ -\ Copyright (c) 2006-2011 Devin Teske +\ Copyright (c) 2006-2015 Devin Teske \ All rights reserved. \ \ Redistribution and use in source and binary forms, with or without @@ -64,20 +64,11 @@ variable brandY : draw-brand ( -- ) s" loader_brand_x" getenv dup -1 <> if - ?number 1 = if - brandX ! - then - else - drop - then - + ?number 1 = if brandX ! then + else drop then s" loader_brand_y" getenv dup -1 <> if - ?number 1 = if - brandY ! - then - else - drop - then + ?number 1 = if brandY ! then + else drop then s" loader_brand" getenv dup -1 = if brandX @ brandY @ fbsd-logo From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 22:32:40 2015 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 62CBAE40; Tue, 31 Mar 2015 22:32: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 43D1C272; Tue, 31 Mar 2015 22:32: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 t2VMWers056051; Tue, 31 Mar 2015 22:32:40 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2VMWa4G056032; Tue, 31 Mar 2015 22:32:36 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201503312232.t2VMWa4G056032@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Tue, 31 Mar 2015 22:32:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280924 - head/sys/boot/forth X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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, 31 Mar 2015 22:32:40 -0000 Author: dteske Date: Tue Mar 31 22:32:35 2015 New Revision: 280924 URL: https://svnweb.freebsd.org/changeset/base/280924 Log: Comments. No functional change(s). MFC after: 3 days X-MFC-to: stable/10 Modified: head/sys/boot/forth/beastie.4th head/sys/boot/forth/brand.4th head/sys/boot/forth/check-password.4th head/sys/boot/forth/frames.4th head/sys/boot/forth/loader.4th head/sys/boot/forth/menu.4th head/sys/boot/forth/pcibios.4th head/sys/boot/forth/pnp.4th head/sys/boot/forth/screen.4th head/sys/boot/forth/support.4th head/sys/boot/forth/version.4th Modified: head/sys/boot/forth/beastie.4th ============================================================================== --- head/sys/boot/forth/beastie.4th Tue Mar 31 22:10:40 2015 (r280923) +++ head/sys/boot/forth/beastie.4th Tue Mar 31 22:32:35 2015 (r280924) @@ -1,4 +1,4 @@ -\ Copyright (c) 2003 Scott Long +\ Copyright (c) 2003 Scott Long \ Copyright (c) 2003 Aleksander Fafula \ Copyright (c) 2006-2015 Devin Teske \ All rights reserved. Modified: head/sys/boot/forth/brand.4th ============================================================================== --- head/sys/boot/forth/brand.4th Tue Mar 31 22:10:40 2015 (r280923) +++ head/sys/boot/forth/brand.4th Tue Mar 31 22:32:35 2015 (r280924) @@ -29,7 +29,7 @@ marker task-brand.4th variable brandX variable brandY -\ Initialize logo placement +\ Initialize brand placement to defaults 2 brandX ! 1 brandY ! @@ -61,7 +61,7 @@ variable brandY \ NOTE: Setting `loader_brand' to an undefined value (such as "none") will \ prevent any brand from being drawn. \ -: draw-brand ( -- ) +: draw-brand ( -- ) \ at (loader_brand_x,loader_brand_y), else (2,1) s" loader_brand_x" getenv dup -1 <> if ?number 1 = if brandX ! then Modified: head/sys/boot/forth/check-password.4th ============================================================================== --- head/sys/boot/forth/check-password.4th Tue Mar 31 22:10:40 2015 (r280923) +++ head/sys/boot/forth/check-password.4th Tue Mar 31 22:32:35 2015 (r280924) @@ -146,8 +146,8 @@ variable readlen \ input len s" password" getenv dup readmax > if drop readmax then begin s" Password: " read ( prompt -- ) - 2dup readval readlen @ compare 0= if - 2drop exit \ Correct password + 2dup readval readlen @ compare 0= if \ Correct password? + 2drop exit then 3000 ms ." loader: incorrect password" 10 emit again Modified: head/sys/boot/forth/frames.4th ============================================================================== --- head/sys/boot/forth/frames.4th Tue Mar 31 22:10:40 2015 (r280923) +++ head/sys/boot/forth/frames.4th Tue Mar 31 22:32:35 2015 (r280924) @@ -1,9 +1,34 @@ -\ Words implementing frame drawing -\ XXX Filled boxes are left as an exercise for the reader... ;-/ +\ Copyright (c) 2003 Scott Long +\ Copyright (c) 2012-2015 Devin Teske +\ All rights reserved. +\ +\ Redistribution and use in source and binary forms, with or without +\ modification, are permitted provided that the following conditions +\ are met: +\ 1. Redistributions of source code must retain the above copyright +\ notice, this list of conditions and the following disclaimer. +\ 2. Redistributions in binary form must reproduce the above copyright +\ notice, this list of conditions and the following disclaimer in the +\ documentation and/or other materials provided with the distribution. +\ +\ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +\ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +\ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +\ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +\ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +\ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +\ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +\ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +\ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +\ SUCH DAMAGE. +\ \ $FreeBSD$ marker task-frames.4th +\ XXX Filled boxes are left as an exercise for the reader... ;-/ + variable h_el variable v_el variable lt_el Modified: head/sys/boot/forth/loader.4th ============================================================================== --- head/sys/boot/forth/loader.4th Tue Mar 31 22:10:40 2015 (r280923) +++ head/sys/boot/forth/loader.4th Tue Mar 31 22:32:35 2015 (r280924) @@ -1,4 +1,5 @@ -\ Copyright (c) 1999 Daniel C. Sobral +\ Copyright (c) 1999 Daniel C. Sobral +\ Copyright (c) 2011-2015 Devin Teske \ All rights reserved. \ \ Redistribution and use in source and binary forms, with or without Modified: head/sys/boot/forth/menu.4th ============================================================================== --- head/sys/boot/forth/menu.4th Tue Mar 31 22:10:40 2015 (r280923) +++ head/sys/boot/forth/menu.4th Tue Mar 31 22:32:35 2015 (r280924) @@ -1,6 +1,6 @@ -\ Copyright (c) 2003 Scott Long +\ Copyright (c) 2003 Scott Long \ Copyright (c) 2003 Aleksander Fafula -\ Copyright (c) 2006-2013 Devin Teske +\ Copyright (c) 2006-2015 Devin Teske \ All rights reserved. \ \ Redistribution and use in source and binary forms, with or without @@ -57,7 +57,7 @@ variable menubllt \ Menu item bullet variable menuX \ Menu X offset (columns) variable menuY \ Menu Y offset (rows) -\ Menu-item key association/detection +\ Menu-item elements variable menukey1 variable menukey2 variable menukey3 @@ -144,12 +144,14 @@ create kernelsbuf 256 allot swap drop ( c bool -- bool ) \ return boolean ; +\ Forth variables : menukeyN ( N -- ADDR ) s" menukeyN" 7 +c! evaluate ; : init_stateN ( N -- ADDR ) s" init_stateN" 10 +c! evaluate ; : toggle_stateN ( N -- ADDR ) s" toggle_stateN" 12 +c! evaluate ; : cycle_stateN ( N -- ADDR ) s" cycle_stateN" 11 +c! evaluate ; : init_textN ( N -- C-ADDR ) s" init_textN" 9 +c! evaluate ; +\ Environment variables : kernel[x] ( N -- C-ADDR/U ) s" kernel[x]" 7 +c! ; : menu_init[x] ( N -- C-ADDR/U ) s" menu_init[x]" 10 +c! ; : menu_command[x] ( N -- C-ADDR/U ) s" menu_command[x]" 13 +c! ; @@ -614,7 +616,7 @@ create kernelsbuf 256 allot ; \ This function creates the list of menu items. This function is called by the -\ menu-display function. You need not be call it directly. +\ menu-display function. You need not call it directly. \ : menu-create ( -- ) Modified: head/sys/boot/forth/pcibios.4th ============================================================================== --- head/sys/boot/forth/pcibios.4th Tue Mar 31 22:10:40 2015 (r280923) +++ head/sys/boot/forth/pcibios.4th Tue Mar 31 22:32:35 2015 (r280924) @@ -1,4 +1,4 @@ -\ Copyright (c) 2014 M. Warner Losh +\ Copyright (c) 2014 M. Warner Losh \ All rights reserved. \ \ Redistribution and use in source and binary forms, with or without Modified: head/sys/boot/forth/pnp.4th ============================================================================== --- head/sys/boot/forth/pnp.4th Tue Mar 31 22:10:40 2015 (r280923) +++ head/sys/boot/forth/pnp.4th Tue Mar 31 22:32:35 2015 (r280924) @@ -1,4 +1,4 @@ -\ Copyright (c) 2000 Daniel C. Sobral +\ Copyright (c) 2000 Daniel C. Sobral \ All rights reserved. \ \ Redistribution and use in source and binary forms, with or without Modified: head/sys/boot/forth/screen.4th ============================================================================== --- head/sys/boot/forth/screen.4th Tue Mar 31 22:10:40 2015 (r280923) +++ head/sys/boot/forth/screen.4th Tue Mar 31 22:32:35 2015 (r280924) @@ -1,4 +1,28 @@ -\ Screen manipulation related words. +\ Copyright (c) 2003 Scott Long +\ Copyright (c) 2015 Devin Teske +\ All rights reserved. +\ +\ Redistribution and use in source and binary forms, with or without +\ modification, are permitted provided that the following conditions +\ are met: +\ 1. Redistributions of source code must retain the above copyright +\ notice, this list of conditions and the following disclaimer. +\ 2. Redistributions in binary form must reproduce the above copyright +\ notice, this list of conditions and the following disclaimer in the +\ documentation and/or other materials provided with the distribution. +\ +\ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +\ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +\ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +\ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +\ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +\ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +\ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +\ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +\ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +\ SUCH DAMAGE. +\ \ $FreeBSD$ marker task-screen.4th Modified: head/sys/boot/forth/support.4th ============================================================================== --- head/sys/boot/forth/support.4th Tue Mar 31 22:10:40 2015 (r280923) +++ head/sys/boot/forth/support.4th Tue Mar 31 22:32:35 2015 (r280924) @@ -1,4 +1,4 @@ -\ Copyright (c) 1999 Daniel C. Sobral +\ Copyright (c) 1999 Daniel C. Sobral \ All rights reserved. \ \ Redistribution and use in source and binary forms, with or without Modified: head/sys/boot/forth/version.4th ============================================================================== --- head/sys/boot/forth/version.4th Tue Mar 31 22:10:40 2015 (r280923) +++ head/sys/boot/forth/version.4th Tue Mar 31 22:32:35 2015 (r280924) @@ -1,4 +1,4 @@ -\ Copyright (c) 2006-2013 Devin Teske +\ Copyright (c) 2006-2015 Devin Teske \ All rights reserved. \ \ Redistribution and use in source and binary forms, with or without @@ -49,10 +49,11 @@ variable versionY \ Default version if none was set s" loader_version" getenv dup -1 = if drop - \ Default version if no logo is requested + \ Use above default if no logo is requested s" loader_logo" getenv dup -1 = if drop str_loader_version else + \ For tributes, do nothing (defer to beastie.4th) 2dup s" tribute" compare-insensitive 0= if 2drop s" tribute-logo" sfind if From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 23:00:49 2015 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 8FCFD63D; Tue, 31 Mar 2015 23:00: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 7B1CB6D9; Tue, 31 Mar 2015 23:00: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 t2VN0nPZ068257; Tue, 31 Mar 2015 23:00:49 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2VN0nCh068256; Tue, 31 Mar 2015 23:00:49 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201503312300.t2VN0nCh068256@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Tue, 31 Mar 2015 23:00:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280925 - head/sys/boot/forth X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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, 31 Mar 2015 23:00:49 -0000 Author: dteske Date: Tue Mar 31 23:00:48 2015 New Revision: 280925 URL: https://svnweb.freebsd.org/changeset/base/280925 Log: Optimize bootmsg to use fg/bg/me from screen.4th NB: screen.4th is included by way of check-password.4th MFC after: 3 days X-MFC-to: stable/10 Modified: head/sys/boot/forth/loader.4th Modified: head/sys/boot/forth/loader.4th ============================================================================== --- head/sys/boot/forth/loader.4th Tue Mar 31 22:32:35 2015 (r280924) +++ head/sys/boot/forth/loader.4th Tue Mar 31 23:00:48 2015 (r280925) @@ -43,15 +43,16 @@ s" arch-i386" environment? [if] [if] include /boot/support.4th include /boot/color.4th include /boot/delay.4th +include /boot/check-password.4th only forth also support-functions also builtins definitions : bootmsg ( -- ) - loader_color? if - ." Booting..." cr - else - ." Booting..." cr - then + loader_color? dup ( -- bool bool ) + if 7 fg 4 bg then + ." Booting..." + if me then + cr ; : try-menu-unset @@ -128,8 +129,6 @@ builtin: boot-conf only forth definitions also support-functions -include /boot/check-password.4th - \ ***** start \ \ Initializes support.4th global variables, sets loader_conf_files, From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 23:09:55 2015 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 C19AA8A7; Tue, 31 Mar 2015 23:09: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 AD1FA81E; Tue, 31 Mar 2015 23:09: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 t2VN9thT070869; Tue, 31 Mar 2015 23:09:55 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2VN9tk6070868; Tue, 31 Mar 2015 23:09:55 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201503312309.t2VN9tk6070868@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Tue, 31 Mar 2015 23:09:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280926 - head/sys/boot/forth X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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, 31 Mar 2015 23:09:55 -0000 Author: dteske Date: Tue Mar 31 23:09:54 2015 New Revision: 280926 URL: https://svnweb.freebsd.org/changeset/base/280926 Log: Whitespace and cleanup. No functional change(s). MFC after: 3 days X-MFC-to: stable/10 Modified: head/sys/boot/forth/screen.4th Modified: head/sys/boot/forth/screen.4th ============================================================================== --- head/sys/boot/forth/screen.4th Tue Mar 31 23:00:48 2015 (r280925) +++ head/sys/boot/forth/screen.4th Tue Mar 31 23:09:54 2015 (r280926) @@ -27,34 +27,26 @@ marker task-screen.4th -: escc ( -- ) \ emit Esc-[ - 91 27 emit emit -; - -: ho ( -- ) \ Home cursor - escc 72 emit \ Esc-[H -; - -: cld ( -- ) \ Clear from current position to end of display - escc 74 emit \ Esc-[J -; - -: clear ( -- ) \ clear screen - ho cld -; - -: at-xy ( x y -- ) \ move cursor to x rows, y cols (1-based coords) - escc .# 59 emit .# 72 emit \ Esc-[%d;%dH -; - -: fg ( x -- ) \ Set foreground color - escc 3 .# .# 109 emit \ Esc-[3%dm -; - -: bg ( x -- ) \ Set background color - escc 4 .# .# 109 emit \ Esc-[4%dm -; - -: me ( -- ) \ Mode end (clear attributes) - escc 109 emit -; +\ emit Esc-[ +: escc ( -- ) 27 emit [char] [ emit ; + +\ Home cursor ( Esc-[H ) +: ho ( -- ) escc [char] H emit ; + +\ Clear from current position to end of display ( Esc-[J ) +: cld ( -- ) escc [char] J emit ; + +\ clear screen +: clear ( -- ) ho cld ; + +\ move cursor to x rows, y cols (1-based coords) ( Esc-[%d;%dH ) +: at-xy ( x y -- ) escc .# [char] ; emit .# [char] H emit ; + +\ Set foreground color ( Esc-[3%dm ) +: fg ( x -- ) escc 3 .# .# [char] m emit ; + +\ Set background color ( Esc-[4%dm ) +: bg ( x -- ) escc 4 .# .# [char] m emit ; + +\ Mode end (clear attributes) +: me ( -- ) escc [char] m emit ; From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 23:37:21 2015 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 5742ADA1; Tue, 31 Mar 2015 23:37:21 +0000 (UTC) Received: from mail-qg0-x22f.google.com (mail-qg0-x22f.google.com [IPv6:2607:f8b0:400d:c04::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0FC0CA96; Tue, 31 Mar 2015 23:37:21 +0000 (UTC) Received: by qgh3 with SMTP id 3so29274193qgh.2; Tue, 31 Mar 2015 16:37:20 -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=/6GxMNG9BvcfvGC1ypBgPsNEyCbuKMLDdO/ZtSY0+BM=; b=ESRCW8X0BB3vJ6PBBaoSO3tMs3JgtHxETRNhCdIJBhgDBx5ICwx2oux+i/EgCu8yX8 rReftswn/vTgi5ynVJu4C4Ri948PdPHybuLMPFHu8JZ7O4C0UNz2SRSYSDJ67B9WbA6I Ymy9zyUKPgSi2DCDOYskW3i/w2VwHuTmHe7F7Xsbpbe6YIlEPy+C4gWkEGpgWNBc74bA QROjhwKMkXT6ZghYAiBCiKgbLNytC1VfSWqv/BI+pcoldQSnp1vs4vnfGpvUi8YNts/r YTxkYeA6IqOOkOJIxm3vw9oWCM4Na+9+bFVy18+k94n3UIKn9AXRu6AvE4ZjKSShHDN7 JzPw== MIME-Version: 1.0 X-Received: by 10.55.48.80 with SMTP id w77mr12868667qkw.39.1427845040177; Tue, 31 Mar 2015 16:37:20 -0700 (PDT) Received: by 10.140.94.99 with HTTP; Tue, 31 Mar 2015 16:37:20 -0700 (PDT) In-Reply-To: <201503311935.t2VJZXhC068495@svn.freebsd.org> References: <201503311935.t2VJZXhC068495@svn.freebsd.org> Date: Tue, 31 Mar 2015 16:37:20 -0700 Message-ID: Subject: Re: svn commit: r280915 - head/contrib/ntp/ntpd From: NGie Cooper To: Cy Schubert 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, 31 Mar 2015 23:37:21 -0000 On Tue, Mar 31, 2015 at 12:35 PM, Cy Schubert wrote: > Author: cy > Date: Tue Mar 31 19:35:32 2015 > New Revision: 280915 > URL: https://svnweb.freebsd.org/changeset/base/280915 > > Log: > Fix build. > > Modified: > head/contrib/ntp/ntpd/ntp_parser.y That fixed it -- thanks :)! From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 00:00:19 2015 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 209EF588; Wed, 1 Apr 2015 00:00: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 E62C3CE8; Wed, 1 Apr 2015 00:00: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 t3100Iqc094936; Wed, 1 Apr 2015 00:00:18 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3100Iu6094933; Wed, 1 Apr 2015 00:00:18 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201504010000.t3100Iu6094933@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Wed, 1 Apr 2015 00:00:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280928 - head/release 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 Apr 2015 00:00:19 -0000 Author: cperciva Date: Wed Apr 1 00:00:17 2015 New Revision: 280928 URL: https://svnweb.freebsd.org/changeset/base/280928 Log: Add code for creating an EC2 AMI. Added: head/release/Makefile.ec2 (contents, props changed) Modified: head/release/Makefile.vm Added: head/release/Makefile.ec2 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/release/Makefile.ec2 Wed Apr 1 00:00:17 2015 (r280928) @@ -0,0 +1,44 @@ +# +# $FreeBSD$ +# +# +# Makefile for creating an EC2 AMI from a disk image. +# + +.if ${BRANCH} == "CURRENT" || ${BRANCH} == "STABLE" +AMINAMESUFFIX!= date +-%Y-%m-%d +.endif +.if defined(EC2PUBLIC) +PUBLISH= --public +.endif + +ec2ami: cw-ec2 +.if !exists(/usr/local/bin/bsdec2-image-upload) + @echo "--------------------------------------------------------------" + @echo ">>> Creating EC2 AMIs requires bsdec2-image-upload" + @echo "--------------------------------------------------------------" + @false +.endif +.if !defined(AWSKEYFILE) || !exists(${AWSKEYFILE}) + @echo "--------------------------------------------------------------" + @echo ">>> AWSKEYFILE must point at AWS keys for EC2 AMI creation" + @echo "--------------------------------------------------------------" + @false +.endif +.if !defined(AWSREGION) + @echo "--------------------------------------------------------------" + @echo ">>> AWSREGION must be specified EC2 AMI creation" + @echo "--------------------------------------------------------------" + @false +.endif +.if !defined(AWSBUCKET) + @echo "--------------------------------------------------------------" + @echo ">>> AWSBUCKET must be specified for EC2 AMI creation" + @echo "--------------------------------------------------------------" + @false +.endif + /usr/local/bin/bsdec2-image-upload ${PUBLISH} \ + ${.OBJDIR}/ec2.raw \ + "${TYPE} ${REVISION}-${BRANCH}${AMINAMESUFFIX}" \ + "${TYPE} ${REVISION}-${BRANCH}" \ + ${AWSREGION} ${AWSBUCKET} ${AWSKEYFILE} Modified: head/release/Makefile.vm ============================================================================== --- head/release/Makefile.vm Tue Mar 31 23:39:34 2015 (r280927) +++ head/release/Makefile.vm Wed Apr 1 00:00:17 2015 (r280928) @@ -152,3 +152,5 @@ cloudware-install: .if defined(WITH_CLOUDWARE) && !empty(WITH_CLOUDWARE) && !empty(CLOUDWARE) ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} ${CLOUDINSTALL} .endif + +.include "${.CURDIR}/Makefile.ec2" From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 00:13:33 2015 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 A6E7AA3E; Wed, 1 Apr 2015 00:13:33 +0000 (UTC) Received: from smtp-out-03.shaw.ca (smtp-out-03.shaw.ca [64.59.136.139]) by mx1.freebsd.org (Postfix) with ESMTP id 509CCEA8; Wed, 1 Apr 2015 00:13:33 +0000 (UTC) X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.1 cv=ryrf5q5p6c4dCQYR2lAej91p2ozDt6sfPnRAuS/Q8hc= c=1 sm=1 a=BLceEmwcHowA:10 a=ICAaq7hcmGcA:10 a=kj9zAlcOel0A:10 a=DtyMuQCYAJf2vvIh/Mv8eA==:17 a=6I5d2MoRAAAA:8 a=BWvPGDcYAAAA:8 a=YxBL1-UpAAAA:8 a=3WzmS071YgWNceFQaJMA:9 a=CjuIK1q_8ugA:10 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 Received: from unknown (HELO spqr.komquats.com) ([24.68.119.200]) by smtp-out-03.shaw.ca with ESMTP; 31 Mar 2015 18:13:31 -0600 Received: from slippy.cwsent.com (slippy8 [10.2.2.6]) by spqr.komquats.com (Postfix) with ESMTP id 62DF29BE9; Tue, 31 Mar 2015 17:13:31 -0700 (PDT) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.14.9/8.14.9) with ESMTP id t310DUEx010513; Tue, 31 Mar 2015 17:13:30 -0700 (PDT) (envelope-from Cy.Schubert@komquats.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.14.9/8.14.8/Submit) with ESMTP id t310DUvh010510; Tue, 31 Mar 2015 17:13:30 -0700 (PDT) (envelope-from Cy.Schubert@komquats.com) Message-Id: <201504010013.t310DUvh010510@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.komquats.com/ To: NGie Cooper Subject: Re: svn commit: r280915 - head/contrib/ntp/ntpd In-Reply-To: Message from NGie Cooper of "Tue, 31 Mar 2015 16:37:20 -0700." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 31 Mar 2015 17:13:30 -0700 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Cy Schubert X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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 Apr 2015 00:13:33 -0000 In message , NGie Cooper writes: > On Tue, Mar 31, 2015 at 12:35 PM, Cy Schubert wrote: > > Author: cy > > Date: Tue Mar 31 19:35:32 2015 > > New Revision: 280915 > > URL: https://svnweb.freebsd.org/changeset/base/280915 > > > > Log: > > Fix build. > > > > Modified: > > head/contrib/ntp/ntpd/ntp_parser.y > > That fixed it -- thanks :)! > Strangely I had no such issues locally. Having to put spaces around curly braces would appear to work around a bug. Is this normal for YACC? -- Cheers, Cy Schubert or FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 00:15:35 2015 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 F2200B8F; Wed, 1 Apr 2015 00:15: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 D3434EB6; Wed, 1 Apr 2015 00:15: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 t310FYfu004806; Wed, 1 Apr 2015 00:15:34 GMT (envelope-from tychon@FreeBSD.org) Received: (from tychon@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t310FW4V004796; Wed, 1 Apr 2015 00:15:32 GMT (envelope-from tychon@FreeBSD.org) Message-Id: <201504010015.t310FW4V004796@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tychon set sender to tychon@FreeBSD.org using -f From: Tycho Nightingale Date: Wed, 1 Apr 2015 00:15:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280929 - in head: lib/libvmmapi sys/amd64/include sys/amd64/vmm 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 Apr 2015 00:15:35 -0000 Author: tychon Date: Wed Apr 1 00:15:31 2015 New Revision: 280929 URL: https://svnweb.freebsd.org/changeset/base/280929 Log: Fix "MOVS" instruction memory to MMIO emulation. Currently updates to %rdi, %rsi, etc are inadvertently bypassed along with the check to see if the instruction needs to be repeated per the 'rep' prefix. Add "MOVS" instruction support for the 'MMIO to MMIO' case. Reviewed by: neel Modified: head/lib/libvmmapi/vmmapi.c head/lib/libvmmapi/vmmapi.h head/sys/amd64/include/vmm_instruction_emul.h head/sys/amd64/vmm/vmm.c head/sys/amd64/vmm/vmm_dev.c head/sys/amd64/vmm/vmm_instruction_emul.c Modified: head/lib/libvmmapi/vmmapi.c ============================================================================== --- head/lib/libvmmapi/vmmapi.c Wed Apr 1 00:00:17 2015 (r280928) +++ head/lib/libvmmapi/vmmapi.c Wed Apr 1 00:15:31 2015 (r280929) @@ -979,6 +979,18 @@ gla2gpa(struct vmctx *ctx, int vcpu, str return (error); } +int +vm_gla2gpa(struct vmctx *ctx, int vcpu, struct vm_guest_paging *paging, + uint64_t gla, int prot, uint64_t *gpa) +{ + int error, fault; + + error = gla2gpa(ctx, vcpu, paging, gla, prot, &fault, gpa); + if (fault) + error = fault; + return (error); +} + #ifndef min #define min(a,b) (((a) < (b)) ? (a) : (b)) #endif Modified: head/lib/libvmmapi/vmmapi.h ============================================================================== --- head/lib/libvmmapi/vmmapi.h Wed Apr 1 00:00:17 2015 (r280928) +++ head/lib/libvmmapi/vmmapi.h Wed Apr 1 00:15:31 2015 (r280929) @@ -63,6 +63,8 @@ int vm_get_memory_seg(struct vmctx *ctx, int vm_setup_memory(struct vmctx *ctx, size_t len, enum vm_mmap_style s); void *vm_map_gpa(struct vmctx *ctx, vm_paddr_t gaddr, size_t len); int vm_get_gpa_pmap(struct vmctx *, uint64_t gpa, uint64_t *pte, int *num); +int vm_gla2gpa(struct vmctx *, int vcpuid, struct vm_guest_paging *paging, + uint64_t gla, int prot, uint64_t *gpa); uint32_t vm_get_lowmem_limit(struct vmctx *ctx); void vm_set_lowmem_limit(struct vmctx *ctx, uint32_t limit); void vm_set_memflags(struct vmctx *ctx, int flags); Modified: head/sys/amd64/include/vmm_instruction_emul.h ============================================================================== --- head/sys/amd64/include/vmm_instruction_emul.h Wed Apr 1 00:00:17 2015 (r280928) +++ head/sys/amd64/include/vmm_instruction_emul.h Wed Apr 1 00:15:31 2015 (r280929) @@ -90,7 +90,7 @@ int vmm_fetch_instruction(struct vm *vm, * Returns 1 if an exception was injected into the guest. * Returns -1 otherwise. */ -int vmm_gla2gpa(struct vm *vm, int vcpuid, struct vm_guest_paging *paging, +int vm_gla2gpa(struct vm *vm, int vcpuid, struct vm_guest_paging *paging, uint64_t gla, int prot, uint64_t *gpa); void vie_init(struct vie *vie, const char *inst_bytes, int inst_length); Modified: head/sys/amd64/vmm/vmm.c ============================================================================== --- head/sys/amd64/vmm/vmm.c Wed Apr 1 00:00:17 2015 (r280928) +++ head/sys/amd64/vmm/vmm.c Wed Apr 1 00:15:31 2015 (r280929) @@ -2332,7 +2332,7 @@ vm_copy_setup(struct vm *vm, int vcpuid, remaining = len; while (remaining > 0) { KASSERT(nused < num_copyinfo, ("insufficient vm_copyinfo")); - error = vmm_gla2gpa(vm, vcpuid, paging, gla, prot, &gpa); + error = vm_gla2gpa(vm, vcpuid, paging, gla, prot, &gpa); if (error) return (error); off = gpa & PAGE_MASK; Modified: head/sys/amd64/vmm/vmm_dev.c ============================================================================== --- head/sys/amd64/vmm/vmm_dev.c Wed Apr 1 00:00:17 2015 (r280928) +++ head/sys/amd64/vmm/vmm_dev.c Wed Apr 1 00:15:31 2015 (r280929) @@ -440,10 +440,10 @@ vmmdev_ioctl(struct cdev *cdev, u_long c CTASSERT(PROT_WRITE == VM_PROT_WRITE); CTASSERT(PROT_EXEC == VM_PROT_EXECUTE); gg = (struct vm_gla2gpa *)data; - error = vmm_gla2gpa(sc->vm, gg->vcpuid, &gg->paging, gg->gla, + error = vm_gla2gpa(sc->vm, gg->vcpuid, &gg->paging, gg->gla, gg->prot, &gg->gpa); KASSERT(error == 0 || error == 1 || error == -1, - ("%s: vmm_gla2gpa unknown error %d", __func__, error)); + ("%s: vm_gla2gpa unknown error %d", __func__, error)); if (error >= 0) { /* * error = 0: the translation was successful Modified: head/sys/amd64/vmm/vmm_instruction_emul.c ============================================================================== --- head/sys/amd64/vmm/vmm_instruction_emul.c Wed Apr 1 00:00:17 2015 (r280928) +++ head/sys/amd64/vmm/vmm_instruction_emul.c Wed Apr 1 00:15:31 2015 (r280929) @@ -634,7 +634,7 @@ emulate_movs(void *vm, int vcpuid, uint6 #else struct iovec copyinfo[2]; #endif - uint64_t dstaddr, srcaddr, val; + uint64_t dstaddr, srcaddr, dstgpa, srcgpa, val; uint64_t rcx, rdi, rsi, rflags; int error, opsize, seg, repeat; @@ -669,7 +669,7 @@ emulate_movs(void *vm, int vcpuid, uint6 * (1) memory memory n/a * (2) memory mmio emulated * (3) mmio memory emulated - * (4) mmio mmio not emulated + * (4) mmio mmio emulated * * At this point we don't have sufficient information to distinguish * between (2), (3) and (4). We use 'vm_copy_setup()' to tease this @@ -694,7 +694,8 @@ emulate_movs(void *vm, int vcpuid, uint6 vm_copyin(vm, vcpuid, copyinfo, &val, opsize); vm_copy_teardown(vm, vcpuid, copyinfo, nitems(copyinfo)); error = memwrite(vm, vcpuid, gpa, val, opsize, arg); - goto done; + if (error) + goto done; } else if (error > 0) { /* * Resume guest execution to handle fault. @@ -705,37 +706,55 @@ emulate_movs(void *vm, int vcpuid, uint6 * 'vm_copy_setup()' is expected to fail for cases (3) and (4) * if 'srcaddr' is in the mmio space. */ - } - - error = get_gla(vm, vcpuid, vie, paging, opsize, vie->addrsize, - PROT_WRITE, VM_REG_GUEST_ES, VM_REG_GUEST_RDI, &dstaddr); - if (error) - goto done; - error = vm_copy_setup(vm, vcpuid, paging, dstaddr, opsize, - PROT_WRITE, copyinfo, nitems(copyinfo)); - if (error == 0) { - /* - * case (3): read from MMIO and write to system memory. - * - * A MMIO read can have side-effects so we commit to it - * only after vm_copy_setup() is successful. If a page-fault - * needs to be injected into the guest then it will happen - * before the MMIO read is attempted. - */ - error = memread(vm, vcpuid, gpa, &val, opsize, arg); + error = get_gla(vm, vcpuid, vie, paging, opsize, vie->addrsize, + PROT_WRITE, VM_REG_GUEST_ES, VM_REG_GUEST_RDI, &dstaddr); if (error) goto done; - vm_copyout(vm, vcpuid, &val, copyinfo, opsize); - vm_copy_teardown(vm, vcpuid, copyinfo, nitems(copyinfo)); - } else if (error > 0) { - /* - * Resume guest execution to handle fault. - */ - goto done; - } else { - goto done; + error = vm_copy_setup(vm, vcpuid, paging, dstaddr, opsize, + PROT_WRITE, copyinfo, nitems(copyinfo)); + if (error == 0) { + /* + * case (3): read from MMIO and write to system memory. + * + * A MMIO read can have side-effects so we + * commit to it only after vm_copy_setup() is + * successful. If a page-fault needs to be + * injected into the guest then it will happen + * before the MMIO read is attempted. + */ + error = memread(vm, vcpuid, gpa, &val, opsize, arg); + if (error) + goto done; + + vm_copyout(vm, vcpuid, &val, copyinfo, opsize); + vm_copy_teardown(vm, vcpuid, copyinfo, nitems(copyinfo)); + } else if (error > 0) { + /* + * Resume guest execution to handle fault. + */ + goto done; + } else { + /* + * Case (4): read from and write to mmio. + */ + error = vm_gla2gpa(vm, vcpuid, paging, srcaddr, + PROT_READ, &srcgpa); + if (error) + goto done; + error = memread(vm, vcpuid, srcgpa, &val, opsize, arg); + if (error) + goto done; + + error = vm_gla2gpa(vm, vcpuid, paging, dstaddr, + PROT_WRITE, &dstgpa); + if (error) + goto done; + error = memwrite(vm, vcpuid, dstgpa, val, opsize, arg); + if (error) + goto done; + } } error = vie_read_register(vm, vcpuid, VM_REG_GUEST_RSI, &rsi); @@ -1465,7 +1484,7 @@ ptp_hold(struct vm *vm, vm_paddr_t ptpph } int -vmm_gla2gpa(struct vm *vm, int vcpuid, struct vm_guest_paging *paging, +vm_gla2gpa(struct vm *vm, int vcpuid, struct vm_guest_paging *paging, uint64_t gla, int prot, uint64_t *gpa) { int nlevels, pfcode, ptpshift, ptpindex, retval, usermode, writable; From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 00:24:07 2015 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 B5C3FE02; Wed, 1 Apr 2015 00:24:07 +0000 (UTC) Received: from mail-qc0-x230.google.com (mail-qc0-x230.google.com [IPv6:2607:f8b0:400d:c01::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6A1BBFC7; Wed, 1 Apr 2015 00:24:07 +0000 (UTC) Received: by qcgx3 with SMTP id x3so28795900qcg.3; Tue, 31 Mar 2015 17:24:06 -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=Go1/Q8kOorHE58TSCeeZOQ4X0GUgONPlnkrm2XlqgC0=; b=uZA/JX+nE/8ZEdrvZucZGCG16abjMim7ynTMPyKaYBBb2keg5mVEiWkC4tT45XqtlL Fj9wPgf8e533EKFUl6rNWxPIrXjM2ZCFuOug9dNuxCRa6MuB87t3mZ4d6i1V5IxavCvp +NU5wajnfgU0zd1Z2pQLKAECBrNncZOI7hK+He7nl+IVFGUkKUYbabgnaYtIoDh3iENE soqWBMsQIh2h1C1YsN/LlJyiclBHu+c0+GiOeGS7iojD6Z75YXx1uADRqfTI0rhCaJxH sY135tfkimaYrMzA/lccmWENLF5Hh3KybSEipC5N+mrpXk8cgd3SlCRvdTttMjDp8W+o j+XA== MIME-Version: 1.0 X-Received: by 10.55.53.137 with SMTP id c131mr20361782qka.102.1427847846551; Tue, 31 Mar 2015 17:24:06 -0700 (PDT) Received: by 10.140.94.99 with HTTP; Tue, 31 Mar 2015 17:24:06 -0700 (PDT) In-Reply-To: <201504010013.t310DUvh010510@slippy.cwsent.com> References: <201504010013.t310DUvh010510@slippy.cwsent.com> Date: Tue, 31 Mar 2015 17:24:06 -0700 Message-ID: Subject: Re: svn commit: r280915 - head/contrib/ntp/ntpd From: NGie Cooper To: Cy Schubert Content-Type: text/plain; charset=UTF-8 Cc: Baptiste Daroussin , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "jenkins-admin@freebsd.org" , Cy Schubert , "svn-src-head@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 Apr 2015 00:24:07 -0000 On Tue, Mar 31, 2015 at 5:13 PM, Cy Schubert wrote: > In message om> > , NGie Cooper writes: >> On Tue, Mar 31, 2015 at 12:35 PM, Cy Schubert wrote: >> > Author: cy >> > Date: Tue Mar 31 19:35:32 2015 >> > New Revision: 280915 >> > URL: https://svnweb.freebsd.org/changeset/base/280915 >> > >> > Log: >> > Fix build. >> > >> > Modified: >> > head/contrib/ntp/ntpd/ntp_parser.y >> >> That fixed it -- thanks :)! >> > > Strangely I had no such issues locally. Having to put spaces around curly > braces would appear to work around a bug. Is this normal for YACC? Not sure, but it might be an issue surrounding the build environment with Jenkins and Yacc, yes... From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 00:45:49 2015 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 855815B3; Wed, 1 Apr 2015 00:45: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 66942231; Wed, 1 Apr 2015 00:45: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 t310jmYl019567; Wed, 1 Apr 2015 00:45:48 GMT (envelope-from wollman@FreeBSD.org) Received: (from wollman@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t310jmIn019565; Wed, 1 Apr 2015 00:45:48 GMT (envelope-from wollman@FreeBSD.org) Message-Id: <201504010045.t310jmIn019565@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: wollman set sender to wollman@FreeBSD.org using -f From: Garrett Wollman Date: Wed, 1 Apr 2015 00:45:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280930 - head/sys/rpc 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 Apr 2015 00:45:49 -0000 Author: wollman Date: Wed Apr 1 00:45:47 2015 New Revision: 280930 URL: https://svnweb.freebsd.org/changeset/base/280930 Log: Fix overflow bugs in and remove obsolete limit from kernel RPC implementation. The kernel RPC code, which is responsible for the low-level scheduling of incoming NFS requests, contains a throttling mechanism that prevents too much kernel memory from being tied up by NFS requests that are being serviced. When the throttle is engaged, the RPC layer stops servicing incoming NFS sockets, resulting ultimately in backpressure on the clients (if they're using TCP). However, this is a very heavy-handed mechanism as it prevents all clients from making any requests, regardless of how heavy or light they are. (Thus, when engaged, the throttle often prevents clients from even mounting the filesystem.) The throttle mechanism applies specifically to requests that have been received by the RPC layer (from a TCP or UDP socket) and are queued waiting to be serviced by one of the nfsd threads; it does not limit the amount of backlog in the socket buffers. The original implementation limited the total bytes of queued requests to the minimum of a quarter of (nmbclusters * MCLBYTES) and 45 MiB. The former limit seems reasonable, since requests queued in the socket buffers and replies being constructed to the requests in progress will all require some amount of network memory, but the 45 MiB limit is plainly ridiculous for modern memory sizes: when running 256 service threads on a busy server, 45 MiB would result in just a single maximum-sized NFS3PROC_WRITE queued per thread before throttling. Removing this limit exposed integer-overflow bugs in the original computation, and related bugs in the routines that actually account for the amount of traffic enqueued for service threads. The old implementation also attempted to reduce accounting overhead by batching updates until each queue is fully drained, but this is prone to livelock, resulting in repeated accumulate-throttle-drain cycles on a busy server. Various data types are changed to long or unsigned long; explicit 64-bit types are not used due to the unavailability of 64-bit atomics on many 32-bit platforms, but those platforms also cannot support nmbclusters large enough to cause overflow. This code (in a 10.1 kernel) is presently running on production NFS servers at CSAIL. Summary of this revision: * Removes 45 MiB limit on requests queued for nfsd service threads * Fixes integer-overflow and signedness bugs * Avoids unnecessary throttling by not deferring accounting for completed requests Differential Revision: https://reviews.freebsd.org/D2165 Reviewed by: rmacklem, mav MFC after: 30 days Relnotes: yes Sponsored by: MIT Computer Science & Artificial Intelligence Laboratory Modified: head/sys/rpc/svc.c head/sys/rpc/svc.h Modified: head/sys/rpc/svc.c ============================================================================== --- head/sys/rpc/svc.c Wed Apr 1 00:15:31 2015 (r280929) +++ head/sys/rpc/svc.c Wed Apr 1 00:45:47 2015 (r280930) @@ -73,7 +73,7 @@ static struct svc_callout *svc_find(SVCP char *); static void svc_new_thread(SVCGROUP *grp); static void xprt_unregister_locked(SVCXPRT *xprt); -static void svc_change_space_used(SVCPOOL *pool, int delta); +static void svc_change_space_used(SVCPOOL *pool, long delta); static bool_t svc_request_space_available(SVCPOOL *pool); /* *************** SVCXPRT related stuff **************** */ @@ -113,13 +113,14 @@ svcpool_create(const char *name, struct } /* - * Don't use more than a quarter of mbuf clusters or more than - * 45Mb buffering requests. + * Don't use more than a quarter of mbuf clusters. Nota bene: + * nmbclusters is an int, but nmbclusters*MCLBYTES may overflow + * on LP64 architectures, so cast to u_long to avoid undefined + * behavior. (ILP32 architectures cannot have nmbclusters + * large enough to overflow for other reasons.) */ - pool->sp_space_high = nmbclusters * MCLBYTES / 4; - if (pool->sp_space_high > 45 << 20) - pool->sp_space_high = 45 << 20; - pool->sp_space_low = 2 * pool->sp_space_high / 3; + pool->sp_space_high = (u_long)nmbclusters * MCLBYTES / 4; + pool->sp_space_low = (pool->sp_space_high / 3) * 2; sysctl_ctx_init(&pool->sp_sysctl); if (sysctl_base) { @@ -139,24 +140,24 @@ svcpool_create(const char *name, struct "groups", CTLFLAG_RD, &pool->sp_groupcount, 0, "Number of thread groups"); - SYSCTL_ADD_UINT(&pool->sp_sysctl, sysctl_base, OID_AUTO, + SYSCTL_ADD_ULONG(&pool->sp_sysctl, sysctl_base, OID_AUTO, "request_space_used", CTLFLAG_RD, - &pool->sp_space_used, 0, + &pool->sp_space_used, "Space in parsed but not handled requests."); - SYSCTL_ADD_UINT(&pool->sp_sysctl, sysctl_base, OID_AUTO, + SYSCTL_ADD_ULONG(&pool->sp_sysctl, sysctl_base, OID_AUTO, "request_space_used_highest", CTLFLAG_RD, - &pool->sp_space_used_highest, 0, + &pool->sp_space_used_highest, "Highest space used since reboot."); - SYSCTL_ADD_UINT(&pool->sp_sysctl, sysctl_base, OID_AUTO, + SYSCTL_ADD_ULONG(&pool->sp_sysctl, sysctl_base, OID_AUTO, "request_space_high", CTLFLAG_RW, - &pool->sp_space_high, 0, + &pool->sp_space_high, "Maximum space in parsed but not handled requests."); - SYSCTL_ADD_UINT(&pool->sp_sysctl, sysctl_base, OID_AUTO, + SYSCTL_ADD_ULONG(&pool->sp_sysctl, sysctl_base, OID_AUTO, "request_space_low", CTLFLAG_RW, - &pool->sp_space_low, 0, + &pool->sp_space_low, "Low water mark for request space."); SYSCTL_ADD_INT(&pool->sp_sysctl, sysctl_base, OID_AUTO, @@ -1064,11 +1065,11 @@ svc_assign_waiting_sockets(SVCPOOL *pool } static void -svc_change_space_used(SVCPOOL *pool, int delta) +svc_change_space_used(SVCPOOL *pool, long delta) { - unsigned int value; + unsigned long value; - value = atomic_fetchadd_int(&pool->sp_space_used, delta) + delta; + value = atomic_fetchadd_long(&pool->sp_space_used, delta) + delta; if (delta > 0) { if (value >= pool->sp_space_high && !pool->sp_space_throttled) { pool->sp_space_throttled = TRUE; @@ -1102,7 +1103,7 @@ svc_run_internal(SVCGROUP *grp, bool_t i enum xprt_stat stat; struct svc_req *rqstp; struct proc *p; - size_t sz; + long sz; int error; st = mem_alloc(sizeof(*st)); @@ -1259,17 +1260,16 @@ svc_run_internal(SVCGROUP *grp, bool_t i /* * Execute what we have queued. */ - sz = 0; mtx_lock(&st->st_lock); while ((rqstp = STAILQ_FIRST(&st->st_reqs)) != NULL) { STAILQ_REMOVE_HEAD(&st->st_reqs, rq_link); mtx_unlock(&st->st_lock); - sz += rqstp->rq_size; + sz = (long)rqstp->rq_size; svc_executereq(rqstp); + svc_change_space_used(pool, -sz); mtx_lock(&st->st_lock); } mtx_unlock(&st->st_lock); - svc_change_space_used(pool, -sz); mtx_lock(&grp->sg_lock); } Modified: head/sys/rpc/svc.h ============================================================================== --- head/sys/rpc/svc.h Wed Apr 1 00:15:31 2015 (r280929) +++ head/sys/rpc/svc.h Wed Apr 1 00:45:47 2015 (r280930) @@ -371,10 +371,10 @@ typedef struct __rpc_svcpool { * amount of memory used by RPC requests which are queued * waiting for execution. */ - unsigned int sp_space_low; - unsigned int sp_space_high; - unsigned int sp_space_used; - unsigned int sp_space_used_highest; + unsigned long sp_space_low; + unsigned long sp_space_high; + unsigned long sp_space_used; + unsigned long sp_space_used_highest; bool_t sp_space_throttled; int sp_space_throttle_count; From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 00:49:35 2015 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 0B5438B1; Wed, 1 Apr 2015 00:49: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 EACF82A6; Wed, 1 Apr 2015 00:49: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 t310nYiW020088; Wed, 1 Apr 2015 00:49:34 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t310nYZf020087; Wed, 1 Apr 2015 00:49:34 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201504010049.t310nYZf020087@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Wed, 1 Apr 2015 00:49:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280931 - head/sys/boot/forth X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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 Apr 2015 00:49:35 -0000 Author: dteske Date: Wed Apr 1 00:49:34 2015 New Revision: 280931 URL: https://svnweb.freebsd.org/changeset/base/280931 Log: Comments. No functional change. MFC after: 3 days X-MFC-to: stable/10 Modified: head/sys/boot/forth/menu-commands.4th Modified: head/sys/boot/forth/menu-commands.4th ============================================================================== --- head/sys/boot/forth/menu-commands.4th Wed Apr 1 00:45:47 2015 (r280930) +++ head/sys/boot/forth/menu-commands.4th Wed Apr 1 00:49:34 2015 (r280931) @@ -67,7 +67,7 @@ variable root_state evaluate ; -: altboot ( -- ) +: altboot ( N -- NOTREACHED ) s" boot_single" 2dup getenv -1 <> if drop ( c-addr/u c-addr -- c-addr/u ) \ unused unsetenv ( c-addr/u -- ) From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 01:08:17 2015 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 1473FD4E; Wed, 1 Apr 2015 01:08: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 F1005687; Wed, 1 Apr 2015 01:08: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 t3118GcN029804; Wed, 1 Apr 2015 01:08:16 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t31182Hx029720; Wed, 1 Apr 2015 01:08:02 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201504010108.t31182Hx029720@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 1 Apr 2015 01:08:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280932 - in head/contrib/elftoolchain: addr2line common cxxfilt elfcopy libdwarf libelf libelftc nm readelf size strings 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 Apr 2015 01:08:17 -0000 Author: emaste Date: Wed Apr 1 01:08:01 2015 New Revision: 280932 URL: https://svnweb.freebsd.org/changeset/base/280932 Log: Update elftoolchain to upstream revision 3179 Some notable changes: - libdwarf: Fixed DWARF4 line section - elfcopy: Implement --localize-hidden - nm: handle object name referenced by DW_AT_specification - elfcopy: Add --strip-dwo and --extract-dwo options for split DWARF - readelf: add remaining arm64 dynamic relocation names - nm: Avoid integer overflow in value comparison Relnotes: Yes Sponsored by: The FreeBSD Foundation Modified: head/contrib/elftoolchain/addr2line/addr2line.c head/contrib/elftoolchain/common/_elftc.h head/contrib/elftoolchain/common/elfdefinitions.h head/contrib/elftoolchain/common/native-elf-format head/contrib/elftoolchain/cxxfilt/cxxfilt.c head/contrib/elftoolchain/elfcopy/archive.c head/contrib/elftoolchain/elfcopy/ascii.c head/contrib/elftoolchain/elfcopy/binary.c head/contrib/elftoolchain/elfcopy/elfcopy.1 head/contrib/elftoolchain/elfcopy/elfcopy.h head/contrib/elftoolchain/elfcopy/main.c head/contrib/elftoolchain/elfcopy/sections.c head/contrib/elftoolchain/elfcopy/segments.c head/contrib/elftoolchain/elfcopy/symbols.c head/contrib/elftoolchain/libdwarf/_libdwarf.h head/contrib/elftoolchain/libdwarf/libdwarf.h head/contrib/elftoolchain/libdwarf/libdwarf_lineno.c head/contrib/elftoolchain/libelf/_libelf.h head/contrib/elftoolchain/libelf/_libelf_config.h head/contrib/elftoolchain/libelf/elf_data.c head/contrib/elftoolchain/libelf/elf_end.c head/contrib/elftoolchain/libelf/elf_errmsg.c head/contrib/elftoolchain/libelf/elf_errno.c head/contrib/elftoolchain/libelf/elf_fill.c head/contrib/elftoolchain/libelf/elf_flag.c head/contrib/elftoolchain/libelf/elf_getarhdr.c head/contrib/elftoolchain/libelf/elf_getarsym.c head/contrib/elftoolchain/libelf/elf_getbase.c head/contrib/elftoolchain/libelf/elf_getident.c head/contrib/elftoolchain/libelf/elf_hash.c head/contrib/elftoolchain/libelf/elf_kind.c head/contrib/elftoolchain/libelf/elf_next.c head/contrib/elftoolchain/libelf/elf_phnum.c head/contrib/elftoolchain/libelf/elf_rand.c head/contrib/elftoolchain/libelf/elf_rawfile.c head/contrib/elftoolchain/libelf/elf_scn.c head/contrib/elftoolchain/libelf/elf_shnum.c head/contrib/elftoolchain/libelf/elf_shstrndx.c head/contrib/elftoolchain/libelf/elf_version.c head/contrib/elftoolchain/libelf/gelf.h head/contrib/elftoolchain/libelf/gelf_cap.c head/contrib/elftoolchain/libelf/gelf_checksum.c head/contrib/elftoolchain/libelf/gelf_dyn.c head/contrib/elftoolchain/libelf/gelf_ehdr.c head/contrib/elftoolchain/libelf/gelf_fsize.c head/contrib/elftoolchain/libelf/gelf_getclass.c head/contrib/elftoolchain/libelf/gelf_move.c head/contrib/elftoolchain/libelf/gelf_phdr.c head/contrib/elftoolchain/libelf/gelf_rel.c head/contrib/elftoolchain/libelf/gelf_rela.c head/contrib/elftoolchain/libelf/gelf_shdr.c head/contrib/elftoolchain/libelf/gelf_sym.c head/contrib/elftoolchain/libelf/gelf_syminfo.c head/contrib/elftoolchain/libelf/gelf_symshndx.c head/contrib/elftoolchain/libelf/gelf_xlate.c head/contrib/elftoolchain/libelf/libelf.h head/contrib/elftoolchain/libelf/libelf_align.c head/contrib/elftoolchain/libelf/libelf_allocate.c head/contrib/elftoolchain/libelf/libelf_ar.c head/contrib/elftoolchain/libelf/libelf_ar_util.c head/contrib/elftoolchain/libelf/libelf_checksum.c head/contrib/elftoolchain/libelf/libelf_convert.m4 head/contrib/elftoolchain/libelf/libelf_data.c head/contrib/elftoolchain/libelf/libelf_ehdr.c head/contrib/elftoolchain/libelf/libelf_extended.c head/contrib/elftoolchain/libelf/libelf_msize.m4 head/contrib/elftoolchain/libelf/libelf_phdr.c head/contrib/elftoolchain/libelf/libelf_shdr.c head/contrib/elftoolchain/libelf/libelf_xlate.c head/contrib/elftoolchain/libelftc/_libelftc.h head/contrib/elftoolchain/libelftc/elftc_bfdtarget.c head/contrib/elftoolchain/libelftc/elftc_demangle.c head/contrib/elftoolchain/libelftc/libelftc.h head/contrib/elftoolchain/libelftc/libelftc_bfdtarget.c head/contrib/elftoolchain/nm/nm.c head/contrib/elftoolchain/readelf/readelf.c head/contrib/elftoolchain/size/size.c head/contrib/elftoolchain/strings/strings.c Directory Properties: head/contrib/elftoolchain/ (props changed) Modified: head/contrib/elftoolchain/addr2line/addr2line.c ============================================================================== --- head/contrib/elftoolchain/addr2line/addr2line.c Wed Apr 1 00:49:34 2015 (r280931) +++ head/contrib/elftoolchain/addr2line/addr2line.c Wed Apr 1 01:08:01 2015 (r280932) @@ -24,7 +24,6 @@ * SUCH DAMAGE. */ -#include #include #include #include @@ -40,7 +39,7 @@ #include "_elftc.h" -ELFTC_VCSID("$Id: addr2line.c 3148 2015-02-15 18:47:39Z emaste $"); +ELFTC_VCSID("$Id: addr2line.c 3174 2015-03-27 17:13:41Z emaste $"); static struct option longopts[] = { {"target" , required_argument, NULL, 'b'}, Modified: head/contrib/elftoolchain/common/_elftc.h ============================================================================== --- head/contrib/elftoolchain/common/_elftc.h Wed Apr 1 00:49:34 2015 (r280931) +++ head/contrib/elftoolchain/common/_elftc.h Wed Apr 1 01:08:01 2015 (r280932) @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: _elftc.h 3139 2015-01-05 03:17:06Z kaiwang27 $ + * $Id: _elftc.h 3175 2015-03-27 17:21:24Z emaste $ */ /** @@ -294,7 +294,8 @@ struct name { \ #define ELFTC_VCSID(ID) __FBSDID(ID) #endif -#if defined(__linux__) || defined(__GNU__) || defined(__GLIBC__) +#if defined(__APPLE__) || defined(__GLIBC__) || defined(__GNU__) || \ + defined(__linux__) #if defined(__GNUC__) #define ELFTC_VCSID(ID) __asm__(".ident\t\"" ID "\"") #else @@ -330,8 +331,8 @@ struct name { \ #ifndef ELFTC_GETPROGNAME -#if defined(__DragonFly__) || defined(__FreeBSD__) || defined(__minix) || \ - defined(__NetBSD__) +#if defined(__APPLE__) || defined(__DragonFly__) || defined(__FreeBSD__) || \ + defined(__minix) || defined(__NetBSD__) #include @@ -340,7 +341,7 @@ struct name { \ #endif /* __DragonFly__ || __FreeBSD__ || __minix || __NetBSD__ */ -#if defined(__GLIBC__) +#if defined(__GLIBC__) || defined(__linux__) /* * GLIBC based systems have a global 'char *' pointer referencing @@ -350,7 +351,7 @@ extern const char *program_invocation_sh #define ELFTC_GETPROGNAME() program_invocation_short_name -#endif /* __GLIBC__ */ +#endif /* __GLIBC__ || __linux__ */ #if defined(__OpenBSD__) @@ -368,6 +369,21 @@ extern const char *__progname; ** Per-OS configuration. **/ +#if defined(__APPLE__) + +#include +#define roundup2 roundup + +#define ELFTC_BYTE_ORDER _BYTE_ORDER +#define ELFTC_BYTE_ORDER_LITTLE_ENDIAN _LITTLE_ENDIAN +#define ELFTC_BYTE_ORDER_BIG_ENDIAN _BIG_ENDIAN + +#define ELFTC_HAVE_MMAP 1 +#define ELFTC_HAVE_STRMODE 1 + +#endif /* __APPLE__ */ + + #if defined(__DragonFly__) #include @@ -381,7 +397,7 @@ extern const char *__progname; #endif -#if defined(__GLIBC__) +#if defined(__GLIBC__) || defined(__linux__) #include @@ -401,7 +417,7 @@ extern const char *__progname; #define roundup2 roundup -#endif /* __GLIBC__ */ +#endif /* __GLIBC__ || __linux__ */ #if defined(__FreeBSD__) Modified: head/contrib/elftoolchain/common/elfdefinitions.h ============================================================================== --- head/contrib/elftoolchain/common/elfdefinitions.h Wed Apr 1 00:49:34 2015 (r280931) +++ head/contrib/elftoolchain/common/elfdefinitions.h Wed Apr 1 01:08:01 2015 (r280932) @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: elfdefinitions.h 3149 2015-02-15 19:00:06Z emaste $ + * $Id: elfdefinitions.h 3178 2015-03-30 18:29:13Z emaste $ */ /* @@ -171,7 +171,7 @@ _ELF_DEFINE_DT(DT_MOVEENT, 0x6F "size of DT_MOVETAB entries") \ _ELF_DEFINE_DT(DT_MOVESZ, 0x6FFFFDFBUL, \ "total size of the MOVETAB table") \ -_ELF_DEFINE_DT(DT_FEATURE_1, 0x6FFFFDFCUL, "feature values") \ +_ELF_DEFINE_DT(DT_FEATURE, 0x6FFFFDFCUL, "feature values") \ _ELF_DEFINE_DT(DT_POSFLAG_1, 0x6FFFFDFDUL, \ "dynamic position flags") \ _ELF_DEFINE_DT(DT_SYMINSZ, 0x6FFFFDFEUL, \ Modified: head/contrib/elftoolchain/common/native-elf-format ============================================================================== --- head/contrib/elftoolchain/common/native-elf-format Wed Apr 1 00:49:34 2015 (r280931) +++ head/contrib/elftoolchain/common/native-elf-format Wed Apr 1 01:08:01 2015 (r280932) @@ -1,6 +1,6 @@ #!/bin/sh # -# $Id: native-elf-format 2064 2011-10-26 15:12:32Z jkoshy $ +# $Id: native-elf-format 3167 2015-02-24 19:10:08Z emaste $ # # Find the native ELF format for a host platform by compiling a # test object and examining the resulting object. @@ -19,7 +19,7 @@ touch ${tmp_c} echo "/* Generated by ${program} on `date` */" cc -c ${tmp_c} -o ${tmp_o} -readelf -h ${tmp_o} | awk ' +LC_ALL=C readelf -h ${tmp_o} | awk ' $1 ~ "Class:" { sub("ELF","",$2); elfclass = $2; } Modified: head/contrib/elftoolchain/cxxfilt/cxxfilt.c ============================================================================== --- head/contrib/elftoolchain/cxxfilt/cxxfilt.c Wed Apr 1 00:49:34 2015 (r280931) +++ head/contrib/elftoolchain/cxxfilt/cxxfilt.c Wed Apr 1 01:08:01 2015 (r280932) @@ -24,7 +24,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include #include #include #include @@ -36,7 +35,7 @@ #include "_elftc.h" -ELFTC_VCSID("$Id: cxxfilt.c 2185 2011-11-19 16:07:16Z jkoshy $"); +ELFTC_VCSID("$Id: cxxfilt.c 3174 2015-03-27 17:13:41Z emaste $"); #define STRBUFSZ 8192 Modified: head/contrib/elftoolchain/elfcopy/archive.c ============================================================================== --- head/contrib/elftoolchain/elfcopy/archive.c Wed Apr 1 00:49:34 2015 (r280931) +++ head/contrib/elftoolchain/elfcopy/archive.c Wed Apr 1 01:08:01 2015 (r280932) @@ -24,8 +24,6 @@ * SUCH DAMAGE. */ -#include - #include #include #include @@ -40,7 +38,7 @@ #include "elfcopy.h" -ELFTC_VCSID("$Id: archive.c 3102 2014-10-29 21:09:01Z jkoshy $"); +ELFTC_VCSID("$Id: archive.c 3174 2015-03-27 17:13:41Z emaste $"); #define _ARMAG_LEN 8 /* length of ar magic string */ #define _ARHDR_LEN 60 /* length of ar header */ Modified: head/contrib/elftoolchain/elfcopy/ascii.c ============================================================================== --- head/contrib/elftoolchain/elfcopy/ascii.c Wed Apr 1 00:49:34 2015 (r280931) +++ head/contrib/elftoolchain/elfcopy/ascii.c Wed Apr 1 01:08:01 2015 (r280932) @@ -24,7 +24,6 @@ * SUCH DAMAGE. */ -#include #include #include #include @@ -37,7 +36,7 @@ #include "elfcopy.h" -ELFTC_VCSID("$Id: ascii.c 2358 2011-12-19 18:22:32Z kaiwang27 $"); +ELFTC_VCSID("$Id: ascii.c 3177 2015-03-30 18:19:41Z emaste $"); static void append_data(struct section *s, const void *buf, size_t sz); static char hex_digit(uint8_t n); Modified: head/contrib/elftoolchain/elfcopy/binary.c ============================================================================== --- head/contrib/elftoolchain/elfcopy/binary.c Wed Apr 1 00:49:34 2015 (r280931) +++ head/contrib/elftoolchain/elfcopy/binary.c Wed Apr 1 01:08:01 2015 (r280932) @@ -24,7 +24,6 @@ * SUCH DAMAGE. */ -#include #include #include #include @@ -36,7 +35,7 @@ #include "elfcopy.h" -ELFTC_VCSID("$Id: binary.c 2358 2011-12-19 18:22:32Z kaiwang27 $"); +ELFTC_VCSID("$Id: binary.c 3174 2015-03-27 17:13:41Z emaste $"); /* * Convert ELF object to `binary'. Sections with SHF_ALLOC flag set Modified: head/contrib/elftoolchain/elfcopy/elfcopy.1 ============================================================================== --- head/contrib/elftoolchain/elfcopy/elfcopy.1 Wed Apr 1 00:49:34 2015 (r280931) +++ head/contrib/elftoolchain/elfcopy/elfcopy.1 Wed Apr 1 01:08:01 2015 (r280932) @@ -21,9 +21,9 @@ .\" out of the use of this software, even if advised of the possibility of .\" such damage. .\" -.\" $Id: elfcopy.1 2373 2011-12-30 07:13:44Z jkoshy $ +.\" $Id: elfcopy.1 3173 2015-03-27 16:46:13Z emaste $ .\" -.Dd October 03, 2011 +.Dd March 27, 2015 .Os .Dt ELFCOPY 1 .Sh NAME @@ -63,7 +63,9 @@ .Op Fl -adjust-warnings | Fl -change-warnings .Op Fl -change-section-lma Ar section Ns {+|-|=} Ns Ar val .Op Fl -change-section-vma Ar section Ns {+|-|=} Ns Ar val +.Op Fl -extract-dwo .Op Fl -gap-fill Ns = Ns Ar val +.Op Fl -localize-hidden .Op Fl -no-adjust-warnings | Fl -no-change-warnings .Op Fl -only-keep-debug .Op Fl -pad-to Ns = Ns Ar address @@ -75,6 +77,7 @@ .Op Fl -set-start Ns = Ns Ar address .Op Fl -srec-forceS3 .Op Fl -srec-len Ns = Ns Ar val +.Op Fl -strip-dwo .Op Fl -strip-unneeded .Ar infile .Op Ar outfile @@ -220,10 +223,15 @@ Depending on the operator specified, the .Ar val will be used as an increment, a decrement or as the new value of the virtual memory address. +.It Fl -extract-dwo +Copy only .dwo debug sections to the output file. .It Fl -gap-fill Ns = Ns Ar val Fill the gaps between sections with the byte value specified by the argument .Ar val . +.It Fl -localize-hidden +Make all hidden symbols local to the output file. +This includes symbols with internal visiblity. .It Fl -no-adjust-warnings | Fl -no-change-warnings Do not issue a warning if the section specified by the options .Fl -change-section-address , @@ -304,6 +312,8 @@ Set the maximum length of an S-record li .Ar val . This option is only meaningful when the output target is set to .Dq srec . +.It Fl -strip-dwo +Do not copy .dwo debug sections to the output file. .It Fl -strip-unneeded Do not copy symbols that are not needed for relocation processing. .El Modified: head/contrib/elftoolchain/elfcopy/elfcopy.h ============================================================================== --- head/contrib/elftoolchain/elfcopy/elfcopy.h Wed Apr 1 00:49:34 2015 (r280931) +++ head/contrib/elftoolchain/elfcopy/elfcopy.h Wed Apr 1 01:08:01 2015 (r280932) @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: elfcopy.h 3134 2014-12-23 10:43:59Z kaiwang27 $ + * $Id: elfcopy.h 3173 2015-03-27 16:46:13Z emaste $ */ #include @@ -190,7 +190,9 @@ struct elfcopy { STRIP_NONE = 0, STRIP_ALL, STRIP_DEBUG, + STRIP_DWO, STRIP_NONDEBUG, + STRIP_NONDWO, STRIP_UNNEEDED } strip; @@ -216,6 +218,7 @@ struct elfcopy { #define SEC_REMOVE 0x00800000U #define SEC_COPY 0x01000000U #define DISCARD_LLABEL 0x02000000U +#define LOCALIZE_HIDDEN 0x04000000U int flags; /* elfcopy run control flags. */ int64_t change_addr; /* Section address adjustment. */ Modified: head/contrib/elftoolchain/elfcopy/main.c ============================================================================== --- head/contrib/elftoolchain/elfcopy/main.c Wed Apr 1 00:49:34 2015 (r280931) +++ head/contrib/elftoolchain/elfcopy/main.c Wed Apr 1 01:08:01 2015 (r280932) @@ -24,7 +24,6 @@ * SUCH DAMAGE. */ -#include #include #include @@ -40,7 +39,7 @@ #include "elfcopy.h" -ELFTC_VCSID("$Id: main.c 3156 2015-02-15 21:40:01Z emaste $"); +ELFTC_VCSID("$Id: main.c 3174 2015-03-27 17:13:41Z emaste $"); enum options { @@ -57,9 +56,11 @@ enum options ECP_GLOBALIZE_SYMBOLS, ECP_KEEP_SYMBOLS, ECP_KEEP_GLOBAL_SYMBOLS, + ECP_LOCALIZE_HIDDEN, ECP_LOCALIZE_SYMBOLS, ECP_NO_CHANGE_WARN, ECP_ONLY_DEBUG, + ECP_ONLY_DWO, ECP_PAD_TO, ECP_PREFIX_ALLOC, ECP_PREFIX_SEC, @@ -72,6 +73,7 @@ enum options ECP_SET_START, ECP_SREC_FORCE_S3, ECP_SREC_LEN, + ECP_STRIP_DWO, ECP_STRIP_SYMBOLS, ECP_STRIP_UNNEEDED, ECP_WEAKEN_ALL, @@ -124,6 +126,7 @@ static struct option elfcopy_longopts[] {"change-warnings", no_argument, NULL, ECP_CHANGE_WARN}, {"discard-all", no_argument, NULL, 'x'}, {"discard-locals", no_argument, NULL, 'X'}, + {"extract-dwo", no_argument, NULL, ECP_ONLY_DWO}, {"gap-fill", required_argument, NULL, ECP_GAP_FILL}, {"globalize-symbol", required_argument, NULL, ECP_GLOBALIZE_SYMBOL}, {"globalize-symbols", required_argument, NULL, ECP_GLOBALIZE_SYMBOLS}, @@ -134,6 +137,7 @@ static struct option elfcopy_longopts[] {"keep-global-symbol", required_argument, NULL, 'G'}, {"keep-global-symbols", required_argument, NULL, ECP_KEEP_GLOBAL_SYMBOLS}, + {"localize-hidden", no_argument, NULL, ECP_LOCALIZE_HIDDEN}, {"localize-symbol", required_argument, NULL, 'L'}, {"localize-symbols", required_argument, NULL, ECP_LOCALIZE_SYMBOLS}, {"no-adjust-warnings", no_argument, NULL, ECP_NO_CHANGE_WARN}, @@ -157,6 +161,7 @@ static struct option elfcopy_longopts[] {"srec-len", required_argument, NULL, ECP_SREC_LEN}, {"strip-all", no_argument, NULL, 'S'}, {"strip-debug", no_argument, 0, 'g'}, + {"strip-dwo", no_argument, NULL, ECP_STRIP_DWO}, {"strip-symbol", required_argument, NULL, 'N'}, {"strip-symbols", required_argument, NULL, ECP_STRIP_SYMBOLS}, {"strip-unneeded", no_argument, NULL, ECP_STRIP_UNNEEDED}, @@ -348,6 +353,7 @@ create_elf(struct elfcopy *ecp) if (ecp->strip == STRIP_DEBUG || ecp->strip == STRIP_UNNEEDED || ecp->flags & WEAKEN_ALL || + ecp->flags & LOCALIZE_HIDDEN || ecp->flags & DISCARD_LOCAL || ecp->flags & DISCARD_LLABEL || ecp->prefix_sym != NULL || @@ -870,6 +876,9 @@ elfcopy_main(struct elfcopy *ecp, int ar case ECP_KEEP_GLOBAL_SYMBOLS: parse_symlist_file(ecp, optarg, SYMOP_KEEPG); break; + case ECP_LOCALIZE_HIDDEN: + ecp->flags |= LOCALIZE_HIDDEN; + break; case ECP_LOCALIZE_SYMBOLS: parse_symlist_file(ecp, optarg, SYMOP_LOCALIZE); break; @@ -879,6 +888,9 @@ elfcopy_main(struct elfcopy *ecp, int ar case ECP_ONLY_DEBUG: ecp->strip = STRIP_NONDEBUG; break; + case ECP_ONLY_DWO: + ecp->strip = STRIP_NONDWO; + break; case ECP_PAD_TO: ecp->pad_to = (uint64_t) strtoull(optarg, NULL, 0); break; @@ -939,6 +951,9 @@ elfcopy_main(struct elfcopy *ecp, int ar ecp->flags |= SREC_FORCE_LEN; ecp->srec_len = strtoul(optarg, NULL, 0); break; + case ECP_STRIP_DWO: + ecp->strip = STRIP_DWO; + break; case ECP_STRIP_SYMBOLS: parse_symlist_file(ecp, optarg, SYMOP_STRIP); break; @@ -1379,6 +1394,8 @@ Usage: %s [options] infile [outfile]\n\ section by VAL.\n\ --gap-fill=VAL Fill the gaps between sections with bytes\n\ of value VAL.\n\ + --localize-hidden Make all hidden symbols local to the output\n\ + file.\n\ --no-adjust-warning| --no-change-warnings\n\ Do not issue warnings for non-existent\n\ sections.\n\ Modified: head/contrib/elftoolchain/elfcopy/sections.c ============================================================================== --- head/contrib/elftoolchain/elfcopy/sections.c Wed Apr 1 00:49:34 2015 (r280931) +++ head/contrib/elftoolchain/elfcopy/sections.c Wed Apr 1 01:08:01 2015 (r280932) @@ -24,7 +24,6 @@ * SUCH DAMAGE. */ -#include #include #include #include @@ -35,7 +34,7 @@ #include "elfcopy.h" -ELFTC_VCSID("$Id: sections.c 3150 2015-02-15 19:07:46Z emaste $"); +ELFTC_VCSID("$Id: sections.c 3174 2015-03-27 17:13:41Z emaste $"); static void add_gnu_debuglink(struct elfcopy *ecp); static uint32_t calc_crc32(const char *p, size_t len, uint32_t crc); @@ -47,6 +46,7 @@ static void insert_to_strtab(struct sect static int is_append_section(struct elfcopy *ecp, const char *name); static int is_compress_section(struct elfcopy *ecp, const char *name); static int is_debug_section(const char *name); +static int is_dwo_section(const char *name); static int is_modify_section(struct elfcopy *ecp, const char *name); static int is_print_section(struct elfcopy *ecp, const char *name); static int lookup_string(struct section *t, const char *s); @@ -73,6 +73,11 @@ is_remove_section(struct elfcopy *ecp, c return (0); } + if (ecp->strip == STRIP_DWO && is_dwo_section(name)) + return (1); + if (ecp->strip == STRIP_NONDWO && !is_dwo_section(name)) + return (1); + if (is_debug_section(name)) { if (ecp->strip == STRIP_ALL || ecp->strip == STRIP_DEBUG || @@ -234,6 +239,16 @@ is_debug_section(const char *name) } static int +is_dwo_section(const char *name) +{ + size_t len; + + if ((len = strlen(name)) > 4 && strcmp(name + len - 4, ".dwo") == 0) + return (1); + return (0); +} + +static int is_print_section(struct elfcopy *ecp, const char *name) { struct sec_action *sac; Modified: head/contrib/elftoolchain/elfcopy/segments.c ============================================================================== --- head/contrib/elftoolchain/elfcopy/segments.c Wed Apr 1 00:49:34 2015 (r280931) +++ head/contrib/elftoolchain/elfcopy/segments.c Wed Apr 1 01:08:01 2015 (r280932) @@ -24,7 +24,6 @@ * SUCH DAMAGE. */ -#include #include #include #include @@ -35,7 +34,7 @@ #include "elfcopy.h" -ELFTC_VCSID("$Id: segments.c 3134 2014-12-23 10:43:59Z kaiwang27 $"); +ELFTC_VCSID("$Id: segments.c 3177 2015-03-30 18:19:41Z emaste $"); static void insert_to_inseg_list(struct segment *seg, struct section *sec); Modified: head/contrib/elftoolchain/elfcopy/symbols.c ============================================================================== --- head/contrib/elftoolchain/elfcopy/symbols.c Wed Apr 1 00:49:34 2015 (r280931) +++ head/contrib/elftoolchain/elfcopy/symbols.c Wed Apr 1 01:08:01 2015 (r280932) @@ -24,7 +24,6 @@ * SUCH DAMAGE. */ -#include #include #include #include @@ -34,7 +33,7 @@ #include "elfcopy.h" -ELFTC_VCSID("$Id: symbols.c 3135 2014-12-24 08:22:43Z kaiwang27 $"); +ELFTC_VCSID("$Id: symbols.c 3174 2015-03-27 17:13:41Z emaste $"); /* Symbol table buffer structure. */ struct symbuf { @@ -129,6 +128,17 @@ is_local_symbol(unsigned char st_info) } static int +is_hidden_symbol(unsigned char st_other) +{ + + if (GELF_ST_VISIBILITY(st_other) == STV_HIDDEN || + GELF_ST_VISIBILITY(st_other) == STV_INTERNAL) + return (1); + + return (0); +} + +static int is_local_label(const char *name) { @@ -457,6 +467,11 @@ generate_symbols(struct elfcopy *ecp) lookup_symop_list(ecp, name, SYMOP_KEEPG) == NULL) sym.st_info = GELF_ST_INFO(STB_LOCAL, GELF_ST_TYPE(sym.st_info)); + if (ecp->flags & LOCALIZE_HIDDEN && + sym.st_shndx != SHN_UNDEF && + is_hidden_symbol(sym.st_other)) + sym.st_info = GELF_ST_INFO(STB_LOCAL, + GELF_ST_TYPE(sym.st_info)); } else { /* STB_LOCAL binding. */ if (lookup_symop_list(ecp, name, SYMOP_GLOBALIZE) != @@ -1036,10 +1051,8 @@ match_wildcard(const char *name, const c } match = 0; - if (!fnmatch(pattern, name, 0)) { + if (!fnmatch(pattern, name, 0)) match = 1; - printf("string '%s' match to pattern '%s'\n", name, pattern); - } return (reverse ? !match : match); } Modified: head/contrib/elftoolchain/libdwarf/_libdwarf.h ============================================================================== --- head/contrib/elftoolchain/libdwarf/_libdwarf.h Wed Apr 1 00:49:34 2015 (r280931) +++ head/contrib/elftoolchain/libdwarf/_libdwarf.h Wed Apr 1 01:08:01 2015 (r280932) @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: _libdwarf.h 3161 2015-02-15 21:43:36Z emaste $ + * $Id: _libdwarf.h 3164 2015-02-19 01:20:12Z kaiwang27 $ */ #ifndef __LIBDWARF_H_ @@ -190,6 +190,7 @@ struct _Dwarf_LineInfo { Dwarf_Half li_version; /* Version of line info. */ Dwarf_Unsigned li_hdrlen; /* Length of line info header. */ Dwarf_Small li_minlen; /* Minimum instrutction length. */ + Dwarf_Small li_maxop; /* Maximum operations per inst. */ Dwarf_Small li_defstmt; /* Default value of is_stmt. */ int8_t li_lbase; /* Line base for special opcode. */ Dwarf_Small li_lrange; /* Line range for special opcode. */ Modified: head/contrib/elftoolchain/libdwarf/libdwarf.h ============================================================================== --- head/contrib/elftoolchain/libdwarf/libdwarf.h Wed Apr 1 00:49:34 2015 (r280931) +++ head/contrib/elftoolchain/libdwarf/libdwarf.h Wed Apr 1 01:08:01 2015 (r280932) @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: libdwarf.h 3149 2015-02-15 19:00:06Z emaste $ + * $Id: libdwarf.h 3174 2015-03-27 17:13:41Z emaste $ */ #ifndef _LIBDWARF_H_ @@ -444,7 +444,9 @@ enum Dwarf_ISA { }; /* Function prototype definitions. */ -__BEGIN_DECLS +#ifdef __cplusplus +extern "C" { +#endif Dwarf_P_Attribute dwarf_add_AT_comp_dir(Dwarf_P_Die, char *, Dwarf_Error *); Dwarf_P_Attribute dwarf_add_AT_const_value_signedint(Dwarf_P_Die, Dwarf_Signed, Dwarf_Error *); @@ -831,6 +833,8 @@ int dwarf_whatattr(Dwarf_Attribute, Dwa int dwarf_whatform(Dwarf_Attribute, Dwarf_Half *, Dwarf_Error *); int dwarf_whatform_direct(Dwarf_Attribute, Dwarf_Half *, Dwarf_Error *); -__END_DECLS +#ifdef __cplusplus +} +#endif #endif /* !_LIBDWARF_H_ */ Modified: head/contrib/elftoolchain/libdwarf/libdwarf_lineno.c ============================================================================== --- head/contrib/elftoolchain/libdwarf/libdwarf_lineno.c Wed Apr 1 00:49:34 2015 (r280931) +++ head/contrib/elftoolchain/libdwarf/libdwarf_lineno.c Wed Apr 1 01:08:01 2015 (r280932) @@ -26,7 +26,7 @@ #include "_libdwarf.h" -ELFTC_VCSID("$Id: libdwarf_lineno.c 3100 2014-10-25 20:34:29Z jkoshy $"); +ELFTC_VCSID("$Id: libdwarf_lineno.c 3164 2015-02-19 01:20:12Z kaiwang27 $"); static int _dwarf_lineno_add_file(Dwarf_LineInfo li, uint8_t **p, const char *compdir, @@ -315,6 +315,8 @@ _dwarf_lineno_init(Dwarf_Die die, uint64 li->li_hdrlen = dbg->read(ds->ds_data, &offset, dwarf_size); hdroff = offset; li->li_minlen = dbg->read(ds->ds_data, &offset, 1); + if (li->li_version == 4) + li->li_maxop = dbg->read(ds->ds_data, &offset, 1); li->li_defstmt = dbg->read(ds->ds_data, &offset, 1); li->li_lbase = dbg->read(ds->ds_data, &offset, 1); li->li_lrange = dbg->read(ds->ds_data, &offset, 1); Modified: head/contrib/elftoolchain/libelf/_libelf.h ============================================================================== --- head/contrib/elftoolchain/libelf/_libelf.h Wed Apr 1 00:49:34 2015 (r280931) +++ head/contrib/elftoolchain/libelf/_libelf.h Wed Apr 1 01:08:01 2015 (r280932) @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: _libelf.h 3011 2014-03-23 03:32:42Z jkoshy $ + * $Id: _libelf.h 3174 2015-03-27 17:13:41Z emaste $ */ #ifndef __LIBELF_H_ @@ -194,7 +194,9 @@ enum { * Function Prototypes. */ -__BEGIN_DECLS +#ifdef __cplusplus +extern "C" { +#endif struct _Libelf_Data *_libelf_allocate_data(Elf_Scn *_s); Elf *_libelf_allocate_elf(void); Elf_Scn *_libelf_allocate_scn(Elf *_e, size_t _ndx); @@ -230,6 +232,8 @@ int _libelf_setshstrndx(Elf *_e, void *_ Elf_Data *_libelf_xlate(Elf_Data *_d, const Elf_Data *_s, unsigned int _encoding, int _elfclass, int _direction); int _libelf_xlate_shtype(uint32_t _sht); -__END_DECLS +#ifdef __cplusplus +} +#endif #endif /* __LIBELF_H_ */ Modified: head/contrib/elftoolchain/libelf/_libelf_config.h ============================================================================== --- head/contrib/elftoolchain/libelf/_libelf_config.h Wed Apr 1 00:49:34 2015 (r280931) +++ head/contrib/elftoolchain/libelf/_libelf_config.h Wed Apr 1 01:08:01 2015 (r280932) @@ -23,10 +23,10 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: _libelf_config.h 3143 2015-02-15 17:57:38Z emaste $ + * $Id: _libelf_config.h 3168 2015-02-24 19:17:47Z emaste $ */ -#ifdef __DragonFly__ +#if defined(__APPLE__) || defined(__DragonFly__) #if defined(__amd64__) #define LIBELF_ARCH EM_X86_64 Modified: head/contrib/elftoolchain/libelf/elf_data.c ============================================================================== --- head/contrib/elftoolchain/libelf/elf_data.c Wed Apr 1 00:49:34 2015 (r280931) +++ head/contrib/elftoolchain/libelf/elf_data.c Wed Apr 1 01:08:01 2015 (r280932) @@ -32,7 +32,7 @@ #include "_libelf.h" -ELFTC_VCSID("$Id: elf_data.c 3009 2014-03-23 01:49:59Z jkoshy $"); +ELFTC_VCSID("$Id: elf_data.c 3177 2015-03-30 18:19:41Z emaste $"); Elf_Data * elf_getdata(Elf_Scn *s, Elf_Data *ed) Modified: head/contrib/elftoolchain/libelf/elf_end.c ============================================================================== --- head/contrib/elftoolchain/libelf/elf_end.c Wed Apr 1 00:49:34 2015 (r280931) +++ head/contrib/elftoolchain/libelf/elf_end.c Wed Apr 1 01:08:01 2015 (r280932) @@ -24,8 +24,6 @@ * SUCH DAMAGE. */ -#include - #include #include #include @@ -36,7 +34,7 @@ #include #endif -ELFTC_VCSID("$Id: elf_end.c 2240 2011-11-28 06:36:48Z jkoshy $"); +ELFTC_VCSID("$Id: elf_end.c 3174 2015-03-27 17:13:41Z emaste $"); int elf_end(Elf *e) Modified: head/contrib/elftoolchain/libelf/elf_errmsg.c ============================================================================== --- head/contrib/elftoolchain/libelf/elf_errmsg.c Wed Apr 1 00:49:34 2015 (r280931) +++ head/contrib/elftoolchain/libelf/elf_errmsg.c Wed Apr 1 01:08:01 2015 (r280932) @@ -24,15 +24,13 @@ * SUCH DAMAGE. */ -#include - #include #include #include #include "_libelf.h" -ELFTC_VCSID("$Id: elf_errmsg.c 3012 2014-03-23 03:41:38Z jkoshy $"); +ELFTC_VCSID("$Id: elf_errmsg.c 3174 2015-03-27 17:13:41Z emaste $"); /* * Retrieve a human readable translation for an error message. Modified: head/contrib/elftoolchain/libelf/elf_errno.c ============================================================================== --- head/contrib/elftoolchain/libelf/elf_errno.c Wed Apr 1 00:49:34 2015 (r280931) +++ head/contrib/elftoolchain/libelf/elf_errno.c Wed Apr 1 01:08:01 2015 (r280932) @@ -24,13 +24,11 @@ * SUCH DAMAGE. */ -#include - #include #include "_libelf.h" -ELFTC_VCSID("$Id: elf_errno.c 2225 2011-11-26 18:55:54Z jkoshy $"); +ELFTC_VCSID("$Id: elf_errno.c 3174 2015-03-27 17:13:41Z emaste $"); int elf_errno(void) Modified: head/contrib/elftoolchain/libelf/elf_fill.c ============================================================================== --- head/contrib/elftoolchain/libelf/elf_fill.c Wed Apr 1 00:49:34 2015 (r280931) +++ head/contrib/elftoolchain/libelf/elf_fill.c Wed Apr 1 01:08:01 2015 (r280932) @@ -24,13 +24,11 @@ * SUCH DAMAGE. */ -#include - #include #include "_libelf.h" -ELFTC_VCSID("$Id: elf_fill.c 2225 2011-11-26 18:55:54Z jkoshy $"); +ELFTC_VCSID("$Id: elf_fill.c 3174 2015-03-27 17:13:41Z emaste $"); void elf_fill(int fill) Modified: head/contrib/elftoolchain/libelf/elf_flag.c ============================================================================== --- head/contrib/elftoolchain/libelf/elf_flag.c Wed Apr 1 00:49:34 2015 (r280931) +++ head/contrib/elftoolchain/libelf/elf_flag.c Wed Apr 1 01:08:01 2015 (r280932) @@ -24,13 +24,11 @@ * SUCH DAMAGE. */ -#include - #include #include "_libelf.h" -ELFTC_VCSID("$Id: elf_flag.c 2988 2014-03-17 08:51:49Z jkoshy $"); +ELFTC_VCSID("$Id: elf_flag.c 3174 2015-03-27 17:13:41Z emaste $"); unsigned int elf_flagarhdr(Elf_Arhdr *a, Elf_Cmd c, unsigned int flags) Modified: head/contrib/elftoolchain/libelf/elf_getarhdr.c ============================================================================== --- head/contrib/elftoolchain/libelf/elf_getarhdr.c Wed Apr 1 00:49:34 2015 (r280931) +++ head/contrib/elftoolchain/libelf/elf_getarhdr.c Wed Apr 1 01:08:01 2015 (r280932) @@ -24,13 +24,11 @@ * SUCH DAMAGE. */ -#include - #include #include "_libelf.h" -ELFTC_VCSID("$Id: elf_getarhdr.c 2225 2011-11-26 18:55:54Z jkoshy $"); +ELFTC_VCSID("$Id: elf_getarhdr.c 3174 2015-03-27 17:13:41Z emaste $"); Elf_Arhdr * elf_getarhdr(Elf *e) Modified: head/contrib/elftoolchain/libelf/elf_getarsym.c ============================================================================== --- head/contrib/elftoolchain/libelf/elf_getarsym.c Wed Apr 1 00:49:34 2015 (r280931) +++ head/contrib/elftoolchain/libelf/elf_getarsym.c Wed Apr 1 01:08:01 2015 (r280932) @@ -24,13 +24,11 @@ * SUCH DAMAGE. */ -#include - #include #include "_libelf.h" -ELFTC_VCSID("$Id: elf_getarsym.c 2225 2011-11-26 18:55:54Z jkoshy $"); +ELFTC_VCSID("$Id: elf_getarsym.c 3174 2015-03-27 17:13:41Z emaste $"); Elf_Arsym * elf_getarsym(Elf *ar, size_t *ptr) Modified: head/contrib/elftoolchain/libelf/elf_getbase.c ============================================================================== --- head/contrib/elftoolchain/libelf/elf_getbase.c Wed Apr 1 00:49:34 2015 (r280931) +++ head/contrib/elftoolchain/libelf/elf_getbase.c Wed Apr 1 01:08:01 2015 (r280932) @@ -24,13 +24,11 @@ * SUCH DAMAGE. */ -#include - #include #include "_libelf.h" -ELFTC_VCSID("$Id: elf_getbase.c 2225 2011-11-26 18:55:54Z jkoshy $"); +ELFTC_VCSID("$Id: elf_getbase.c 3174 2015-03-27 17:13:41Z emaste $"); off_t elf_getbase(Elf *e) Modified: head/contrib/elftoolchain/libelf/elf_getident.c ============================================================================== --- head/contrib/elftoolchain/libelf/elf_getident.c Wed Apr 1 00:49:34 2015 (r280931) +++ head/contrib/elftoolchain/libelf/elf_getident.c Wed Apr 1 01:08:01 2015 (r280932) @@ -24,15 +24,13 @@ * SUCH DAMAGE. */ -#include - #include #include #include #include "_libelf.h" -ELFTC_VCSID("$Id: elf_getident.c 2225 2011-11-26 18:55:54Z jkoshy $"); +ELFTC_VCSID("$Id: elf_getident.c 3174 2015-03-27 17:13:41Z emaste $"); char * elf_getident(Elf *e, size_t *sz) Modified: head/contrib/elftoolchain/libelf/elf_hash.c ============================================================================== --- head/contrib/elftoolchain/libelf/elf_hash.c Wed Apr 1 00:49:34 2015 (r280931) +++ head/contrib/elftoolchain/libelf/elf_hash.c Wed Apr 1 01:08:01 2015 (r280932) @@ -24,13 +24,11 @@ * SUCH DAMAGE. */ -#include - #include #include "_libelf.h" -ELFTC_VCSID("$Id: elf_hash.c 2225 2011-11-26 18:55:54Z jkoshy $"); +ELFTC_VCSID("$Id: elf_hash.c 3174 2015-03-27 17:13:41Z emaste $"); /* * This elf_hash function is defined by the System V ABI. Modified: head/contrib/elftoolchain/libelf/elf_kind.c ============================================================================== --- head/contrib/elftoolchain/libelf/elf_kind.c Wed Apr 1 00:49:34 2015 (r280931) +++ head/contrib/elftoolchain/libelf/elf_kind.c Wed Apr 1 01:08:01 2015 (r280932) @@ -24,13 +24,11 @@ * SUCH DAMAGE. */ -#include - #include #include "_libelf.h" -ELFTC_VCSID("$Id: elf_kind.c 2225 2011-11-26 18:55:54Z jkoshy $"); +ELFTC_VCSID("$Id: elf_kind.c 3174 2015-03-27 17:13:41Z emaste $"); Elf_Kind elf_kind(Elf *e) Modified: head/contrib/elftoolchain/libelf/elf_next.c ============================================================================== --- head/contrib/elftoolchain/libelf/elf_next.c Wed Apr 1 00:49:34 2015 (r280931) +++ head/contrib/elftoolchain/libelf/elf_next.c Wed Apr 1 01:08:01 2015 (r280932) @@ -24,15 +24,13 @@ * SUCH DAMAGE. */ -#include - #include #include #include #include "_libelf.h" -ELFTC_VCSID("$Id: elf_next.c 2989 2014-03-17 09:56:46Z jkoshy $"); +ELFTC_VCSID("$Id: elf_next.c 3174 2015-03-27 17:13:41Z emaste $"); Elf_Cmd elf_next(Elf *e) Modified: head/contrib/elftoolchain/libelf/elf_phnum.c ============================================================================== --- head/contrib/elftoolchain/libelf/elf_phnum.c Wed Apr 1 00:49:34 2015 (r280931) +++ head/contrib/elftoolchain/libelf/elf_phnum.c Wed Apr 1 01:08:01 2015 (r280932) @@ -24,14 +24,12 @@ * SUCH DAMAGE. */ -#include - #include #include #include "_libelf.h" -ELFTC_VCSID("$Id: elf_phnum.c 2225 2011-11-26 18:55:54Z jkoshy $"); +ELFTC_VCSID("$Id: elf_phnum.c 3174 2015-03-27 17:13:41Z emaste $"); static int _libelf_getphdrnum(Elf *e, size_t *phnum) Modified: head/contrib/elftoolchain/libelf/elf_rand.c ============================================================================== --- head/contrib/elftoolchain/libelf/elf_rand.c Wed Apr 1 00:49:34 2015 (r280931) +++ head/contrib/elftoolchain/libelf/elf_rand.c Wed Apr 1 01:08:01 2015 (r280932) @@ -24,14 +24,12 @@ * SUCH DAMAGE. */ -#include - #include #include #include "_libelf.h" -ELFTC_VCSID("$Id: elf_rand.c 2991 2014-03-17 09:57:04Z jkoshy $"); +ELFTC_VCSID("$Id: elf_rand.c 3174 2015-03-27 17:13:41Z emaste $"); off_t elf_rand(Elf *ar, off_t offset) Modified: head/contrib/elftoolchain/libelf/elf_rawfile.c ============================================================================== --- head/contrib/elftoolchain/libelf/elf_rawfile.c Wed Apr 1 00:49:34 2015 (r280931) +++ head/contrib/elftoolchain/libelf/elf_rawfile.c Wed Apr 1 01:08:01 2015 (r280932) @@ -24,13 +24,11 @@ * SUCH DAMAGE. */ -#include - #include #include "_libelf.h" -ELFTC_VCSID("$Id: elf_rawfile.c 3013 2014-03-23 06:16:59Z jkoshy $"); +ELFTC_VCSID("$Id: elf_rawfile.c 3174 2015-03-27 17:13:41Z emaste $"); char * elf_rawfile(Elf *e, size_t *sz) Modified: head/contrib/elftoolchain/libelf/elf_scn.c ============================================================================== --- head/contrib/elftoolchain/libelf/elf_scn.c Wed Apr 1 00:49:34 2015 (r280931) +++ head/contrib/elftoolchain/libelf/elf_scn.c Wed Apr 1 01:08:01 2015 (r280932) @@ -24,7 +24,6 @@ * SUCH DAMAGE. */ -#include #include #include @@ -37,7 +36,7 @@ #include "_libelf.h" -ELFTC_VCSID("$Id: elf_scn.c 3147 2015-02-15 18:45:23Z emaste $"); +ELFTC_VCSID("$Id: elf_scn.c 3177 2015-03-30 18:19:41Z emaste $"); /* * Load an ELF section table and create a list of Elf_Scn structures. Modified: head/contrib/elftoolchain/libelf/elf_shnum.c ============================================================================== --- head/contrib/elftoolchain/libelf/elf_shnum.c Wed Apr 1 00:49:34 2015 (r280931) +++ head/contrib/elftoolchain/libelf/elf_shnum.c Wed Apr 1 01:08:01 2015 (r280932) @@ -24,14 +24,12 @@ * SUCH DAMAGE. */ -#include - #include #include #include "_libelf.h" -ELFTC_VCSID("$Id: elf_shnum.c 2225 2011-11-26 18:55:54Z jkoshy $"); +ELFTC_VCSID("$Id: elf_shnum.c 3174 2015-03-27 17:13:41Z emaste $"); static int _libelf_getshdrnum(Elf *e, size_t *shnum) Modified: head/contrib/elftoolchain/libelf/elf_shstrndx.c ============================================================================== --- head/contrib/elftoolchain/libelf/elf_shstrndx.c Wed Apr 1 00:49:34 2015 (r280931) +++ head/contrib/elftoolchain/libelf/elf_shstrndx.c Wed Apr 1 01:08:01 2015 (r280932) @@ -24,14 +24,12 @@ * SUCH DAMAGE. */ -#include - #include #include *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 01:14:23 2015 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 B0A3BB4; Wed, 1 Apr 2015 01:14: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 9A0E77B0; Wed, 1 Apr 2015 01:14: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 t311ENEw034167; Wed, 1 Apr 2015 01:14:23 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t311EKCq034154; Wed, 1 Apr 2015 01:14:20 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201504010114.t311EKCq034154@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Wed, 1 Apr 2015 01:14:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280933 - head/sys/boot/forth X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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 Apr 2015 01:14:23 -0000 Author: dteske Date: Wed Apr 1 01:14:19 2015 New Revision: 280933 URL: https://svnweb.freebsd.org/changeset/base/280933 Log: Move beastie to logo-*.4th; brands to brand-*.4th Suggested by: jkh, alfred MFC after: 3 days X-MFC-to: stable/10 Added: head/sys/boot/forth/brand-fbsd.4th (contents, props changed) head/sys/boot/forth/logo-beastie.4th (contents, props changed) head/sys/boot/forth/logo-beastiebw.4th (contents, props changed) head/sys/boot/forth/logo-fbsdbw.4th (contents, props changed) head/sys/boot/forth/logo-orb.4th (contents, props changed) head/sys/boot/forth/logo-orbbw.4th (contents, props changed) Modified: head/sys/boot/forth/beastie.4th head/sys/boot/forth/brand.4th head/sys/boot/forth/version.4th Modified: head/sys/boot/forth/beastie.4th ============================================================================== --- head/sys/boot/forth/beastie.4th Wed Apr 1 01:08:01 2015 (r280932) +++ head/sys/boot/forth/beastie.4th Wed Apr 1 01:14:19 2015 (r280933) @@ -37,157 +37,13 @@ variable logoY 46 logoX ! 4 logoY ! -: beastie-logo ( x y -- ) \ color BSD mascot (19 rows x 34 columns) - -2dup at-xy ." , ," 1+ -2dup at-xy ." /( )`" 1+ -2dup at-xy ." \ \___ / |" 1+ -2dup at-xy ." /- _ `-/ '" 1+ -2dup at-xy ." (/\/ \ \ /\" 1+ -2dup at-xy ." / / | ` \" 1+ -2dup at-xy ." O O ) / |" 1+ -2dup at-xy ." `-^--'`< '" 1+ -2dup at-xy ." (_.) _ ) /" 1+ -2dup at-xy ." `.___/` /" 1+ -2dup at-xy ." `-----' /" 1+ -2dup at-xy ." <----. __ / __ \" 1+ -2dup at-xy ." <----|====O)))==) \) /====|" 1+ -2dup at-xy ." <----' `--' `.__,' \" 1+ -2dup at-xy ." | |" 1+ -2dup at-xy ." \ / /\" 1+ -2dup at-xy ." ______( (_ / \______/" 1+ -2dup at-xy ." ,' ,-----' |" 1+ - at-xy ." `--{__________)" - - \ Put the cursor back at the bottom - 0 25 at-xy -; - -: beastiebw-logo ( x y -- ) \ B/W BSD mascot (19 rows x 34 columns) - - 2dup at-xy ." , ," 1+ - 2dup at-xy ." /( )`" 1+ - 2dup at-xy ." \ \___ / |" 1+ - 2dup at-xy ." /- _ `-/ '" 1+ - 2dup at-xy ." (/\/ \ \ /\" 1+ - 2dup at-xy ." / / | ` \" 1+ - 2dup at-xy ." O O ) / |" 1+ - 2dup at-xy ." `-^--'`< '" 1+ - 2dup at-xy ." (_.) _ ) /" 1+ - 2dup at-xy ." `.___/` /" 1+ - 2dup at-xy ." `-----' /" 1+ - 2dup at-xy ." <----. __ / __ \" 1+ - 2dup at-xy ." <----|====O)))==) \) /====|" 1+ - 2dup at-xy ." <----' `--' `.__,' \" 1+ - 2dup at-xy ." | |" 1+ - 2dup at-xy ." \ / /\" 1+ - 2dup at-xy ." ______( (_ / \______/" 1+ - 2dup at-xy ." ,' ,-----' |" 1+ - at-xy ." `--{__________)" - - \ Put the cursor back at the bottom - 0 25 at-xy -; - -: fbsdbw-logo ( x y -- ) \ "FreeBSD" logo in B/W (13 rows x 21 columns) - - \ We used to use the beastie himself as our default... until the - \ eventual complaint derided his reign of the advanced boot-menu. - \ - \ This is the replacement of beastie to satiate the haters of our - \ beloved helper-daemon (ready to track down and spear bugs with - \ his trident and sporty sneakers; see above). - \ - \ Since we merely just changed the default and not the default- - \ location, below is an adjustment to the passed-in coordinates, - \ forever influenced by the proper location of beastie himself - \ kept as the default loader_logo_x/loader_logo_y values. - \ - 5 + swap 6 + swap - - 2dup at-xy ." ______" 1+ - 2dup at-xy ." | ____| __ ___ ___ " 1+ - 2dup at-xy ." | |__ | '__/ _ \/ _ \" 1+ - 2dup at-xy ." | __|| | | __/ __/" 1+ - 2dup at-xy ." | | | | | | |" 1+ - 2dup at-xy ." |_| |_| \___|\___|" 1+ - 2dup at-xy ." ____ _____ _____" 1+ - 2dup at-xy ." | _ \ / ____| __ \" 1+ - 2dup at-xy ." | |_) | (___ | | | |" 1+ - 2dup at-xy ." | _ < \___ \| | | |" 1+ - 2dup at-xy ." | |_) |____) | |__| |" 1+ - 2dup at-xy ." | | | |" 1+ - at-xy ." |____/|_____/|_____/" - - \ Put the cursor back at the bottom - 0 25 at-xy -; - -: orb-logo ( x y -- ) \ color Orb mascot (15 rows x 30 columns) - - 3 + \ beastie adjustment (see `fbsdbw-logo' comments above) - - 2dup at-xy ." ``` `" 1+ - 2dup at-xy ." s` `.....---.......--.``` -/" 1+ - 2dup at-xy ." +o .--` /y:` +." 1+ - 2dup at-xy ." yo`:. :o `+-" 1+ - 2dup at-xy ." y/ -/` -o/" 1+ - 2dup at-xy ." .- ::/sy+:." 1+ - 2dup at-xy ." / `-- /" 1+ - 2dup at-xy ." `: :`" 1+ - 2dup at-xy ." `: :`" 1+ - 2dup at-xy ." / /" 1+ - 2dup at-xy ." .- -." 1+ - 2dup at-xy ." -- -." 1+ - 2dup at-xy ." `:` `:`" 1+ - 2dup at-xy ." .-- `--." 1+ - at-xy ." .---.....----." - - \ Put the cursor back at the bottom - 0 25 at-xy -; - -: orbbw-logo ( x y -- ) \ B/W Orb mascot (15 rows x 32 columns) - - 3 + \ beastie adjustment (see `fbsdbw-logo' comments above) - - 2dup at-xy ." ``` `" 1+ - 2dup at-xy ." s` `.....---.......--.``` -/" 1+ - 2dup at-xy ." +o .--` /y:` +." 1+ - 2dup at-xy ." yo`:. :o `+-" 1+ - 2dup at-xy ." y/ -/` -o/" 1+ - 2dup at-xy ." .- ::/sy+:." 1+ - 2dup at-xy ." / `-- /" 1+ - 2dup at-xy ." `: :`" 1+ - 2dup at-xy ." `: :`" 1+ - 2dup at-xy ." / /" 1+ - 2dup at-xy ." .- -." 1+ - 2dup at-xy ." -- -." 1+ - 2dup at-xy ." `:` `:`" 1+ - 2dup at-xy ." .-- `--." 1+ - at-xy ." .---.....----." - - \ Put the cursor back at the bottom - 0 25 at-xy -; - \ This function draws any number of beastie logos at (loader_logo_x, \ loader_logo_y) if defined, else (46,4) (to the right of the menu). To choose \ your beastie, set the variable `loader_logo' to the respective logo name. \ -\ Currently available: -\ -\ NAME DESCRIPTION -\ beastie Color ``Helper Daemon'' mascot (19 rows x 34 columns) -\ beastiebw B/W ``Helper Daemon'' mascot (19 rows x 34 columns) -\ fbsdbw "FreeBSD" logo in B/W (13 rows x 21 columns) -\ orb Color ``Orb'' mascot (15 rows x 30 columns) (2nd default) -\ orbbw B/W ``Orb'' mascot (15 rows x 32 columns) -\ tribute Color ``Tribute'' (must fit 19 rows x 34 columns) (default) -\ tributebw B/W ``Tribute'' (must fit 19 rows x 34 columns) -\ -\ NOTE: Setting `loader_logo' to an undefined value (such as "none") will -\ prevent beastie from being drawn. +\ NOTE: Each is defined as a logo function in /boot/logo-${loader_logo}.4th +\ NOTE: If `/boot/logo-${loader_logo}.4th' does not exist or does not define +\ a `logo' function, no beastie is drawn. \ : draw-beastie ( -- ) \ at (loader_logo_x,loader_logo_y), else (46,4) @@ -198,43 +54,32 @@ variable logoY ?number 1 = if logoY ! then else drop then - s" loader_logo" getenv dup -1 <> if - dup 5 + allocate if ENOMEM throw then - 0 2swap strcat s" -logo" strcat - over -rot ( a-addr/u -- a-addr a-addr/u ) - sfind ( a-addr a-addr/u -- a-addr xt bool ) - rot ( a-addr xt bool -- xt bool a-addr ) - free ( xt bool a-addr -- xt bool ior ) - if EFREE throw then + + \ If `logo' is defined, execute it + s" logo" sfind ( -- xt|0 bool ) if + logoX @ logoY @ rot execute else - 0 ( cruft -- cruft bool ) \ load the default below - then - 0= if - drop ( cruft -- ) - loader_color? if - ['] orb-logo + \ Not defined; try-include desired logo file + drop ( xt = 0 ) \ cruft + s" loader_logo" getenv dup -1 = over 0= or if + dup 0= if 2drop else drop then \ getenv result unused + loader_color? if + s" try-include /boot/logo-orb.4th" + else + s" try-include /boot/logo-orbbw.4th" + then else - ['] orbbw-logo + 2drop ( c-addr/u -- ) \ getenv result unused + s" try-include /boot/logo-${loader_logo}.4th" then - then - logoX @ logoY @ rot execute -; - -: clear-beastie ( -- ) \ clears beastie from the screen - logoX @ logoY @ - 2dup at-xy 34 spaces 1+ 2dup at-xy 34 spaces 1+ - 2dup at-xy 34 spaces 1+ 2dup at-xy 34 spaces 1+ - 2dup at-xy 34 spaces 1+ 2dup at-xy 34 spaces 1+ - 2dup at-xy 34 spaces 1+ 2dup at-xy 34 spaces 1+ - 2dup at-xy 34 spaces 1+ 2dup at-xy 34 spaces 1+ - 2dup at-xy 34 spaces 1+ 2dup at-xy 34 spaces 1+ - 2dup at-xy 34 spaces 1+ 2dup at-xy 34 spaces 1+ - 2dup at-xy 34 spaces 1+ 2dup at-xy 34 spaces 1+ - 2dup at-xy 34 spaces 1+ 2dup at-xy 34 spaces 1+ - 2dup at-xy 34 spaces 2drop + evaluate + 1 spaces - \ Put the cursor back at the bottom - 0 25 at-xy + \ Execute `logo' if defined now + s" logo" sfind if + logoX @ logoY @ rot execute + else drop then + then ; : beastie-start ( -- ) \ starts the menu Added: head/sys/boot/forth/brand-fbsd.4th ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/forth/brand-fbsd.4th Wed Apr 1 01:14:19 2015 (r280933) @@ -0,0 +1,38 @@ +\ Copyright (c) 2006-2015 Devin Teske +\ All rights reserved. +\ +\ Redistribution and use in source and binary forms, with or without +\ modification, are permitted provided that the following conditions +\ are met: +\ 1. Redistributions of source code must retain the above copyright +\ notice, this list of conditions and the following disclaimer. +\ 2. Redistributions in binary form must reproduce the above copyright +\ notice, this list of conditions and the following disclaimer in the +\ documentation and/or other materials provided with the distribution. +\ +\ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +\ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +\ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +\ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +\ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +\ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +\ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +\ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +\ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +\ SUCH DAMAGE. +\ +\ $FreeBSD$ + +2 brandX ! 1 brandY ! \ Initialize brand placement defaults + +: brand ( x y -- ) \ "FreeBSD" [wide] logo in B/W (7 rows x 42 columns) + + 2dup at-xy ." ______ ____ _____ _____ " 1+ + 2dup at-xy ." | ____| | _ \ / ____| __ \ " 1+ + 2dup at-xy ." | |___ _ __ ___ ___ | |_) | (___ | | | |" 1+ + 2dup at-xy ." | ___| '__/ _ \/ _ \| _ < \___ \| | | |" 1+ + 2dup at-xy ." | | | | | __/ __/| |_) |____) | |__| |" 1+ + 2dup at-xy ." | | | | | | || | | |" 1+ + at-xy ." |_| |_| \___|\___||____/|_____/|_____/ " +; Modified: head/sys/boot/forth/brand.4th ============================================================================== --- head/sys/boot/forth/brand.4th Wed Apr 1 01:08:01 2015 (r280932) +++ head/sys/boot/forth/brand.4th Wed Apr 1 01:14:19 2015 (r280933) @@ -33,33 +33,13 @@ variable brandY 2 brandX ! 1 brandY ! -: fbsd-logo ( x y -- ) \ "FreeBSD" [wide] logo in B/W (7 rows x 42 columns) - - 2dup at-xy ." ______ ____ _____ _____ " 1+ - 2dup at-xy ." | ____| | _ \ / ____| __ \ " 1+ - 2dup at-xy ." | |___ _ __ ___ ___ | |_) | (___ | | | |" 1+ - 2dup at-xy ." | ___| '__/ _ \/ _ \| _ < \___ \| | | |" 1+ - 2dup at-xy ." | | | | | __/ __/| |_) |____) | |__| |" 1+ - 2dup at-xy ." | | | | | | || | | |" 1+ - at-xy ." |_| |_| \___|\___||____/|_____/|_____/ " - - \ Put the cursor back at the bottom - 0 25 at-xy -; - -\ This function draws any number of company logos at (loader_brand_x, -\ loader_brand_y) if defined, or (2,1) (top-left) if not defined. To choose -\ your logo, set the variable `loader_brand' to the respective logo name. -\ -\ Currently available: -\ -\ NAME DESCRIPTION -\ fbsd FreeBSD logo +\ This function draws any number of company brands at (loader_brand_x, +\ loader_brand_y) if defined, or (2,1) (top-left). To choose your brand, set +\ the variable `loader_brand' to the respective brand name. \ -\ NOTE: Setting `loader_brand' to the value of an existing function -\ (such as "mycustom-brand") will cause that symbol to be executed. -\ NOTE: Setting `loader_brand' to an undefined value (such as "none") will -\ prevent any brand from being drawn. +\ NOTE: Each is defined as a brand function in /boot/brand-${loader_brand}.4th +\ NOTE: If `/boot/brand-${loader_brand}.4th' does not exist or does not define +\ a `brand' function, no brand is drawn. \ : draw-brand ( -- ) \ at (loader_brand_x,loader_brand_y), else (2,1) @@ -70,24 +50,25 @@ variable brandY ?number 1 = if brandY ! then else drop then - s" loader_brand" getenv dup -1 = if - brandX @ brandY @ fbsd-logo - drop exit + \ If `brand' is defined, execute it + s" brand" sfind ( -- xt|0 bool ) if + brandX @ brandY @ rot execute + else + \ Not defined; try-include desired brand file + drop ( xt = 0 ) \ cruft + s" loader_brand" getenv dup -1 = over 0= or if + dup 0= if 2drop else drop then \ getenv result unused + s" try-include /boot/brand-fbsd.4th" + else + 2drop ( c-addr/u -- ) \ getenv result unused + s" try-include /boot/brand-${loader_brand}.4th" + then + evaluate + 1 spaces + + \ Execute `brand' if defined now + s" brand" sfind if + brandX @ brandY @ rot execute + else drop then then - - 2dup s" fbsd" compare-insensitive 0= if - brandX @ brandY @ fbsd-logo - 2drop exit - then - - \ if it refers to a raw symbol then run that function - sfind if - brandX @ brandY @ - 2 roll - execute - else - drop - then - - 2drop ; Added: head/sys/boot/forth/logo-beastie.4th ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/forth/logo-beastie.4th Wed Apr 1 01:14:19 2015 (r280933) @@ -0,0 +1,52 @@ +\ Copyright (c) 2003 Scott Long +\ Copyright (c) 2003 Aleksander Fafula +\ Copyright (c) 2006-2015 Devin Teske +\ All rights reserved. +\ +\ Redistribution and use in source and binary forms, with or without +\ modification, are permitted provided that the following conditions +\ are met: +\ 1. Redistributions of source code must retain the above copyright +\ notice, this list of conditions and the following disclaimer. +\ 2. Redistributions in binary form must reproduce the above copyright +\ notice, this list of conditions and the following disclaimer in the +\ documentation and/or other materials provided with the distribution. +\ +\ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +\ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +\ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +\ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +\ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +\ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +\ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +\ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +\ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +\ SUCH DAMAGE. +\ +\ $FreeBSD$ + +46 logoX ! 4 logoY ! \ Initialize logo placement defaults + +: logo ( x y -- ) \ color BSD mascot (19 rows x 34 columns) + +2dup at-xy ." , ," 1+ +2dup at-xy ." /( )`" 1+ +2dup at-xy ." \ \___ / |" 1+ +2dup at-xy ." /- _ `-/ '" 1+ +2dup at-xy ." (/\/ \ \ /\" 1+ +2dup at-xy ." / / | ` \" 1+ +2dup at-xy ." O O ) / |" 1+ +2dup at-xy ." `-^--'`< '" 1+ +2dup at-xy ." (_.) _ ) /" 1+ +2dup at-xy ." `.___/` /" 1+ +2dup at-xy ." `-----' /" 1+ +2dup at-xy ." <----. __ / __ \" 1+ +2dup at-xy ." <----|====O)))==) \) /====|" 1+ +2dup at-xy ." <----' `--' `.__,' \" 1+ +2dup at-xy ." | |" 1+ +2dup at-xy ." \ / /\" 1+ +2dup at-xy ." ______( (_ / \______/" 1+ +2dup at-xy ." ,' ,-----' |" 1+ + at-xy ." `--{__________)" +; Added: head/sys/boot/forth/logo-beastiebw.4th ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/forth/logo-beastiebw.4th Wed Apr 1 01:14:19 2015 (r280933) @@ -0,0 +1,51 @@ +\ Copyright (c) 2003 Scott Long +\ Copyright (c) 2006-2015 Devin Teske +\ All rights reserved. +\ +\ Redistribution and use in source and binary forms, with or without +\ modification, are permitted provided that the following conditions +\ are met: +\ 1. Redistributions of source code must retain the above copyright +\ notice, this list of conditions and the following disclaimer. +\ 2. Redistributions in binary form must reproduce the above copyright +\ notice, this list of conditions and the following disclaimer in the +\ documentation and/or other materials provided with the distribution. +\ +\ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +\ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +\ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +\ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +\ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +\ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +\ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +\ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +\ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +\ SUCH DAMAGE. +\ +\ $FreeBSD$ + +46 logoX ! 4 logoY ! \ Initialize logo placement defaults + +: logo ( x y -- ) \ B/W BSD mascot (19 rows x 34 columns) + + 2dup at-xy ." , ," 1+ + 2dup at-xy ." /( )`" 1+ + 2dup at-xy ." \ \___ / |" 1+ + 2dup at-xy ." /- _ `-/ '" 1+ + 2dup at-xy ." (/\/ \ \ /\" 1+ + 2dup at-xy ." / / | ` \" 1+ + 2dup at-xy ." O O ) / |" 1+ + 2dup at-xy ." `-^--'`< '" 1+ + 2dup at-xy ." (_.) _ ) /" 1+ + 2dup at-xy ." `.___/` /" 1+ + 2dup at-xy ." `-----' /" 1+ + 2dup at-xy ." <----. __ / __ \" 1+ + 2dup at-xy ." <----|====O)))==) \) /====|" 1+ + 2dup at-xy ." <----' `--' `.__,' \" 1+ + 2dup at-xy ." | |" 1+ + 2dup at-xy ." \ / /\" 1+ + 2dup at-xy ." ______( (_ / \______/" 1+ + 2dup at-xy ." ,' ,-----' |" 1+ + at-xy ." `--{__________)" +; Added: head/sys/boot/forth/logo-fbsdbw.4th ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/forth/logo-fbsdbw.4th Wed Apr 1 01:14:19 2015 (r280933) @@ -0,0 +1,45 @@ +\ Copyright (c) 2003 Scott Long +\ Copyright (c) 2006-2015 Devin Teske +\ All rights reserved. +\ +\ Redistribution and use in source and binary forms, with or without +\ modification, are permitted provided that the following conditions +\ are met: +\ 1. Redistributions of source code must retain the above copyright +\ notice, this list of conditions and the following disclaimer. +\ 2. Redistributions in binary form must reproduce the above copyright +\ notice, this list of conditions and the following disclaimer in the +\ documentation and/or other materials provided with the distribution. +\ +\ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +\ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +\ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +\ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +\ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +\ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +\ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +\ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +\ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +\ SUCH DAMAGE. +\ +\ $FreeBSD$ + +52 logoX ! 9 logoY ! \ Initialize logo placement defaults + +: logo ( x y -- ) \ "FreeBSD" logo in B/W (13 rows x 21 columns) + + 2dup at-xy ." ______" 1+ + 2dup at-xy ." | ____| __ ___ ___ " 1+ + 2dup at-xy ." | |__ | '__/ _ \/ _ \" 1+ + 2dup at-xy ." | __|| | | __/ __/" 1+ + 2dup at-xy ." | | | | | | |" 1+ + 2dup at-xy ." |_| |_| \___|\___|" 1+ + 2dup at-xy ." ____ _____ _____" 1+ + 2dup at-xy ." | _ \ / ____| __ \" 1+ + 2dup at-xy ." | |_) | (___ | | | |" 1+ + 2dup at-xy ." | _ < \___ \| | | |" 1+ + 2dup at-xy ." | |_) |____) | |__| |" 1+ + 2dup at-xy ." | | | |" 1+ + at-xy ." |____/|_____/|_____/" +; Added: head/sys/boot/forth/logo-orb.4th ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/forth/logo-orb.4th Wed Apr 1 01:14:19 2015 (r280933) @@ -0,0 +1,46 @@ +\ Copyright (c) 2006-2015 Devin Teske +\ All rights reserved. +\ +\ Redistribution and use in source and binary forms, with or without +\ modification, are permitted provided that the following conditions +\ are met: +\ 1. Redistributions of source code must retain the above copyright +\ notice, this list of conditions and the following disclaimer. +\ 2. Redistributions in binary form must reproduce the above copyright +\ notice, this list of conditions and the following disclaimer in the +\ documentation and/or other materials provided with the distribution. +\ +\ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +\ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +\ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +\ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +\ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +\ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +\ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +\ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +\ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +\ SUCH DAMAGE. +\ +\ $FreeBSD$ + +46 logoX ! 7 logoY ! \ Initialize logo placement defaults + +: logo ( x y -- ) \ color Orb mascot (15 rows x 30 columns) + + 2dup at-xy ." ``` `" 1+ + 2dup at-xy ." s` `.....---.......--.``` -/" 1+ + 2dup at-xy ." +o .--` /y:` +." 1+ + 2dup at-xy ." yo`:. :o `+-" 1+ + 2dup at-xy ." y/ -/` -o/" 1+ + 2dup at-xy ." .- ::/sy+:." 1+ + 2dup at-xy ." / `-- /" 1+ + 2dup at-xy ." `: :`" 1+ + 2dup at-xy ." `: :`" 1+ + 2dup at-xy ." / /" 1+ + 2dup at-xy ." .- -." 1+ + 2dup at-xy ." -- -." 1+ + 2dup at-xy ." `:` `:`" 1+ + 2dup at-xy ." .-- `--." 1+ + at-xy ." .---.....----." +; Added: head/sys/boot/forth/logo-orbbw.4th ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/forth/logo-orbbw.4th Wed Apr 1 01:14:19 2015 (r280933) @@ -0,0 +1,46 @@ +\ Copyright (c) 2006-2015 Devin Teske +\ All rights reserved. +\ +\ Redistribution and use in source and binary forms, with or without +\ modification, are permitted provided that the following conditions +\ are met: +\ 1. Redistributions of source code must retain the above copyright +\ notice, this list of conditions and the following disclaimer. +\ 2. Redistributions in binary form must reproduce the above copyright +\ notice, this list of conditions and the following disclaimer in the +\ documentation and/or other materials provided with the distribution. +\ +\ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +\ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +\ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +\ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +\ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +\ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +\ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +\ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +\ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +\ SUCH DAMAGE. +\ +\ $FreeBSD$ + +46 logoX ! 7 logoY ! \ Initialize logo placement defaults + +: logo ( x y -- ) \ B/W Orb mascot (15 rows x 32 columns) + + 2dup at-xy ." ``` `" 1+ + 2dup at-xy ." s` `.....---.......--.``` -/" 1+ + 2dup at-xy ." +o .--` /y:` +." 1+ + 2dup at-xy ." yo`:. :o `+-" 1+ + 2dup at-xy ." y/ -/` -o/" 1+ + 2dup at-xy ." .- ::/sy+:." 1+ + 2dup at-xy ." / `-- /" 1+ + 2dup at-xy ." `: :`" 1+ + 2dup at-xy ." `: :`" 1+ + 2dup at-xy ." / /" 1+ + 2dup at-xy ." .- -." 1+ + 2dup at-xy ." -- -." 1+ + 2dup at-xy ." `:` `:`" 1+ + 2dup at-xy ." .-- `--." 1+ + at-xy ." .---.....----." +; Modified: head/sys/boot/forth/version.4th ============================================================================== --- head/sys/boot/forth/version.4th Wed Apr 1 01:08:01 2015 (r280932) +++ head/sys/boot/forth/version.4th Wed Apr 1 01:14:19 2015 (r280933) @@ -53,18 +53,18 @@ variable versionY s" loader_logo" getenv dup -1 = if drop str_loader_version else - \ For tributes, do nothing (defer to beastie.4th) + \ For tributes, do nothing (defer to logo-*.4th) 2dup s" tribute" compare-insensitive 0= if 2drop - s" tribute-logo" sfind if - drop exit \ see beastie tribute-text + s" logo" sfind if + drop exit \ see logo-tribute.4th else drop str_loader_version then else 2dup s" tributebw" compare-insensitive 0= if 2drop - s" tributebw-logo" sfind if - drop exit \ see beastie tribute-text + s" logo" sfind if + drop exit \ see logo-tributebw.4th else drop str_loader_version then From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 01:17:37 2015 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 6A732331; Wed, 1 Apr 2015 01:17: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 564467DB; Wed, 1 Apr 2015 01:17: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 t311Hbl5034668; Wed, 1 Apr 2015 01:17:37 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t311HbSf034667; Wed, 1 Apr 2015 01:17:37 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201504010117.t311HbSf034667@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Wed, 1 Apr 2015 01:17:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280934 - head/sys/boot/forth X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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 Apr 2015 01:17:37 -0000 Author: dteske Date: Wed Apr 1 01:17:36 2015 New Revision: 280934 URL: https://svnweb.freebsd.org/changeset/base/280934 Log: Add remainder of supported ANSI escape sequences. MFC after: 3 days X-MFC-to: stable/10 Modified: head/sys/boot/forth/screen.4th Modified: head/sys/boot/forth/screen.4th ============================================================================== --- head/sys/boot/forth/screen.4th Wed Apr 1 01:14:19 2015 (r280933) +++ head/sys/boot/forth/screen.4th Wed Apr 1 01:17:36 2015 (r280934) @@ -50,3 +50,15 @@ marker task-screen.4th \ Mode end (clear attributes) : me ( -- ) escc [char] m emit ; + +\ Enable bold mode ( Esc-[1m ) +: b ( -- ) escc 1 .# [char] m emit ; + +\ Disable bold mode ( Esc-[22m ) +: -b ( -- ) escc 22 .# [char] m emit ; + +\ Enable inverse foreground/background mode ( Esc-[7m ) +: inv ( -- ) escc 7 .# [char] m emit ; + +\ Disable inverse foreground/background mode ( Esc-[27m ) +: -inv ( -- ) escc 27 .# [char] m emit ; From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 01:22:31 2015 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 8846F51B; Wed, 1 Apr 2015 01:22: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 73D408BF; Wed, 1 Apr 2015 01:22: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 t311MUBS038770; Wed, 1 Apr 2015 01:22:30 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t311MUtm038769; Wed, 1 Apr 2015 01:22:30 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201504010122.t311MUtm038769@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Wed, 1 Apr 2015 01:22:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280935 - head/sys/boot/forth X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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 Apr 2015 01:22:31 -0000 Author: dteske Date: Wed Apr 1 01:22:30 2015 New Revision: 280935 URL: https://svnweb.freebsd.org/changeset/base/280935 Log: Securely overwrite (zero) user input when we finish password checks. MFC after: 3 days X-MFC-to: stable/10 Modified: head/sys/boot/forth/check-password.4th Modified: head/sys/boot/forth/check-password.4th ============================================================================== --- head/sys/boot/forth/check-password.4th Wed Apr 1 01:17:36 2015 (r280934) +++ head/sys/boot/forth/check-password.4th Wed Apr 1 01:22:30 2015 (r280935) @@ -78,6 +78,17 @@ variable readlen \ input len again ; +: cfill ( c c-addr/u -- ) + begin dup 0> while + -rot 2dup c! 1+ rot 1- + repeat 2drop drop +; + +: read-reset ( -- ) + 0 readlen ! + 0 readval readmax cfill +; + : read ( c-addr/u -- ) \ Expects string prompt as stack input 0 25 at-xy \ Move the cursor to the bottom-left @@ -127,10 +138,8 @@ variable readlen \ input len while 3000 ms ." loader: incorrect password" 10 emit repeat - 2drop ( c-addr/u ) - else - drop ( -1 ) \ getenv cruft - then + 2drop read-reset + else drop then \ Exit if a password was not set s" password" getenv -1 = if exit else drop then @@ -147,7 +156,7 @@ variable readlen \ input len begin s" Password: " read ( prompt -- ) 2dup readval readlen @ compare 0= if \ Correct password? - 2drop exit + 2drop read-reset exit then 3000 ms ." loader: incorrect password" 10 emit again From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 01:25:59 2015 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 C28077E5; Wed, 1 Apr 2015 01:25: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 ADA14907; Wed, 1 Apr 2015 01:25: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 t311PxbU039256; Wed, 1 Apr 2015 01:25:59 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t311PxIN039255; Wed, 1 Apr 2015 01:25:59 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201504010125.t311PxIN039255@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Wed, 1 Apr 2015 01:25:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280936 - head/sys/boot/forth X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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 Apr 2015 01:25:59 -0000 Author: dteske Date: Wed Apr 1 01:25:58 2015 New Revision: 280936 URL: https://svnweb.freebsd.org/changeset/base/280936 Log: When forced to draw ASCII lines/boxen, use `=' for the horizontal line when double frames are requested versus single. MFC after: 3 days X-MFC-to: stable/10 Modified: head/sys/boot/forth/frames.4th Modified: head/sys/boot/forth/frames.4th ============================================================================== --- head/sys/boot/forth/frames.4th Wed Apr 1 01:22:30 2015 (r280935) +++ head/sys/boot/forth/frames.4th Wed Apr 1 01:25:58 2015 (r280936) @@ -39,6 +39,7 @@ variable fill \ ASCII frames (used when serial console is detected) 45 constant ascii_dash + 61 constant ascii_equal 124 constant ascii_pipe 43 constant ascii_plus @@ -113,7 +114,11 @@ s" arch-pc98" environment? [if] ; : f_double ( -- ) \ set frames to double - boot_serial? if f_ascii exit then + boot_serial? if + f_ascii + ascii_equal h_el ! + exit + then dh_el h_el ! dv_el v_el ! dlt_el lt_el ! From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 01:54:33 2015 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 63048C74; Wed, 1 Apr 2015 01:54: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 4CD6DC3E; Wed, 1 Apr 2015 01:54: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 t311sWeW053098; Wed, 1 Apr 2015 01:54:32 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t311sTSf053084; Wed, 1 Apr 2015 01:54:29 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201504010154.t311sTSf053084@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Wed, 1 Apr 2015 01:54:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280937 - head/sys/boot/forth X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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 Apr 2015 01:54:33 -0000 Author: dteske Date: Wed Apr 1 01:54:28 2015 New Revision: 280937 URL: https://svnweb.freebsd.org/changeset/base/280937 Log: Solve dreaded "dictionary full" issue by segregating words into new vocabularies delay-processing, password-processing, version-processing, frame-drawing, menu-infrastructure, menu-namespace, menu-command-helpers, and menusets-infrastructure. The net effect is to remove almost 200 definitions from the main forth vocabulary reducing the dictionary size by over 50%. The chances of hitting "dictionary full" should be greatly reduced by this patch. MFC after: 3 days X-MFC-to: stable/10 Modified: head/sys/boot/forth/beastie.4th head/sys/boot/forth/check-password.4th head/sys/boot/forth/delay.4th head/sys/boot/forth/frames.4th head/sys/boot/forth/loader.4th head/sys/boot/forth/menu-commands.4th head/sys/boot/forth/menu.4th head/sys/boot/forth/menusets.4th head/sys/boot/forth/support.4th head/sys/boot/forth/version.4th Modified: head/sys/boot/forth/beastie.4th ============================================================================== --- head/sys/boot/forth/beastie.4th Wed Apr 1 01:25:58 2015 (r280936) +++ head/sys/boot/forth/beastie.4th Wed Apr 1 01:54:28 2015 (r280937) @@ -28,7 +28,7 @@ marker task-beastie.4th -only forth definitions also support-functions +only forth definitions variable logoX variable logoY @@ -82,6 +82,8 @@ variable logoY then ; +also support-functions + : beastie-start ( -- ) \ starts the menu s" console" getenv dup -1 <> if s" efi" 2swap contains? if @@ -110,4 +112,4 @@ variable logoY then ; -only forth also +only forth definitions Modified: head/sys/boot/forth/check-password.4th ============================================================================== --- head/sys/boot/forth/check-password.4th Wed Apr 1 01:25:58 2015 (r280936) +++ head/sys/boot/forth/check-password.4th Wed Apr 1 01:54:28 2015 (r280937) @@ -28,6 +28,9 @@ marker task-check-password.4th include /boot/screen.4th +vocabulary password-processing +only forth also password-processing definitions + 13 constant enter_key \ The decimal ASCII value for Enter key 8 constant bs_key \ The decimal ASCII value for Backspace key 21 constant ctrl_u \ The decimal ASCII value for Ctrl-U sequence @@ -126,6 +129,8 @@ variable readlen \ input len again \ Enter was not pressed; repeat ; +only forth definitions also password-processing + : check-password ( -- ) \ Do not allow the user to proceed beyond this point if a boot-lock @@ -161,3 +166,5 @@ variable readlen \ input len 3000 ms ." loader: incorrect password" 10 emit again ; + +only forth definitions Modified: head/sys/boot/forth/delay.4th ============================================================================== --- head/sys/boot/forth/delay.4th Wed Apr 1 01:25:58 2015 (r280936) +++ head/sys/boot/forth/delay.4th Wed Apr 1 01:54:28 2015 (r280937) @@ -1,4 +1,4 @@ -\ Copyright (c) 2008-2011 Devin Teske +\ Copyright (c) 2008-2015 Devin Teske \ All rights reserved. \ \ Redistribution and use in source and binary forms, with or without @@ -26,6 +26,9 @@ marker task-delay.4th +vocabulary delay-processing +only forth also delay-processing definitions + 2 constant delay_default \ Default delay (in seconds) 3 constant etx_key \ End-of-Text character produced by Ctrl+C 13 constant enter_key \ Carriage-Return character produce by ENTER @@ -36,6 +39,8 @@ variable delay_delay \ determined c variable delay_cancelled \ state variable for user cancellation variable delay_showdots \ whether continually print dots while waiting +only forth definitions also delay-processing + : delay_execute ( -- ) \ make sure that we have a command to execute @@ -110,3 +115,5 @@ variable delay_showdots \ whether cont evaluate \ evaluate/execute the command string then ; + +only forth definitions Modified: head/sys/boot/forth/frames.4th ============================================================================== --- head/sys/boot/forth/frames.4th Wed Apr 1 01:25:58 2015 (r280936) +++ head/sys/boot/forth/frames.4th Wed Apr 1 01:54:28 2015 (r280937) @@ -27,6 +27,9 @@ marker task-frames.4th +vocabulary frame-drawing +only forth also frame-drawing definitions + \ XXX Filled boxes are left as an exercise for the reader... ;-/ variable h_el @@ -87,6 +90,8 @@ s" arch-pc98" environment? [if] 178 constant fill_bright [then] +only forth definitions also frame-drawing + : hline ( len x y -- ) \ Draw horizontal single line at-xy \ move cursor 0 do @@ -156,3 +161,5 @@ s" arch-pc98" environment? [if] f_single fill_none fill ! + +only forth definitions Modified: head/sys/boot/forth/loader.4th ============================================================================== --- head/sys/boot/forth/loader.4th Wed Apr 1 01:25:58 2015 (r280936) +++ head/sys/boot/forth/loader.4th Wed Apr 1 01:54:28 2015 (r280937) @@ -25,6 +25,8 @@ \ \ $FreeBSD$ +only forth definitions + s" arch-i386" environment? [if] [if] s" loader_version" environment? [if] 11 < [if] @@ -45,7 +47,7 @@ include /boot/color.4th include /boot/delay.4th include /boot/check-password.4th -only forth also support-functions also builtins definitions +only forth definitions : bootmsg ( -- ) loader_color? dup ( -- bool bool ) @@ -79,6 +81,8 @@ only forth also support-functions also b then ; +only forth also support-functions also builtins definitions + : boot 0= if ( interpreted ) get_arguments then @@ -122,7 +126,7 @@ only forth also support-functions also b ?dup 0= if 0 1 autoboot then ; -also forth definitions also builtins +also forth definitions previous builtin: boot builtin: boot-conf @@ -245,5 +249,4 @@ only forth definitions also support-func then ; immediate \ interpret immediately for access to `source' (aka tib) -only forth also - +only forth definitions Modified: head/sys/boot/forth/menu-commands.4th ============================================================================== --- head/sys/boot/forth/menu-commands.4th Wed Apr 1 01:25:58 2015 (r280936) +++ head/sys/boot/forth/menu-commands.4th Wed Apr 1 01:54:28 2015 (r280937) @@ -1,4 +1,4 @@ -\ Copyright (c) 2006-2013 Devin Teske +\ Copyright (c) 2006-2015 Devin Teske \ All rights reserved. \ \ Redistribution and use in source and binary forms, with or without @@ -28,11 +28,15 @@ marker task-menu-commands.4th include /boot/menusets.4th +only forth definitions + variable kernel_state variable root_state 0 kernel_state ! 0 root_state ! +also menu-namespace also menu-command-helpers + \ \ Boot \ @@ -346,3 +350,5 @@ variable root_state verbose_disable 2 goto_menu ; + +only forth definitions Modified: head/sys/boot/forth/menu.4th ============================================================================== --- head/sys/boot/forth/menu.4th Wed Apr 1 01:25:58 2015 (r280936) +++ head/sys/boot/forth/menu.4th Wed Apr 1 01:54:28 2015 (r280937) @@ -31,6 +31,12 @@ marker task-menu.4th \ Frame drawing include /boot/frames.4th +vocabulary menu-infrastructure +vocabulary menu-namespace +vocabulary menu-command-helpers + +only forth also menu-infrastructure definitions + f_double \ Set frames to double (see frames.4th). Replace with \ f_single if you want single frames. 46 constant dot \ ASCII definition of a period (in decimal) @@ -58,19 +64,7 @@ variable menuX \ Menu X offset (colu variable menuY \ Menu Y offset (rows) \ Menu-item elements -variable menukey1 -variable menukey2 -variable menukey3 -variable menukey4 -variable menukey5 -variable menukey6 -variable menukey7 -variable menukey8 -variable menureboot variable menurebootadded -variable menuacpi -variable menuoptions -variable menukernel \ Parsing of kernels into menu-items variable kernidx @@ -84,6 +78,27 @@ variable menu_timeout \ determin variable menu_timeout_x \ column position of timeout message variable menu_timeout_y \ row position of timeout message +\ Containers for parsing kernels into menu-items +create kerncapbuf 64 allot +create kerndefault 64 allot +create kernelsbuf 256 allot + +only forth also menu-namespace definitions + +\ Menu-item key association/detection +variable menukey1 +variable menukey2 +variable menukey3 +variable menukey4 +variable menukey5 +variable menukey6 +variable menukey7 +variable menukey8 +variable menureboot +variable menuacpi +variable menuoptions +variable menukernel + \ Menu initialization status variables variable init_state1 variable init_state2 @@ -124,10 +139,34 @@ create init_text6 64 allot create init_text7 64 allot create init_text8 64 allot -\ Containers for parsing kernels into menu-items -create kerncapbuf 64 allot -create kerndefault 64 allot -create kernelsbuf 256 allot +only forth definitions + +: arch-i386? ( -- BOOL ) \ Returns TRUE (-1) on i386, FALSE (0) otherwise. + s" arch-i386" environment? dup if + drop + then +; + +: acpipresent? ( -- flag ) \ Returns TRUE if ACPI is present, FALSE otherwise + s" hint.acpi.0.rsdp" getenv + dup -1 = if + drop false exit + then + 2drop + true +; + +: acpienabled? ( -- flag ) \ Returns TRUE if ACPI is enabled, FALSE otherwise + s" hint.acpi.0.disabled" getenv + dup -1 <> if + s" 0" compare 0<> if + false exit + then + else + drop + then + true +; : +c! ( N C-ADDR/U K -- C-ADDR/U ) 3 pick 3 pick ( n c-addr/u k -- n c-addr/u k n c-addr ) @@ -135,21 +174,15 @@ create kernelsbuf 256 allot rot drop ( n c-addr/u -- c-addr/u ) ; -: delim? ( C -- BOOL ) - dup 32 = ( c -- c bool ) \ [sp] space - over 9 = or ( c bool -- c bool ) \ [ht] horizontal tab - over 10 = or ( c bool -- c bool ) \ [nl] newline - over 13 = or ( c bool -- c bool ) \ [cr] carriage return - over [char] , = or ( c bool -- c bool ) \ comma - swap drop ( c bool -- bool ) \ return boolean -; +only forth also menu-namespace definitions \ Forth variables -: menukeyN ( N -- ADDR ) s" menukeyN" 7 +c! evaluate ; -: init_stateN ( N -- ADDR ) s" init_stateN" 10 +c! evaluate ; -: toggle_stateN ( N -- ADDR ) s" toggle_stateN" 12 +c! evaluate ; -: cycle_stateN ( N -- ADDR ) s" cycle_stateN" 11 +c! evaluate ; -: init_textN ( N -- C-ADDR ) s" init_textN" 9 +c! evaluate ; +: namespace ( C-ADDR/U N -- ) also menu-namespace +c! evaluate previous ; +: menukeyN ( N -- ADDR ) s" menukeyN" 7 namespace ; +: init_stateN ( N -- ADDR ) s" init_stateN" 10 namespace ; +: toggle_stateN ( N -- ADDR ) s" toggle_stateN" 12 namespace ; +: cycle_stateN ( N -- ADDR ) s" cycle_stateN" 11 namespace ; +: init_textN ( N -- C-ADDR ) s" init_textN" 9 namespace ; \ Environment variables : kernel[x] ( N -- C-ADDR/U ) s" kernel[x]" 7 +c! ; @@ -163,11 +196,7 @@ create kernelsbuf 256 allot : menu_caption[x][y] ( N M -- C-ADDR/U ) s" menu_caption[x][y]" 16 +c! 13 +c! ; : ansi_caption[x][y] ( N M -- C-ADDR/U ) s" ansi_caption[x][y]" 16 +c! 13 +c! ; -: arch-i386? ( -- BOOL ) \ Returns TRUE (-1) on i386, FALSE (0) otherwise. - s" arch-i386" environment? dup if - drop - then -; +also menu-infrastructure definitions \ This function prints a menu item at menuX (row) and menuY (column), returns \ the incremental decimal ASCII value associated with the menu item, and @@ -214,196 +243,6 @@ create kernelsbuf 256 allot menuidx @ 48 + ; -: toggle_menuitem ( N -- N ) \ toggles caption text and internal menuitem state - - \ ASCII numeral equal to user-selected menu item must be on the stack. - \ We do not modify the stack, so the ASCII numeral is left on top. - - dup init_textN c@ 0= if - \ NOTE: no need to check toggle_stateN since the first time we - \ are called, we will populate init_textN. Further, we don't - \ need to test whether menu_caption[x] (ansi_caption[x] when - \ loader_color?=1) is available since we would not have been - \ called if the caption was NULL. - - \ base name of environment variable - dup ( n -- n n ) \ key pressed - loader_color? if - ansi_caption[x] - else - menu_caption[x] - then - getenv dup -1 <> if - - 2 pick ( n c-addr/u -- n c-addr/u n ) - init_textN ( n c-addr/u n -- n c-addr/u c-addr ) - - \ now we have the buffer c-addr on top - \ ( followed by c-addr/u of current caption ) - - \ Copy the current caption into our buffer - 2dup c! -rot \ store strlen at first byte - begin - rot 1+ \ bring alt addr to top and increment - -rot -rot \ bring buffer addr to top - 2dup c@ swap c! \ copy current character - 1+ \ increment buffer addr - rot 1- \ bring buffer len to top and decrement - dup 0= \ exit loop if buffer len is zero - until - 2drop \ buffer len/addr - drop \ alt addr - - else - drop - then - then - - \ Now we are certain to have init_textN populated with the initial - \ value of menu_caption[x] (ansi_caption[x] with loader_color enabled). - \ We can now use init_textN as the untoggled caption and - \ toggled_text[x] (toggled_ansi[x] with loader_color enabled) as the - \ toggled caption and store the appropriate value into menu_caption[x] - \ (again, ansi_caption[x] with loader_color enabled). Last, we'll - \ negate the toggled state so that we reverse the flow on subsequent - \ calls. - - dup toggle_stateN @ 0= if - \ state is OFF, toggle to ON - - dup ( n -- n n ) \ key pressed - loader_color? if - toggled_ansi[x] - else - toggled_text[x] - then - getenv dup -1 <> if - \ Assign toggled text to menu caption - 2 pick ( n c-addr/u -- n c-addr/u n ) \ key pressed - loader_color? if - ansi_caption[x] - else - menu_caption[x] - then - setenv - else - \ No toggled text, keep the same caption - drop ( n -1 -- n ) \ getenv cruft - then - - true \ new value of toggle state var (to be stored later) - else - \ state is ON, toggle to OFF - - dup init_textN count ( n -- n c-addr/u ) - - \ Assign init_textN text to menu caption - 2 pick ( n c-addr/u -- n c-addr/u n ) \ key pressed - loader_color? if - ansi_caption[x] - else - menu_caption[x] - then - setenv - - false \ new value of toggle state var (to be stored below) - then - - \ now we'll store the new toggle state (on top of stack) - over toggle_stateN ! -; - -: cycle_menuitem ( N -- N ) \ cycles through array of choices for a menuitem - - \ ASCII numeral equal to user-selected menu item must be on the stack. - \ We do not modify the stack, so the ASCII numeral is left on top. - - dup cycle_stateN dup @ 1+ \ get value and increment - - \ Before assigning the (incremented) value back to the pointer, - \ let's test for the existence of this particular array element. - \ If the element exists, we'll store index value and move on. - \ Otherwise, we'll loop around to zero and store that. - - dup 48 + ( n addr k -- n addr k k' ) - \ duplicate array index and convert to ASCII numeral - - 3 pick swap ( n addr k k' -- n addr k n k' ) \ (n,k') as (x,y) - loader_color? if - ansi_caption[x][y] - else - menu_caption[x][y] - then - ( n addr k n k' -- n addr k c-addr/u ) - - \ Now test for the existence of our incremented array index in the - \ form of $menu_caption[x][y] ($ansi_caption[x][y] with loader_color - \ enabled) as set in loader.rc(5), et. al. - - getenv dup -1 = if - \ No caption set for this array index. Loop back to zero. - - drop ( n addr k -1 -- n addr k ) \ getenv cruft - drop 0 ( n addr k -- n addr 0 ) \ new value to store later - - 2 pick [char] 0 ( n addr 0 -- n addr 0 n 48 ) \ (n,48) as (x,y) - loader_color? if - ansi_caption[x][y] - else - menu_caption[x][y] - then - ( n addr 0 n 48 -- n addr 0 c-addr/u ) - getenv dup -1 = if - \ Highly unlikely to occur, but to ensure things move - \ along smoothly, allocate a temporary NULL string - drop ( cruft ) s" " - then - then - - \ At this point, we should have the following on the stack (in order, - \ from bottom to top): - \ - \ n - Ascii numeral representing the menu choice (inherited) - \ addr - address of our internal cycle_stateN variable - \ k - zero-based number we intend to store to the above - \ c-addr/u - string value we intend to store to menu_caption[x] - \ (or ansi_caption[x] with loader_color enabled) - \ - \ Let's perform what we need to with the above. - - \ Assign array value text to menu caption - 4 pick ( n addr k c-addr/u -- n addr k c-addr/u n ) - loader_color? if - ansi_caption[x] - else - menu_caption[x] - then - setenv - - swap ! ( n addr k -- n ) \ update array state variable -; - -: acpipresent? ( -- flag ) \ Returns TRUE if ACPI is present, FALSE otherwise - s" hint.acpi.0.rsdp" getenv - dup -1 = if - drop false exit - then - 2drop - true -; - -: acpienabled? ( -- flag ) \ Returns TRUE if ACPI is enabled, FALSE otherwise - s" hint.acpi.0.disabled" getenv - dup -1 <> if - s" 0" compare 0<> if - false exit - then - else - drop - then - true -; - \ This function prints the appropriate menuitem basename to the stack if an \ ACPI option is to be presented to the user, otherwise returns -1. Used \ internally by menu-create, you need not (nor should you) call this directly. @@ -434,6 +273,15 @@ create kernelsbuf 256 allot then ; +: delim? ( C -- BOOL ) + dup 32 = ( c -- c bool ) \ [sp] space + over 9 = or ( c bool -- c bool ) \ [ht] horizontal tab + over 10 = or ( c bool -- c bool ) \ [nl] newline + over 13 = or ( c bool -- c bool ) \ [cr] carriage return + over [char] , = or ( c bool -- c bool ) \ comma + swap drop ( c bool -- bool ) \ return boolean +; + \ This function parses $kernels into variables that are used by the menu to \ display wich kernel to boot when the [overloaded] `boot' word is interpreted. \ Used internally by menu-create, you need not (nor should you) call this @@ -959,6 +807,182 @@ create kernelsbuf 256 allot 0 menurow ! ; +only forth +also menu-infrastructure +also menu-namespace +also menu-command-helpers definitions + +: toggle_menuitem ( N -- N ) \ toggles caption text and internal menuitem state + + \ ASCII numeral equal to user-selected menu item must be on the stack. + \ We do not modify the stack, so the ASCII numeral is left on top. + + dup init_textN c@ 0= if + \ NOTE: no need to check toggle_stateN since the first time we + \ are called, we will populate init_textN. Further, we don't + \ need to test whether menu_caption[x] (ansi_caption[x] when + \ loader_color?=1) is available since we would not have been + \ called if the caption was NULL. + + \ base name of environment variable + dup ( n -- n n ) \ key pressed + loader_color? if + ansi_caption[x] + else + menu_caption[x] + then + getenv dup -1 <> if + + 2 pick ( n c-addr/u -- n c-addr/u n ) + init_textN ( n c-addr/u n -- n c-addr/u c-addr ) + + \ now we have the buffer c-addr on top + \ ( followed by c-addr/u of current caption ) + + \ Copy the current caption into our buffer + 2dup c! -rot \ store strlen at first byte + begin + rot 1+ \ bring alt addr to top and increment + -rot -rot \ bring buffer addr to top + 2dup c@ swap c! \ copy current character + 1+ \ increment buffer addr + rot 1- \ bring buffer len to top and decrement + dup 0= \ exit loop if buffer len is zero + until + 2drop \ buffer len/addr + drop \ alt addr + + else + drop + then + then + + \ Now we are certain to have init_textN populated with the initial + \ value of menu_caption[x] (ansi_caption[x] with loader_color enabled). + \ We can now use init_textN as the untoggled caption and + \ toggled_text[x] (toggled_ansi[x] with loader_color enabled) as the + \ toggled caption and store the appropriate value into menu_caption[x] + \ (again, ansi_caption[x] with loader_color enabled). Last, we'll + \ negate the toggled state so that we reverse the flow on subsequent + \ calls. + + dup toggle_stateN @ 0= if + \ state is OFF, toggle to ON + + dup ( n -- n n ) \ key pressed + loader_color? if + toggled_ansi[x] + else + toggled_text[x] + then + getenv dup -1 <> if + \ Assign toggled text to menu caption + 2 pick ( n c-addr/u -- n c-addr/u n ) \ key pressed + loader_color? if + ansi_caption[x] + else + menu_caption[x] + then + setenv + else + \ No toggled text, keep the same caption + drop ( n -1 -- n ) \ getenv cruft + then + + true \ new value of toggle state var (to be stored later) + else + \ state is ON, toggle to OFF + + dup init_textN count ( n -- n c-addr/u ) + + \ Assign init_textN text to menu caption + 2 pick ( n c-addr/u -- n c-addr/u n ) \ key pressed + loader_color? if + ansi_caption[x] + else + menu_caption[x] + then + setenv + + false \ new value of toggle state var (to be stored below) + then + + \ now we'll store the new toggle state (on top of stack) + over toggle_stateN ! +; + +: cycle_menuitem ( N -- N ) \ cycles through array of choices for a menuitem + + \ ASCII numeral equal to user-selected menu item must be on the stack. + \ We do not modify the stack, so the ASCII numeral is left on top. + + dup cycle_stateN dup @ 1+ \ get value and increment + + \ Before assigning the (incremented) value back to the pointer, + \ let's test for the existence of this particular array element. + \ If the element exists, we'll store index value and move on. + \ Otherwise, we'll loop around to zero and store that. + + dup 48 + ( n addr k -- n addr k k' ) + \ duplicate array index and convert to ASCII numeral + + 3 pick swap ( n addr k k' -- n addr k n k' ) \ (n,k') as (x,y) + loader_color? if + ansi_caption[x][y] + else + menu_caption[x][y] + then + ( n addr k n k' -- n addr k c-addr/u ) + + \ Now test for the existence of our incremented array index in the + \ form of $menu_caption[x][y] ($ansi_caption[x][y] with loader_color + \ enabled) as set in loader.rc(5), et. al. + + getenv dup -1 = if + \ No caption set for this array index. Loop back to zero. + + drop ( n addr k -1 -- n addr k ) \ getenv cruft + drop 0 ( n addr k -- n addr 0 ) \ new value to store later + + 2 pick [char] 0 ( n addr 0 -- n addr 0 n 48 ) \ (n,48) as (x,y) + loader_color? if + ansi_caption[x][y] + else + menu_caption[x][y] + then + ( n addr 0 n 48 -- n addr 0 c-addr/u ) + getenv dup -1 = if + \ Highly unlikely to occur, but to ensure things move + \ along smoothly, allocate a temporary NULL string + drop ( cruft ) s" " + then + then + + \ At this point, we should have the following on the stack (in order, + \ from bottom to top): + \ + \ n - Ascii numeral representing the menu choice (inherited) + \ addr - address of our internal cycle_stateN variable + \ k - zero-based number we intend to store to the above + \ c-addr/u - string value we intend to store to menu_caption[x] + \ (or ansi_caption[x] with loader_color enabled) + \ + \ Let's perform what we need to with the above. + + \ Assign array value text to menu caption + 4 pick ( n addr k c-addr/u -- n addr k c-addr/u n ) + loader_color? if + ansi_caption[x] + else + menu_caption[x] + then + setenv + + swap ! ( n addr k -- n ) \ update array state variable +; + +only forth definitions also menu-infrastructure + \ Erase and redraw the menu. Useful if you change a caption and want to \ update the menu to reflect the new value. \ @@ -1015,6 +1039,8 @@ create kernelsbuf 256 allot 0 25 at-xy \ Move cursor to the bottom for output ; +also menu-namespace + \ Main function. Call this from your `loader.rc' file. \ : menu-display ( -- ) @@ -1236,6 +1262,8 @@ create kernelsbuf 256 allot 0 menuoptions ! ; +only forth definitions also menu-infrastructure + \ This function both unsets menu variables and visually erases the menu area \ in-preparation for another menu. \ @@ -1246,6 +1274,8 @@ create kernelsbuf 256 allot bullet menubllt ! +also menu-namespace + \ Initialize our menu initialization state variables 0 init_state1 ! 0 init_state2 ! @@ -1285,3 +1315,5 @@ bullet menubllt ! 0 init_text6 c! 0 init_text7 c! 0 init_text8 c! + +only forth definitions Modified: head/sys/boot/forth/menusets.4th ============================================================================== --- head/sys/boot/forth/menusets.4th Wed Apr 1 01:25:58 2015 (r280936) +++ head/sys/boot/forth/menusets.4th Wed Apr 1 01:54:28 2015 (r280937) @@ -26,6 +26,9 @@ marker task-menusets.4th +vocabulary menusets-infrastructure +only forth also menusets-infrastructure definitions + variable menuset_use_name create menuset_affixbuf 255 allot @@ -437,6 +440,8 @@ create menuset_y 1 allot s" affix" unsetenv ; +only forth definitions also menusets-infrastructure + : menuset-loadsetnum ( N -- ) menuset-checksetnum ( n -- ) @@ -537,16 +542,6 @@ create menuset_y 1 allot menuset-cleanup ; -: menuset-loadinitial ( -- ) - s" menuset_initial" getenv dup -1 <> if - ?number 0<> if - menuset-loadsetnum - then - else - drop \ cruft - then -; - : menusets-unset ( -- ) s" menuset_initial" unsetenv @@ -615,3 +610,15 @@ create menuset_y 1 allot s" buf" unsetenv menuset-cleanup ; + +only forth definitions + +: menuset-loadinitial ( -- ) + s" menuset_initial" getenv dup -1 <> if + ?number 0<> if + menuset-loadsetnum + then + else + drop \ cruft + then +; Modified: head/sys/boot/forth/support.4th ============================================================================== --- head/sys/boot/forth/support.4th Wed Apr 1 01:25:58 2015 (r280936) +++ head/sys/boot/forth/support.4th Wed Apr 1 01:54:28 2015 (r280937) @@ -315,7 +315,7 @@ string value_buffer \ reset_line_reading vocabulary line-reading -also line-reading definitions also +also line-reading definitions \ File data temporary storage @@ -324,13 +324,13 @@ string read_buffer \ File's line reading function -support-functions definitions +get-current ( -- wid ) previous definitions string line_buffer 0 value end_of_file? variable fd -line-reading definitions +>search ( wid -- ) definitions : skip_newlines begin @@ -405,7 +405,7 @@ line-reading definitions read_buffer .len ! ; -support-functions definitions +get-current ( -- wid ) previous definitions >search ( wid -- ) : reset_line_reading 0 to read_buffer_ptr @@ -447,7 +447,7 @@ also file-processing definitions \ get_assignment vocabulary parser -also parser definitions also +also parser definitions 0 value parsing_function 0 value end_of_line @@ -606,7 +606,7 @@ also parser definitions also end_of_line? 0= if ESYNTAX throw then ; -file-processing definitions +get-current ( -- wid ) previous definitions >search ( wid -- ) : get_assignment line_buffer strget + to end_of_line @@ -623,7 +623,7 @@ file-processing definitions or or 0= if ESYNTAX throw then ; -only forth also support-functions also file-processing definitions also +only forth also support-functions also file-processing definitions \ Process line @@ -818,7 +818,7 @@ only forth also support-functions also f \ Higher level file processing -support-functions definitions +get-current ( -- wid ) previous definitions >search ( wid -- ) : process_conf begin @@ -1580,7 +1580,4 @@ also builtins then ; -\ Go back to straight forth vocabulary - -only forth also definitions - +only forth definitions Modified: head/sys/boot/forth/version.4th ============================================================================== --- head/sys/boot/forth/version.4th Wed Apr 1 01:25:58 2015 (r280936) +++ head/sys/boot/forth/version.4th Wed Apr 1 01:54:28 2015 (r280937) @@ -26,6 +26,9 @@ marker task-version.4th +vocabulary version-processing +only forth also version-processing definitions + variable versionX variable versionY @@ -36,6 +39,8 @@ variable versionY 80 versionX ! \ NOTE: this is the ending column (text is right-justified) 24 versionY ! +only forth definitions also version-processing + : print_version ( -- ) \ Get the text placement position (if set) @@ -86,3 +91,5 @@ variable versionY type then ; + +only forth definitions From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 02:00:05 2015 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 EDA32E34; Wed, 1 Apr 2015 02:00:04 +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 AB191C6A; Wed, 1 Apr 2015 02:00:04 +0000 (UTC) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail109.syd.optusnet.com.au (Postfix) with ESMTPS id 373F6D638DD; Wed, 1 Apr 2015 12:59:55 +1100 (AEDT) Date: Wed, 1 Apr 2015 12:59:53 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Konstantin Belousov Subject: Re: svn commit: r280308 - head/sys/fs/devfs In-Reply-To: <20150330103355.GD2379@kib.kiev.ua> Message-ID: <20150401124524.B1349@besplex.bde.org> References: <20150322162507.GD2379@kib.kiev.ua> <201503221825.t2MIP7jv096531@gw.catspoiler.org> <20150329175137.GD95224@stack.nl> <20150329184238.GB2379@kib.kiev.ua> <20150330145148.C1660@besplex.bde.org> <20150330103355.GD2379@kib.kiev.ua> 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=Za4kaKlA c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=0Ncl0vLHgX-B8fq7w2QA:9 a=CjuIK1q_8ugA:10 Cc: src-committers@freebsd.org, Jilles Tjoelker , svn-src-all@freebsd.org, delphij@freebsd.org, Bruce Evans , svn-src-head@freebsd.org, Don Lewis X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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 Apr 2015 02:00:05 -0000 On Mon, 30 Mar 2015, Konstantin Belousov wrote: > On Mon, Mar 30, 2015 at 03:14:10PM +1100, Bruce Evans wrote: >> File timestamps use CLOCK_REALTIME, so they are supposed to go backwards >> sometimes. More importantly, if the time is set to a future time (by >> utimes(), etc., not due to a clock step), this prevents it being correted. >> I think you only want to do a null update if tv_nsec is nonzero due to a >> previous setting with vfs_timestamp(), and the new second hasn't arrived >> yet. Something like: >> >> if (tsp->tv_sec != ts) ... >> >> If '<', then as above. If '>', it means a correction by >= 1 second >> (strictly greater if tv_nsec != 0). The initial value tv_nsec is >> irrelevant in both cases. The future times happen often in practice. Any time the system is on local time East of Greenwich, using a device file early in the boot sets its timestamps in the future (9-11 hours here). Then using the file later should set it to the current time without waiting until the future time is reached. > Below is the updated patch. I also added a comment to devfs_timestamp(), > please reformulate it to your liking. I like this version. Bruce From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 02:01:36 2015 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 65E15FB9; Wed, 1 Apr 2015 02:01: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 4F0FCD18; Wed, 1 Apr 2015 02:01: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 t3121aOM057113; Wed, 1 Apr 2015 02:01:36 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3121Zoq057109; Wed, 1 Apr 2015 02:01:35 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201504010201.t3121Zoq057109@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Wed, 1 Apr 2015 02:01:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280938 - in head: sys/boot/forth 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: Wed, 01 Apr 2015 02:01:36 -0000 Author: dteske Date: Wed Apr 1 02:01:34 2015 New Revision: 280938 URL: https://svnweb.freebsd.org/changeset/base/280938 Log: Add "GELI Passphrase:" prompt to boot loader. Summary: Add "GELI Passphrase:" prompt to boot loader. A new loader.conf(5) option of geom_eli_passphrase_prompt="YES" will now allow you to enter your geli(8) root-mount credentials prior to invoking the kernel. See check-password.4th(8) for details. Differential Revision: https://reviews.freebsd.org/D2105 Reviewed by: (your name[s] here) MFC after: 3 days X-MFC-to: stable/10 Relnotes: yes Test Plan: Drop a head copy of check-password.4th into /boot and then apply the patch (only the patch to /boot/check-password.4th is required; no other changes are required but you do have to have a HEAD copy of check-password.4th to apply the patch). NB: The rest of your /boot files can be up to 2 years old but no older. NB: The test won't work unless your kernel has the following change https://svnweb.freebsd.org/base?view=revision&revision=273489 Now, put into /boot/loader.conf: geom_eli_passphrase_prompt="YES" and reboot. You should be prompted for a GELI passphrase before the menu (if enabled), just after loading loader.conf(5). NB: It doesn't matter if you're using GELI or not. However if you are using GELI and a sufficiently new enough release (has SVN r273489) and you entered the proper passphrase to mount your GELI encrypted root device(s), you should notice that the boot process did not stop (you went from loader all the way to login). Reviewers: cperciva, allanjude, scottl, kmoore Subscribers: jkh, imp Differential Revision: https://reviews.freebsd.org/D2105 Modified: head/sys/boot/forth/check-password.4th head/sys/boot/forth/check-password.4th.8 head/sys/boot/forth/loader.conf head/usr.sbin/bsdinstall/scripts/zfsboot Modified: head/sys/boot/forth/check-password.4th ============================================================================== --- head/sys/boot/forth/check-password.4th Wed Apr 1 01:54:28 2015 (r280937) +++ head/sys/boot/forth/check-password.4th Wed Apr 1 02:01:34 2015 (r280938) @@ -146,6 +146,15 @@ only forth definitions also password-pro 2drop read-reset else drop then + \ Prompt for GEOM ELI (geli(4)) passphrase if enabled + s" geom_eli_passphrase_prompt" getenv dup -1 <> if + s" YES" compare-insensitive 0= if + s" GELI Passphrase: " read ( prompt -- ) + readval readlen @ s" kern.geom.eli.passphrase" setenv + read-reset + then + else drop then + \ Exit if a password was not set s" password" getenv -1 = if exit else drop then Modified: head/sys/boot/forth/check-password.4th.8 ============================================================================== --- head/sys/boot/forth/check-password.4th.8 Wed Apr 1 01:54:28 2015 (r280937) +++ head/sys/boot/forth/check-password.4th.8 Wed Apr 1 02:01:34 2015 (r280938) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2011-2012 Devin Teske +.\" Copyright (c) 2011-2015 Devin Teske .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 10, 2012 +.Dd March 20, 2015 .Dt CHECK-PASSWORD.4TH 8 .Os .Sh NAME @@ -33,8 +33,12 @@ .Sh DESCRIPTION The file that goes by the name of .Nm -is a set of commands designed to either prevent booting or prevent modification -of boot options without an appropriately configured password. +is a set of commands designed to do one or more of the following: +.Pp +.Dl o Prevent booting without password +.Dl o Prevent modification of boot options without password +.Dl o Provide a password to mount geli(8) encrypted root disk(s) +.Pp The commands of .Nm by themselves are not enough for most uses. @@ -58,14 +62,23 @@ The commands provided by it are: .Pp .Bl -tag -width disable-module_module -compact -offset indent .It Ic check-password -Dual-purpose function that can either protect the interactive boot menu or -prevent boot without password (separately). +Multi-purpose function that can protect the interactive boot menu, +prevent boot without password, or prompt for geli(8) passphrase +.Pq depending on Xr loader.conf 5 settings . .Pp First checks .Va bootlock_password and if-set, the user cannot continue until the correct password is entered. .Pp -Next checks +Next, checks +.Va geom_eli_passphrase_prompt +and if set to +.Li YES +.Pq case-insensitive +prompts the user to enter their GELI password for later mounting of the root +device(s) during boot. +.Pp +Last, checks .Va password and if-set, tries to .Ic autoboot @@ -81,6 +94,11 @@ The environment variables that effect it Sets the bootlock password (up to 16 characters long) that is required by .Ic check-password to be entered before the system is allowed to boot. +.It Va geom_eli_passphrase_prompt +Selects whether loader(8) will prompt for GELI credentials, handing-off to the +kernel for later mounting of +.Xr geli 8 +encrypted root device(s). .It Va password Sets the password (up to 16 characters long) that is required by .Ic check-password @@ -122,6 +140,16 @@ to prevent booting without password: .Bd -literal -offset indent -compact bootlock_password="boot" .Ed +.Pp +Add the following to +.Xr loader.conf 5 +to generate a prompt at boot to collect GELI credentials for mounting +.Xr geli 8 +encrypted root device(s): +.Pp +.Bd -literal -offset indent -compact +geom_eli_passphrase_prompt="YES" +.Ed .Sh SEE ALSO .Xr loader.conf 5 , .Xr loader 8 , Modified: head/sys/boot/forth/loader.conf ============================================================================== --- head/sys/boot/forth/loader.conf Wed Apr 1 01:54:28 2015 (r280937) +++ head/sys/boot/forth/loader.conf Wed Apr 1 02:01:34 2015 (r280938) @@ -62,6 +62,7 @@ entropy_cache_type="/boot/entropy" # "NO" to disable autobooting #password="" # Prevent changes to boot options #bootlock_password="" # Prevent booting (see check-password.4th(8)) +#geom_eli_passphrase_prompt="NO" # Prompt for geli(8) passphrase to mount root #beastie_disable="NO" # Turn the beastie boot menu on and off #kernels="kernel kernel.old" # Kernels to display in the boot menu #loader_logo="orbbw" # Desired logo: orbbw, orb, fbsdbw, beastiebw, beastie, none Modified: head/usr.sbin/bsdinstall/scripts/zfsboot ============================================================================== --- head/usr.sbin/bsdinstall/scripts/zfsboot Wed Apr 1 01:54:28 2015 (r280937) +++ head/usr.sbin/bsdinstall/scripts/zfsboot Wed Apr 1 02:01:34 2015 (r280938) @@ -1343,6 +1343,9 @@ zfs_create_boot() $BSDINSTALL_TMPBOOT/loader.conf.aesni || return $FAILURE f_eval_catch $funcname echo "$ECHO_APPEND" 'geom_eli_load=\"YES\"' \ $BSDINSTALL_TMPBOOT/loader.conf.geli || return $FAILURE + f_eval_catch $funcname echo "$ECHO_APPEND" \ + 'geom_eli_passphrase_prompt=\"YES\"' \ + $BSDINSTALL_TMPBOOT/loader.conf.geli || return $FAILURE for disk in $disks; do f_eval_catch $funcname printf "$PRINTF_CONF" \ geli_%s_keyfile0_load "$disk$targetpart YES" \ From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 02:05:29 2015 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 F0E2D2EC; Wed, 1 Apr 2015 02: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 D1C53D55; Wed, 1 Apr 2015 02: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 t3125SQo058134; Wed, 1 Apr 2015 02:05:28 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3125R42058126; Wed, 1 Apr 2015 02:05:27 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201504010205.t3125R42058126@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Wed, 1 Apr 2015 02:05:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280939 - in head: sys/boot/forth 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: Wed, 01 Apr 2015 02:05:29 -0000 Author: dteske Date: Wed Apr 1 02:05:26 2015 New Revision: 280939 URL: https://svnweb.freebsd.org/changeset/base/280939 Log: Whoops! "arc commit --revision" != "arc diff --update" Modified: head/sys/boot/forth/check-password.4th head/sys/boot/forth/check-password.4th.8 head/sys/boot/forth/loader.conf head/usr.sbin/bsdinstall/scripts/zfsboot Modified: head/sys/boot/forth/check-password.4th ============================================================================== --- head/sys/boot/forth/check-password.4th Wed Apr 1 02:01:34 2015 (r280938) +++ head/sys/boot/forth/check-password.4th Wed Apr 1 02:05:26 2015 (r280939) @@ -146,15 +146,6 @@ only forth definitions also password-pro 2drop read-reset else drop then - \ Prompt for GEOM ELI (geli(4)) passphrase if enabled - s" geom_eli_passphrase_prompt" getenv dup -1 <> if - s" YES" compare-insensitive 0= if - s" GELI Passphrase: " read ( prompt -- ) - readval readlen @ s" kern.geom.eli.passphrase" setenv - read-reset - then - else drop then - \ Exit if a password was not set s" password" getenv -1 = if exit else drop then Modified: head/sys/boot/forth/check-password.4th.8 ============================================================================== --- head/sys/boot/forth/check-password.4th.8 Wed Apr 1 02:01:34 2015 (r280938) +++ head/sys/boot/forth/check-password.4th.8 Wed Apr 1 02:05:26 2015 (r280939) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2011-2015 Devin Teske +.\" Copyright (c) 2011-2012 Devin Teske .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 20, 2015 +.Dd December 10, 2012 .Dt CHECK-PASSWORD.4TH 8 .Os .Sh NAME @@ -33,12 +33,8 @@ .Sh DESCRIPTION The file that goes by the name of .Nm -is a set of commands designed to do one or more of the following: -.Pp -.Dl o Prevent booting without password -.Dl o Prevent modification of boot options without password -.Dl o Provide a password to mount geli(8) encrypted root disk(s) -.Pp +is a set of commands designed to either prevent booting or prevent modification +of boot options without an appropriately configured password. The commands of .Nm by themselves are not enough for most uses. @@ -62,23 +58,14 @@ The commands provided by it are: .Pp .Bl -tag -width disable-module_module -compact -offset indent .It Ic check-password -Multi-purpose function that can protect the interactive boot menu, -prevent boot without password, or prompt for geli(8) passphrase -.Pq depending on Xr loader.conf 5 settings . +Dual-purpose function that can either protect the interactive boot menu or +prevent boot without password (separately). .Pp First checks .Va bootlock_password and if-set, the user cannot continue until the correct password is entered. .Pp -Next, checks -.Va geom_eli_passphrase_prompt -and if set to -.Li YES -.Pq case-insensitive -prompts the user to enter their GELI password for later mounting of the root -device(s) during boot. -.Pp -Last, checks +Next checks .Va password and if-set, tries to .Ic autoboot @@ -94,11 +81,6 @@ The environment variables that effect it Sets the bootlock password (up to 16 characters long) that is required by .Ic check-password to be entered before the system is allowed to boot. -.It Va geom_eli_passphrase_prompt -Selects whether loader(8) will prompt for GELI credentials, handing-off to the -kernel for later mounting of -.Xr geli 8 -encrypted root device(s). .It Va password Sets the password (up to 16 characters long) that is required by .Ic check-password @@ -140,16 +122,6 @@ to prevent booting without password: .Bd -literal -offset indent -compact bootlock_password="boot" .Ed -.Pp -Add the following to -.Xr loader.conf 5 -to generate a prompt at boot to collect GELI credentials for mounting -.Xr geli 8 -encrypted root device(s): -.Pp -.Bd -literal -offset indent -compact -geom_eli_passphrase_prompt="YES" -.Ed .Sh SEE ALSO .Xr loader.conf 5 , .Xr loader 8 , Modified: head/sys/boot/forth/loader.conf ============================================================================== --- head/sys/boot/forth/loader.conf Wed Apr 1 02:01:34 2015 (r280938) +++ head/sys/boot/forth/loader.conf Wed Apr 1 02:05:26 2015 (r280939) @@ -62,7 +62,6 @@ entropy_cache_type="/boot/entropy" # "NO" to disable autobooting #password="" # Prevent changes to boot options #bootlock_password="" # Prevent booting (see check-password.4th(8)) -#geom_eli_passphrase_prompt="NO" # Prompt for geli(8) passphrase to mount root #beastie_disable="NO" # Turn the beastie boot menu on and off #kernels="kernel kernel.old" # Kernels to display in the boot menu #loader_logo="orbbw" # Desired logo: orbbw, orb, fbsdbw, beastiebw, beastie, none Modified: head/usr.sbin/bsdinstall/scripts/zfsboot ============================================================================== --- head/usr.sbin/bsdinstall/scripts/zfsboot Wed Apr 1 02:01:34 2015 (r280938) +++ head/usr.sbin/bsdinstall/scripts/zfsboot Wed Apr 1 02:05:26 2015 (r280939) @@ -1343,9 +1343,6 @@ zfs_create_boot() $BSDINSTALL_TMPBOOT/loader.conf.aesni || return $FAILURE f_eval_catch $funcname echo "$ECHO_APPEND" 'geom_eli_load=\"YES\"' \ $BSDINSTALL_TMPBOOT/loader.conf.geli || return $FAILURE - f_eval_catch $funcname echo "$ECHO_APPEND" \ - 'geom_eli_passphrase_prompt=\"YES\"' \ - $BSDINSTALL_TMPBOOT/loader.conf.geli || return $FAILURE for disk in $disks; do f_eval_catch $funcname printf "$PRINTF_CONF" \ geli_%s_keyfile0_load "$disk$targetpart YES" \ From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 03:42:49 2015 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 14F3893E; Wed, 1 Apr 2015 03:42: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 EAD16BAB; Wed, 1 Apr 2015 03:42: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 t313gmtQ005182; Wed, 1 Apr 2015 03:42:48 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t313glPb005175; Wed, 1 Apr 2015 03:42:47 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201504010342.t313glPb005175@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 1 Apr 2015 03:42:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280940 - in head/sys/dev/ath/ath_hal: . ar5212 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 Apr 2015 03:42:49 -0000 Author: adrian Date: Wed Apr 1 03:42:46 2015 New Revision: 280940 URL: https://svnweb.freebsd.org/changeset/base/280940 Log: Start the process of migrating the ANI statistics out of the HALs and into the top-level HAL. The athstats program is blindly using a copy of the ar5212 ANI stats structure to pull out ANI statistics/state and this is problematic for the AR9300 HAL. So: * Define HAL_ANI_STATS and HAL_ANI_STATE * Use HAL_ANI_STATS inside the AR5212 HAL This commit doesn't (yet) convert the ar5212AniState -> HAL_ANI_STATE when exporting it to userland; that'll come in the next commit. Modified: head/sys/dev/ath/ath_hal/ah.h head/sys/dev/ath/ath_hal/ar5212/ar5212.h head/sys/dev/ath/ath_hal/ar5212/ar5212_ani.c head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c Modified: head/sys/dev/ath/ath_hal/ah.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah.h Wed Apr 1 02:05:26 2015 (r280939) +++ head/sys/dev/ath/ath_hal/ah.h Wed Apr 1 03:42:46 2015 (r280940) @@ -850,6 +850,48 @@ typedef struct { #define HAL_RSSI_EP_MULTIPLIER (1<<7) /* pow2 to optimize out * and / */ +/* + * This is the ANI state and MIB stats. + * + * It's used by the HAL modules to keep state /and/ by the debug ioctl + * to fetch ANI information. + */ +typedef struct { + uint32_t ast_ani_niup; /* ANI increased noise immunity */ + uint32_t ast_ani_nidown; /* ANI decreased noise immunity */ + uint32_t ast_ani_spurup; /* ANI increased spur immunity */ + uint32_t ast_ani_spurdown;/* ANI descreased spur immunity */ + uint32_t ast_ani_ofdmon; /* ANI OFDM weak signal detect on */ + uint32_t ast_ani_ofdmoff;/* ANI OFDM weak signal detect off */ + uint32_t ast_ani_cckhigh;/* ANI CCK weak signal threshold high */ + uint32_t ast_ani_ccklow; /* ANI CCK weak signal threshold low */ + uint32_t ast_ani_stepup; /* ANI increased first step level */ + uint32_t ast_ani_stepdown;/* ANI decreased first step level */ + uint32_t ast_ani_ofdmerrs;/* ANI cumulative ofdm phy err count */ + uint32_t ast_ani_cckerrs;/* ANI cumulative cck phy err count */ + uint32_t ast_ani_reset; /* ANI parameters zero'd for non-STA */ + uint32_t ast_ani_lzero; /* ANI listen time forced to zero */ + uint32_t ast_ani_lneg; /* ANI listen time calculated < 0 */ + HAL_MIB_STATS ast_mibstats; /* MIB counter stats */ + HAL_NODE_STATS ast_nodestats; /* Latest rssi stats from driver */ +} HAL_ANI_STATS; + +typedef struct { + uint8_t noiseImmunityLevel; + uint8_t spurImmunityLevel; + uint8_t firstepLevel; + uint8_t ofdmWeakSigDetectOff; + uint8_t cckWeakSigThreshold; + uint32_t listenTime; + + /* NB: intentionally ordered so data exported to user space is first */ + uint32_t txFrameCount; /* Last txFrameCount */ + uint32_t rxFrameCount; /* Last rx Frame count */ + uint32_t cycleCount; /* Last cycleCount + (to detect wrap-around) */ + uint32_t ofdmPhyErrCount;/* OFDM err count since last reset */ + uint32_t cckPhyErrCount; /* CCK err count since last reset */ +} HAL_ANI_STATE; struct ath_desc; struct ath_tx_status; Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5212/ar5212.h Wed Apr 1 02:05:26 2015 (r280939) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212.h Wed Apr 1 03:42:46 2015 (r280940) @@ -200,6 +200,7 @@ struct ar5212AniState { #define HAL_ANI_ENA 0x00000001 /* ANI operation enabled */ #define HAL_RSSI_ANI_ENA 0x00000002 /* rssi-based processing ena'd*/ +#if 0 struct ar5212Stats { uint32_t ast_ani_niup; /* ANI increased noise immunity */ uint32_t ast_ani_nidown; /* ANI decreased noise immunity */ @@ -219,6 +220,7 @@ struct ar5212Stats { HAL_MIB_STATS ast_mibstats; /* MIB counter stats */ HAL_NODE_STATS ast_nodestats; /* Latest rssi stats from driver */ }; +#endif /* * NF Cal history buffer @@ -258,7 +260,7 @@ struct ath_hal_5212 { * Runtime state. */ uint32_t ah_maskReg; /* copy of AR_IMR */ - struct ar5212Stats ah_stats; /* various statistics */ + HAL_ANI_STATS ah_stats; /* various statistics */ RF_HAL_FUNCS *ah_rfHal; uint32_t ah_txDescMask; /* mask for TXDESC */ uint32_t ah_txOkInterruptMask; @@ -625,7 +627,7 @@ extern void ar5212AniAttach(struct ath_h const struct ar5212AniParams *, HAL_BOOL ena); extern void ar5212AniDetach(struct ath_hal *); extern struct ar5212AniState *ar5212AniGetCurrentState(struct ath_hal *); -extern struct ar5212Stats *ar5212AniGetCurrentStats(struct ath_hal *); +extern HAL_ANI_STATS *ar5212AniGetCurrentStats(struct ath_hal *); extern HAL_BOOL ar5212AniControl(struct ath_hal *, HAL_ANI_CMD cmd, int param); extern HAL_BOOL ar5212AniSetParams(struct ath_hal *, const struct ar5212AniParams *, const struct ar5212AniParams *); Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_ani.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5212/ar5212_ani.c Wed Apr 1 02:05:26 2015 (r280939) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212_ani.c Wed Apr 1 03:42:46 2015 (r280940) @@ -110,7 +110,7 @@ ar5212AniGetCurrentState(struct ath_hal /* * Return the current statistics. */ -struct ar5212Stats * +HAL_ANI_STATS * ar5212AniGetCurrentStats(struct ath_hal *ah) { struct ath_hal_5212 *ahp = AH5212(ah); Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c Wed Apr 1 02:05:26 2015 (r280939) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c Wed Apr 1 03:42:46 2015 (r280940) @@ -1085,7 +1085,7 @@ ar5212GetDiagState(struct ath_hal *ah, i case HAL_DIAG_ANI_STATS: *result = ar5212AniGetCurrentStats(ah); *resultsize = (*result == AH_NULL) ? - 0 : sizeof(struct ar5212Stats); + 0 : sizeof(HAL_ANI_STATS); return AH_TRUE; case HAL_DIAG_ANI_CMD: if (argsize != 2*sizeof(uint32_t)) From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 04:56:12 2015 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 372916CD; Wed, 1 Apr 2015 04:56: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 1897123F; Wed, 1 Apr 2015 04:56: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 t314uB2O038343; Wed, 1 Apr 2015 04:56:11 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t314uBMN038340; Wed, 1 Apr 2015 04:56:11 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201504010456.t314uBMN038340@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 1 Apr 2015 04:56:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280941 - 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: Wed, 01 Apr 2015 04:56:12 -0000 Author: adrian Date: Wed Apr 1 04:56:10 2015 New Revision: 280941 URL: https://svnweb.freebsd.org/changeset/base/280941 Log: Expose the ANI state / statistics using the public ANI function, rather than the ar9300_* definitions. .. which of course don't match, and athstats was reading garbage ANI data. Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300.h head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_ani.c head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_misc.c Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300.h ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300.h Wed Apr 1 03:42:46 2015 (r280940) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300.h Wed Apr 1 04:56:10 2015 (r280941) @@ -206,6 +206,7 @@ struct ar9300_ani_state { #define DO_ANI(ah) \ ((AH9300(ah)->ah_proc_phy_err & HAL_PROCESS_ANI)) +#if 0 struct ar9300_stats { u_int32_t ast_ani_niup; /* ANI increased noise immunity */ u_int32_t ast_ani_nidown; /* ANI decreased noise immunity */ @@ -225,6 +226,7 @@ struct ar9300_stats { HAL_MIB_STATS ast_mibstats; /* MIB counter stats */ HAL_NODE_STATS ast_nodestats; /* Latest rssi stats from driver */ }; +#endif struct ar9300_rad_reader { u_int16_t rd_index; @@ -431,7 +433,7 @@ struct ath_hal_9300 { u_int32_t ah_mask2Reg; /* copy of AR_IMR_S2 */ u_int32_t ah_msi_reg; /* copy of AR_PCIE_MSI */ os_atomic_t ah_ier_ref_count; /* reference count for enabling interrupts */ - struct ar9300_stats ah_stats; /* various statistics */ + HAL_ANI_STATS ah_stats; /* various statistics */ RF_HAL_FUNCS ah_rf_hal; u_int32_t ah_tx_desc_mask; /* mask for TXDESC */ u_int32_t ah_tx_ok_interrupt_mask; @@ -887,6 +889,7 @@ struct ath_hal_9300 { int ah_fccaifs; int ah_reset_reason; int ah_dcs_enable; + HAL_ANI_STATE ext_ani_state; /* FreeBSD; external facing ANI state */ struct ar9300NfLimits nf_2GHz; struct ar9300NfLimits nf_5GHz; @@ -1443,7 +1446,7 @@ extern void ar9300_disable_mib_counters extern void ar9300_ani_attach(struct ath_hal *); extern void ar9300_ani_detach(struct ath_hal *); extern struct ar9300_ani_state *ar9300_ani_get_current_state(struct ath_hal *); -extern struct ar9300_stats *ar9300_ani_get_current_stats(struct ath_hal *); +extern HAL_ANI_STATS *ar9300_ani_get_current_stats(struct ath_hal *); extern HAL_BOOL ar9300_ani_control(struct ath_hal *, HAL_ANI_CMD cmd, int param); struct ath_rx_status; Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_ani.c ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_ani.c Wed Apr 1 03:42:46 2015 (r280940) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_ani.c Wed Apr 1 04:56:10 2015 (r280941) @@ -210,7 +210,7 @@ ar9300_ani_get_current_state(struct ath_ /* * Return the current statistics. */ -struct ar9300_stats * +HAL_ANI_STATS * ar9300_ani_get_current_stats(struct ath_hal *ah) { return &AH9300(ah)->ah_stats; Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_misc.c ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_misc.c Wed Apr 1 03:42:46 2015 (r280940) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_misc.c Wed Apr 1 04:56:10 2015 (r280941) @@ -1179,6 +1179,7 @@ ar9300_get_diag_state(struct ath_hal *ah void **result, u_int32_t *resultsize) { struct ath_hal_9300 *ahp = AH9300(ah); + struct ar9300_ani_state *ani; (void) ahp; if (ath_hal_getdiagstate(ah, request, args, argsize, result, resultsize)) { @@ -1219,14 +1220,35 @@ ar9300_get_diag_state(struct ath_hal *ah return AH_TRUE; #endif case HAL_DIAG_ANI_CURRENT: + + ani = ar9300_ani_get_current_state(ah); + if (ani == AH_NULL) + return AH_FALSE; + /* Convert ar9300 HAL to FreeBSD HAL ANI state */ + /* XXX TODO: add all of these to the HAL ANI state structure */ + bzero(&ahp->ext_ani_state, sizeof(ahp->ext_ani_state)); + /* XXX should this be OFDM or CCK noise immunity level? */ + ahp->ext_ani_state.noiseImmunityLevel = ani->ofdm_noise_immunity_level; + ahp->ext_ani_state.spurImmunityLevel = ani->spur_immunity_level; + ahp->ext_ani_state.firstepLevel = ani->firstep_level; + ahp->ext_ani_state.ofdmWeakSigDetectOff = ani->ofdm_weak_sig_detect_off; + /* mrc_cck_off */ + /* cck_noise_immunity_level */ + + ahp->ext_ani_state.listenTime = ani->listen_time; + + *result = &ahp->ext_ani_state; + *resultsize = sizeof(ahp->ext_ani_state); +#if 0 *result = ar9300_ani_get_current_state(ah); *resultsize = (*result == AH_NULL) ? 0 : sizeof(struct ar9300_ani_state); +#endif return AH_TRUE; case HAL_DIAG_ANI_STATS: *result = ar9300_ani_get_current_stats(ah); *resultsize = (*result == AH_NULL) ? - 0 : sizeof(struct ar9300_stats); + 0 : sizeof(HAL_ANI_STATS); return AH_TRUE; case HAL_DIAG_ANI_CMD: if (argsize != 2*sizeof(u_int32_t)) { From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 04:56:24 2015 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 3B9CC814; Wed, 1 Apr 2015 04:56: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 0DDFD242; Wed, 1 Apr 2015 04:56: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 t314uNQM038410; Wed, 1 Apr 2015 04:56:23 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t314uNgM038406; Wed, 1 Apr 2015 04:56:23 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201504010456.t314uNgM038406@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 1 Apr 2015 04:56:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280942 - head/sys/dev/ath/ath_hal/ar5212 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 Apr 2015 04:56:24 -0000 Author: adrian Date: Wed Apr 1 04:56:22 2015 New Revision: 280942 URL: https://svnweb.freebsd.org/changeset/base/280942 Log: Use the HAL API for returning ar5212AniState, rather than just dumping AniState itself. Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212.h head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5212/ar5212.h Wed Apr 1 04:56:10 2015 (r280941) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212.h Wed Apr 1 04:56:22 2015 (r280942) @@ -345,6 +345,7 @@ struct ath_hal_5212 { uint32_t ah_txBusy; uint32_t ah_rx_chainmask; uint32_t ah_tx_chainmask; + HAL_ANI_STATE ext_ani_state; }; #define AH5212(_ah) ((struct ath_hal_5212 *)(_ah)) Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c Wed Apr 1 04:56:10 2015 (r280941) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c Wed Apr 1 04:56:22 2015 (r280942) @@ -1052,6 +1052,7 @@ ar5212GetDiagState(struct ath_hal *ah, i void **result, uint32_t *resultsize) { struct ath_hal_5212 *ahp = AH5212(ah); + struct ar5212AniState *astate; (void) ahp; if (ath_hal_getdiagstate(ah, request, args, argsize, result, resultsize)) @@ -1083,9 +1084,28 @@ ar5212GetDiagState(struct ath_hal *ah, i 0 : sizeof(struct ar5212AniState); return AH_TRUE; case HAL_DIAG_ANI_STATS: - *result = ar5212AniGetCurrentStats(ah); - *resultsize = (*result == AH_NULL) ? - 0 : sizeof(HAL_ANI_STATS); + OS_MEMZERO(&ahp->ext_ani_state, sizeof(ahp->ext_ani_state)); + astate = ar5212AniGetCurrentState(ah); + if (astate == NULL) { + *result = NULL; + *resultsize = 0; + } else { + ahp->ext_ani_state.noiseImmunityLevel = + astate->noiseImmunityLevel; + ahp->ext_ani_state.spurImmunityLevel = + astate->spurImmunityLevel; + ahp->ext_ani_state.firstepLevel = + astate->firstepLevel; + ahp->ext_ani_state.ofdmWeakSigDetectOff = + astate->ofdmWeakSigDetectOff; + ahp->ext_ani_state.cckWeakSigThreshold = + astate->cckWeakSigThreshold; + ahp->ext_ani_state.listenTime = + astate->listenTime; + + *result = &ahp->ext_ani_state; + *resultsize = sizeof(ahp->ext_ani_state); + } return AH_TRUE; case HAL_DIAG_ANI_CMD: if (argsize != 2*sizeof(uint32_t)) From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 04:57:28 2015 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 462C895D; Wed, 1 Apr 2015 04:57: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 31A4E250; Wed, 1 Apr 2015 04:57: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 t314vSpR038584; Wed, 1 Apr 2015 04:57:28 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t314vSEE038583; Wed, 1 Apr 2015 04:57:28 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201504010457.t314vSEE038583@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 1 Apr 2015 04:57:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280943 - head/tools/tools/ath/athstats 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 Apr 2015 04:57:28 -0000 Author: adrian Date: Wed Apr 1 04:57:27 2015 New Revision: 280943 URL: https://svnweb.freebsd.org/changeset/base/280943 Log: Don't use a private copy of the ANI definitions - use the HAL definitions. Whilst I'm at it: * fix the NI+ to be correct, rather than NI-; * use the diag api codes, now that the HAL is public. Tested: * AR9380, STA mode Modified: head/tools/tools/ath/athstats/athstats.c Modified: head/tools/tools/ath/athstats/athstats.c ============================================================================== --- head/tools/tools/ath/athstats/athstats.c Wed Apr 1 04:56:22 2015 (r280942) +++ head/tools/tools/ath/athstats/athstats.c Wed Apr 1 04:57:27 2015 (r280943) @@ -51,6 +51,7 @@ #include "ah.h" #include "ah_desc.h" +#include "ah_diagcodes.h" #include "net80211/ieee80211_ioctl.h" #include "net80211/ieee80211_radiotap.h" #include "if_athioctl.h" @@ -336,7 +337,7 @@ static const struct fmt athstats[] = { #define S_ANI_LISTEN AFTER(S_ANI_MAXSPUR) { 6, "listen","LISTEN", "listen time" }, #define S_ANI_NIUP AFTER(S_ANI_LISTEN) - { 4, "ni+", "NI-", "ANI increased noise immunity" }, + { 4, "ni+", "NI+", "ANI increased noise immunity" }, #define S_ANI_NIDOWN AFTER(S_ANI_NIUP) { 4, "ni-", "NI-", "ANI decrease noise immunity" }, #define S_ANI_SIUP AFTER(S_ANI_NIDOWN) @@ -428,39 +429,11 @@ static const struct fmt athstats[] = { #define S_LAST S_ANT_TX0 #define S_MAX S_BMISSCOUNT+1 -/* - * XXX fold this into the external HAL definitions! -adrian - */ struct _athstats { struct ath_stats ath; #ifdef ATH_SUPPORT_ANI - struct { - uint32_t ast_ani_niup; /* increased noise immunity */ - uint32_t ast_ani_nidown; /* decreased noise immunity */ - uint32_t ast_ani_spurup; /* increased spur immunity */ - uint32_t ast_ani_spurdown; /* descreased spur immunity */ - uint32_t ast_ani_ofdmon; /* OFDM weak signal detect on */ - uint32_t ast_ani_ofdmoff; /* OFDM weak signal detect off*/ - uint32_t ast_ani_cckhigh; /* CCK weak signal thr high */ - uint32_t ast_ani_ccklow; /* CCK weak signal thr low */ - uint32_t ast_ani_stepup; /* increased first step level */ - uint32_t ast_ani_stepdown; /* decreased first step level */ - uint32_t ast_ani_ofdmerrs; /* cumulative ofdm phy err cnt*/ - uint32_t ast_ani_cckerrs; /* cumulative cck phy err cnt */ - uint32_t ast_ani_reset; /* params zero'd for non-STA */ - uint32_t ast_ani_lzero; /* listen time forced to zero */ - uint32_t ast_ani_lneg; /* listen time calculated < 0 */ - HAL_MIB_STATS ast_mibstats; /* MIB counter stats */ - HAL_NODE_STATS ast_nodestats; /* latest rssi stats */ - } ani_stats; - struct { - uint8_t noiseImmunityLevel; - uint8_t spurImmunityLevel; - uint8_t firstepLevel; - uint8_t ofdmWeakSigDetectOff; - uint8_t cckWeakSigThreshold; - uint32_t listenTime; - } ani_state; + HAL_ANI_STATS ani_stats; + HAL_ANI_STATE ani_state; #endif }; @@ -504,14 +477,14 @@ ath_collect(struct athstatfoo_p *wf, str err(1, "ioctl: %s", wf->ifr.ifr_name); #ifdef ATH_SUPPORT_ANI if (wf->optstats & ATHSTATS_ANI) { - wf->atd.ad_id = 5; + wf->atd.ad_id = HAL_DIAG_ANI_CURRENT; /* HAL_DIAG_ANI_CURRENT */ wf->atd.ad_out_data = (caddr_t) &stats->ani_state; wf->atd.ad_out_size = sizeof(stats->ani_state); if (ioctl(wf->s, SIOCGATHDIAG, &wf->atd) < 0) { warn("ioctl: %s", wf->atd.ad_name); wf->optstats &= ~ATHSTATS_ANI; } - wf->atd.ad_id = 8; + wf->atd.ad_id = HAL_DIAG_ANI_STATS; /* HAL_DIAG_ANI_STATS */ wf->atd.ad_out_data = (caddr_t) &stats->ani_stats; wf->atd.ad_out_size = sizeof(stats->ani_stats); if (ioctl(wf->s, SIOCGATHDIAG, &wf->atd) < 0) From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 04:58:09 2015 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 67A1BAAF; Wed, 1 Apr 2015 04:58: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 5267425E; Wed, 1 Apr 2015 04:58: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 t314w9Vj038731; Wed, 1 Apr 2015 04:58:09 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t314w9x7038730; Wed, 1 Apr 2015 04:58:09 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201504010458.t314w9x7038730@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 1 Apr 2015 04:58:09 +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: r280944 - stable/10/release/doc/en_US.ISO8859-1/errata 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 Apr 2015 04:58:09 -0000 Author: gjb Date: Wed Apr 1 04:58:08 2015 New Revision: 280944 URL: https://svnweb.freebsd.org/changeset/base/280944 Log: Document removal of 10.1-RELEASE QCOW2 virtual machine disk images from FTP, due to a crash-on-boot problem. Requested by: jhb (months ago), bapt (recently) Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/errata/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/errata/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/errata/article.xml Wed Apr 1 04:57:27 2015 (r280943) +++ stable/10/release/doc/en_US.ISO8859-1/errata/article.xml Wed Apr 1 04:58:08 2015 (r280944) @@ -232,6 +232,17 @@ boot is expected to be issued when a solution to the problem is identified. + + + [2015-03-31] Several reports were received regarding the + QCOW2 &os; virtual machine images + crashing on boot. As result of this, these images have been + removed from the FTP mirrors, and the + hashes removed from CHECKSUM.SHA256 and + CHECKSUM.MD5 in the VM-IMAGES/ directory on the + FTP mirrors. + From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 06:28:52 2015 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 46B16DFC; Wed, 1 Apr 2015 06:28:52 +0000 (UTC) Received: from gold.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "gold.funkthat.com", Issuer "gold.funkthat.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 1759B817; Wed, 1 Apr 2015 06:28:51 +0000 (UTC) Received: from gold.funkthat.com (localhost [127.0.0.1]) by gold.funkthat.com (8.14.5/8.14.5) with ESMTP id t316SoVV005357 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 31 Mar 2015 23:28:50 -0700 (PDT) (envelope-from jmg@gold.funkthat.com) Received: (from jmg@localhost) by gold.funkthat.com (8.14.5/8.14.5/Submit) id t316So9r005356; Tue, 31 Mar 2015 23:28:50 -0700 (PDT) (envelope-from jmg) Date: Tue, 31 Mar 2015 23:28:50 -0700 From: John-Mark Gurney To: Konstantin Belousov Subject: Re: svn commit: r280818 - in head: lib/libc/include lib/libc/sys lib/libthr/thread share/man/man3 Message-ID: <20150401062850.GV51048@funkthat.com> References: <201503291914.t2TJEgZN082841@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201503291914.t2TJEgZN082841@svn.freebsd.org> X-Operating-System: FreeBSD 9.1-PRERELEASE amd64 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? User-Agent: Mutt/1.5.21 (2010-09-15) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (gold.funkthat.com [127.0.0.1]); Tue, 31 Mar 2015 23:28:50 -0700 (PDT) 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 Apr 2015 06:28:52 -0000 Konstantin Belousov wrote this message on Sun, Mar 29, 2015 at 19:14 +0000: > -.Fn EV_SET "&kev" ident filter flags fflags data udata > +.Fn EV_SET "kev" ident filter flags fflags data udata I'm wondering if this change was intentional? Are you planning on changing the EV_SET macro? -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 06:44:40 2015 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 35F1A4FB; Wed, 1 Apr 2015 06:44: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 20AF99C5; Wed, 1 Apr 2015 06:44: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 t316idgv091170; Wed, 1 Apr 2015 06:44:39 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t316idOq091169; Wed, 1 Apr 2015 06:44:39 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201504010644.t316idOq091169@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 1 Apr 2015 06:44:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280948 - head/sys/mips/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 Apr 2015 06:44:40 -0000 Author: adrian Date: Wed Apr 1 06:44:39 2015 New Revision: 280948 URL: https://svnweb.freebsd.org/changeset/base/280948 Log: Migrate the TL-WR1043nd v2 to use the new map based MAC hints mechanism. This programs separate, correct mac addresses for the ethernet and wlan interfaces. Modified: head/sys/mips/conf/TL-WR1043NDv2.hints Modified: head/sys/mips/conf/TL-WR1043NDv2.hints ============================================================================== --- head/sys/mips/conf/TL-WR1043NDv2.hints Wed Apr 1 05:55:03 2015 (r280947) +++ head/sys/mips/conf/TL-WR1043NDv2.hints Wed Apr 1 06:44:39 2015 (r280948) @@ -6,6 +6,25 @@ # QCA955X_ETH_CFG_RGMII_EN (1 << 0) hint.qca955x_gmac.0.gmac_cfg=0x1 +# Use base mac address for wifi; +1 and +2 for arge0/arge1. +hint.ar71xx.0.eeprom_mac_addr=0x1f01fc00 +hint.ar71xx.0.eeprom_mac_isascii=0 + +hint.ar71xx_mac_map.0.devid=ath +hint.ar71xx_mac_map.0.unitid=0 +hint.ar71xx_mac_map.0.offset=0 +hint.ar71xx_mac_map.0.is_local=0 + +hint.ar71xx_mac_map.1.devid=arge +hint.ar71xx_mac_map.1.unitid=0 +hint.ar71xx_mac_map.1.offset=1 +hint.ar71xx_mac_map.1.is_local=0 + +hint.ar71xx_mac_map.2.devid=arge +hint.ar71xx_mac_map.2.unitid=1 +hint.ar71xx_mac_map.2.offset=2 +hint.ar71xx_mac_map.2.is_local=0 + # mdiobus0 on arge0 hint.argemdio.0.at="nexus0" hint.argemdio.0.maddr=0x19000000 @@ -89,8 +108,6 @@ hint.arge.0.media=1000 hint.arge.0.fduplex=1 hint.arge.0.pll_1000=0x56000000 -hint.arge.0.eeprommac=0x1f01fc00 - # arge1 - lock up to 1000/full hint.arge.1.phymask=0x0 hint.arge.1.media=1000 From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 08:25:41 2015 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 9C9B8E01; Wed, 1 Apr 2015 08:25: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 6D564672; Wed, 1 Apr 2015 08:25: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 t318Pf7K038333; Wed, 1 Apr 2015 08:25:41 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t318PfCB038332; Wed, 1 Apr 2015 08:25:41 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201504010825.t318PfCB038332@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 1 Apr 2015 08:25:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280949 - head/sys/fs/devfs 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 Apr 2015 08:25:41 -0000 Author: kib Date: Wed Apr 1 08:25:40 2015 New Revision: 280949 URL: https://svnweb.freebsd.org/changeset/base/280949 Log: Refine r280308. Do not completely disable timestamping of devfs nodes on reads or writes, the time marks are used to display idle time by w(1) [1]. Instead, use vfs.devfs.dotimes as the selector of default precision vs. using time_second. The later gives seconds precision, which is good enough for the purpose. Note that timestamp updates are unlocked and the updates itself, as well as the check in devfs_timestamp, are non-atomic. Noted by: truckman [1] Reviewed by: bde Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/fs/devfs/devfs_vnops.c Modified: head/sys/fs/devfs/devfs_vnops.c ============================================================================== --- head/sys/fs/devfs/devfs_vnops.c Wed Apr 1 06:44:39 2015 (r280948) +++ head/sys/fs/devfs/devfs_vnops.c Wed Apr 1 08:25:40 2015 (r280949) @@ -84,7 +84,27 @@ SYSCTL_DECL(_vfs_devfs); static int devfs_dotimes; SYSCTL_INT(_vfs_devfs, OID_AUTO, dotimes, CTLFLAG_RW, - &devfs_dotimes, 0, "Update timestamps on DEVFS"); + &devfs_dotimes, 0, "Update timestamps on DEVFS with default precision"); + +/* + * Update devfs node timestamp. Note that updates are unlocked and + * stat(2) could see partially updated times. + */ +static void +devfs_timestamp(struct timespec *tsp) +{ + time_t ts; + + if (devfs_dotimes) { + vfs_timestamp(tsp); + } else { + ts = time_second; + if (tsp->tv_sec != ts) { + tsp->tv_sec = ts; + tsp->tv_nsec = 0; + } + } +} static int devfs_fp_check(struct file *fp, struct cdev **devp, struct cdevsw **dswp, @@ -1228,9 +1248,8 @@ devfs_read_f(struct file *fp, struct uio foffset_lock_uio(fp, uio, flags | FOF_NOLOCK); error = dsw->d_read(dev, uio, ioflag); - if (devfs_dotimes && - (uio->uio_resid != resid || (error == 0 && resid != 0))) - vfs_timestamp(&dev->si_atime); + if (uio->uio_resid != resid || (error == 0 && resid != 0)) + devfs_timestamp(&dev->si_atime); td->td_fpop = fpop; dev_relthread(dev, ref); @@ -1708,9 +1727,8 @@ devfs_write_f(struct file *fp, struct ui resid = uio->uio_resid; error = dsw->d_write(dev, uio, ioflag); - if (devfs_dotimes && - (uio->uio_resid != resid || (error == 0 && resid != 0))) { - vfs_timestamp(&dev->si_ctime); + if (uio->uio_resid != resid || (error == 0 && resid != 0)) { + devfs_timestamp(&dev->si_ctime); dev->si_mtime = dev->si_ctime; } td->td_fpop = fpop; From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 08:27:20 2015 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 E14C4FD9; Wed, 1 Apr 2015 08:27:20 +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 6A96568D; Wed, 1 Apr 2015 08:27:20 +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 t318REJU042773 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Wed, 1 Apr 2015 11:27:15 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t318REJU042773 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t318RE6F042772; Wed, 1 Apr 2015 11:27:14 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 1 Apr 2015 11:27:14 +0300 From: Konstantin Belousov To: John-Mark Gurney Subject: Re: svn commit: r280818 - in head: lib/libc/include lib/libc/sys lib/libthr/thread share/man/man3 Message-ID: <20150401082714.GV2379@kib.kiev.ua> References: <201503291914.t2TJEgZN082841@svn.freebsd.org> <20150401062850.GV51048@funkthat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150401062850.GV51048@funkthat.com> 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 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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 Apr 2015 08:27:21 -0000 On Tue, Mar 31, 2015 at 11:28:50PM -0700, John-Mark Gurney wrote: > Konstantin Belousov wrote this message on Sun, Mar 29, 2015 at 19:14 +0000: > > -.Fn EV_SET "&kev" ident filter flags fflags data udata > > +.Fn EV_SET "kev" ident filter flags fflags data udata > > I'm wondering if this change was intentional? Are you planning on > changing the EV_SET macro? Yes, it was intentional. The &kev is not a C syntax for type declaration. I considered change it to *kev, but later is also not very useful for list of _macro_ arguments. From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 08:30:45 2015 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 AACB9331; Wed, 1 Apr 2015 08:30: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 92A567A1; Wed, 1 Apr 2015 08:30: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 t318UjQk039087; Wed, 1 Apr 2015 08:30:45 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t318Ufhn039066; Wed, 1 Apr 2015 08:30:41 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504010830.t318Ufhn039066@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 1 Apr 2015 08:30:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280950 - in head/sys/boot: amd64 efi efi/boot1 efi/loader efi/loader/arch efi/loader/arch/amd64 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 Apr 2015 08:30:45 -0000 Author: andrew Date: Wed Apr 1 08:30:40 2015 New Revision: 280950 URL: https://svnweb.freebsd.org/changeset/base/280950 Log: Move the efi loaders to be under sys/boot/efi. This will help us add support for booting arm and arm64 from UEFI. Differential Revision: https://reviews.freebsd.org/D2164 Reviewed by: emaste, imp (previous version) Sponsored by: The FreeBSD Foundation Added: head/sys/boot/efi/boot1/ head/sys/boot/efi/boot1/Makefile - copied, changed from r280949, head/sys/boot/amd64/boot1.efi/Makefile head/sys/boot/efi/boot1/Makefile.fat - copied unchanged from r280570, head/sys/boot/amd64/boot1.efi/Makefile.fat head/sys/boot/efi/boot1/boot1.c - copied unchanged from r280570, head/sys/boot/amd64/boot1.efi/boot1.c head/sys/boot/efi/boot1/fat.tmpl.bz2.uu - copied unchanged from r280570, head/sys/boot/amd64/boot1.efi/fat.tmpl.bz2.uu head/sys/boot/efi/boot1/generate-fat.sh - copied unchanged from r280570, head/sys/boot/amd64/boot1.efi/generate-fat.sh head/sys/boot/efi/loader/ head/sys/boot/efi/loader/Makefile - copied, changed from r280570, head/sys/boot/amd64/efi/Makefile head/sys/boot/efi/loader/arch/ head/sys/boot/efi/loader/arch/amd64/ head/sys/boot/efi/loader/arch/amd64/Makefile.inc (contents, props changed) head/sys/boot/efi/loader/arch/amd64/amd64_tramp.S - copied unchanged from r280570, head/sys/boot/amd64/efi/amd64_tramp.S head/sys/boot/efi/loader/arch/amd64/elf64_freebsd.c - copied, changed from r280570, head/sys/boot/amd64/efi/elf64_freebsd.c head/sys/boot/efi/loader/arch/amd64/framebuffer.c - copied unchanged from r280570, head/sys/boot/amd64/efi/framebuffer.c head/sys/boot/efi/loader/arch/amd64/framebuffer.h - copied unchanged from r280570, head/sys/boot/amd64/efi/framebuffer.h head/sys/boot/efi/loader/arch/amd64/ldscript.amd64 - copied unchanged from r280570, head/sys/boot/amd64/efi/ldscript.amd64 head/sys/boot/efi/loader/arch/amd64/reloc.c - copied unchanged from r280570, head/sys/boot/amd64/efi/reloc.c head/sys/boot/efi/loader/arch/amd64/start.S - copied unchanged from r280570, head/sys/boot/amd64/efi/start.S head/sys/boot/efi/loader/autoload.c - copied, changed from r280570, head/sys/boot/amd64/efi/autoload.c head/sys/boot/efi/loader/bootinfo.c - copied, changed from r280570, head/sys/boot/amd64/efi/bootinfo.c head/sys/boot/efi/loader/conf.c - copied, changed from r280570, head/sys/boot/amd64/efi/conf.c head/sys/boot/efi/loader/copy.c - copied, changed from r280570, head/sys/boot/amd64/efi/copy.c head/sys/boot/efi/loader/devicename.c - copied, changed from r280570, head/sys/boot/amd64/efi/devicename.c head/sys/boot/efi/loader/loader_efi.h - copied, changed from r280570, head/sys/boot/amd64/efi/x86_efi.h head/sys/boot/efi/loader/main.c - copied, changed from r280570, head/sys/boot/amd64/efi/main.c head/sys/boot/efi/loader/version - copied unchanged from r280570, head/sys/boot/amd64/efi/version Deleted: head/sys/boot/amd64/ Modified: head/sys/boot/efi/Makefile head/sys/boot/efi/Makefile.inc Modified: head/sys/boot/efi/Makefile ============================================================================== --- head/sys/boot/efi/Makefile Wed Apr 1 08:25:40 2015 (r280949) +++ head/sys/boot/efi/Makefile Wed Apr 1 08:30:40 2015 (r280950) @@ -2,4 +2,8 @@ SUBDIR= libefi +.if ${MACHINE_CPUARCH} == "amd64" +SUBDIR+= loader boot1 +.endif + .include Modified: head/sys/boot/efi/Makefile.inc ============================================================================== --- head/sys/boot/efi/Makefile.inc Wed Apr 1 08:25:40 2015 (r280949) +++ head/sys/boot/efi/Makefile.inc Wed Apr 1 08:30:40 2015 (r280950) @@ -7,7 +7,10 @@ CFLAGS+= -march=i386 .endif # Options used when building app-specific efi components +# See conf/kern.mk for the correct set of these CFLAGS+= -ffreestanding -fshort-wchar -Wformat +CFLAGS+= -mno-red-zone +CFLAGS+= -mno-mmx -mno-sse -mno-aes -mno-avx -msoft-float LDFLAGS+= -nostdlib .include "../Makefile.inc" Copied and modified: head/sys/boot/efi/boot1/Makefile (from r280949, head/sys/boot/amd64/boot1.efi/Makefile) ============================================================================== --- head/sys/boot/amd64/boot1.efi/Makefile Wed Apr 1 08:25:40 2015 (r280949, copy source) +++ head/sys/boot/efi/boot1/Makefile Wed Apr 1 08:30:40 2015 (r280950) @@ -17,19 +17,19 @@ SRCS= boot1.c reloc.c start.S CFLAGS+= -fPIC CFLAGS+= -I. -CFLAGS+= -I${.CURDIR}/../../efi/include -CFLAGS+= -I${.CURDIR}/../../efi/include/${MACHINE_CPUARCH} +CFLAGS+= -I${.CURDIR}/../include +CFLAGS+= -I${.CURDIR}/../include/${MACHINE_CPUARCH} CFLAGS+= -I${.CURDIR}/../../../contrib/dev/acpica/include CFLAGS+= -I${.CURDIR}/../../.. # Always add MI sources and REGULAR efi loader bits -.PATH: ${.CURDIR}/../efi ${.CURDIR}/../../common +.PATH: ${.CURDIR}/../loader/arch/amd64 ${.CURDIR}/../../common CFLAGS+= -I${.CURDIR}/../../common FILES= boot1.efi boot1.efifat FILESMODE_boot1.efi= ${BINMODE} -LDSCRIPT= ${.CURDIR}/../efi/ldscript.${MACHINE_CPUARCH} +LDSCRIPT= ${.CURDIR}/../loader/arch/${MACHINE_CPUARCH}/ldscript.${MACHINE_CPUARCH} LDFLAGS= -Wl,-T${LDSCRIPT} -Wl,-Bsymbolic -shared -Wl,-znocombreloc ${PROG}: ${LDSCRIPT} @@ -39,7 +39,7 @@ OBJDUMP?= objdump .if ${MACHINE_CPUARCH} == "amd64" EFI_TARGET= efi-app-x86_64 -.else +.elif ${MACHINE_CPUARCH} == "i386" EFI_TARGET= efi-app-ia32 .endif Copied: head/sys/boot/efi/boot1/Makefile.fat (from r280570, head/sys/boot/amd64/boot1.efi/Makefile.fat) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/efi/boot1/Makefile.fat Wed Apr 1 08:30:40 2015 (r280950, copy of r280570, head/sys/boot/amd64/boot1.efi/Makefile.fat) @@ -0,0 +1,3 @@ +# This file autogenerated by generate-fat.sh - DO NOT EDIT +# $FreeBSD$ +BOOT1_OFFSET=0x2d Copied: head/sys/boot/efi/boot1/boot1.c (from r280570, head/sys/boot/amd64/boot1.efi/boot1.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/efi/boot1/boot1.c Wed Apr 1 08:30:40 2015 (r280950, copy of r280570, head/sys/boot/amd64/boot1.efi/boot1.c) @@ -0,0 +1,552 @@ +/*- + * Copyright (c) 1998 Robert Nordier + * All rights reserved. + * Copyright (c) 2001 Robert Drehmel + * All rights reserved. + * Copyright (c) 2014 Nathan Whitehorn + * All rights reserved. + * + * Redistribution and use in source and binary forms are freely + * permitted provided that the above copyright notice and this + * paragraph and the following disclaimer are duplicated in all + * such forms. + * + * This software is provided "AS IS" and without any express or + * implied warranties, including, without limitation, the implied + * warranties of merchantability and fitness for a particular + * purpose. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +#include +#include + +#define _PATH_LOADER "/boot/loader.efi" +#define _PATH_KERNEL "/boot/kernel/kernel" + +#define BSIZEMAX 16384 + +typedef int putc_func_t(char c, void *arg); + +struct sp_data { + char *sp_buf; + u_int sp_len; + u_int sp_size; +}; + +static const char digits[] = "0123456789abcdef"; + +static void panic(const char *fmt, ...) __dead2; +static int printf(const char *fmt, ...); +static int putchar(char c, void *arg); +static int vprintf(const char *fmt, va_list ap); +static int vsnprintf(char *str, size_t sz, const char *fmt, va_list ap); + +static int __printf(const char *fmt, putc_func_t *putc, void *arg, va_list ap); +static int __putc(char c, void *arg); +static int __puts(const char *s, putc_func_t *putc, void *arg); +static int __sputc(char c, void *arg); +static char *__uitoa(char *buf, u_int val, int base); +static char *__ultoa(char *buf, u_long val, int base); + +static int domount(EFI_DEVICE_PATH *device, EFI_BLOCK_IO *blkio, int quiet); +static void load(const char *fname); + +EFI_SYSTEM_TABLE *systab; +EFI_HANDLE *image; + +static void +bcopy(const void *src, void *dst, size_t len) +{ + const char *s = src; + char *d = dst; + + while (len-- != 0) + *d++ = *s++; +} + +static void +memcpy(void *dst, const void *src, size_t len) +{ + bcopy(src, dst, len); +} + +static void +bzero(void *b, size_t len) +{ + char *p = b; + + while (len-- != 0) + *p++ = 0; +} + +static int +strcmp(const char *s1, const char *s2) +{ + for (; *s1 == *s2 && *s1; s1++, s2++) + ; + return ((u_char)*s1 - (u_char)*s2); +} + +static EFI_GUID BlockIoProtocolGUID = BLOCK_IO_PROTOCOL; +static EFI_GUID DevicePathGUID = DEVICE_PATH_PROTOCOL; +static EFI_GUID LoadedImageGUID = LOADED_IMAGE_PROTOCOL; +static EFI_GUID ConsoleControlGUID = EFI_CONSOLE_CONTROL_PROTOCOL_GUID; + +static EFI_BLOCK_IO *bootdev; +static EFI_DEVICE_PATH *bootdevpath; +static EFI_HANDLE *bootdevhandle; + +EFI_STATUS efi_main(EFI_HANDLE Ximage, EFI_SYSTEM_TABLE* Xsystab) +{ + EFI_HANDLE handles[128]; + EFI_BLOCK_IO *blkio; + UINTN i, nparts = sizeof(handles); + EFI_STATUS status; + EFI_DEVICE_PATH *devpath; + EFI_BOOT_SERVICES *BS; + EFI_CONSOLE_CONTROL_PROTOCOL *ConsoleControl = NULL; + char *path = _PATH_LOADER; + + systab = Xsystab; + image = Ximage; + + BS = systab->BootServices; + status = BS->LocateProtocol(&ConsoleControlGUID, NULL, + (VOID **)&ConsoleControl); + if (status == EFI_SUCCESS) + (void)ConsoleControl->SetMode(ConsoleControl, + EfiConsoleControlScreenText); + + printf(" \n>> FreeBSD EFI boot block\n"); + printf(" Loader path: %s\n", path); + + status = systab->BootServices->LocateHandle(ByProtocol, + &BlockIoProtocolGUID, NULL, &nparts, handles); + nparts /= sizeof(handles[0]); + + for (i = 0; i < nparts; i++) { + status = systab->BootServices->HandleProtocol(handles[i], + &DevicePathGUID, (void **)&devpath); + if (EFI_ERROR(status)) + continue; + + while (!IsDevicePathEnd(NextDevicePathNode(devpath))) + devpath = NextDevicePathNode(devpath); + + status = systab->BootServices->HandleProtocol(handles[i], + &BlockIoProtocolGUID, (void **)&blkio); + if (EFI_ERROR(status)) + continue; + + if (!blkio->Media->LogicalPartition) + continue; + + if (domount(devpath, blkio, 1) >= 0) + break; + } + + if (i == nparts) + panic("No bootable partition found"); + + bootdevhandle = handles[i]; + load(path); + + panic("Load failed"); + + return EFI_SUCCESS; +} + +static int +dskread(void *buf, u_int64_t lba, int nblk) +{ + EFI_STATUS status; + int size; + + lba = lba / (bootdev->Media->BlockSize / DEV_BSIZE); + size = nblk * DEV_BSIZE; + status = bootdev->ReadBlocks(bootdev, bootdev->Media->MediaId, lba, + size, buf); + + if (EFI_ERROR(status)) + return (-1); + + return (0); +} + +#include "ufsread.c" + +static ssize_t +fsstat(ufs_ino_t inode) +{ +#ifndef UFS2_ONLY + static struct ufs1_dinode dp1; + ufs1_daddr_t addr1; +#endif +#ifndef UFS1_ONLY + static struct ufs2_dinode dp2; +#endif + static struct fs fs; + static ufs_ino_t inomap; + char *blkbuf; + void *indbuf; + size_t n, nb, size, off, vboff; + ufs_lbn_t lbn; + ufs2_daddr_t addr2, vbaddr; + static ufs2_daddr_t blkmap, indmap; + u_int u; + + blkbuf = dmadat->blkbuf; + indbuf = dmadat->indbuf; + if (!dsk_meta) { + inomap = 0; + for (n = 0; sblock_try[n] != -1; n++) { + if (dskread(dmadat->sbbuf, sblock_try[n] / DEV_BSIZE, + SBLOCKSIZE / DEV_BSIZE)) + return -1; + memcpy(&fs, dmadat->sbbuf, sizeof(struct fs)); + if (( +#if defined(UFS1_ONLY) + fs.fs_magic == FS_UFS1_MAGIC +#elif defined(UFS2_ONLY) + (fs.fs_magic == FS_UFS2_MAGIC && + fs.fs_sblockloc == sblock_try[n]) +#else + fs.fs_magic == FS_UFS1_MAGIC || + (fs.fs_magic == FS_UFS2_MAGIC && + fs.fs_sblockloc == sblock_try[n]) +#endif + ) && + fs.fs_bsize <= MAXBSIZE && + fs.fs_bsize >= sizeof(struct fs)) + break; + } + if (sblock_try[n] == -1) { + printf("Not ufs\n"); + return -1; + } + dsk_meta++; + } else + memcpy(&fs, dmadat->sbbuf, sizeof(struct fs)); + if (!inode) + return 0; + if (inomap != inode) { + n = IPERVBLK(&fs); + if (dskread(blkbuf, INO_TO_VBA(&fs, n, inode), DBPERVBLK)) + return -1; + n = INO_TO_VBO(n, inode); +#if defined(UFS1_ONLY) + memcpy(&dp1, (struct ufs1_dinode *)blkbuf + n, + sizeof(struct ufs1_dinode)); +#elif defined(UFS2_ONLY) + memcpy(&dp2, (struct ufs2_dinode *)blkbuf + n, + sizeof(struct ufs2_dinode)); +#else + if (fs.fs_magic == FS_UFS1_MAGIC) + memcpy(&dp1, (struct ufs1_dinode *)blkbuf + n, + sizeof(struct ufs1_dinode)); + else + memcpy(&dp2, (struct ufs2_dinode *)blkbuf + n, + sizeof(struct ufs2_dinode)); +#endif + inomap = inode; + fs_off = 0; + blkmap = indmap = 0; + } + size = DIP(di_size); + n = size - fs_off; + return (n); +} + +static struct dmadat __dmadat; + +static int +domount(EFI_DEVICE_PATH *device, EFI_BLOCK_IO *blkio, int quiet) +{ + + dmadat = &__dmadat; + bootdev = blkio; + bootdevpath = device; + if (fsread(0, NULL, 0)) { + if (!quiet) + printf("domount: can't read superblock\n"); + return (-1); + } + if (!quiet) + printf("Succesfully mounted UFS filesystem\n"); + return (0); +} + +static void +load(const char *fname) +{ + ufs_ino_t ino; + EFI_STATUS status; + EFI_HANDLE loaderhandle; + EFI_LOADED_IMAGE *loaded_image; + void *buffer; + size_t bufsize; + + if ((ino = lookup(fname)) == 0) { + printf("File %s not found\n", fname); + return; + } + + bufsize = fsstat(ino); + status = systab->BootServices->AllocatePool(EfiLoaderData, + bufsize, &buffer); + fsread(ino, buffer, bufsize); + + /* XXX: For secure boot, we need our own loader here */ + status = systab->BootServices->LoadImage(TRUE, image, bootdevpath, + buffer, bufsize, &loaderhandle); + if (EFI_ERROR(status)) + printf("LoadImage failed with error %d\n", status); + + status = systab->BootServices->HandleProtocol(loaderhandle, + &LoadedImageGUID, (VOID**)&loaded_image); + if (EFI_ERROR(status)) + printf("HandleProtocol failed with error %d\n", status); + + loaded_image->DeviceHandle = bootdevhandle; + + status = systab->BootServices->StartImage(loaderhandle, NULL, NULL); + if (EFI_ERROR(status)) + printf("StartImage failed with error %d\n", status); +} + +static void +panic(const char *fmt, ...) +{ + char buf[128]; + va_list ap; + + va_start(ap, fmt); + vsnprintf(buf, sizeof buf, fmt, ap); + printf("panic: %s\n", buf); + va_end(ap); + + while (1) {} +} + +static int +printf(const char *fmt, ...) +{ + va_list ap; + int ret; + + /* Don't annoy the user as we probe for partitions */ + if (strcmp(fmt,"Not ufs\n") == 0) + return 0; + + va_start(ap, fmt); + ret = vprintf(fmt, ap); + va_end(ap); + return (ret); +} + +static int +putchar(char c, void *arg) +{ + CHAR16 buf[2]; + + if (c == '\n') { + buf[0] = '\r'; + buf[1] = 0; + systab->ConOut->OutputString(systab->ConOut, buf); + } + buf[0] = c; + buf[1] = 0; + systab->ConOut->OutputString(systab->ConOut, buf); + return (1); +} + +static int +vprintf(const char *fmt, va_list ap) +{ + int ret; + + ret = __printf(fmt, putchar, 0, ap); + return (ret); +} + +static int +vsnprintf(char *str, size_t sz, const char *fmt, va_list ap) +{ + struct sp_data sp; + int ret; + + sp.sp_buf = str; + sp.sp_len = 0; + sp.sp_size = sz; + ret = __printf(fmt, __sputc, &sp, ap); + return (ret); +} + +static int +__printf(const char *fmt, putc_func_t *putc, void *arg, va_list ap) +{ + char buf[(sizeof(long) * 8) + 1]; + char *nbuf; + u_long ul; + u_int ui; + int lflag; + int sflag; + char *s; + int pad; + int ret; + int c; + + nbuf = &buf[sizeof buf - 1]; + ret = 0; + while ((c = *fmt++) != 0) { + if (c != '%') { + ret += putc(c, arg); + continue; + } + lflag = 0; + sflag = 0; + pad = 0; +reswitch: c = *fmt++; + switch (c) { + case '#': + sflag = 1; + goto reswitch; + case '%': + ret += putc('%', arg); + break; + case 'c': + c = va_arg(ap, int); + ret += putc(c, arg); + break; + case 'd': + if (lflag == 0) { + ui = (u_int)va_arg(ap, int); + if (ui < (int)ui) { + ui = -ui; + ret += putc('-', arg); + } + s = __uitoa(nbuf, ui, 10); + } else { + ul = (u_long)va_arg(ap, long); + if (ul < (long)ul) { + ul = -ul; + ret += putc('-', arg); + } + s = __ultoa(nbuf, ul, 10); + } + ret += __puts(s, putc, arg); + break; + case 'l': + lflag = 1; + goto reswitch; + case 'o': + if (lflag == 0) { + ui = (u_int)va_arg(ap, u_int); + s = __uitoa(nbuf, ui, 8); + } else { + ul = (u_long)va_arg(ap, u_long); + s = __ultoa(nbuf, ul, 8); + } + ret += __puts(s, putc, arg); + break; + case 'p': + ul = (u_long)va_arg(ap, void *); + s = __ultoa(nbuf, ul, 16); + ret += __puts("0x", putc, arg); + ret += __puts(s, putc, arg); + break; + case 's': + s = va_arg(ap, char *); + ret += __puts(s, putc, arg); + break; + case 'u': + if (lflag == 0) { + ui = va_arg(ap, u_int); + s = __uitoa(nbuf, ui, 10); + } else { + ul = va_arg(ap, u_long); + s = __ultoa(nbuf, ul, 10); + } + ret += __puts(s, putc, arg); + break; + case 'x': + if (lflag == 0) { + ui = va_arg(ap, u_int); + s = __uitoa(nbuf, ui, 16); + } else { + ul = va_arg(ap, u_long); + s = __ultoa(nbuf, ul, 16); + } + if (sflag) + ret += __puts("0x", putc, arg); + ret += __puts(s, putc, arg); + break; + case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + pad = pad * 10 + c - '0'; + goto reswitch; + default: + break; + } + } + return (ret); +} + +static int +__sputc(char c, void *arg) +{ + struct sp_data *sp; + + sp = arg; + if (sp->sp_len < sp->sp_size) + sp->sp_buf[sp->sp_len++] = c; + sp->sp_buf[sp->sp_len] = '\0'; + return (1); +} + +static int +__puts(const char *s, putc_func_t *putc, void *arg) +{ + const char *p; + int ret; + + ret = 0; + for (p = s; *p != '\0'; p++) + ret += putc(*p, arg); + return (ret); +} + +static char * +__uitoa(char *buf, u_int ui, int base) +{ + char *p; + + p = buf; + *p = '\0'; + do + *--p = digits[ui % base]; + while ((ui /= base) != 0); + return (p); +} + +static char * +__ultoa(char *buf, u_long ul, int base) +{ + char *p; + + p = buf; + *p = '\0'; + do + *--p = digits[ul % base]; + while ((ul /= base) != 0); + return (p); +} + Copied: head/sys/boot/efi/boot1/fat.tmpl.bz2.uu (from r280570, head/sys/boot/amd64/boot1.efi/fat.tmpl.bz2.uu) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/efi/boot1/fat.tmpl.bz2.uu Wed Apr 1 08:30:40 2015 (r280950, copy of r280570, head/sys/boot/amd64/boot1.efi/fat.tmpl.bz2.uu) @@ -0,0 +1,20 @@ +FAT template boot filesystem created by generate-fat.sh +DO NOT EDIT +$FreeBSD$ +begin 644 fat.tmpl.bz2 +M0EIH.3%!629362AK*D(`&I+____[ZZKJZ_^N_ZO^Z_Z_OJ[L`4`!7I0$#&$" +M0$!$3&(I-DTU,)ZAZ0VA-!M0T'J`>H#"9 +M'I#0-H&HQI&0&3&FH>H>*`JHHU3V]1%/4/2``T#0`!H``#0`````#1H,@``6 +M'1&G'&@?$6[T#A)?X8$A160"20BO#")0J4TB1*4GXF$B4I,&>43+=_?K=#3* +M6]R"ZNKJZI,9*68E8*E2Q +M4J5*E3'(1830A"$(12A-"<(0A#]VD)H0A"$,>I0FA"$(0I\>P^=F5:M6K5JU +M:DI3:64UN;[7%5B]Y-^\]@_K@B:N\/,5F%&H<\G#IXQXAEFC&D?![6%0'6MR +MX1@@%FC"FD`M7,/SXFNG:2`'-0<-C$8^+$N.7M1B,^6)9,DV9,0A\OL<:C"L +ML1V&,<\9YRB>XV#BG")'6NKRK^("UF2XO?_L!#29">MGDF$R3).!PX&%E,4C +M''=(FL1.`_3?CN@-IB2PI3!FF\<8X.X@D,>CA90I)#M$XRPNDFJELL<3=1?8 +M2B7\5Z64,!7Z;EEBW-MXN-4IJ@W$462]-*\YCR,-B,5[W?=3&L/U>SX,WV#\ +M\B`:I"'0Z)5"$1B.E)(K[5I4RS`%R$>Y\D0NR*,;<9CZ:^V3P(I?D Makefile.fat +echo '# $FreeBSD$' >> Makefile.fat +echo "BOOT1_OFFSET=0x$BOOT1_OFFSET" >> Makefile.fat + +bzip2 $OUTPUT_FILE +echo 'FAT template boot filesystem created by generate-fat.sh' > $OUTPUT_FILE.bz2.uu +echo 'DO NOT EDIT' >> $OUTPUT_FILE.bz2.uu +echo '$FreeBSD$' >> $OUTPUT_FILE.bz2.uu + +uuencode $OUTPUT_FILE.bz2 $OUTPUT_FILE.bz2 >> $OUTPUT_FILE.bz2.uu +rm $OUTPUT_FILE.bz2 + Copied and modified: head/sys/boot/efi/loader/Makefile (from r280570, head/sys/boot/amd64/efi/Makefile) ============================================================================== --- head/sys/boot/amd64/efi/Makefile Wed Mar 25 11:14:17 2015 (r280570, copy source) +++ head/sys/boot/efi/loader/Makefile Wed Apr 1 08:30:40 2015 (r280950) @@ -12,27 +12,24 @@ MK_SSP= no PROG= loader.sym INTERNALPROG= +.PATH: ${.CURDIR}/../../efi/loader # architecture-specific loader code SRCS= autoload.c \ bootinfo.c \ conf.c \ copy.c \ devicename.c \ - elf64_freebsd.c \ - framebuffer.c \ main.c \ - reloc.c \ vers.c -SRCS+= amd64_tramp.S \ - start.S -.PATH: ${.CURDIR}/../../i386/libi386 -SRCS+= nullconsole.c \ - comconsole.c + +.PATH: ${.CURDIR}/arch/${MACHINE_CPUARCH} +.include "${.CURDIR}/arch/${MACHINE_CPUARCH}/Makefile.inc" CFLAGS+= -fPIC -CFLAGS+= -I. -CFLAGS+= -I${.CURDIR}/../../efi/include -CFLAGS+= -I${.CURDIR}/../../efi/include/${MACHINE_CPUARCH} +CFLAGS+= -I${.CURDIR} +CFLAGS+= -I${.CURDIR}/arch/${MACHINE_CPUARCH} +CFLAGS+= -I${.CURDIR}/../include +CFLAGS+= -I${.CURDIR}/../include/${MACHINE_CPUARCH} CFLAGS+= -I${.CURDIR}/../../../contrib/dev/acpica/include CFLAGS+= -I${.CURDIR}/../../.. CFLAGS+= -DNO_PCI @@ -60,14 +57,14 @@ CFLAGS+= -I${.CURDIR}/../../common FILES= loader.efi FILESMODE_loader.efi= ${BINMODE} -LDSCRIPT= ${.CURDIR}/ldscript.${MACHINE_CPUARCH} +LDSCRIPT= ${.CURDIR}/arch/${MACHINE_CPUARCH}/ldscript.${MACHINE_CPUARCH} LDFLAGS= -Wl,-T${LDSCRIPT} -Wl,-Bsymbolic -shared -Wl,-znocombreloc CLEANFILES= vers.c loader.efi NEWVERSWHAT= "EFI loader" ${MACHINE_CPUARCH} -vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version +vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/../../efi/loader/version sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT} OBJCOPY?= objcopy @@ -75,7 +72,7 @@ OBJDUMP?= objdump .if ${MACHINE_CPUARCH} == "amd64" EFI_TARGET= efi-app-x86_64 -.else +.elif ${MACHINE_CPUARCH} == "i386" EFI_TARGET= efi-app-ia32 .endif @@ -89,7 +86,7 @@ loader.efi: loader.sym -j .rela.dyn -j .reloc -j .eh_frame -j set_Xcommand_set \ --output-target=${EFI_TARGET} ${.ALLSRC} ${.TARGET} -LIBEFI= ${.OBJDIR}/../../efi/libefi/libefi.a +LIBEFI= ${.OBJDIR}/../libefi/libefi.a DPADD= ${LIBFICL} ${LIBEFI} ${LIBSTAND} ${LDSCRIPT} LDADD= ${LIBFICL} ${LIBEFI} ${LIBSTAND} Added: head/sys/boot/efi/loader/arch/amd64/Makefile.inc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/efi/loader/arch/amd64/Makefile.inc Wed Apr 1 08:30:40 2015 (r280950) @@ -0,0 +1,11 @@ +# $FreeBSD$ + +SRCS+= amd64_tramp.S \ + start.S \ + framebuffer.c \ + elf64_freebsd.c \ + reloc.c + +.PATH: ${.CURDIR}/../../i386/libi386 +SRCS+= nullconsole.c \ + comconsole.c Copied: head/sys/boot/efi/loader/arch/amd64/amd64_tramp.S (from r280570, head/sys/boot/amd64/efi/amd64_tramp.S) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/efi/loader/arch/amd64/amd64_tramp.S Wed Apr 1 08:30:40 2015 (r280950, copy of r280570, head/sys/boot/amd64/efi/amd64_tramp.S) @@ -0,0 +1,64 @@ +/*- + * Copyright (c) 2013 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Benno Rice under sponsorship from + * the FreeBSD Foundation. + * 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$ + */ + +#include + + .text + .globl amd64_tramp + +/* + * void amd64_tramp(uint64_t stack, void *copy_finish, uint64_t kernend, + * uint64_t modulep, uint64_t pagetable, uint64_t entry) + */ +amd64_tramp: + cli /* Make sure we don't get interrupted. */ + movq %rdi,%rsp /* Switch to our temporary stack. */ + + movq %rdx,%r12 /* Stash the kernel values for later. */ + movq %rcx,%r13 + movq %r8,%r14 + movq %r9,%r15 + + callq *%rsi /* Call copy_finish so we're all ready to go. */ + + pushq %r12 /* Push kernend. */ + salq $32,%r13 /* Shift modulep and push it. */ + pushq %r13 + pushq %r15 /* Push the entry address. */ + movq %r14,%cr3 /* Switch page tables. */ + ret /* "Return" to kernel entry. */ + + ALIGN_TEXT +amd64_tramp_end: + + .data + .globl amd64_tramp_size +amd64_tramp_size: + .long amd64_tramp_end-amd64_tramp Copied and modified: head/sys/boot/efi/loader/arch/amd64/elf64_freebsd.c (from r280570, head/sys/boot/amd64/efi/elf64_freebsd.c) ============================================================================== --- head/sys/boot/amd64/efi/elf64_freebsd.c Wed Mar 25 11:14:17 2015 (r280570, copy source) +++ head/sys/boot/efi/loader/arch/amd64/elf64_freebsd.c Wed Apr 1 08:30:40 2015 (r280950) @@ -47,7 +47,7 @@ __FBSDID("$FreeBSD$"); #include "actypes.h" #include "actbl.h" -#include "x86_efi.h" +#include "loader_efi.h" static EFI_GUID acpi_guid = ACPI_TABLE_GUID; static EFI_GUID acpi20_guid = ACPI_20_TABLE_GUID; @@ -57,8 +57,14 @@ extern int bi_load(char *args, vm_offset static int elf64_exec(struct preloaded_file *amp); static int elf64_obj_exec(struct preloaded_file *amp); -struct file_format amd64_elf = { elf64_loadfile, elf64_exec }; -struct file_format amd64_elf_obj = { elf64_obj_loadfile, elf64_obj_exec }; +static struct file_format amd64_elf = { elf64_loadfile, elf64_exec }; +static struct file_format amd64_elf_obj = { elf64_obj_loadfile, elf64_obj_exec }; + +struct file_format *file_formats[] = { + &amd64_elf, + &amd64_elf_obj, + NULL +}; #define PG_V 0x001 #define PG_RW 0x002 @@ -168,7 +174,7 @@ elf64_exec(struct preloaded_file *fp) if (err != 0) return(err); - status = BS->ExitBootServices(IH, x86_efi_mapkey); + status = BS->ExitBootServices(IH, efi_mapkey); if (EFI_ERROR(status)) { printf("%s: ExitBootServices() returned 0x%lx\n", __func__, (long)status); @@ -177,7 +183,7 @@ elf64_exec(struct preloaded_file *fp) dev_cleanup(); - trampoline(trampstack, x86_efi_copy_finish, kernend, modulep, PT4, + trampoline(trampstack, efi_copy_finish, kernend, modulep, PT4, ehdr->e_entry); panic("exec returned"); Copied: head/sys/boot/efi/loader/arch/amd64/framebuffer.c (from r280570, head/sys/boot/amd64/efi/framebuffer.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/efi/loader/arch/amd64/framebuffer.c Wed Apr 1 08:30:40 2015 (r280950, copy of r280570, head/sys/boot/amd64/efi/framebuffer.c) @@ -0,0 +1,85 @@ +/*- + * Copyright (c) 2013 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Benno Rice under sponsorship from + * the FreeBSD Foundation. + * 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 + +static EFI_GUID gop_guid = EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID; + +int +efi_find_framebuffer(struct efi_fb *efifb) +{ + EFI_GRAPHICS_OUTPUT *gop; + EFI_STATUS status; + EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE *mode; + EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *info; + + status = BS->LocateProtocol(&gop_guid, NULL, (VOID **)&gop); + if (EFI_ERROR(status)) + return (1); + + mode = gop->Mode; + info = gop->Mode->Info; + + efifb->fb_addr = mode->FrameBufferBase; + efifb->fb_size = mode->FrameBufferSize; + efifb->fb_height = info->VerticalResolution; + efifb->fb_width = info->HorizontalResolution; + efifb->fb_stride = info->PixelsPerScanLine; + + switch (info->PixelFormat) { + case PixelRedGreenBlueReserved8BitPerColor: + efifb->fb_mask_red = 0x000000ff; + efifb->fb_mask_green = 0x0000ff00; + efifb->fb_mask_blue = 0x00ff0000; + efifb->fb_mask_reserved = 0xff000000; + break; + case PixelBlueGreenRedReserved8BitPerColor: + efifb->fb_mask_red = 0x00ff0000; + efifb->fb_mask_green = 0x0000ff00; + efifb->fb_mask_blue = 0x000000ff; + efifb->fb_mask_reserved = 0xff000000; + break; + case PixelBitMask: + efifb->fb_mask_red = info->PixelInformation.RedMask; + efifb->fb_mask_green = info->PixelInformation.GreenMask; + efifb->fb_mask_blue = info->PixelInformation.BlueMask; + efifb->fb_mask_reserved = + info->PixelInformation.ReservedMask; + break; + default: + return (1); + } + return (0); +} *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 08:31:58 2015 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 11AFC563; Wed, 1 Apr 2015 08:31: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 D5E537B9; Wed, 1 Apr 2015 08:31: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 t318VvKm042841; Wed, 1 Apr 2015 08:31:57 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t318VvkO042839; Wed, 1 Apr 2015 08:31:57 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504010831.t318VvkO042839@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 1 Apr 2015 08:31:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280951 - in head/sys/cddl: compat/opensolaris/sys contrib/opensolaris/uts/common/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 Apr 2015 08:31:58 -0000 Author: andrew Date: Wed Apr 1 08:31:56 2015 New Revision: 280951 URL: https://svnweb.freebsd.org/changeset/base/280951 Log: Add the arm64 defines for cddl code. Differential Revision: https://reviews.freebsd.org/D2186 Reviewed by: emaste Sponsored by: The FreeBSD Foundation Modified: head/sys/cddl/compat/opensolaris/sys/atomic.h head/sys/cddl/contrib/opensolaris/uts/common/sys/isa_defs.h Modified: head/sys/cddl/compat/opensolaris/sys/atomic.h ============================================================================== --- head/sys/cddl/compat/opensolaris/sys/atomic.h Wed Apr 1 08:30:40 2015 (r280950) +++ head/sys/cddl/compat/opensolaris/sys/atomic.h Wed Apr 1 08:31:56 2015 (r280951) @@ -51,7 +51,7 @@ extern uint8_t atomic_or_8_nv(volatile u extern void membar_producer(void); #if defined(__sparc64__) || defined(__powerpc__) || defined(__arm__) || \ - defined(__mips__) + defined(__mips__) || defined(__aarch64__) extern void atomic_or_8(volatile uint8_t *target, uint8_t value); #else static __inline void Modified: head/sys/cddl/contrib/opensolaris/uts/common/sys/isa_defs.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/sys/isa_defs.h Wed Apr 1 08:30:40 2015 (r280950) +++ head/sys/cddl/contrib/opensolaris/uts/common/sys/isa_defs.h Wed Apr 1 08:31:56 2015 (r280951) @@ -346,6 +346,48 @@ extern "C" { #define _DONT_USE_1275_GENERIC_NAMES #define _HAVE_CPUID_INSN +#elif defined(__aarch64__) + +/* + * Define the appropriate "processor characteristics" + */ +#define _STACK_GROWS_DOWNWARD +#define _LONG_LONG_LTOH +#define _BIT_FIELDS_LTOH +#define _IEEE_754 +#define _CHAR_IS_UNSIGNED +#define _BOOL_ALIGNMENT 1 +#define _CHAR_ALIGNMENT 1 +#define _SHORT_ALIGNMENT 2 +#define _INT_ALIGNMENT 4 +#define _FLOAT_ALIGNMENT 4 +#define _FLOAT_COMPLEX_ALIGNMENT 4 +#define _LONG_ALIGNMENT 8 +#define _LONG_LONG_ALIGNMENT 8 +#define _DOUBLE_ALIGNMENT 8 +#define _DOUBLE_COMPLEX_ALIGNMENT 8 +#define _LONG_DOUBLE_ALIGNMENT 16 +#define _LONG_DOUBLE_COMPLEX_ALIGNMENT 16 +#define _POINTER_ALIGNMENT 8 +#define _MAX_ALIGNMENT 16 +#define _ALIGNMENT_REQUIRED 1 + +#define _LONG_LONG_ALIGNMENT_32 _LONG_LONG_ALIGNMENT + +/* + * Define the appropriate "implementation choices" + */ +#if !defined(_LP64) +#define _LP64 +#endif +#define _SUNOS_VTOC_16 +#define _DMA_USES_PHYSADDR +#define _FIRMWARE_NEEDS_FDISK +#define _PSM_MODULES +#define _RTC_CONFIG +#define _DONT_USE_1275_GENERIC_NAMES +#define _HAVE_CPUID_INSN + #elif defined(__arm__) /* From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 08:37:52 2015 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 2D626952; Wed, 1 Apr 2015 08:37: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 1764F828; Wed, 1 Apr 2015 08:37: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 t318bpBn043836; Wed, 1 Apr 2015 08:37:51 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t318bpks043835; Wed, 1 Apr 2015 08:37:51 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504010837.t318bpks043835@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 1 Apr 2015 08:37:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280952 - head/lib/libthread_db/arch/aarch64 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 Apr 2015 08:37:52 -0000 Author: andrew Date: Wed Apr 1 08:37:50 2015 New Revision: 280952 URL: https://svnweb.freebsd.org/changeset/base/280952 Log: Add the arm64 parts of libthread_db. Differential Revision: https://reviews.freebsd.org/D2184 Reviewed by: imp Sponsored by: The FreeBSD Foundation Added: head/lib/libthread_db/arch/aarch64/ head/lib/libthread_db/arch/aarch64/libpthread_md.c (contents, props changed) Added: head/lib/libthread_db/arch/aarch64/libpthread_md.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libthread_db/arch/aarch64/libpthread_md.c Wed Apr 1 08:37:50 2015 (r280952) @@ -0,0 +1,96 @@ +/*- + * Copyright (c) 2014-2015 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Andrew Turner under + * sponsorship from the FreeBSD Foundation. + * + * 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 "libpthread_db.h" + +void abort(void); + +void +pt_reg_to_ucontext(const struct reg *r, ucontext_t *uc) +{ + mcontext_t *mc = &uc->uc_mcontext; + + memcpy(mc->mc_gpregs.gp_x, r->x, sizeof(mc->mc_gpregs.gp_x)); + mc->mc_gpregs.gp_sp = r->sp; + mc->mc_gpregs.gp_lr = r->lr; + mc->mc_gpregs.gp_elr = r->elr; + mc->mc_gpregs.gp_spsr = r->spsr; +} + +void +pt_ucontext_to_reg(const ucontext_t *uc, struct reg *r) +{ + const mcontext_t *mc = &uc->uc_mcontext; + + memcpy(r->x, mc->mc_gpregs.gp_x, sizeof(mc->mc_gpregs.gp_x)); + r->sp = mc->mc_gpregs.gp_sp; + r->lr = mc->mc_gpregs.gp_lr; + r->elr = mc->mc_gpregs.gp_elr; + r->spsr = mc->mc_gpregs.gp_spsr; +} + +void +pt_fpreg_to_ucontext(const struct fpreg *r, ucontext_t *uc) +{ + mcontext_t *mc = &uc->uc_mcontext; + + memcpy(&mc->mc_fpregs, r, sizeof(*r)); + mc->mc_flags |= _MC_FP_VALID; +} + +void +pt_ucontext_to_fpreg(const ucontext_t *uc, struct fpreg *r) +{ + const mcontext_t *mc = &uc->uc_mcontext; + + if (mc->mc_flags & _MC_FP_VALID) + memcpy(r, &mc->mc_fpregs, sizeof(*r)); + else + memset(r, 0, sizeof(*r)); + +} + +void +pt_md_init(void) +{ +} + +int +pt_reg_sstep(struct reg *reg __unused, int step __unused) +{ + + return (0); +} From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 10:02:30 2015 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 F1CB4FDE; Wed, 1 Apr 2015 10:02: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 DC72520E; Wed, 1 Apr 2015 10:02: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 t31A2TF0085679; Wed, 1 Apr 2015 10:02:29 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t31A2TrN085678; Wed, 1 Apr 2015 10:02:29 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201504011002.t31A2TrN085678@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: Roger Pau Monné Date: Wed, 1 Apr 2015 10:02:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280953 - head/sys/boot/i386/libi386 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 Apr 2015 10:02:30 -0000 Author: royger Date: Wed Apr 1 10:02:28 2015 New Revision: 280953 URL: https://svnweb.freebsd.org/changeset/base/280953 Log: multiboot: zero mod list array Zero the list of modules array before using it, or else we might pass uninitialized data in unused fields of the struct that will make Xen choke. Also add a check to make sure malloc succeeds. Sponsored by: Citrix Systems R&D Modified: head/sys/boot/i386/libi386/multiboot.c Modified: head/sys/boot/i386/libi386/multiboot.c ============================================================================== --- head/sys/boot/i386/libi386/multiboot.c Wed Apr 1 08:37:50 2015 (r280952) +++ head/sys/boot/i386/libi386/multiboot.c Wed Apr 1 10:02:28 2015 (r280953) @@ -274,7 +274,14 @@ multiboot_exec(struct preloaded_file *fp error = EFTYPE; goto error; } + mb_mod = malloc(sizeof(struct multiboot_mod_list) * NUM_MODULES); + if (mb_mod == NULL) { + error = ENOMEM; + goto error; + } + + bzero(mb_mod, sizeof(struct multiboot_mod_list) * NUM_MODULES); /* * Calculate how much memory is needed for the metatdata. We did From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 10:10:22 2015 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 04D185EF; Wed, 1 Apr 2015 10:10: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 E3B802DA; Wed, 1 Apr 2015 10:10: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 t31AALdh087431; Wed, 1 Apr 2015 10:10:21 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t31AAL1W087430; Wed, 1 Apr 2015 10:10:21 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201504011010.t31AAL1W087430@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: Roger Pau Monné Date: Wed, 1 Apr 2015 10:10:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280954 - head/sys/boot/i386/libi386 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 Apr 2015 10:10:22 -0000 Author: royger Date: Wed Apr 1 10:10:20 2015 New Revision: 280954 URL: https://svnweb.freebsd.org/changeset/base/280954 Log: multiboot: fix error codes Return EINVAL instead of EFTYPE if we have a multiboot kernel loaded but failed to load the modules. This makes it clear that the kernel/module should be handled by the multiboot handler but something went wrong. Sponsored by: Citrix Systems R&D Modified: head/sys/boot/i386/libi386/multiboot.c Modified: head/sys/boot/i386/libi386/multiboot.c ============================================================================== --- head/sys/boot/i386/libi386/multiboot.c Wed Apr 1 10:02:28 2015 (r280953) +++ head/sys/boot/i386/libi386/multiboot.c Wed Apr 1 10:10:20 2015 (r280954) @@ -243,7 +243,7 @@ multiboot_exec(struct preloaded_file *fp /* Find the entry point of the Xen kernel and save it for later */ if ((md = file_findmetadata(fp, MODINFOMD_ELFHDR)) == NULL) { printf("Unable to find %s entry point\n", fp->f_name); - error = EFTYPE; + error = EINVAL; goto error; } ehdr = (Elf_Ehdr *)&(md->md_data); @@ -271,7 +271,7 @@ multiboot_exec(struct preloaded_file *fp fp = file_findfile(NULL, "elf kernel"); if (fp == NULL) { printf("No FreeBSD kernel provided, aborting\n"); - error = EFTYPE; + error = EINVAL; goto error; } @@ -380,7 +380,7 @@ multiboot_obj_loadfile(char *filename, u printf( "Unable to load %s as a multiboot payload kernel\n", filename); - return (EFTYPE); + return (EINVAL); } /* Load kernel metadata... */ @@ -389,7 +389,7 @@ multiboot_obj_loadfile(char *filename, u if (error) { printf("Unable to load kernel %s metadata error: %d\n", rfp->f_name, error); - return (EFTYPE); + return (EINVAL); } /* From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 11:36:33 2015 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 DC33035B; Wed, 1 Apr 2015 11:36:33 +0000 (UTC) Received: from mail-wi0-x22c.google.com (mail-wi0-x22c.google.com [IPv6:2a00:1450:400c:c05::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6765FE52; Wed, 1 Apr 2015 11:36:33 +0000 (UTC) Received: by wibgn9 with SMTP id gn9so62582460wib.1; Wed, 01 Apr 2015 04:36:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=Wp/Ev+D7D1jFtNA8Z/23vT4c/Z9O/LihUgzppswvM5Y=; b=Fv+2t/l+geCZ+WDYiyEZpF3MU9fBbQEQV/enteDyktpJwjrkgS97RbHgk0aJx5PyHM WHUeNs64RlEkKWDK2jiBAkcVZPJUr974mbQWt6whU2xLEODv8mlTlcBcx1yQqUnDC6mf ThJO/4zs6u6ow7D/MZSgQlRZ/bLPAEcVqM66BHVhBLMEbeLlwjbrWThhsFD4B04r0fcW TymWa3HDxdD5L8iypH/taZGWx0qdd2bLc3R3mbx3BqWIwNFk+ROQ6jtBzjcPj2Qx0WMp XXz8UD5Jt2E2bWBKMRvRgXRRyj0r7Al7C5O5ORKh6r8RoFubUQOsoGWQvtSABYj2yDEJ 7XNw== X-Received: by 10.194.120.132 with SMTP id lc4mr84698746wjb.92.1427888191827; Wed, 01 Apr 2015 04:36:31 -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 q10sm2270002wjr.41.2015.04.01.04.36.30 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 01 Apr 2015 04:36:30 -0700 (PDT) Sender: Mateusz Guzik Date: Wed, 1 Apr 2015 13:36:28 +0200 From: Mateusz Guzik To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom Message-ID: <20150401113628.GA16649@dft-labs.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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 Apr 2015 11:36:34 -0000 Author: mjg Date: Wed Apr 1 13:37:00 2015 New Revision: 280955 URL: https://svnweb.freebsd.org/changeset/base/280955 Log: Add /dev/notrandom notrandom provides fast and reliable not random numbers. This was added in an effort to increase feature-compatiblity with Solaris 10. See http://www.brendangregg.com/Specials/notrandom.c for Solaris implementation. Reviewed-by: Bruce Schneier (ok, not really) MFC after: 1 week Added: head/sys/modules/notrandom/Makefile head/sys/dev/notrandom/notrandom.c Added: sys/dev/notrandom/notrandom.c =================================================================== --- head/sys/dev/notrandom/notrandom.c (revision 0) +++ head/sys/dev/notrandom/notrandom.c (working copy) @@ -0,0 +1,126 @@ +/*- + * Copyright (c) 2015 Mateusz Guzik + * 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 + * in this position and unchanged. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include + +static struct cdev *notrandom_dev; + +static d_ioctl_t notrandom_ioctl; +static d_read_t notrandom_read; + +static struct cdevsw notrandom_cdevsw = { + .d_version = D_VERSION, + .d_read = notrandom_read, + .d_ioctl = notrandom_ioctl, + .d_name = "notrandom", + .d_flags = D_MMAP_ANON, +}; + +static char notrandom_buf[1024]; + +static int +notrandom_ioctl(struct cdev *dev __unused, u_long cmd, caddr_t data __unused, + int flags __unused, struct thread *td) +{ + int error = 0; + + switch (cmd) { + case FIONBIO: + break; + case FIOASYNC: + if (*(int *)data != 0) + error = EINVAL; + break; + default: + error = ENOIOCTL; + } + return (error); +} + + +/* ARGSUSED */ +static int +notrandom_read(struct cdev *dev __unused, struct uio *uio, int flags __unused) +{ + ssize_t len; + int error = 0; + + while (uio->uio_resid > 0 && error == 0) { + len = uio->uio_resid; + if (len > sizeof(notrandom_buf)) + len = sizeof(notrandom_buf); + error = uiomove(notrandom_buf, len, uio); + } + + return (error); +} + +/* ARGSUSED */ +static int +notrandom_modevent(module_t mod __unused, int type, void *data __unused) +{ + int error = 0; + + switch(type) { + case MOD_LOAD: + memset(notrandom_buf, 7, sizeof(notrandom_buf)); + notrandom_dev = make_dev_credf(MAKEDEV_ETERNAL_KLD, + ¬random_cdevsw, 0, NULL, UID_ROOT, GID_WHEEL, 0666, + "notrandom"); + break; + + case MOD_UNLOAD: + destroy_dev(notrandom_dev); + /* + * Trash notrandom region so that the content cannot be + * retrieved. Better safe than sorry. + */ + memset(notrandom_buf, 123, sizeof(notrandom_buf)); + break; + + case MOD_SHUTDOWN: + break; + + default: + error = EOPNOTSUPP; + } + + return (error); +} + +DEV_MODULE(notrandom, notrandom_modevent, NULL); +MODULE_VERSION(notrandom, 1); Property changes on: head/sys/dev/notrandom/notrandom.c ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: sys/modules/notrandom/Makefile =================================================================== --- head/sys/modules/notrandom/Makefile (revision 0) +++ head/sys/modules/notrandom/Makefile (working copy) @@ -0,0 +1,8 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR}/../../dev/notrandom + +KMOD= notrandom +SRCS= notrandom.c + +.include Property changes on: head/sys/modules/notrandom/Makefile ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 11:43:25 2015 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 0EA2E852; Wed, 1 Apr 2015 11:43: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 635A1F2B; Wed, 1 Apr 2015 11:43:23 +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 t31BhDRk058080 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 1 Apr 2015 14:43:13 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t31BhD34058079; Wed, 1 Apr 2015 14:43:13 +0300 (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 Apr 2015 14:43:13 +0300 From: Gleb Smirnoff To: Mateusz Guzik Subject: Re: svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom Message-ID: <20150401114313.GZ64665@FreeBSD.org> References: <20150401113628.GA16649@dft-labs.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150401113628.GA16649@dft-labs.eu> 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: Wed, 01 Apr 2015 11:43:25 -0000 On Wed, Apr 01, 2015 at 01:36:28PM +0200, Mateusz Guzik wrote: M> Author: mjg M> Date: Wed Apr 1 13:37:00 2015 M> New Revision: 280955 M> URL: https://svnweb.freebsd.org/changeset/base/280955 M> M> Log: M> Add /dev/notrandom M> M> notrandom provides fast and reliable not random numbers. M> M> This was added in an effort to increase feature-compatiblity with M> Solaris 10. M> M> See http://www.brendangregg.com/Specials/notrandom.c for Solaris M> implementation. M> M> Reviewed-by: Bruce Schneier (ok, not really) M> MFC after: 1 week What is the difference of this implementation with /dev/zero? -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 11:52:10 2015 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 06F43C6C; Wed, 1 Apr 2015 11:52:10 +0000 (UTC) Received: from mail-wg0-x229.google.com (mail-wg0-x229.google.com [IPv6:2a00:1450:400c:c00::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9A68D74; Wed, 1 Apr 2015 11:52:09 +0000 (UTC) Received: by wgoe14 with SMTP id e14so50245891wgo.0; Wed, 01 Apr 2015 04:52:07 -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=1dPHohWOscLPNWN3lODbJH5DiKYWxFHykDZmLMC0KJc=; b=NxMMURXWddENNIi8DAIrhW6a8BPCbh2m6Qzz5tcq5+yu/csf1aI13TUAiJ7pBIsLVc W60wq4i+1tAbdLowH2M9ULxbS+s5l5rNbTodDKOIxvP3L/guyQpiBUdo2uUwz1+9gT1Y 65yKKznqdcIw5VgHjhyTWa4vic52GAEHCmWV8hICqnnPGv7rQ81xhN+5Rzf/p594z+Q1 pXH5J7qfnuP1ooA2Iak9ngNIKKTK0xdjtg58m2qM5hzZlUe9yAJ8Z0WWvPqDFgpGYEjv gL6ozeubFU43BzUYSf3tBcdqlfW7BCbcQIBs6NprfbAnfZ7WgI5OBFvsax11oW9XHK3s feZA== X-Received: by 10.180.7.196 with SMTP id l4mr14117744wia.44.1427889127830; Wed, 01 Apr 2015 04:52:07 -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 gt4sm2813498wib.21.2015.04.01.04.52.06 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 01 Apr 2015 04:52:07 -0700 (PDT) Date: Wed, 1 Apr 2015 13:52:04 +0200 From: Mateusz Guzik To: Gleb Smirnoff Subject: Re: svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom Message-ID: <20150401115204.GB16649@dft-labs.eu> References: <20150401113628.GA16649@dft-labs.eu> <20150401114313.GZ64665@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20150401114313.GZ64665@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 Apr 2015 11:52:10 -0000 On Wed, Apr 01, 2015 at 02:43:13PM +0300, Gleb Smirnoff wrote: > On Wed, Apr 01, 2015 at 01:36:28PM +0200, Mateusz Guzik wrote: > M> Author: mjg > M> Date: Wed Apr 1 13:37:00 2015 > M> New Revision: 280955 > M> URL: https://svnweb.freebsd.org/changeset/base/280955 > M> > M> Log: > M> Add /dev/notrandom > M> > M> notrandom provides fast and reliable not random numbers. > M> > M> This was added in an effort to increase feature-compatiblity with > M> Solaris 10. > M> > M> See http://www.brendangregg.com/Specials/notrandom.c for Solaris > M> implementation. > M> > M> Reviewed-by: Bruce Schneier (ok, not really) > M> MFC after: 1 week > > What is the difference of this implementation with /dev/zero? > /dev/zero returns 0s, while notrandom was implemented to return 7s. We could e.g. symlink /dev/notrandom to /dev/zero, but that would break compatiblity with Solaris apps depending on this functionality. It could also introduce hard-to-debug problems. After all, readers get a different value than they expect. Given that we have some parts of Solaris merged (zfs, dtrace) and work with open source forks on these technologies, I think we should diverge only when necessary. As a side note I'm surprised with the choice of 7. I would expect 3, no more, no less. 3 would be the number returned, and the number readers receive would be 3. -- Mateusz Guzik From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 11:57:32 2015 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 6B6B8E4; Wed, 1 Apr 2015 11:57:32 +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 E4477BB; Wed, 1 Apr 2015 11:57:31 +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 t31BvT5B058166 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 1 Apr 2015 14:57:29 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t31BvTo6058165; Wed, 1 Apr 2015 14:57:29 +0300 (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 Apr 2015 14:57:29 +0300 From: Gleb Smirnoff To: Mateusz Guzik Subject: Re: svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom Message-ID: <20150401115729.GA64665@FreeBSD.org> References: <20150401113628.GA16649@dft-labs.eu> <20150401114313.GZ64665@FreeBSD.org> <20150401115204.GB16649@dft-labs.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150401115204.GB16649@dft-labs.eu> 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: Wed, 01 Apr 2015 11:57:32 -0000 On Wed, Apr 01, 2015 at 01:52:04PM +0200, Mateusz Guzik wrote: M> /dev/zero returns 0s, while notrandom was implemented to return 7s. M> M> We could e.g. symlink /dev/notrandom to /dev/zero, but that would break M> compatiblity with Solaris apps depending on this functionality. M> M> It could also introduce hard-to-debug problems. After all, readers get a M> different value than they expect. M> M> Given that we have some parts of Solaris merged (zfs, dtrace) and work M> with open source forks on these technologies, I think we should diverge M> only when necessary. M> M> As a side note I'm surprised with the choice of 7. M> M> I would expect 3, no more, no less. 3 would be the number returned, and M> the number readers receive would be 3. You can add the seven_region variable to dev/null/null.c and implement the new device here. Now notrandom.c shares > 50% of code with null.c. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 12:02:34 2015 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 B510D54F; Wed, 1 Apr 2015 12:02:34 +0000 (UTC) Received: from mail-wg0-x22c.google.com (mail-wg0-x22c.google.com [IPv6:2a00:1450:400c:c00::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 454701B1; Wed, 1 Apr 2015 12:02:34 +0000 (UTC) Received: by wgdm6 with SMTP id m6so50716460wgd.2; Wed, 01 Apr 2015 05:02:32 -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=XZffWIcmEALQEPqQIRdX+XQNJtbEd7zrD9MY6pj6uuI=; b=Q8GsSH/acP5DEsX2I/JmrOfSyGS3hLeCyPwjsDOofQJyFaw0l8DNi2SplFEW516AN3 GBX2yKPd+n06fzFhKolo9VF/eTYHoY8TtwGm3ju7fQ1YgC3r+qjepElvYBf222o5hvqc 0J69pJml8ulw9srAlWvBeDEqod0bFUcyZU/UPrVqqaPKXroIY2t9PESt1oYQCDQ/Md2Q Hb8tkMYl8R0HXKbzsNa2n5bc7p5lMRL7KE1oW1vGQUFWevxuqj2ArGVY2SO18d6mt6G5 3m8C//d+PorIUu8YzOF9s163Bza9elKJ2Fx/5/jl4CX6x85qde74uzhr5b+oGGq13owF a12w== X-Received: by 10.180.83.136 with SMTP id q8mr14530885wiy.39.1427889752713; Wed, 01 Apr 2015 05:02:32 -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 v8sm28728703wib.0.2015.04.01.05.02.31 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 01 Apr 2015 05:02:32 -0700 (PDT) Date: Wed, 1 Apr 2015 14:02:29 +0200 From: Mateusz Guzik To: Gleb Smirnoff Subject: Re: svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom Message-ID: <20150401120229.GA2201@dft-labs.eu> References: <20150401113628.GA16649@dft-labs.eu> <20150401114313.GZ64665@FreeBSD.org> <20150401115204.GB16649@dft-labs.eu> <20150401115729.GA64665@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20150401115729.GA64665@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 Apr 2015 12:02:34 -0000 On Wed, Apr 01, 2015 at 02:57:29PM +0300, Gleb Smirnoff wrote: > On Wed, Apr 01, 2015 at 01:52:04PM +0200, Mateusz Guzik wrote: > M> /dev/zero returns 0s, while notrandom was implemented to return 7s. > M> > M> We could e.g. symlink /dev/notrandom to /dev/zero, but that would break > M> compatiblity with Solaris apps depending on this functionality. > M> > M> It could also introduce hard-to-debug problems. After all, readers get a > M> different value than they expect. > M> > M> Given that we have some parts of Solaris merged (zfs, dtrace) and work > M> with open source forks on these technologies, I think we should diverge > M> only when necessary. > M> > M> As a side note I'm surprised with the choice of 7. > M> > M> I would expect 3, no more, no less. 3 would be the number returned, and > M> the number readers receive would be 3. > > You can add the seven_region variable to dev/null/null.c and implement > the new device here. Now notrandom.c shares > 50% of code with null.c. > Yeah I know, in fact I got most of the code from that driver. I just wanted to have a file with my own copyright in the tree, what's so bad about it. If you feel strongly about it feel free to move it, but I would prefer if you did not. -- Mateusz Guzik From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 12:13:47 2015 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 DD3F6899; Wed, 1 Apr 2015 12:13: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 62B73315; Wed, 1 Apr 2015 12:13:46 +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 t31CDiav058321 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 1 Apr 2015 15:13:44 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t31CDium058320; Wed, 1 Apr 2015 15:13:44 +0300 (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 Apr 2015 15:13:44 +0300 From: Gleb Smirnoff To: Mateusz Guzik Subject: Re: svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom Message-ID: <20150401121344.GC64665@FreeBSD.org> References: <20150401113628.GA16649@dft-labs.eu> <20150401114313.GZ64665@FreeBSD.org> <20150401115204.GB16649@dft-labs.eu> <20150401115729.GA64665@FreeBSD.org> <20150401120229.GA2201@dft-labs.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150401120229.GA2201@dft-labs.eu> 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: Wed, 01 Apr 2015 12:13:48 -0000 Mateusz, On Wed, Apr 01, 2015 at 02:02:29PM +0200, Mateusz Guzik wrote: M> > You can add the seven_region variable to dev/null/null.c and implement M> > the new device here. Now notrandom.c shares > 50% of code with null.c. M> M> Yeah I know, in fact I got most of the code from that driver. M> M> I just wanted to have a file with my own copyright in the tree, what's M> so bad about it. M> M> If you feel strongly about it feel free to move it, but I would prefer M> if you did not. You are increasing size of kernel object file merely for a selfish reason. While some systems do not care about kernel object size, some embedded do. Size of source code also matters. You added new code in FreeBSD, that is likely to be supported for a long time. Of course maintaing two files, where one is paste of other, requires more efforts than maintaining single file. Mateusz, if you keep the momentum, in the next years we will see lots of files with your copyright. :) There is no reason to create one just for this. Also, you can legitimately add your name into header of null.c if you move code of notrandom there. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 12:15:03 2015 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 1619F9F6; Wed, 1 Apr 2015 12: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 EA6A932A; Wed, 1 Apr 2015 12:15: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 t31CF2GK047375; Wed, 1 Apr 2015 12:15:02 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t31CF1wb047368; Wed, 1 Apr 2015 12:15:01 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201504011215.t31CF1wb047368@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Wed, 1 Apr 2015 12:15:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280955 - in head/sys: 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 Apr 2015 12:15:03 -0000 Author: kp Date: Wed Apr 1 12:15:01 2015 New Revision: 280955 URL: https://svnweb.freebsd.org/changeset/base/280955 Log: Preserve IPv6 fragment IDs accross reassembly and refragmentation When forwarding fragmented IPv6 packets and filtering with PF we reassemble and refragment. That means we generate new fragment headers and a new fragment ID. We already save the fragment IDs so we can do the reassembly so it's straightforward to apply the incoming fragment ID on the refragmented packets. Differential Revision: https://reviews.freebsd.org/D2188 Approved by: gnn (mentor) Modified: head/sys/netinet6/ip6_output.c head/sys/netinet6/ip6_var.h head/sys/netpfil/pf/pf_norm.c Modified: head/sys/netinet6/ip6_output.c ============================================================================== --- head/sys/netinet6/ip6_output.c Wed Apr 1 10:10:20 2015 (r280954) +++ head/sys/netinet6/ip6_output.c Wed Apr 1 12:15:01 2015 (r280955) @@ -214,7 +214,7 @@ in6_delayed_cksum(struct mbuf *m, uint32 int ip6_fragment(struct ifnet *ifp, struct mbuf *m0, int hlen, u_char nextproto, - int mtu) + int mtu, uint32_t id) { struct mbuf *m, **mnext, *m_frgpart; struct ip6_hdr *ip6, *mhip6; @@ -222,7 +222,6 @@ ip6_fragment(struct ifnet *ifp, struct m int off; int error; int tlen = m0->m_pkthdr.len; - uint32_t id = htonl(ip6_randomid()); m = m0; ip6 = mtod(m, struct ip6_hdr *); @@ -318,6 +317,7 @@ ip6_output(struct mbuf *m0, struct ip6_p int needfiblookup; uint32_t fibnum; struct m_tag *fwd_tag = NULL; + uint32_t id; ip6 = mtod(m, struct ip6_hdr *); if (ip6 == NULL) { @@ -1010,7 +1010,8 @@ passout: * chain. */ m0 = m; - if ((error = ip6_fragment(ifp, m, hlen, nextproto, len))) + id = htonl(ip6_randomid()); + if ((error = ip6_fragment(ifp, m, hlen, nextproto, len, id))) goto sendorfree; in6_ifstat_inc(ifp, ifs6_out_fragok); Modified: head/sys/netinet6/ip6_var.h ============================================================================== --- head/sys/netinet6/ip6_var.h Wed Apr 1 10:10:20 2015 (r280954) +++ head/sys/netinet6/ip6_var.h Wed Apr 1 12:15:01 2015 (r280955) @@ -388,7 +388,8 @@ void ip6_clearpktopts(struct ip6_pktopts struct ip6_pktopts *ip6_copypktopts(struct ip6_pktopts *, int); int ip6_optlen(struct inpcb *); int ip6_deletefraghdr(struct mbuf *, int, int); -int ip6_fragment(struct ifnet *, struct mbuf *, int, u_char, int); +int ip6_fragment(struct ifnet *, struct mbuf *, int, u_char, int, + uint32_t); int route6_input(struct mbuf **, int *, int); Modified: head/sys/netpfil/pf/pf_norm.c ============================================================================== --- head/sys/netpfil/pf/pf_norm.c Wed Apr 1 10:10:20 2015 (r280954) +++ head/sys/netpfil/pf/pf_norm.c Wed Apr 1 12:15:01 2015 (r280955) @@ -104,6 +104,7 @@ struct pf_fragment_tag { uint16_t ft_hdrlen; /* header length of reassembled pkt */ uint16_t ft_extoff; /* last extension header offset or 0 */ uint16_t ft_maxlen; /* maximum fragment payload length */ + uint32_t ft_id; /* fragment id */ }; static struct mtx pf_frag_mtx; @@ -673,6 +674,7 @@ pf_reassemble6(struct mbuf **m0, struct struct m_tag *mtag; struct pf_fragment_tag *ftag; int off; + uint32_t frag_id; uint16_t total, maxlen; uint8_t proto; @@ -715,6 +717,7 @@ pf_reassemble6(struct mbuf **m0, struct /* We have all the data. */ extoff = frent->fe_extoff; maxlen = frag->fr_maxlen; + frag_id = frag->fr_id; frent = TAILQ_FIRST(&frag->fr_queue); KASSERT(frent != NULL, ("frent != NULL")); total = TAILQ_LAST(&frag->fr_queue, pf_fragq)->fe_off + @@ -751,6 +754,7 @@ pf_reassemble6(struct mbuf **m0, struct ftag->ft_hdrlen = hdrlen; ftag->ft_extoff = extoff; ftag->ft_maxlen = maxlen; + ftag->ft_id = frag_id; m_tag_prepend(m, mtag); ip6 = mtod(m, struct ip6_hdr *); @@ -1094,6 +1098,7 @@ pf_refragment6(struct ifnet *ifp, struct struct mbuf *m = *m0, *t; struct pf_fragment_tag *ftag = (struct pf_fragment_tag *)(mtag + 1); struct pf_pdesc pd; + uint32_t frag_id; uint16_t hdrlen, extoff, maxlen; uint8_t proto; int error, action; @@ -1101,6 +1106,7 @@ pf_refragment6(struct ifnet *ifp, struct hdrlen = ftag->ft_hdrlen; extoff = ftag->ft_extoff; maxlen = ftag->ft_maxlen; + frag_id = ftag->ft_id; m_tag_delete(m, mtag); mtag = NULL; ftag = NULL; @@ -1130,7 +1136,7 @@ pf_refragment6(struct ifnet *ifp, struct * is less than 8, ip6_fragment() will return EMSGSIZE and * we drop the packet. */ - error = ip6_fragment(ifp, m, hdrlen, proto, maxlen); + error = ip6_fragment(ifp, m, hdrlen, proto, maxlen, frag_id); m = (*m0)->m_nextpkt; (*m0)->m_nextpkt = NULL; if (error == 0) { From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 12:16:58 2015 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 48C27E2B; Wed, 1 Apr 2015 12:16: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 20724360; Wed, 1 Apr 2015 12:16: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 t31CGvSc047695; Wed, 1 Apr 2015 12:16:57 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t31CGv0C047694; Wed, 1 Apr 2015 12:16:57 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201504011216.t31CGv0C047694@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Wed, 1 Apr 2015 12:16:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280956 - 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 Apr 2015 12:16:58 -0000 Author: kp Date: Wed Apr 1 12:16:56 2015 New Revision: 280956 URL: https://svnweb.freebsd.org/changeset/base/280956 Log: pf: Deal with runt packets On Ethernet packets have a minimal length, so very short packets get padding appended to them. This padding is not stripped off in ip6_input() (due to support for IPv6 Jumbograms, RFC2675). That means PF needs to be careful when reassembling fragmented packets to not include the padding in the reassembled packet. While here also remove the 'Magic from ip_input.' bits. Splitting up and re-joining an mbuf chain here doesn't make any sense. Differential Revision: https://reviews.freebsd.org/D2189 Approved by: gnn (mentor) Modified: head/sys/netpfil/pf/pf_norm.c Modified: head/sys/netpfil/pf/pf_norm.c ============================================================================== --- head/sys/netpfil/pf/pf_norm.c Wed Apr 1 12:15:01 2015 (r280955) +++ head/sys/netpfil/pf/pf_norm.c Wed Apr 1 12:16:56 2015 (r280956) @@ -573,11 +573,8 @@ pf_join_fragment(struct pf_fragment *fra frent = TAILQ_FIRST(&frag->fr_queue); next = TAILQ_NEXT(frent, fr_next); - /* Magic from ip_input. */ m = frent->fe_m; - m2 = m->m_next; - m->m_next = NULL; - m_cat(m, m2); + m_adj(m, (frent->fe_hdrlen + frent->fe_len) - m->m_pkthdr.len); uma_zfree(V_pf_frent_z, frent); for (frent = next; frent != NULL; frent = next) { next = TAILQ_NEXT(frent, fr_next); @@ -585,6 +582,9 @@ pf_join_fragment(struct pf_fragment *fra m2 = frent->fe_m; /* Strip off ip header. */ m_adj(m2, frent->fe_hdrlen); + /* Strip off any trailing bytes. */ + m_adj(m2, frent->fe_len - m2->m_pkthdr.len); + uma_zfree(V_pf_frent_z, frent); m_cat(m, m2); } From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 12:29:22 2015 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 793F02FB; Wed, 1 Apr 2015 12:29:22 +0000 (UTC) Received: from mail-wg0-x22c.google.com (mail-wg0-x22c.google.com [IPv6:2a00:1450:400c:c00::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 076A4665; Wed, 1 Apr 2015 12:29:22 +0000 (UTC) Received: by wgdm6 with SMTP id m6so51508954wgd.2; Wed, 01 Apr 2015 05:29:20 -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=MMHN7TKJa42fjqmv5uEeIkHfxGS383s6WCjfOTEAUN8=; b=wI9tH4bg2oFql5HrN1e84Cv2cCwiAQsJTmmQkdJ2Ttsc45ngIEtxSKHFVySJJkSVAd yNkWOsTYD52drdyrT74Pg+AwBn8TqCvcu+pv+17YdQCRWo8NP24yyq/BAnCq4kZ1bl8Q RvY7nDEpihrynTo/4IXPDyHR3F+efrk62GkfM/3WQSFmkznNrEIOH6vAYOgNsmbPSDWm JhG0kJk1armHG7m8Dw1kyCKn6bGqr2YBuCEMmCXhIjWqR1oUMMSiMTejJqAkDYfhBR8y UoRgxcPx7D7tRajAoMpqvJ2dLQrI25PptUjnkx4xu3DphnqbUXkpok2/40Y0iAsL5zYR sGvw== X-Received: by 10.180.75.73 with SMTP id a9mr14709591wiw.45.1427891360410; Wed, 01 Apr 2015 05:29:20 -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 ea11sm2949572wic.24.2015.04.01.05.29.18 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 01 Apr 2015 05:29:19 -0700 (PDT) Date: Wed, 1 Apr 2015 14:29:16 +0200 From: Mateusz Guzik To: Gleb Smirnoff Subject: Re: svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom Message-ID: <20150401122916.GA10926@dft-labs.eu> References: <20150401113628.GA16649@dft-labs.eu> <20150401114313.GZ64665@FreeBSD.org> <20150401115204.GB16649@dft-labs.eu> <20150401115729.GA64665@FreeBSD.org> <20150401120229.GA2201@dft-labs.eu> <20150401121344.GC64665@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20150401121344.GC64665@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 Apr 2015 12:29:22 -0000 On Wed, Apr 01, 2015 at 03:13:44PM +0300, Gleb Smirnoff wrote: > Mateusz, > > On Wed, Apr 01, 2015 at 02:02:29PM +0200, Mateusz Guzik wrote: > M> > You can add the seven_region variable to dev/null/null.c and implement > M> > the new device here. Now notrandom.c shares > 50% of code with null.c. > M> > M> Yeah I know, in fact I got most of the code from that driver. > M> > M> I just wanted to have a file with my own copyright in the tree, what's > M> so bad about it. > M> > M> If you feel strongly about it feel free to move it, but I would prefer > M> if you did not. > > You are increasing size of kernel object file merely for a selfish reason. > Sure, but who does not? > While some systems do not care about kernel object size, some embedded do. > Size of source code also matters. You added new code in FreeBSD, that > is likely to be supported for a long time. Of course maintaing two files, > where one is paste of other, requires more efforts than maintaining > single file. > Fair point, but cmon. We can cut IPv6 instead. Net win. > Mateusz, if you keep the momentum, in the next years we will see lots > of files with your copyright. :) There is no reason to create one > just for this. Also, you can legitimately add your name into header of > null.c if you move code of notrandom there. > Yeah, but that's not the same as having my own file, even if I copy-pasted most of it. :( I understand you have concerns, but can we please leave this over the weekend? I'll be happy and maybe it will grow on you in the meantime. I must say this funcionality is so awesome it deserves a separate file regardless of who gets the copyright. -- Mateusz Guzik From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 12:31:22 2015 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 013E5461; Wed, 1 Apr 2015 12:31:21 +0000 (UTC) Received: from kif.fubar.geek.nz (kif.fubar.geek.nz [178.62.119.249]) by mx1.freebsd.org (Postfix) with ESMTP id 9E7BB763; Wed, 1 Apr 2015 12:31:21 +0000 (UTC) Received: from bender (c101.sec.cl.cam.ac.uk [128.232.18.101]) by kif.fubar.geek.nz (Postfix) with ESMTPSA id 8578DD7A0D; Wed, 1 Apr 2015 12:31:14 +0000 (UTC) Date: Wed, 1 Apr 2015 13:31:14 +0100 From: Andrew Turner To: Mateusz Guzik Subject: Re: svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom Message-ID: <20150401133114.16e7d7ba@bender> In-Reply-To: <20150401113628.GA16649@dft-labs.eu> References: <20150401113628.GA16649@dft-labs.eu> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; amd64-portbld-freebsd10.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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 Apr 2015 12:31:22 -0000 On Wed, 1 Apr 2015 13:36:28 +0200 Mateusz Guzik wrote: > Author: mjg > Date: Wed Apr 1 13:37:00 2015 > New Revision: 280955 > URL: https://svnweb.freebsd.org/changeset/base/280955 > > Log: > Add /dev/notrandom > > notrandom provides fast and reliable not random numbers. > > This was added in an effort to increase feature-compatiblity with > Solaris 10. > > See http://www.brendangregg.com/Specials/notrandom.c for Solaris > implementation. > > Reviewed-by: Bruce Schneier (ok, not really) > MFC after: 1 week I've been thinking about adding something similar for some time. I do have one question, should it accept data for the notrandom number generator? It would only need to accept up until the first notrandom number. I was thinking something like the following patch (untested). Andrew diff --git a/sys/dev/notrandom/notrandom.c b/sys/dev/notrandom/notrandom.c index c09eaf3..9e5f523 100644 --- a/sys/dev/notrandom/notrandom.c +++ b/sys/dev/notrandom/notrandom.c @@ -41,10 +41,12 @@ static struct cdev *notrandom_dev; static d_ioctl_t notrandom_ioctl; static d_read_t notrandom_read; +static d_read_t notrandom_write; static struct cdevsw notrandom_cdevsw = { .d_version = D_VERSION, .d_read = notrandom_read, + .d_write = notrandom_write, .d_ioctl = notrandom_ioctl, .d_name = "notrandom", .d_flags = D_MMAP_ANON, @@ -91,6 +93,30 @@ notrandom_read(struct cdev *dev __unused, struct uio *uio, int flags __unused) /* ARGSUSED */ static int +notrandom_write(struct cdev *dev __unused, struct uio *uio, int flags __unused) +{ + size_t pos; + ssize_t len; + int error = 0; + char buf; + + pos = 0; + while (uio->uio_resid > 0) { + len = uio->uio_resid; + error = uiomove(&buf, 1, uio); + if (error != 0) + break; + if (buf != 7) + return (EIO); + notrandom_buf[pos++] = buf; + pos %= sizeof(notrandom_buf); + } + + return (error); +} + +/* ARGSUSED */ +static int notrandom_modevent(module_t mod __unused, int type, void *data __unused) { int error = 0; From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 12:38:17 2015 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 AE5257C4; Wed, 1 Apr 2015 12:38:17 +0000 (UTC) Received: from mail-wi0-x22c.google.com (mail-wi0-x22c.google.com [IPv6:2a00:1450:400c:c05::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4EA097B6; Wed, 1 Apr 2015 12:38:17 +0000 (UTC) Received: by wibgn9 with SMTP id gn9so64655014wib.1; Wed, 01 Apr 2015 05:38:15 -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=2nykuv3PaG4y5BOR+mMQSwL5SanJ1oXfR++roA18t1o=; b=dneehVbUTINxCDpe+UI/h8LFSRtVI+L66L2LSmBQiUuud3cdcA7kB8QzZoSMXZW8Rw Wh14yluivucCt74t9PF2Lk23vUvOMHnxu1PpPxgXPrSq/uv4WfclfdEJLJOA34Mj/N1x aSoilNqflKsKpHwubjCMBMB1150BWi8sP0GSypVYG9fPcROr8IifbgygpP62k58WtJbx wGathVyVZA6JaU6qXKZ9t0dBqWYGqjK6ueBi5AsjQSv+MI/1jDfc8ojod5rf7Ylc4Let e1esIQqzx4hRwZ96YqaICdoKpAaw+0IansRMdqshrszwjqy3zlvuVeb7djCRMkX3ZoSs fCpQ== X-Received: by 10.194.177.195 with SMTP id cs3mr81818833wjc.141.1427891895797; Wed, 01 Apr 2015 05:38:15 -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 dx11sm2520886wjb.23.2015.04.01.05.38.14 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 01 Apr 2015 05:38:15 -0700 (PDT) Date: Wed, 1 Apr 2015 14:38:12 +0200 From: Mateusz Guzik To: Andrew Turner Subject: Re: svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom Message-ID: <20150401123812.GB10926@dft-labs.eu> References: <20150401113628.GA16649@dft-labs.eu> <20150401133114.16e7d7ba@bender> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20150401133114.16e7d7ba@bender> 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 Apr 2015 12:38:17 -0000 On Wed, Apr 01, 2015 at 01:31:14PM +0100, Andrew Turner wrote: > On Wed, 1 Apr 2015 13:36:28 +0200 > Mateusz Guzik wrote: > > > Author: mjg > > Date: Wed Apr 1 13:37:00 2015 > > New Revision: 280955 > > URL: https://svnweb.freebsd.org/changeset/base/280955 > > > > Log: > > Add /dev/notrandom > > > > notrandom provides fast and reliable not random numbers. > > > > This was added in an effort to increase feature-compatiblity with > > Solaris 10. > > > > See http://www.brendangregg.com/Specials/notrandom.c for Solaris > > implementation. > > > > Reviewed-by: Bruce Schneier (ok, not really) > > MFC after: 1 week > > I've been thinking about adding something similar for some time. I do > have one question, should it accept data for the notrandom number > generator? It would only need to accept up until the first notrandom > number. I was thinking something like the following patch (untested). > > Andrew > > diff --git a/sys/dev/notrandom/notrandom.c > b/sys/dev/notrandom/notrandom.c index c09eaf3..9e5f523 100644 > --- a/sys/dev/notrandom/notrandom.c > +++ b/sys/dev/notrandom/notrandom.c > @@ -41,10 +41,12 @@ static struct cdev *notrandom_dev; > > static d_ioctl_t notrandom_ioctl; > static d_read_t notrandom_read; > +static d_read_t notrandom_write; > > static struct cdevsw notrandom_cdevsw = { > .d_version = D_VERSION, > .d_read = notrandom_read, > + .d_write = notrandom_write, > .d_ioctl = notrandom_ioctl, > .d_name = "notrandom", > .d_flags = D_MMAP_ANON, > @@ -91,6 +93,30 @@ notrandom_read(struct cdev *dev __unused, struct uio > *uio, int flags __unused) > /* ARGSUSED */ > static int > +notrandom_write(struct cdev *dev __unused, struct uio *uio, int flags > __unused) > +{ > + size_t pos; > + ssize_t len; > + int error = 0; > + char buf; > + > + pos = 0; > + while (uio->uio_resid > 0) { > + len = uio->uio_resid; > + error = uiomove(&buf, 1, uio); > + if (error != 0) > + break; > + if (buf != 7) > + return (EIO); > + notrandom_buf[pos++] = buf; > + pos %= sizeof(notrandom_buf); I disagree with this part. It should only write buffers which fit the rest of the buffer, it should not wrap. Would you mind fixing the patch, testing it and allowing me later to commit it without attribution? Thanks, > + } > + > + return (error); > +} > + -- Mateusz Guzik From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 12:42:32 2015 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 7F85596C; Wed, 1 Apr 2015 12:42: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 5FD69882; Wed, 1 Apr 2015 12:42: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 t31CgWp4061571; Wed, 1 Apr 2015 12:42:32 GMT (envelope-from rstone@FreeBSD.org) Received: (from rstone@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t31CgRX5061551; Wed, 1 Apr 2015 12:42:27 GMT (envelope-from rstone@FreeBSD.org) Message-Id: <201504011242.t31CgRX5061551@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rstone set sender to rstone@FreeBSD.org using -f From: Ryan Stone Date: Wed, 1 Apr 2015 12:42:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280957 - in head/sys: amd64/amd64 i386/i386 kern mips/mips powerpc/aim sparc64/sparc64 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: Wed, 01 Apr 2015 12:42:32 -0000 Author: rstone Date: Wed Apr 1 12:42:26 2015 New Revision: 280957 URL: https://svnweb.freebsd.org/changeset/base/280957 Log: Fix integer truncation bug in malloc(9) A couple of internal functions used by malloc(9) and uma truncated a size_t down to an int. This could cause any number of issues (e.g. indefinite sleeps, memory corruption) if any kernel subsystem tried to allocate 2GB or more through malloc. zfs would attempt such an allocation when run on a system with 2TB or more of RAM. Note to self: When this is MFCed, sparc64 needs the same fix. Differential revision: https://reviews.freebsd.org/D2106 Reviewed by: kib Reported by: Michael Fuckner Tested by: Michael Fuckner MFC after: 2 weeks Modified: head/sys/amd64/amd64/uma_machdep.c head/sys/i386/i386/pmap.c head/sys/kern/kern_mbuf.c head/sys/kern/subr_busdma_bufalloc.c head/sys/kern/subr_vmem.c head/sys/mips/mips/uma_machdep.c head/sys/powerpc/aim/mmu_oea64.c head/sys/powerpc/aim/slb.c head/sys/powerpc/aim/uma_machdep.c head/sys/sparc64/sparc64/vm_machdep.c head/sys/sys/busdma_bufalloc.h head/sys/vm/uma.h head/sys/vm/uma_core.c head/sys/vm/uma_int.h Modified: head/sys/amd64/amd64/uma_machdep.c ============================================================================== --- head/sys/amd64/amd64/uma_machdep.c Wed Apr 1 12:16:56 2015 (r280956) +++ head/sys/amd64/amd64/uma_machdep.c Wed Apr 1 12:42:26 2015 (r280957) @@ -41,7 +41,7 @@ __FBSDID("$FreeBSD$"); #include void * -uma_small_alloc(uma_zone_t zone, int bytes, u_int8_t *flags, int wait) +uma_small_alloc(uma_zone_t zone, vm_size_t bytes, u_int8_t *flags, int wait) { vm_page_t m; vm_paddr_t pa; @@ -70,7 +70,7 @@ uma_small_alloc(uma_zone_t zone, int byt } void -uma_small_free(void *mem, int size, u_int8_t flags) +uma_small_free(void *mem, vm_size_t size, u_int8_t flags) { vm_page_t m; vm_paddr_t pa; Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Wed Apr 1 12:16:56 2015 (r280956) +++ head/sys/i386/i386/pmap.c Wed Apr 1 12:42:26 2015 (r280957) @@ -340,7 +340,8 @@ static pt_entry_t *pmap_pte_quick(pmap_t static void pmap_pte_release(pt_entry_t *pte); static int pmap_unuse_pt(pmap_t, vm_offset_t, struct spglist *); #ifdef PAE -static void *pmap_pdpt_allocf(uma_zone_t zone, int bytes, u_int8_t *flags, int wait); +static void *pmap_pdpt_allocf(uma_zone_t zone, vm_size_t bytes, uint8_t *flags, + int wait); #endif static void pmap_set_pg(void); @@ -658,7 +659,7 @@ pmap_page_init(vm_page_t m) #ifdef PAE static void * -pmap_pdpt_allocf(uma_zone_t zone, int bytes, u_int8_t *flags, int wait) +pmap_pdpt_allocf(uma_zone_t zone, vm_size_t bytes, uint8_t *flags, int wait) { /* Inform UMA that this allocator uses kernel_map/object. */ Modified: head/sys/kern/kern_mbuf.c ============================================================================== --- head/sys/kern/kern_mbuf.c Wed Apr 1 12:16:56 2015 (r280956) +++ head/sys/kern/kern_mbuf.c Wed Apr 1 12:42:26 2015 (r280957) @@ -284,7 +284,7 @@ static int mb_zinit_pack(void *, int, in static void mb_zfini_pack(void *, int); static void mb_reclaim(void *); -static void *mbuf_jumbo_alloc(uma_zone_t, int, uint8_t *, int); +static void *mbuf_jumbo_alloc(uma_zone_t, vm_size_t, uint8_t *, int); /* Ensure that MSIZE is a power of 2. */ CTASSERT((((MSIZE - 1) ^ MSIZE) + 1) >> 1 == MSIZE); @@ -389,7 +389,7 @@ SYSINIT(mbuf, SI_SUB_MBUF, SI_ORDER_FIRS * pages. */ static void * -mbuf_jumbo_alloc(uma_zone_t zone, int bytes, uint8_t *flags, int wait) +mbuf_jumbo_alloc(uma_zone_t zone, vm_size_t bytes, uint8_t *flags, int wait) { /* Inform UMA that this allocator uses kernel_map/object. */ Modified: head/sys/kern/subr_busdma_bufalloc.c ============================================================================== --- head/sys/kern/subr_busdma_bufalloc.c Wed Apr 1 12:16:56 2015 (r280956) +++ head/sys/kern/subr_busdma_bufalloc.c Wed Apr 1 12:42:26 2015 (r280957) @@ -147,8 +147,8 @@ busdma_bufalloc_findzone(busdma_bufalloc } void * -busdma_bufalloc_alloc_uncacheable(uma_zone_t zone, int size, u_int8_t *pflag, - int wait) +busdma_bufalloc_alloc_uncacheable(uma_zone_t zone, vm_size_t size, + uint8_t *pflag, int wait) { #ifdef VM_MEMATTR_UNCACHEABLE @@ -166,7 +166,7 @@ busdma_bufalloc_alloc_uncacheable(uma_zo } void -busdma_bufalloc_free_uncacheable(void *item, int size, u_int8_t pflag) +busdma_bufalloc_free_uncacheable(void *item, vm_size_t size, uint8_t pflag) { kmem_free(kernel_arena, (vm_offset_t)item, size); Modified: head/sys/kern/subr_vmem.c ============================================================================== --- head/sys/kern/subr_vmem.c Wed Apr 1 12:16:56 2015 (r280956) +++ head/sys/kern/subr_vmem.c Wed Apr 1 12:42:26 2015 (r280957) @@ -609,7 +609,7 @@ static struct mtx_padalign vmem_bt_lock; * we are really out of KVA. */ static void * -vmem_bt_alloc(uma_zone_t zone, int bytes, uint8_t *pflag, int wait) +vmem_bt_alloc(uma_zone_t zone, vm_size_t bytes, uint8_t *pflag, int wait) { vmem_addr_t addr; Modified: head/sys/mips/mips/uma_machdep.c ============================================================================== --- head/sys/mips/mips/uma_machdep.c Wed Apr 1 12:16:56 2015 (r280956) +++ head/sys/mips/mips/uma_machdep.c Wed Apr 1 12:42:26 2015 (r280957) @@ -41,7 +41,7 @@ __FBSDID("$FreeBSD$"); #include void * -uma_small_alloc(uma_zone_t zone, int bytes, u_int8_t *flags, int wait) +uma_small_alloc(uma_zone_t zone, vm_size_t bytes, u_int8_t *flags, int wait) { vm_paddr_t pa; vm_page_t m; @@ -70,7 +70,7 @@ uma_small_alloc(uma_zone_t zone, int byt } void -uma_small_free(void *mem, int size, u_int8_t flags) +uma_small_free(void *mem, vm_size_t size, u_int8_t flags) { vm_page_t m; vm_paddr_t pa; Modified: head/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- head/sys/powerpc/aim/mmu_oea64.c Wed Apr 1 12:16:56 2015 (r280956) +++ head/sys/powerpc/aim/mmu_oea64.c Wed Apr 1 12:42:26 2015 (r280957) @@ -1437,7 +1437,8 @@ retry: static mmu_t installed_mmu; static void * -moea64_uma_page_alloc(uma_zone_t zone, int bytes, u_int8_t *flags, int wait) +moea64_uma_page_alloc(uma_zone_t zone, vm_size_t bytes, uint8_t *flags, + int wait) { struct pvo_entry *pvo; vm_offset_t va; Modified: head/sys/powerpc/aim/slb.c ============================================================================== --- head/sys/powerpc/aim/slb.c Wed Apr 1 12:16:56 2015 (r280956) +++ head/sys/powerpc/aim/slb.c Wed Apr 1 12:42:26 2015 (r280957) @@ -473,7 +473,7 @@ slb_insert_user(pmap_t pm, struct slb *s } static void * -slb_uma_real_alloc(uma_zone_t zone, int bytes, u_int8_t *flags, int wait) +slb_uma_real_alloc(uma_zone_t zone, vm_size_t bytes, u_int8_t *flags, int wait) { static vm_offset_t realmax = 0; void *va; Modified: head/sys/powerpc/aim/uma_machdep.c ============================================================================== --- head/sys/powerpc/aim/uma_machdep.c Wed Apr 1 12:16:56 2015 (r280956) +++ head/sys/powerpc/aim/uma_machdep.c Wed Apr 1 12:42:26 2015 (r280957) @@ -50,7 +50,7 @@ SYSCTL_INT(_hw, OID_AUTO, uma_mdpages, C "UMA MD pages in use"); void * -uma_small_alloc(uma_zone_t zone, int bytes, u_int8_t *flags, int wait) +uma_small_alloc(uma_zone_t zone, vm_size_t bytes, u_int8_t *flags, int wait) { void *va; vm_page_t m; @@ -82,7 +82,7 @@ uma_small_alloc(uma_zone_t zone, int byt } void -uma_small_free(void *mem, int size, u_int8_t flags) +uma_small_free(void *mem, vm_size_t size, u_int8_t flags) { vm_page_t m; Modified: head/sys/sparc64/sparc64/vm_machdep.c ============================================================================== --- head/sys/sparc64/sparc64/vm_machdep.c Wed Apr 1 12:16:56 2015 (r280956) +++ head/sys/sparc64/sparc64/vm_machdep.c Wed Apr 1 12:42:26 2015 (r280957) @@ -396,7 +396,7 @@ swi_vm(void *v) } void * -uma_small_alloc(uma_zone_t zone, int bytes, u_int8_t *flags, int wait) +uma_small_alloc(uma_zone_t zone, vm_size_t bytes, u_int8_t *flags, int wait) { vm_paddr_t pa; vm_page_t m; @@ -434,7 +434,7 @@ uma_small_alloc(uma_zone_t zone, int byt } void -uma_small_free(void *mem, int size, u_int8_t flags) +uma_small_free(void *mem, vm_size_t size, u_int8_t flags) { vm_page_t m; Modified: head/sys/sys/busdma_bufalloc.h ============================================================================== --- head/sys/sys/busdma_bufalloc.h Wed Apr 1 12:16:56 2015 (r280956) +++ head/sys/sys/busdma_bufalloc.h Wed Apr 1 12:42:26 2015 (r280957) @@ -110,9 +110,10 @@ struct busdma_bufzone * busdma_bufalloc_ * routines support pmap_page_set_memattr() and the VM_MEMATTR_UNCACHEABLE flag * you can probably use these when you need uncacheable buffers. */ -void * busdma_bufalloc_alloc_uncacheable(uma_zone_t zone, int size, - u_int8_t *pflag, int wait); -void busdma_bufalloc_free_uncacheable(void *item, int size, u_int8_t pflag); +void * busdma_bufalloc_alloc_uncacheable(uma_zone_t zone, vm_size_t size, + uint8_t *pflag, int wait); +void busdma_bufalloc_free_uncacheable(void *item, vm_size_t size, + uint8_t pflag); #endif /* _MACHINE_BUSDMA_BUFALLOC_H_ */ Modified: head/sys/vm/uma.h ============================================================================== --- head/sys/vm/uma.h Wed Apr 1 12:16:56 2015 (r280956) +++ head/sys/vm/uma.h Wed Apr 1 12:42:26 2015 (r280957) @@ -382,7 +382,8 @@ uma_zfree(uma_zone_t zone, void *item) * A pointer to the allocated memory or NULL on failure. */ -typedef void *(*uma_alloc)(uma_zone_t zone, int size, uint8_t *pflag, int wait); +typedef void *(*uma_alloc)(uma_zone_t zone, vm_size_t size, uint8_t *pflag, + int wait); /* * Backend page free routines @@ -395,7 +396,7 @@ typedef void *(*uma_alloc)(uma_zone_t zo * Returns: * None */ -typedef void (*uma_free)(void *item, int size, uint8_t pflag); +typedef void (*uma_free)(void *item, vm_size_t size, uint8_t pflag); Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Wed Apr 1 12:16:56 2015 (r280956) +++ head/sys/vm/uma_core.c Wed Apr 1 12:42:26 2015 (r280957) @@ -230,10 +230,10 @@ enum zfreeskip { SKIP_NONE = 0, SKIP_DTO /* Prototypes.. */ -static void *noobj_alloc(uma_zone_t, int, uint8_t *, int); -static void *page_alloc(uma_zone_t, int, uint8_t *, int); -static void *startup_alloc(uma_zone_t, int, uint8_t *, int); -static void page_free(void *, int, uint8_t); +static void *noobj_alloc(uma_zone_t, vm_size_t, uint8_t *, int); +static void *page_alloc(uma_zone_t, vm_size_t, uint8_t *, int); +static void *startup_alloc(uma_zone_t, vm_size_t, uint8_t *, int); +static void page_free(void *, vm_size_t, uint8_t); static uma_slab_t keg_alloc_slab(uma_keg_t, uma_zone_t, int); static void cache_drain(uma_zone_t); static void bucket_drain(uma_zone_t, uma_bucket_t); @@ -1038,7 +1038,7 @@ out: * the VM is ready. */ static void * -startup_alloc(uma_zone_t zone, int bytes, uint8_t *pflag, int wait) +startup_alloc(uma_zone_t zone, vm_size_t bytes, uint8_t *pflag, int wait) { uma_keg_t keg; uma_slab_t tmps; @@ -1098,7 +1098,7 @@ startup_alloc(uma_zone_t zone, int bytes * NULL if M_NOWAIT is set. */ static void * -page_alloc(uma_zone_t zone, int bytes, uint8_t *pflag, int wait) +page_alloc(uma_zone_t zone, vm_size_t bytes, uint8_t *pflag, int wait) { void *p; /* Returned page */ @@ -1120,7 +1120,7 @@ page_alloc(uma_zone_t zone, int bytes, u * NULL if M_NOWAIT is set. */ static void * -noobj_alloc(uma_zone_t zone, int bytes, uint8_t *flags, int wait) +noobj_alloc(uma_zone_t zone, vm_size_t bytes, uint8_t *flags, int wait) { TAILQ_HEAD(, vm_page) alloctail; u_long npages; @@ -1183,7 +1183,7 @@ noobj_alloc(uma_zone_t zone, int bytes, * Nothing */ static void -page_free(void *mem, int size, uint8_t flags) +page_free(void *mem, vm_size_t size, uint8_t flags) { struct vmem *vmem; @@ -3266,7 +3266,7 @@ uma_zone_exhausted_nolock(uma_zone_t zon } void * -uma_large_malloc(int size, int wait) +uma_large_malloc(vm_size_t size, int wait) { void *mem; uma_slab_t slab; Modified: head/sys/vm/uma_int.h ============================================================================== --- head/sys/vm/uma_int.h Wed Apr 1 12:16:56 2015 (r280956) +++ head/sys/vm/uma_int.h Wed Apr 1 12:42:26 2015 (r280957) @@ -341,7 +341,7 @@ zone_first_keg(uma_zone_t zone) #ifdef _KERNEL /* Internal prototypes */ static __inline uma_slab_t hash_sfind(struct uma_hash *hash, uint8_t *data); -void *uma_large_malloc(int size, int wait); +void *uma_large_malloc(vm_size_t size, int wait); void uma_large_free(uma_slab_t slab); /* Lock Macros */ @@ -424,8 +424,9 @@ vsetslab(vm_offset_t va, uma_slab_t slab * if they can provide more effecient allocation functions. This is useful * for using direct mapped addresses. */ -void *uma_small_alloc(uma_zone_t zone, int bytes, uint8_t *pflag, int wait); -void uma_small_free(void *mem, int size, uint8_t flags); +void *uma_small_alloc(uma_zone_t zone, vm_size_t bytes, uint8_t *pflag, + int wait); +void uma_small_free(void *mem, vm_size_t size, uint8_t flags); #endif /* _KERNEL */ #endif /* VM_UMA_INT_H */ From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 14:56:20 2015 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 45AAC766; Wed, 1 Apr 2015 14:56:20 +0000 (UTC) Received: from relay.mailchannels.net (si-002-i66.relay.mailchannels.net [184.154.112.240]) by mx1.freebsd.org (Postfix) with ESMTP id 1CF7198D; Wed, 1 Apr 2015 14:56:17 +0000 (UTC) X-Sender-Id: duocircle|x-authuser|hippie Received: from smtp5.ore.mailhop.org (ip-10-213-14-133.us-west-2.compute.internal [10.213.14.133]) by relay.mailchannels.net (Postfix) with ESMTPA id 11B43640E1; Wed, 1 Apr 2015 14:18:22 +0000 (UTC) X-Sender-Id: duocircle|x-authuser|hippie Received: from smtp5.ore.mailhop.org (smtp5.ore.mailhop.org [10.21.145.197]) (using TLSv1 with cipher DHE-RSA-AES256-SHA) by 0.0.0.0:2500 (trex/5.4.8); Wed, 01 Apr 2015 14:18:22 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: duocircle|x-authuser|hippie X-MailChannels-Auth-Id: duocircle X-MC-Loop-Signature: 1427897902227:4257096398 X-MC-Ingress-Time: 1427897902226 Received: from c-73-34-117-227.hsd1.co.comcast.net ([73.34.117.227] helo=ilsoft.org) by smtp5.ore.mailhop.org with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.82) (envelope-from ) id 1YdJTI-0007H1-Bj; Wed, 01 Apr 2015 14:18:20 +0000 Received: from revolution.hippie.lan (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t31EIHxq061590; Wed, 1 Apr 2015 08:18:17 -0600 (MDT) (envelope-from ian@freebsd.org) X-Mail-Handler: DuoCircle Outbound SMTP X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@duocircle.com (see https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information for abuse reporting information) X-MHO-User: U2FsdGVkX19FJhA63yVH+NbDnUX1GFqy Message-ID: <1427897897.82583.62.camel@freebsd.org> Subject: Re: svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom From: Ian Lepore To: Mateusz Guzik Date: Wed, 01 Apr 2015 08:18:17 -0600 In-Reply-To: <20150401115204.GB16649@dft-labs.eu> References: <20150401113628.GA16649@dft-labs.eu> <20150401114313.GZ64665@FreeBSD.org> <20150401115204.GB16649@dft-labs.eu> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.12.10 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-AuthUser: hippie 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 Apr 2015 14:56:20 -0000 On Wed, 2015-04-01 at 13:52 +0200, Mateusz Guzik wrote: > As a side note I'm surprised with the choice of 7. > > I would expect 3, no more, no less. 3 would be the number returned, > and the number readers receive would be 3. 5 would be right out. -- Ian From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 14:59:45 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id BD41A914; Wed, 1 Apr 2015 14:59:45 +0000 (UTC) Date: Wed, 1 Apr 2015 14:59:45 +0000 From: Alexey Dokuchaev To: Ian Lepore Subject: Re: svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom Message-ID: <20150401145945.GA67667@FreeBSD.org> References: <20150401113628.GA16649@dft-labs.eu> <20150401114313.GZ64665@FreeBSD.org> <20150401115204.GB16649@dft-labs.eu> <1427897897.82583.62.camel@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1427897897.82583.62.camel@freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Mateusz Guzik , 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 Apr 2015 14:59:45 -0000 On Wed, Apr 01, 2015 at 08:18:17AM -0600, Ian Lepore wrote: > On Wed, 2015-04-01 at 13:52 +0200, Mateusz Guzik wrote: > > As a side note I'm surprised with the choice of 7. > > > > I would expect 3, no more, no less. 3 would be the number returned, > > and the number readers receive would be 3. > > 5 would be right out. I haven't reviewed the code, but I trust you guys that it has to be prime. Otherwise I'd vote for 42. ./danfe From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 15:07:35 2015 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 CF788C89; Wed, 1 Apr 2015 15:07:35 +0000 (UTC) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps1.elischer.org", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 31E54AC3; Wed, 1 Apr 2015 15:07:35 +0000 (UTC) Received: from Julian-MBP3.local (ppp121-45-255-201.lns20.per4.internode.on.net [121.45.255.201]) (authenticated bits=0) by vps1.elischer.org (8.14.9/8.14.9) with ESMTP id t31F7RdS025543 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Wed, 1 Apr 2015 08:07:30 -0700 (PDT) (envelope-from julian@freebsd.org) Message-ID: <551C09A9.1030005@freebsd.org> Date: Wed, 01 Apr 2015 23:07:21 +0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Andrew Turner , Mateusz Guzik Subject: Re: svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom References: <20150401113628.GA16649@dft-labs.eu> <20150401133114.16e7d7ba@bender> In-Reply-To: <20150401133114.16e7d7ba@bender> Content-Type: text/plain; charset=windows-1252; 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: Wed, 01 Apr 2015 15:07:35 -0000 On 4/1/15 8:31 PM, Andrew Turner wrote: > On Wed, 1 Apr 2015 13:36:28 +0200 > Mateusz Guzik wrote: > >> Author: mjg >> Date: Wed Apr 1 13:37:00 2015 >> New Revision: 280955 >> URL: https://svnweb.freebsd.org/changeset/base/280955 >> >> Log: >> Add /dev/notrandom >> >> notrandom provides fast and reliable not random numbers. >> >> This was added in an effort to increase feature-compatiblity with >> Solaris 10. >> >> See http://www.brendangregg.com/Specials/notrandom.c for Solaris >> implementation. the not-random write- side code should have a sysctl that decides whether it rejects data that is too random. >> >> Reviewed-by: Bruce Schneier (ok, not really) >> MFC after: 1 week > I've been thinking about adding something similar for some time. I do > have one question, should it accept data for the notrandom number > generator? It would only need to accept up until the first notrandom > number. I was thinking something like the following patch (untested). > > Andrew > > diff --git a/sys/dev/notrandom/notrandom.c > b/sys/dev/notrandom/notrandom.c index c09eaf3..9e5f523 100644 > --- a/sys/dev/notrandom/notrandom.c > +++ b/sys/dev/notrandom/notrandom.c > @@ -41,10 +41,12 @@ static struct cdev *notrandom_dev; > > static d_ioctl_t notrandom_ioctl; > static d_read_t notrandom_read; > +static d_read_t notrandom_write; > > static struct cdevsw notrandom_cdevsw = { > .d_version = D_VERSION, > .d_read = notrandom_read, > + .d_write = notrandom_write, > .d_ioctl = notrandom_ioctl, > .d_name = "notrandom", > .d_flags = D_MMAP_ANON, > @@ -91,6 +93,30 @@ notrandom_read(struct cdev *dev __unused, struct uio > *uio, int flags __unused) > /* ARGSUSED */ > static int > +notrandom_write(struct cdev *dev __unused, struct uio *uio, int flags > __unused) > +{ > + size_t pos; > + ssize_t len; > + int error = 0; > + char buf; > + > + pos = 0; > + while (uio->uio_resid > 0) { > + len = uio->uio_resid; > + error = uiomove(&buf, 1, uio); > + if (error != 0) > + break; > + if (buf != 7) > + return (EIO); > + notrandom_buf[pos++] = buf; > + pos %= sizeof(notrandom_buf); > + } > + > + return (error); > +} > + > +/* ARGSUSED */ > +static int > notrandom_modevent(module_t mod __unused, int type, void *data > __unused) { > int error = 0; > > > From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 15:10:29 2015 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 EE433E43; Wed, 1 Apr 2015 15:10:28 +0000 (UTC) Received: from pp1.rice.edu (proofpoint1.mail.rice.edu [128.42.201.100]) (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 B0342ADA; Wed, 1 Apr 2015 15:10:27 +0000 (UTC) Received: from pps.filterd (pp1.rice.edu [127.0.0.1]) by pp1.rice.edu (8.14.5/8.14.5) with SMTP id t31F703m010349; Wed, 1 Apr 2015 10:10:21 -0500 Received: from mh3.mail.rice.edu (mh3.mail.rice.edu [128.42.199.10]) by pp1.rice.edu with ESMTP id 1tf8ay9jv6-1; Wed, 01 Apr 2015 10:10:20 -0500 X-Virus-Scanned: by amavis-2.7.0 at mh3.mail.rice.edu, auth channel Received: from 108-254-203-201.lightspeed.hstntx.sbcglobal.net (108-254-203-201.lightspeed.hstntx.sbcglobal.net [108.254.203.201]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) (Authenticated sender: alc) by mh3.mail.rice.edu (Postfix) with ESMTPSA id 01FAE4013D; Wed, 1 Apr 2015 10:10:19 -0500 (CDT) Message-ID: <551C0A5B.9060409@rice.edu> Date: Wed, 01 Apr 2015 10:10:19 -0500 From: Alan Cox User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Ryan Stone , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r280957 - in head/sys: amd64/amd64 i386/i386 kern mips/mips powerpc/aim sparc64/sparc64 sys vm References: <201504011242.t31CgRX5061551@svn.freebsd.org> In-Reply-To: <201504011242.t31CgRX5061551@svn.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=10 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1402240000 definitions=main-1504010132 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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 Apr 2015 15:10:29 -0000 On 04/01/2015 07:42, Ryan Stone wrote: > Author: rstone > Date: Wed Apr 1 12:42:26 2015 > New Revision: 280957 > URL: https://svnweb.freebsd.org/changeset/base/280957 > > Log: > Fix integer truncation bug in malloc(9) > > A couple of internal functions used by malloc(9) and uma truncated > a size_t down to an int. This could cause any number of issues > (e.g. indefinite sleeps, memory corruption) if any kernel > subsystem tried to allocate 2GB or more through malloc. zfs would > attempt such an allocation when run on a system with 2TB or more > of RAM. > > Note to self: When this is MFCed, sparc64 needs the same fix. > I suspect that you mean ia64 here, not sparc64. Yes? > Differential revision: https://reviews.freebsd.org/D2106 > Reviewed by: kib > Reported by: Michael Fuckner > Tested by: Michael Fuckner > MFC after: 2 weeks > > Modified: > head/sys/amd64/amd64/uma_machdep.c > head/sys/i386/i386/pmap.c > head/sys/kern/kern_mbuf.c > head/sys/kern/subr_busdma_bufalloc.c > head/sys/kern/subr_vmem.c > head/sys/mips/mips/uma_machdep.c > head/sys/powerpc/aim/mmu_oea64.c > head/sys/powerpc/aim/slb.c > head/sys/powerpc/aim/uma_machdep.c > head/sys/sparc64/sparc64/vm_machdep.c > head/sys/sys/busdma_bufalloc.h > head/sys/vm/uma.h > head/sys/vm/uma_core.c > head/sys/vm/uma_int.h > > Modified: head/sys/amd64/amd64/uma_machdep.c > ============================================================================== > --- head/sys/amd64/amd64/uma_machdep.c Wed Apr 1 12:16:56 2015 (r280956) > +++ head/sys/amd64/amd64/uma_machdep.c Wed Apr 1 12:42:26 2015 (r280957) > @@ -41,7 +41,7 @@ __FBSDID("$FreeBSD$"); > #include > > void * > -uma_small_alloc(uma_zone_t zone, int bytes, u_int8_t *flags, int wait) > +uma_small_alloc(uma_zone_t zone, vm_size_t bytes, u_int8_t *flags, int wait) > { > vm_page_t m; > vm_paddr_t pa; > @@ -70,7 +70,7 @@ uma_small_alloc(uma_zone_t zone, int byt > } > > void > -uma_small_free(void *mem, int size, u_int8_t flags) > +uma_small_free(void *mem, vm_size_t size, u_int8_t flags) > { > vm_page_t m; > vm_paddr_t pa; > > Modified: head/sys/i386/i386/pmap.c > ============================================================================== > --- head/sys/i386/i386/pmap.c Wed Apr 1 12:16:56 2015 (r280956) > +++ head/sys/i386/i386/pmap.c Wed Apr 1 12:42:26 2015 (r280957) > @@ -340,7 +340,8 @@ static pt_entry_t *pmap_pte_quick(pmap_t > static void pmap_pte_release(pt_entry_t *pte); > static int pmap_unuse_pt(pmap_t, vm_offset_t, struct spglist *); > #ifdef PAE > -static void *pmap_pdpt_allocf(uma_zone_t zone, int bytes, u_int8_t *flags, int wait); > +static void *pmap_pdpt_allocf(uma_zone_t zone, vm_size_t bytes, uint8_t *flags, > + int wait); > #endif > static void pmap_set_pg(void); > > @@ -658,7 +659,7 @@ pmap_page_init(vm_page_t m) > > #ifdef PAE > static void * > -pmap_pdpt_allocf(uma_zone_t zone, int bytes, u_int8_t *flags, int wait) > +pmap_pdpt_allocf(uma_zone_t zone, vm_size_t bytes, uint8_t *flags, int wait) > { > > /* Inform UMA that this allocator uses kernel_map/object. */ > > Modified: head/sys/kern/kern_mbuf.c > ============================================================================== > --- head/sys/kern/kern_mbuf.c Wed Apr 1 12:16:56 2015 (r280956) > +++ head/sys/kern/kern_mbuf.c Wed Apr 1 12:42:26 2015 (r280957) > @@ -284,7 +284,7 @@ static int mb_zinit_pack(void *, int, in > static void mb_zfini_pack(void *, int); > > static void mb_reclaim(void *); > -static void *mbuf_jumbo_alloc(uma_zone_t, int, uint8_t *, int); > +static void *mbuf_jumbo_alloc(uma_zone_t, vm_size_t, uint8_t *, int); > > /* Ensure that MSIZE is a power of 2. */ > CTASSERT((((MSIZE - 1) ^ MSIZE) + 1) >> 1 == MSIZE); > @@ -389,7 +389,7 @@ SYSINIT(mbuf, SI_SUB_MBUF, SI_ORDER_FIRS > * pages. > */ > static void * > -mbuf_jumbo_alloc(uma_zone_t zone, int bytes, uint8_t *flags, int wait) > +mbuf_jumbo_alloc(uma_zone_t zone, vm_size_t bytes, uint8_t *flags, int wait) > { > > /* Inform UMA that this allocator uses kernel_map/object. */ > > Modified: head/sys/kern/subr_busdma_bufalloc.c > ============================================================================== > --- head/sys/kern/subr_busdma_bufalloc.c Wed Apr 1 12:16:56 2015 (r280956) > +++ head/sys/kern/subr_busdma_bufalloc.c Wed Apr 1 12:42:26 2015 (r280957) > @@ -147,8 +147,8 @@ busdma_bufalloc_findzone(busdma_bufalloc > } > > void * > -busdma_bufalloc_alloc_uncacheable(uma_zone_t zone, int size, u_int8_t *pflag, > - int wait) > +busdma_bufalloc_alloc_uncacheable(uma_zone_t zone, vm_size_t size, > + uint8_t *pflag, int wait) > { > #ifdef VM_MEMATTR_UNCACHEABLE > > @@ -166,7 +166,7 @@ busdma_bufalloc_alloc_uncacheable(uma_zo > } > > void > -busdma_bufalloc_free_uncacheable(void *item, int size, u_int8_t pflag) > +busdma_bufalloc_free_uncacheable(void *item, vm_size_t size, uint8_t pflag) > { > > kmem_free(kernel_arena, (vm_offset_t)item, size); > > Modified: head/sys/kern/subr_vmem.c > ============================================================================== > --- head/sys/kern/subr_vmem.c Wed Apr 1 12:16:56 2015 (r280956) > +++ head/sys/kern/subr_vmem.c Wed Apr 1 12:42:26 2015 (r280957) > @@ -609,7 +609,7 @@ static struct mtx_padalign vmem_bt_lock; > * we are really out of KVA. > */ > static void * > -vmem_bt_alloc(uma_zone_t zone, int bytes, uint8_t *pflag, int wait) > +vmem_bt_alloc(uma_zone_t zone, vm_size_t bytes, uint8_t *pflag, int wait) > { > vmem_addr_t addr; > > > Modified: head/sys/mips/mips/uma_machdep.c > ============================================================================== > --- head/sys/mips/mips/uma_machdep.c Wed Apr 1 12:16:56 2015 (r280956) > +++ head/sys/mips/mips/uma_machdep.c Wed Apr 1 12:42:26 2015 (r280957) > @@ -41,7 +41,7 @@ __FBSDID("$FreeBSD$"); > #include > > void * > -uma_small_alloc(uma_zone_t zone, int bytes, u_int8_t *flags, int wait) > +uma_small_alloc(uma_zone_t zone, vm_size_t bytes, u_int8_t *flags, int wait) > { > vm_paddr_t pa; > vm_page_t m; > @@ -70,7 +70,7 @@ uma_small_alloc(uma_zone_t zone, int byt > } > > void > -uma_small_free(void *mem, int size, u_int8_t flags) > +uma_small_free(void *mem, vm_size_t size, u_int8_t flags) > { > vm_page_t m; > vm_paddr_t pa; > > Modified: head/sys/powerpc/aim/mmu_oea64.c > ============================================================================== > --- head/sys/powerpc/aim/mmu_oea64.c Wed Apr 1 12:16:56 2015 (r280956) > +++ head/sys/powerpc/aim/mmu_oea64.c Wed Apr 1 12:42:26 2015 (r280957) > @@ -1437,7 +1437,8 @@ retry: > static mmu_t installed_mmu; > > static void * > -moea64_uma_page_alloc(uma_zone_t zone, int bytes, u_int8_t *flags, int wait) > +moea64_uma_page_alloc(uma_zone_t zone, vm_size_t bytes, uint8_t *flags, > + int wait) > { > struct pvo_entry *pvo; > vm_offset_t va; > > Modified: head/sys/powerpc/aim/slb.c > ============================================================================== > --- head/sys/powerpc/aim/slb.c Wed Apr 1 12:16:56 2015 (r280956) > +++ head/sys/powerpc/aim/slb.c Wed Apr 1 12:42:26 2015 (r280957) > @@ -473,7 +473,7 @@ slb_insert_user(pmap_t pm, struct slb *s > } > > static void * > -slb_uma_real_alloc(uma_zone_t zone, int bytes, u_int8_t *flags, int wait) > +slb_uma_real_alloc(uma_zone_t zone, vm_size_t bytes, u_int8_t *flags, int wait) > { > static vm_offset_t realmax = 0; > void *va; > > Modified: head/sys/powerpc/aim/uma_machdep.c > ============================================================================== > --- head/sys/powerpc/aim/uma_machdep.c Wed Apr 1 12:16:56 2015 (r280956) > +++ head/sys/powerpc/aim/uma_machdep.c Wed Apr 1 12:42:26 2015 (r280957) > @@ -50,7 +50,7 @@ SYSCTL_INT(_hw, OID_AUTO, uma_mdpages, C > "UMA MD pages in use"); > > void * > -uma_small_alloc(uma_zone_t zone, int bytes, u_int8_t *flags, int wait) > +uma_small_alloc(uma_zone_t zone, vm_size_t bytes, u_int8_t *flags, int wait) > { > void *va; > vm_page_t m; > @@ -82,7 +82,7 @@ uma_small_alloc(uma_zone_t zone, int byt > } > > void > -uma_small_free(void *mem, int size, u_int8_t flags) > +uma_small_free(void *mem, vm_size_t size, u_int8_t flags) > { > vm_page_t m; > > > Modified: head/sys/sparc64/sparc64/vm_machdep.c > ============================================================================== > --- head/sys/sparc64/sparc64/vm_machdep.c Wed Apr 1 12:16:56 2015 (r280956) > +++ head/sys/sparc64/sparc64/vm_machdep.c Wed Apr 1 12:42:26 2015 (r280957) > @@ -396,7 +396,7 @@ swi_vm(void *v) > } > > void * > -uma_small_alloc(uma_zone_t zone, int bytes, u_int8_t *flags, int wait) > +uma_small_alloc(uma_zone_t zone, vm_size_t bytes, u_int8_t *flags, int wait) > { > vm_paddr_t pa; > vm_page_t m; > @@ -434,7 +434,7 @@ uma_small_alloc(uma_zone_t zone, int byt > } > > void > -uma_small_free(void *mem, int size, u_int8_t flags) > +uma_small_free(void *mem, vm_size_t size, u_int8_t flags) > { > vm_page_t m; > > > Modified: head/sys/sys/busdma_bufalloc.h > ============================================================================== > --- head/sys/sys/busdma_bufalloc.h Wed Apr 1 12:16:56 2015 (r280956) > +++ head/sys/sys/busdma_bufalloc.h Wed Apr 1 12:42:26 2015 (r280957) > @@ -110,9 +110,10 @@ struct busdma_bufzone * busdma_bufalloc_ > * routines support pmap_page_set_memattr() and the VM_MEMATTR_UNCACHEABLE flag > * you can probably use these when you need uncacheable buffers. > */ > -void * busdma_bufalloc_alloc_uncacheable(uma_zone_t zone, int size, > - u_int8_t *pflag, int wait); > -void busdma_bufalloc_free_uncacheable(void *item, int size, u_int8_t pflag); > +void * busdma_bufalloc_alloc_uncacheable(uma_zone_t zone, vm_size_t size, > + uint8_t *pflag, int wait); > +void busdma_bufalloc_free_uncacheable(void *item, vm_size_t size, > + uint8_t pflag); > > #endif /* _MACHINE_BUSDMA_BUFALLOC_H_ */ > > > Modified: head/sys/vm/uma.h > ============================================================================== > --- head/sys/vm/uma.h Wed Apr 1 12:16:56 2015 (r280956) > +++ head/sys/vm/uma.h Wed Apr 1 12:42:26 2015 (r280957) > @@ -382,7 +382,8 @@ uma_zfree(uma_zone_t zone, void *item) > * A pointer to the allocated memory or NULL on failure. > */ > > -typedef void *(*uma_alloc)(uma_zone_t zone, int size, uint8_t *pflag, int wait); > +typedef void *(*uma_alloc)(uma_zone_t zone, vm_size_t size, uint8_t *pflag, > + int wait); > > /* > * Backend page free routines > @@ -395,7 +396,7 @@ typedef void *(*uma_alloc)(uma_zone_t zo > * Returns: > * None > */ > -typedef void (*uma_free)(void *item, int size, uint8_t pflag); > +typedef void (*uma_free)(void *item, vm_size_t size, uint8_t pflag); > > > > > Modified: head/sys/vm/uma_core.c > ============================================================================== > --- head/sys/vm/uma_core.c Wed Apr 1 12:16:56 2015 (r280956) > +++ head/sys/vm/uma_core.c Wed Apr 1 12:42:26 2015 (r280957) > @@ -230,10 +230,10 @@ enum zfreeskip { SKIP_NONE = 0, SKIP_DTO > > /* Prototypes.. */ > > -static void *noobj_alloc(uma_zone_t, int, uint8_t *, int); > -static void *page_alloc(uma_zone_t, int, uint8_t *, int); > -static void *startup_alloc(uma_zone_t, int, uint8_t *, int); > -static void page_free(void *, int, uint8_t); > +static void *noobj_alloc(uma_zone_t, vm_size_t, uint8_t *, int); > +static void *page_alloc(uma_zone_t, vm_size_t, uint8_t *, int); > +static void *startup_alloc(uma_zone_t, vm_size_t, uint8_t *, int); > +static void page_free(void *, vm_size_t, uint8_t); > static uma_slab_t keg_alloc_slab(uma_keg_t, uma_zone_t, int); > static void cache_drain(uma_zone_t); > static void bucket_drain(uma_zone_t, uma_bucket_t); > @@ -1038,7 +1038,7 @@ out: > * the VM is ready. > */ > static void * > -startup_alloc(uma_zone_t zone, int bytes, uint8_t *pflag, int wait) > +startup_alloc(uma_zone_t zone, vm_size_t bytes, uint8_t *pflag, int wait) > { > uma_keg_t keg; > uma_slab_t tmps; > @@ -1098,7 +1098,7 @@ startup_alloc(uma_zone_t zone, int bytes > * NULL if M_NOWAIT is set. > */ > static void * > -page_alloc(uma_zone_t zone, int bytes, uint8_t *pflag, int wait) > +page_alloc(uma_zone_t zone, vm_size_t bytes, uint8_t *pflag, int wait) > { > void *p; /* Returned page */ > > @@ -1120,7 +1120,7 @@ page_alloc(uma_zone_t zone, int bytes, u > * NULL if M_NOWAIT is set. > */ > static void * > -noobj_alloc(uma_zone_t zone, int bytes, uint8_t *flags, int wait) > +noobj_alloc(uma_zone_t zone, vm_size_t bytes, uint8_t *flags, int wait) > { > TAILQ_HEAD(, vm_page) alloctail; > u_long npages; > @@ -1183,7 +1183,7 @@ noobj_alloc(uma_zone_t zone, int bytes, > * Nothing > */ > static void > -page_free(void *mem, int size, uint8_t flags) > +page_free(void *mem, vm_size_t size, uint8_t flags) > { > struct vmem *vmem; > > @@ -3266,7 +3266,7 @@ uma_zone_exhausted_nolock(uma_zone_t zon > } > > void * > -uma_large_malloc(int size, int wait) > +uma_large_malloc(vm_size_t size, int wait) > { > void *mem; > uma_slab_t slab; > > Modified: head/sys/vm/uma_int.h > ============================================================================== > --- head/sys/vm/uma_int.h Wed Apr 1 12:16:56 2015 (r280956) > +++ head/sys/vm/uma_int.h Wed Apr 1 12:42:26 2015 (r280957) > @@ -341,7 +341,7 @@ zone_first_keg(uma_zone_t zone) > #ifdef _KERNEL > /* Internal prototypes */ > static __inline uma_slab_t hash_sfind(struct uma_hash *hash, uint8_t *data); > -void *uma_large_malloc(int size, int wait); > +void *uma_large_malloc(vm_size_t size, int wait); > void uma_large_free(uma_slab_t slab); > > /* Lock Macros */ > @@ -424,8 +424,9 @@ vsetslab(vm_offset_t va, uma_slab_t slab > * if they can provide more effecient allocation functions. This is useful > * for using direct mapped addresses. > */ > -void *uma_small_alloc(uma_zone_t zone, int bytes, uint8_t *pflag, int wait); > -void uma_small_free(void *mem, int size, uint8_t flags); > +void *uma_small_alloc(uma_zone_t zone, vm_size_t bytes, uint8_t *pflag, > + int wait); > +void uma_small_free(void *mem, vm_size_t size, uint8_t flags); > #endif /* _KERNEL */ > > #endif /* VM_UMA_INT_H */ > > From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 15:11:25 2015 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 DE23DFC8; Wed, 1 Apr 2015 15:11:25 +0000 (UTC) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps1.elischer.org", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id AD2BCAEB; Wed, 1 Apr 2015 15:11:25 +0000 (UTC) Received: from Julian-MBP3.local (ppp121-45-255-201.lns20.per4.internode.on.net [121.45.255.201]) (authenticated bits=0) by vps1.elischer.org (8.14.9/8.14.9) with ESMTP id t31FBKsf025573 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Wed, 1 Apr 2015 08:11:23 -0700 (PDT) (envelope-from julian@freebsd.org) Message-ID: <551C0A92.8070507@freebsd.org> Date: Wed, 01 Apr 2015 23:11:14 +0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Ian Lepore , Mateusz Guzik Subject: Re: svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom References: <20150401113628.GA16649@dft-labs.eu> <20150401114313.GZ64665@FreeBSD.org> <20150401115204.GB16649@dft-labs.eu> <1427897897.82583.62.camel@freebsd.org> In-Reply-To: <1427897897.82583.62.camel@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, 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 Apr 2015 15:11:26 -0000 On 4/1/15 10:18 PM, Ian Lepore wrote: > On Wed, 2015-04-01 at 13:52 +0200, Mateusz Guzik wrote: >> As a side note I'm surprised with the choice of 7. >> >> I would expect 3, no more, no less. 3 would be the number returned, >> and the number readers receive would be 3. > 5 would be right out. there is prior art for 7... I remember seeing it once.. 7, 7, 7, 7, 7 ... that's the trouble with randomness, you can't really tell.. I remember a part of a paper on the topic by Adams S, et al. I think it was towards the end of the paper. > > -- Ian > > > > > From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 15:13:57 2015 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 9F16B1C1; Wed, 1 Apr 2015 15:13:57 +0000 (UTC) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps1.elischer.org", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 6C8C5BDE; Wed, 1 Apr 2015 15:13:57 +0000 (UTC) Received: from Julian-MBP3.local (ppp121-45-255-201.lns20.per4.internode.on.net [121.45.255.201]) (authenticated bits=0) by vps1.elischer.org (8.14.9/8.14.9) with ESMTP id t31FDpAN025583 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Wed, 1 Apr 2015 08:13:54 -0700 (PDT) (envelope-from julian@freebsd.org) Message-ID: <551C0B2A.9060006@freebsd.org> Date: Wed, 01 Apr 2015 23:13:46 +0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Ian Lepore , Mateusz Guzik Subject: Re: svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom References: <20150401113628.GA16649@dft-labs.eu> <20150401114313.GZ64665@FreeBSD.org> <20150401115204.GB16649@dft-labs.eu> <1427897897.82583.62.camel@freebsd.org> <551C0A92.8070507@freebsd.org> In-Reply-To: <551C0A92.8070507@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, 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 Apr 2015 15:13:57 -0000 On 4/1/15 11:11 PM, Julian Elischer wrote: > On 4/1/15 10:18 PM, Ian Lepore wrote: >> On Wed, 2015-04-01 at 13:52 +0200, Mateusz Guzik wrote: >>> As a side note I'm surprised with the choice of 7. >>> >>> I would expect 3, no more, no less. 3 would be the number returned, >>> and the number readers receive would be 3. >> 5 would be right out. > > there is prior art for 7... I remember seeing it once.. 7, 7, 7, 7, > 7 ... > that's the trouble with randomness, you can't really tell.. > I remember a part of a paper on the topic by Adams S, et al. > I think it was towards the end of the paper. I stand corrected... the number selected in the paper was 9 > > >> >> -- Ian >> >> >> >> >> > > > > From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 15:34:04 2015 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 E96FD6E2; Wed, 1 Apr 2015 15:34:04 +0000 (UTC) Received: from gromit.grondar.org (grandfather.grondar.org [IPv6:2a01:348:0:15:5d59:5c20:0:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ABE77E11; Wed, 1 Apr 2015 15:34:04 +0000 (UTC) Received: from graveyard.grondar.org ([88.96.155.33] helo=gronkulator.grondar.org) by gromit.grondar.org with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.85 (FreeBSD)) (envelope-from ) id 1YdKeX-000Boq-75; Wed, 01 Apr 2015 16:34:01 +0100 Subject: Re: svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2096\)) Content-Type: text/plain; charset=windows-1252 From: Mark R V Murray In-Reply-To: <551C0B2A.9060006@freebsd.org> Date: Wed, 1 Apr 2015 16:33:55 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <5A609CED-56E6-4459-8505-58930048AA0D@grondar.org> References: <20150401113628.GA16649@dft-labs.eu> <20150401114313.GZ64665@FreeBSD.org> <20150401115204.GB16649@dft-labs.eu> <1427897897.82583.62.camel@freebsd.org> <551C0A92.8070507@freebsd.org> <551C0B2A.9060006@freebsd.org> To: Julian Elischer X-Mailer: Apple Mail (2.2096) X-SA-Score: -4.0 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Mateusz Guzik , src-committers@freebsd.org, Ian Lepore X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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 Apr 2015 15:34:05 -0000 > On 1 Apr 2015, at 16:13, Julian Elischer wrote: >=20 > On 4/1/15 11:11 PM, Julian Elischer wrote: >> On 4/1/15 10:18 PM, Ian Lepore wrote: >>> On Wed, 2015-04-01 at 13:52 +0200, Mateusz Guzik wrote: >>>> As a side note I'm surprised with the choice of 7. >>>>=20 >>>> I would expect 3, no more, no less. 3 would be the number returned, >>>> and the number readers receive would be 3. >>> 5 would be right out. >>=20 >> there is prior art for 7... I remember seeing it once.. 7, 7, 7, 7, = 7 ... >> that's the trouble with randomness, you can't really tell.. >> I remember a part of a paper on the topic by Adams S, et al. >> I think it was towards the end of the paper. >=20 > I stand corrected... the number selected in the paper was 9 Well spotted! Before someone makes a terrible mistake, I should point out that 4 is = confirmed random, as cited here: https://xkcd.com/221/ M --=20 Mark R V Murray From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 15:35:14 2015 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 55C18962; Wed, 1 Apr 2015 15:35:14 +0000 (UTC) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "troutmask", Issuer "troutmask" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 2EDCBE2B; Wed, 1 Apr 2015 15:35:14 +0000 (UTC) Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) by troutmask.apl.washington.edu (8.14.9/8.14.9) with ESMTP id t31FBI78016238 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 1 Apr 2015 08:11:18 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.9/8.14.9/Submit) id t31FBIqG016237; Wed, 1 Apr 2015 08:11:18 -0700 (PDT) (envelope-from sgk) Date: Wed, 1 Apr 2015 08:11:18 -0700 From: Steve Kargl To: Mateusz Guzik Subject: Re: svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom Message-ID: <20150401151118.GA16151@troutmask.apl.washington.edu> References: <20150401113628.GA16649@dft-labs.eu> <20150401114313.GZ64665@FreeBSD.org> <20150401115204.GB16649@dft-labs.eu> <20150401115729.GA64665@FreeBSD.org> <20150401120229.GA2201@dft-labs.eu> <20150401121344.GC64665@FreeBSD.org> <20150401122916.GA10926@dft-labs.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150401122916.GA10926@dft-labs.eu> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Gleb Smirnoff , 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 Apr 2015 15:35:14 -0000 On Wed, Apr 01, 2015 at 02:29:16PM +0200, Mateusz Guzik wrote: > > > Mateusz, if you keep the momentum, in the next years we will see lots > > of files with your copyright. :) There is no reason to create one > > just for this. Also, you can legitimately add your name into header of > > null.c if you move code of notrandom there. > > > > Yeah, but that's not the same as having my own file, even if I > copy-pasted most of it. :( > > I understand you have concerns, but can we please leave this over the > weekend? I'll be happy and maybe it will grow on you in the meantime. > > I must say this funcionality is so awesome it deserves a separate file > regardless of who gets the copyright. > Please remove this file. If you copied greater than 50% of the code from dev/null/null.c, I do not see how you can remove the names of those individuals listed in null.c. It appears you are claiming Copyright over others' work. -- Steve From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 15:36:29 2015 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 490BFACD; Wed, 1 Apr 2015 15:36:29 +0000 (UTC) Received: from mail-wi0-x230.google.com (mail-wi0-x230.google.com [IPv6:2a00:1450:400c:c05::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CB160E3E; Wed, 1 Apr 2015 15:36:28 +0000 (UTC) Received: by wibgn9 with SMTP id gn9so71567108wib.1; Wed, 01 Apr 2015 08:36:26 -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=bdaQam3wSyo1ISKBd/Uzmp2qepscw3bYWDwEBknF+tE=; b=Nhk/cQGwnCXUFMkedFtVEbPry+B99mhTaWBNEZ2kLhZwCdGd7JPFu0D0fkWwEUbd9w ICa5R83bMATknAWXk/kQPHMZaTCYIiunYc0KcWEQYkqqltfcff4pbog5Ot3c346M6Z4X uuoDEbQ5uuAt8bRqq3c+o2OciAg0gTo+WaLBcnKAi78uhHQw9c5WZM8cfyAbfLj1DVxV nalAPCdM/7JxHh0rYM7AsGvr8+A8MhcfPDbP2ssQG43djdT/dKiPpJGPVWSEJ8Xoex1g JUNq7jmFPjsOimpx4eBhmiqvnMR8DxJNLQiJ1gKRtmL67uff1HNZr7J8jx5ons/SC5kN q5/Q== MIME-Version: 1.0 X-Received: by 10.194.11.9 with SMTP id m9mr83573008wjb.82.1427902586574; Wed, 01 Apr 2015 08:36:26 -0700 (PDT) Received: by 10.27.77.215 with HTTP; Wed, 1 Apr 2015 08:36:26 -0700 (PDT) In-Reply-To: <5A609CED-56E6-4459-8505-58930048AA0D@grondar.org> References: <20150401113628.GA16649@dft-labs.eu> <20150401114313.GZ64665@FreeBSD.org> <20150401115204.GB16649@dft-labs.eu> <1427897897.82583.62.camel@freebsd.org> <551C0A92.8070507@freebsd.org> <551C0B2A.9060006@freebsd.org> <5A609CED-56E6-4459-8505-58930048AA0D@grondar.org> Date: Wed, 1 Apr 2015 11:36:26 -0400 Message-ID: Subject: Re: svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom From: Benjamin Kaduk To: Mark R V Murray 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" , Mateusz Guzik , "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 Apr 2015 15:36:29 -0000 On Wed, Apr 1, 2015 at 11:33 AM, Mark R V Murray wrote: > > > Before someone makes a terrible mistake, I should point out that 4 is > confirmed random, as cited here: https://xkcd.com/221/ But surely to be non-random we need an equal number of 1 and 0 bits, making 15 the clear choice. -Ben From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 15:46:38 2015 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 E8969D9B; Wed, 1 Apr 2015 15:46:38 +0000 (UTC) Received: from mail-wi0-x234.google.com (mail-wi0-x234.google.com [IPv6:2a00:1450:400c:c05::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 710C3F6F; Wed, 1 Apr 2015 15:46:38 +0000 (UTC) Received: by wixo5 with SMTP id o5so32497793wix.1; Wed, 01 Apr 2015 08:46:36 -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=HSb6w2E2FyJuAEGWyD/KHxv3YWPult9t0buNjpAQ2so=; b=FhQw4XLf6doY5TidHXeAObOSp5zTAr+wXAfqjbB1FI044+yyRnF9nggmeGWScNmLZk kwrCQbTJkOi/3ATpnuprlQDlgsd6/6JSe+3rgMthP9ZtkxAy9aOtYjo56izyuAsfZAnJ mmbD1a5pAi7cEZUv8CAB0J6Zagl73OxRD2iJT+wOk3wy59NXf5UT9pqyCOjJz5Q2Zu+H JD8YpC9ap0LkmteHWB9rLQo6U3amVQNFWxOIIyihUw+/pPxROKxTZ5i4QLsQ1O/hOLHN VcXttm0Vv2XDzJAVTs+2RdyMgP1V9fyKkRBFBkkl8DWowhMKf0Ukba01wzQF2Otrb5lU jWzg== X-Received: by 10.180.80.164 with SMTP id s4mr15900754wix.78.1427903196900; Wed, 01 Apr 2015 08:46:36 -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 w3sm26021205wiz.5.2015.04.01.08.46.35 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 01 Apr 2015 08:46:35 -0700 (PDT) Date: Wed, 1 Apr 2015 17:46:33 +0200 From: Mateusz Guzik To: Benjamin Kaduk Subject: Re: svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom Message-ID: <20150401154633.GA14631@dft-labs.eu> References: <20150401113628.GA16649@dft-labs.eu> <20150401114313.GZ64665@FreeBSD.org> <20150401115204.GB16649@dft-labs.eu> <1427897897.82583.62.camel@freebsd.org> <551C0A92.8070507@freebsd.org> <551C0B2A.9060006@freebsd.org> <5A609CED-56E6-4459-8505-58930048AA0D@grondar.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Mark R V Murray X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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 Apr 2015 15:46:39 -0000 On Wed, Apr 01, 2015 at 11:36:26AM -0400, Benjamin Kaduk wrote: > On Wed, Apr 1, 2015 at 11:33 AM, Mark R V Murray wrote: > > > > > > > Before someone makes a terrible mistake, I should point out that 4 is > > confirmed random, as cited here: https://xkcd.com/221/ > > > But surely to be non-random we need an equal number of 1 and 0 bits, making > 15 the clear choice. > I don't know man. First off, '7' could not be chosen at random. I'm convinced factors like amount of CPUs (and their speed), RAM etc. played a huge factor here. Now that everything is faster these days, one could ponder returning '8'. We can add an ioctl to control this. Opinions? -- Mateusz Guzik From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 15:51:18 2015 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 327A7FE0; Wed, 1 Apr 2015 15:51:18 +0000 (UTC) Received: from gromit.grondar.org (grandfather.grondar.org [IPv6:2a01:348:0:15:5d59:5c20:0:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E5CEB89; Wed, 1 Apr 2015 15:51:17 +0000 (UTC) Received: from graveyard.grondar.org ([88.96.155.33] helo=gronkulator.grondar.org) by gromit.grondar.org with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.85 (FreeBSD)) (envelope-from ) id 1YdKvE-000Bpu-6i; Wed, 01 Apr 2015 16:51:16 +0100 Subject: Re: svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2096\)) Content-Type: text/plain; charset=utf-8 From: Mark R V Murray In-Reply-To: <20150401154633.GA14631@dft-labs.eu> Date: Wed, 1 Apr 2015 16:51:10 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <22C101FB-6F00-468C-8681-27EB54E4049A@grondar.org> References: <20150401113628.GA16649@dft-labs.eu> <20150401114313.GZ64665@FreeBSD.org> <20150401115204.GB16649@dft-labs.eu> <1427897897.82583.62.camel@freebsd.org> <551C0A92.8070507@freebsd.org> <551C0B2A.9060006@freebsd.org> <5A609CED-56E6-4459-8505-58930048AA0D@grondar.org> <20150401154633.GA14631@dft-labs.eu> To: Mateusz Guzik X-Mailer: Apple Mail (2.2096) X-SA-Score: -4.0 Cc: Benjamin Kaduk , "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 Apr 2015 15:51:18 -0000 > On 1 Apr 2015, at 16:46, Mateusz Guzik wrote: > We can add an ioctl to control this. Thats a bad idea, because some fool may set up their local instance to = return a random number (like 4), and that will badly break the intent of = this device. And before somebody says =E2=80=9Ctools, not policy=E2=80=9D, there is = SOME level of protection that you must allow for to prevent completely = idiotic admins to foul things up! > Opinions? =E2=80=9CPah!=E2=80=9D? M --=20 Mark R V Murray From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 16:18:00 2015 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 071DDA10; Wed, 1 Apr 2015 16:18: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 CB8FB35B; Wed, 1 Apr 2015 16:17: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 t31GHxv7062080; Wed, 1 Apr 2015 16:17:59 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t31GHxNX062079; Wed, 1 Apr 2015 16:17:59 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201504011617.t31GHxNX062079@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 Apr 2015 16:17: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: r280958 - 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: Wed, 01 Apr 2015 16:18:00 -0000 Author: pfg Date: Wed Apr 1 16:17:58 2015 New Revision: 280958 URL: https://svnweb.freebsd.org/changeset/base/280958 Log: Revert r280449; Permit multiple arguments for the nonnull attribute. For the benefit of anyone that may be struggling to port FreeBSD to gcc 2.8 (or older) avoid using variadic macros. MFC r280700 (partial); Bring new attribute: __result_use_check Causes a warning to be emitted if a caller of the function with this attribute does not use its return value. This is known in gcc as "warn_unused_result" but we considered the original naming unsuitable for an attribute. Modified: stable/10/sys/sys/cdefs.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/sys/cdefs.h ============================================================================== --- stable/10/sys/sys/cdefs.h Wed Apr 1 12:42:26 2015 (r280957) +++ stable/10/sys/sys/cdefs.h Wed Apr 1 16:17:58 2015 (r280958) @@ -40,6 +40,9 @@ * Testing against Clang-specific extensions. */ +#ifndef __has_attribute +#define __has_attribute(x) 0 +#endif #ifndef __has_extension #define __has_extension __has_feature #endif @@ -240,7 +243,7 @@ #define __aligned(x) __attribute__((__aligned__(x))) #define __section(x) __attribute__((__section__(x))) #endif -#endif +#endif /* lint */ #if !__GNUC_PREREQ__(2, 95) #define __alignof(x) __offsetof(struct { char __a; x __b; }, __b) @@ -347,15 +350,17 @@ #endif #if __GNUC_PREREQ__(3, 3) -#define __nonnull(...) __attribute__((__nonnull__(__VA_ARGS__))) +#define __nonnull(x) __attribute__((__nonnull__(x))) #else -#define __nonnull(...) +#define __nonnull(x) #endif #if __GNUC_PREREQ__(3, 4) #define __fastcall __attribute__((__fastcall__)) +#define __result_use_check __attribute__((__warn_unused_result__)) #else #define __fastcall +#define __result_use_check #endif #if __GNUC_PREREQ__(4, 1) From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 16:24:24 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id B8C90C0D; Wed, 1 Apr 2015 16:24:24 +0000 (UTC) Date: Wed, 1 Apr 2015 16:24:24 +0000 From: Alexey Dokuchaev To: Mateusz Guzik Subject: Re: svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom Message-ID: <20150401162424.GB85612@FreeBSD.org> References: <20150401113628.GA16649@dft-labs.eu> <20150401114313.GZ64665@FreeBSD.org> <20150401115204.GB16649@dft-labs.eu> <1427897897.82583.62.camel@freebsd.org> <551C0A92.8070507@freebsd.org> <551C0B2A.9060006@freebsd.org> <5A609CED-56E6-4459-8505-58930048AA0D@grondar.org> <20150401154633.GA14631@dft-labs.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150401154633.GA14631@dft-labs.eu> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: Benjamin Kaduk , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Mark R V Murray X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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 Apr 2015 16:24:24 -0000 On Wed, Apr 01, 2015 at 05:46:33PM +0200, Mateusz Guzik wrote: > On Wed, Apr 01, 2015 at 11:36:26AM -0400, Benjamin Kaduk wrote: > > But surely to be non-random we need an equal number of 1 and 0 bits, > > making 15 the clear choice. > > I don't know man. I concur. Consider running FreeBSD to HP48; 15 would max out entire nibble, leading to predictability and risk of overflow attacks. > First off, '7' could not be chosen at random. I'm convinced factors like > amount of CPUs (and their speed), RAM etc. played a huge factor here. > > Now that everything is faster these days, one could ponder returning > '8'. OTOH, eight also fits two elementary units (trits) on trinary machines, which might allow for certain micro-optimizations when you need strong flow of non- random numbers. > We can add an ioctl to control this. > > Opinions? To stay portable, very likely, yes. ./danfe From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 16:25:56 2015 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 6170ED67 for ; Wed, 1 Apr 2015 16:25:56 +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 3E19E646 for ; Wed, 1 Apr 2015 16:25:56 +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 t31GPtk9038440 for ; Wed, 1 Apr 2015 16:25:55 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.9/8.14.9/Submit) id t31GPtfg038436 for svn-src-all@freebsd.org; Wed, 1 Apr 2015 16:25:55 GMT (envelope-from bdrewery) Received: (qmail 79402 invoked from network); 1 Apr 2015 11:25:54 -0500 Received: from unknown (HELO ?10.10.1.139?) (freebsd@shatow.net@10.10.1.139) by sweb.xzibition.com with ESMTPA; 1 Apr 2015 11:25:54 -0500 Message-ID: <551C1C21.50007@FreeBSD.org> Date: Wed, 01 Apr 2015 11:26:09 -0500 From: Bryan Drewery Organization: FreeBSD User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Mateusz Guzik , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom References: <20150401113628.GA16649@dft-labs.eu> In-Reply-To: <20150401113628.GA16649@dft-labs.eu> OpenPGP: id=6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="66wVfuWqW16mPUuUMWkbDfN2uFoQ7XbGn" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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 Apr 2015 16:25:56 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --66wVfuWqW16mPUuUMWkbDfN2uFoQ7XbGn Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 4/1/2015 6:36 AM, Mateusz Guzik wrote: > Author: mjg > Date: Wed Apr 1 13:37:00 2015 > New Revision: 280955 > URL: https://svnweb.freebsd.org/changeset/base/280955 >=20 > Log: > Add /dev/notrandom >=20 > notrandom provides fast and reliable not random numbers. >=20 This is a nice tradeoff. No longer do I have to decide if I want to use /dev/zero or slower /dev/random. --=20 Regards, Bryan Drewery --66wVfuWqW16mPUuUMWkbDfN2uFoQ7XbGn 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 iQEcBAEBAgAGBQJVHBwhAAoJEDXXcbtuRpfPKZYIAI/fvX5h/qnPYjxPeprLYu0z XtHVDQd7Bi75Xffhpp+C8huEGmOR6SaPB2C8gdi7fPmD8Ya4oXjFn108ooFVwIZK O2c8NH7+e6VssgJ7MAW/FoeYVTw/Y1akIwjekJxGjD4HkC5ukM89+TqcT8o63IBs Ni6I6kmcisEd5FFf4gj+EBwl4C6DBayE4MnMDbummGIsbWTkNab5FADhf/NW43WN puTyivGhvMaSoxK92JsZvAsf4h/kOuBJyp+/2DKbp+0tql6CPWk7+WgNelBi03rR f0nGC8o/i6XfvFOFPINxjsW3I15GsVG+ylNUqc1KM2pAU4S2KPWFLu81/ii4N7w= =1U/F -----END PGP SIGNATURE----- --66wVfuWqW16mPUuUMWkbDfN2uFoQ7XbGn-- From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 16:40:37 2015 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 A4DE32CD; Wed, 1 Apr 2015 16:40:37 +0000 (UTC) Received: from relay.mailchannels.net (aso-006-i443.relay.mailchannels.net [23.91.64.124]) by mx1.freebsd.org (Postfix) with ESMTP id 6E0767FD; Wed, 1 Apr 2015 16:40:35 +0000 (UTC) X-Sender-Id: duocircle|x-authuser|hippie Received: from smtp4.ore.mailhop.org (ip-10-237-13-110.us-west-2.compute.internal [10.237.13.110]) by relay.mailchannels.net (Postfix) with ESMTPA id 1CD2E120DEB; Wed, 1 Apr 2015 15:24:50 +0000 (UTC) X-Sender-Id: duocircle|x-authuser|hippie Received: from smtp4.ore.mailhop.org (smtp4.ore.mailhop.org [10.21.145.197]) (using TLSv1 with cipher DHE-RSA-AES256-SHA) by 0.0.0.0:2500 (trex/5.4.8); Wed, 01 Apr 2015 15:24:50 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: duocircle|x-authuser|hippie X-MailChannels-Auth-Id: duocircle X-MC-Loop-Signature: 1427901890257:2173604502 X-MC-Ingress-Time: 1427901890257 Received: from c-73-34-117-227.hsd1.co.comcast.net ([73.34.117.227] helo=ilsoft.org) by smtp4.ore.mailhop.org with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.82) (envelope-from ) id 1YdKVb-0006wr-JK; Wed, 01 Apr 2015 15:24:47 +0000 Received: from revolution.hippie.lan (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t31FOhON061728; Wed, 1 Apr 2015 09:24:43 -0600 (MDT) (envelope-from ian@freebsd.org) X-Mail-Handler: DuoCircle Outbound SMTP X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@duocircle.com (see https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information for abuse reporting information) X-MHO-User: U2FsdGVkX19NhSSJQELWLrdV+aqXmRjF Message-ID: <1427901883.82583.72.camel@freebsd.org> Subject: Re: svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom From: Ian Lepore To: Julian Elischer Date: Wed, 01 Apr 2015 09:24:43 -0600 In-Reply-To: <551C0B2A.9060006@freebsd.org> References: <20150401113628.GA16649@dft-labs.eu> <20150401114313.GZ64665@FreeBSD.org> <20150401115204.GB16649@dft-labs.eu> <1427897897.82583.62.camel@freebsd.org> <551C0A92.8070507@freebsd.org> <551C0B2A.9060006@freebsd.org> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.12.10 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-AuthUser: hippie Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Mateusz Guzik , 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 Apr 2015 16:40:37 -0000 On Wed, 2015-04-01 at 23:13 +0800, Julian Elischer wrote: > On 4/1/15 11:11 PM, Julian Elischer wrote: > > On 4/1/15 10:18 PM, Ian Lepore wrote: > >> On Wed, 2015-04-01 at 13:52 +0200, Mateusz Guzik wrote: > >>> As a side note I'm surprised with the choice of 7. > >>> > >>> I would expect 3, no more, no less. 3 would be the number returned, > >>> and the number readers receive would be 3. > >> 5 would be right out. > > > > there is prior art for 7... I remember seeing it once.. 7, 7, 7, 7, > > 7 ... > > that's the trouble with randomness, you can't really tell.. > > I remember a part of a paper on the topic by Adams S, et al. > > I think it was towards the end of the paper. > > I stand corrected... the number selected in the paper was 9 > Odd, I though Lennon & Ono were the primary proponents of number 9, as detailed in their 1968 work on the subject. -- Ian From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 16:42:31 2015 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 2D3D6494; Wed, 1 Apr 2015 16:42:31 +0000 (UTC) Date: Wed, 1 Apr 2015 16:42:27 +0000 From: Glen Barber To: Mateusz Guzik Subject: Re: svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom Message-ID: <20150401164227.GB57086@hub.FreeBSD.org> References: <20150401113628.GA16649@dft-labs.eu> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="5/uDoXvLw7AC5HRs" Content-Disposition: inline In-Reply-To: <20150401113628.GA16649@dft-labs.eu> 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-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 Apr 2015 16:42:32 -0000 --5/uDoXvLw7AC5HRs Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Apr 01, 2015 at 01:36:28PM +0200, Mateusz Guzik wrote: > Author: mjg > Date: Wed Apr 1 13:37:00 2015 > New Revision: 280955 > URL: https://svnweb.freebsd.org/changeset/base/280955 >=20 > Log: > Add /dev/notrandom >=20 > notrandom provides fast and reliable not random numbers. >=20 > This was added in an effort to increase feature-compatiblity with > Solaris 10. >=20 > See http://www.brendangregg.com/Specials/notrandom.c for Solaris > implementation. >=20 > Reviewed-by: Bruce Schneier (ok, not really) > MFC after: 1 week >=20 > Added: > head/sys/modules/notrandom/Makefile > head/sys/dev/notrandom/notrandom.c >=20 Sigh. Yet another commit without a corresponding manual page. Please provide notrandom(4) before the MFC period. Glen --5/uDoXvLw7AC5HRs Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJVHB/sAAoJEAMUWKVHj+KTI9gP/3rBWLwNVvIgMAooGwmZgJug gH2+XpyZp3NHvxRUW1hltERcAuK/tUhF6Mz61vEn3bCxtej/axympVaoDyRyxkTJ fNvACP6JtU59h4QnJZSg8v0STnt6nHjo7B+y4BKzhCH7XEHe6Y9TmA7/B6HMBlZg FS2s32zByUl8lVCw/FJBfjI/Hymj4cqEvP+Lpt0bthpjC12OJfxKlwdTT2R4cyOF vTae/o5IMmhDkL1P1009eLJQ+OliDXrBgLBK2DfU7you+iUDxKhuAofgqfLng7nI /80+h3sRIB/Xd0kr88hZhcwCRQ9d4uEQuFMBZuaza4RiSBJjrjVb0kE0IUl4Locp g1fLW1rXFQ7VqobqerqGKMmIEP0rnUGZACyWvVMgreVIJt97agPvTK9daOwO4TXT YAdpbYYQBO9EADEhk6YIEM3tAPXwhfkeQDabaKcidXwXKOE78QqS+IRf6ocbscA/ Ldqj459wkQmqe3w5d+ntG4OrHfsbjYa6LFje5T7zghzR7EP9Uebn5V+wYfeDzA+F kxitM+Vklr9BOBA3Z4eSrTAS7fWJT0ae4yvzE+pildY7Bin9Zsphbwqo3nCc3BGf uLBzUy6fJg5erkxA9XYEKAZrt6SmiNNoYBFdfoWe/+6e3zSkgqyGrAISpPLMJ5jo 2B4GYWWhlsQM8QUNV7yr =1tuN -----END PGP SIGNATURE----- --5/uDoXvLw7AC5HRs-- From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 16:55:32 2015 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 746599D0; Wed, 1 Apr 2015 16:55: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 5F0929C7; Wed, 1 Apr 2015 16:55: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 t31GtWnd080775; Wed, 1 Apr 2015 16:55:32 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t31GtVZq080773; Wed, 1 Apr 2015 16:55:31 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201504011655.t31GtVZq080773@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 1 Apr 2015 16:55:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280959 - in head/lib/libc: include 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 Apr 2015 16:55:32 -0000 Author: kib Date: Wed Apr 1 16:55:30 2015 New Revision: 280959 URL: https://svnweb.freebsd.org/changeset/base/280959 Log: Correctly handle __fcntl_compat symbol for the !SYSCALL_COMPAT case. Both .weak and .alias assembler directives only work when assembling the file which defines the symbol. Reported and tested by: andrew Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/lib/libc/include/compat.h head/lib/libc/sys/fcntl.c Modified: head/lib/libc/include/compat.h ============================================================================== --- head/lib/libc/include/compat.h Wed Apr 1 16:17:58 2015 (r280958) +++ head/lib/libc/include/compat.h Wed Apr 1 16:55:30 2015 (r280959) @@ -44,5 +44,14 @@ __sym_compat(shmctl, freebsd7_shmctl, FB #undef __sym_compat +#define __weak_reference(sym,alias) \ + .weak alias;.equ alias,sym + +#ifndef SYSCALL_COMPAT +__weak_reference(__sys_fcntl,__fcntl_compat) +#endif + +#undef __weak_reference + #endif /* __LIBC_COMPAT_H__ */ Modified: head/lib/libc/sys/fcntl.c ============================================================================== --- head/lib/libc/sys/fcntl.c Wed Apr 1 16:17:58 2015 (r280958) +++ head/lib/libc/sys/fcntl.c Wed Apr 1 16:55:30 2015 (r280959) @@ -103,7 +103,4 @@ __fcntl_compat(int fd, int cmd, ...) return (__sys_fcntl(fd, cmd, arg)); } } -#else -__weak_reference(__sys_fcntl, __fcntl_compat); -__weak_reference(__sys_fcntl, __fcntl); #endif From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 17:19:57 2015 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 04EA4534; Wed, 1 Apr 2015 17:19: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 CA6D1C8D; Wed, 1 Apr 2015 17:19: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 t31HJusj091138; Wed, 1 Apr 2015 17:19:56 GMT (envelope-from erj@FreeBSD.org) Received: (from erj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t31HJugU091137; Wed, 1 Apr 2015 17:19:56 GMT (envelope-from erj@FreeBSD.org) Message-Id: <201504011719.t31HJugU091137@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: erj set sender to erj@FreeBSD.org using -f From: Eric Joyner Date: Wed, 1 Apr 2015 17:19:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280962 - 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: Wed, 01 Apr 2015 17:19:57 -0000 Author: erj Date: Wed Apr 1 17:19:55 2015 New Revision: 280962 URL: https://svnweb.freebsd.org/changeset/base/280962 Log: Make changes to busdma code in tx/rx path similar to the ones made in r257541. - bus_dmamap_create() does not take the BUS_DMA_NOWAIT flag - properly unload maps - do not assign NULL to dma map pointers Submitted by: Konstantin Belousov Approved by: jfv (mentor) MFC after: 1 week Modified: head/sys/dev/ixgbe/ix_txrx.c Modified: head/sys/dev/ixgbe/ix_txrx.c ============================================================================== --- head/sys/dev/ixgbe/ix_txrx.c Wed Apr 1 17:05:45 2015 (r280961) +++ head/sys/dev/ixgbe/ix_txrx.c Wed Apr 1 17:19:55 2015 (r280962) @@ -1049,7 +1049,6 @@ ixgbe_txeof(struct tx_ring *txr) buf->map); m_freem(buf->m_head); buf->m_head = NULL; - buf->map = NULL; } buf->eop = NULL; ++txr->tx_avail; @@ -1075,7 +1074,6 @@ ixgbe_txeof(struct tx_ring *txr) buf->map); m_freem(buf->m_head); buf->m_head = NULL; - buf->map = NULL; } ++txr->tx_avail; buf->eop = NULL; @@ -1319,6 +1317,7 @@ ixgbe_refresh_mbufs(struct rx_ring *rxr, */ if ((rxbuf->flags & IXGBE_RX_COPY) == 0) { /* Get the memory mapping */ + bus_dmamap_unload(rxr->ptag, rxbuf->pmap); error = bus_dmamap_load_mbuf_sg(rxr->ptag, rxbuf->pmap, mp, seg, &nsegs, BUS_DMA_NOWAIT); if (error != 0) { @@ -1395,8 +1394,7 @@ ixgbe_allocate_receive_buffers(struct rx for (i = 0; i < rxr->num_desc; i++, rxbuf++) { rxbuf = &rxr->rx_buffers[i]; - error = bus_dmamap_create(rxr->ptag, - BUS_DMA_NOWAIT, &rxbuf->pmap); + error = bus_dmamap_create(rxr->ptag, 0, &rxbuf->pmap); if (error) { device_printf(dev, "Unable to create RX dma map\n"); goto fail; @@ -1715,6 +1713,7 @@ ixgbe_rx_discard(struct rx_ring *rxr, in m_free(rbuf->buf); rbuf->buf = NULL; } + bus_dmamap_unload(rxr->ptag, rbuf->pmap); rbuf->flags = 0; From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 17:40:06 2015 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 8DD773CD; Wed, 1 Apr 2015 17:40:06 +0000 (UTC) Received: from mail-wi0-x233.google.com (mail-wi0-x233.google.com [IPv6:2a00:1450:400c:c05::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47570EF4; Wed, 1 Apr 2015 17:40:06 +0000 (UTC) Received: by wixo5 with SMTP id o5so34504708wix.1; Wed, 01 Apr 2015 10:40:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=L58POvHaDMfe58kX6F2tfYVn0xMf6/BL+tm5NiYbPec=; b=PGZjD4pTscHuLitmy6mj2C6QFrFrFUaRZFwtUjQJBQdw29Ui4RNuBniCGUe8X02apN Tz3V6zi4y0+YGePIanem5ZGWyQFffTPA+SNJmbd6xgVVPbpwUlg3+zLhlADx4/bqqORz pBZwlUkZXfQiSmek2EQ9x5LN+xEzzdjAk9eDzuGbO1bbpeb6ym9ZWmySQU4Rgbm4poTo 5Vb+roZLZ+TqkAN8jXEIRKId/q+phSct1lPbzqZ2iAhdRT2Pv8x98de0xMHZx5b1vxru BNYE2JPJ5ju2ovDhx6O7cVvs3OtshZB6tJPsNkbV31TT7nqCl3IBle6AwJkTnAc313p7 6Hqw== X-Received: by 10.180.219.102 with SMTP id pn6mr16810985wic.50.1427910004735; Wed, 01 Apr 2015 10:40:04 -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 gd6sm26396511wib.17.2015.04.01.10.40.03 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 01 Apr 2015 10:40:03 -0700 (PDT) Sender: Mateusz Guzik Date: Wed, 1 Apr 2015 19:40:01 +0200 From: Mateusz Guzik To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280866 - in head/sys: modules/notrandom dev/notrandom dev/null Message-ID: <20150401174000.GA2575@dft-labs.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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 Apr 2015 17:40:06 -0000 Author: mjg Date: Wed Apr 1 19:38:00 2015 New Revision: 280963 URL: https://svnweb.freebsd.org/changeset/base/280963 Log: Move /dev/notrandom implementation to /dev/null driver. Due to popular demand. While here tweak a comment justifying memset when unloading the module. MFC after: 1 week Modified: head/sys/dev/null/null.c Removed: head/sys/modules/notrandom/Makefile head/sys/dev/notrandom/notrandom.c Modified: head/sys/dev/null/null.c =================================================================== --- sys/dev/null/null.c (revision 280404) +++ sys/dev/null/null.c (working copy) @@ -1,9 +1,10 @@ /*- - * Copyright (c) 2000 Mark R. V. Murray & Jeroen C. van Gelderen - * Copyright (c) 2001-2004 Mark R. V. Murray - * Copyright (c) 2014 Eitan Adler + * Copyright (c) 2015 Mateusz Guzik * All rights reserved. * + * Some dudes which previously held the copyright: + * Marc V. R. Murray, Jeroen C. van Gelderen, Eytan Adrel + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -45,11 +46,14 @@ #include /* For use with destroy_dev(9). */ +static char notrandom_buf[1024]; static struct cdev *full_dev; +static struct cdev *notrandom_dev; static struct cdev *null_dev; static struct cdev *zero_dev; static d_write_t full_write; +static d_read_t notrandom_read; static d_write_t null_write; static d_ioctl_t null_ioctl; static d_ioctl_t zero_ioctl; @@ -63,6 +67,14 @@ .d_name = "full", }; +static struct cdevsw notrandom_cdevsw = { + .d_version = D_VERSION, + .d_read = notrandom_read, + .d_ioctl = zero_ioctl, + .d_name = "notrandom", + .d_flags = D_MMAP_ANON, +}; + static struct cdevsw null_cdevsw = { .d_version = D_VERSION, .d_read = (d_read_t *)nullop, @@ -92,6 +104,23 @@ /* ARGSUSED */ static int +notrandom_read(struct cdev *dev __unused, struct uio *uio, int flags __unused) +{ + ssize_t len; + int error = 0; + + while (uio->uio_resid > 0 && error == 0) { + len = uio->uio_resid; + if (len > sizeof(notrandom_buf)) + len = sizeof(notrandom_buf); + error = uiomove(notrandom_buf, len, uio); + } + + return (error); +} + +/* ARGSUSED */ +static int null_write(struct cdev *dev __unused, struct uio *uio, int flags __unused) { uio->uio_resid = 0; @@ -173,9 +202,14 @@ switch(type) { case MOD_LOAD: if (bootverbose) - printf("null: \n"); + printf("null: \n"); full_dev = make_dev_credf(MAKEDEV_ETERNAL_KLD, &full_cdevsw, 0, NULL, UID_ROOT, GID_WHEEL, 0666, "full"); + memset(notrandom_buf, 7, sizeof(notrandom_buf)); + notrandom_dev = make_dev_credf(MAKEDEV_ETERNAL_KLD, + ¬random_cdevsw, 0, NULL, UID_ROOT, GID_WHEEL, 0666, + "notrandom"); null_dev = make_dev_credf(MAKEDEV_ETERNAL_KLD, &null_cdevsw, 0, NULL, UID_ROOT, GID_WHEEL, 0666, "null"); zero_dev = make_dev_credf(MAKEDEV_ETERNAL_KLD, &zero_cdevsw, 0, @@ -185,6 +219,12 @@ case MOD_UNLOAD: destroy_dev(full_dev); destroy_dev(null_dev); + destroy_dev(notrandom_dev); + /* + * Thrash notrandom region so that the content cannot be + * retrieved. Better safe than sorry. + */ + memset(notrandom_buf, 123, sizeof(notrandom_buf)); destroy_dev(zero_dev); break; Removed: head/sys/dev/notrandom/notrandom.c =================================================================== --- head/sys/dev/notrandom/notrandom.c (revision r280962) +++ head/sys/dev/notrandom/notrandom.c (working copy) @@ -0,0 +1,126 @@ -/*- - * Copyright (c) 2015 Mateusz Guzik - * 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 - * in this position and unchanged. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#include -__FBSDID("$FreeBSD$"); - -#include -#include -#include -#include -#include -#include -#include -#include - -static struct cdev *notrandom_dev; - -static d_ioctl_t notrandom_ioctl; -static d_read_t notrandom_read; - -static struct cdevsw notrandom_cdevsw = { - .d_version = D_VERSION, - .d_read = notrandom_read, - .d_ioctl = notrandom_ioctl, - .d_name = "notrandom", - .d_flags = D_MMAP_ANON, -}; - -static char notrandom_buf[1024]; - -static int -notrandom_ioctl(struct cdev *dev __unused, u_long cmd, caddr_t data __unused, - int flags __unused, struct thread *td) -{ - int error = 0; - - switch (cmd) { - case FIONBIO: - break; - case FIOASYNC: - if (*(int *)data != 0) - error = EINVAL; - break; - default: - error = ENOIOCTL; - } - return (error); -} - - -/* ARGSUSED */ -static int -notrandom_read(struct cdev *dev __unused, struct uio *uio, int flags __unused) -{ - ssize_t len; - int error = 0; - - while (uio->uio_resid > 0 && error == 0) { - len = uio->uio_resid; - if (len > sizeof(notrandom_buf)) - len = sizeof(notrandom_buf); - error = uiomove(notrandom_buf, len, uio); - } - - return (error); -} - -/* ARGSUSED */ -static int -notrandom_modevent(module_t mod __unused, int type, void *data __unused) -{ - int error = 0; - - switch(type) { - case MOD_LOAD: - memset(notrandom_buf, 7, sizeof(notrandom_buf)); - notrandom_dev = make_dev_credf(MAKEDEV_ETERNAL_KLD, - ¬random_cdevsw, 0, NULL, UID_ROOT, GID_WHEEL, 0666, - "notrandom"); - break; - - case MOD_UNLOAD: - destroy_dev(notrandom_dev); - /* - * Trash notrandom region so that the content cannot be - * retrieved. Better to be safe than sorry. - */ - memset(notrandom_buf, 123, sizeof(notrandom_buf)); - break; - - case MOD_SHUTDOWN: - break; - - default: - error = EOPNOTSUPP; - } - - return (error); -} - -DEV_MODULE(notrandom, notrandom_modevent, NULL); -MODULE_VERSION(notrandom, 1); Removed: head/sys/modules/notrandom/Makefile =================================================================== --- head/sys/modules/notrandom/Makefile (revision r280962) +++ head/sys/modules/notrandom/Makefile (working copy) @@ -0,0 +1,8 @@ -# $FreeBSD$ - -.PATH: ${.CURDIR}/../../dev/notrandom - -KMOD= notrandom -SRCS= notrandom.c - -.include From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 17:41:45 2015 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 5E23851D; Wed, 1 Apr 2015 17:41:45 +0000 (UTC) Received: from mail-wi0-x22d.google.com (mail-wi0-x22d.google.com [IPv6:2a00:1450:400c:c05::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EF025F07; Wed, 1 Apr 2015 17:41:44 +0000 (UTC) Received: by wixo5 with SMTP id o5so57723568wix.1; Wed, 01 Apr 2015 10:41:43 -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=zGywolUOzSg3D0GiQBS6patIjNeTqfS4zmZtwEXIsGA=; b=vqu7ufI9bm8tCqjFkLbVDSLRuRRAbTBJHYfU8sMFIXvCLsyELDk06BXkZR7+zy4yKW HWrNe9/NopJ+uNXp8TtlqS2DuxBYK/vFytxIDYhXOpZL+PARltqt4PjKdSbzbeyM7Jin jukZgs1Nu10SS1hUPB27YJq/T+XE2Fq8OMQBQewGgQF8b4hoAkl0GXmfsiJWYu1q4EE9 ntBYjfgoRrqLeCqRZV6wd8KfU5IqO07iIrzlDPM+90tszVXRgigwZIt1U3f1e3U2Pn9l +KwWqsUPSvRFgQeVn1if85oN4aS1tBKrWEcGIFr5WQRkDiYlT6wosULj/d91kBXslLMW 9iqw== X-Received: by 10.180.101.233 with SMTP id fj9mr16925301wib.65.1427910103524; Wed, 01 Apr 2015 10:41:43 -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 ga8sm4117829wib.11.2015.04.01.10.41.42 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 01 Apr 2015 10:41:42 -0700 (PDT) Date: Wed, 1 Apr 2015 19:41:40 +0200 From: Mateusz Guzik To: Steve Kargl Subject: Re: svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom Message-ID: <20150401174140.GB2575@dft-labs.eu> References: <20150401113628.GA16649@dft-labs.eu> <20150401114313.GZ64665@FreeBSD.org> <20150401115204.GB16649@dft-labs.eu> <20150401115729.GA64665@FreeBSD.org> <20150401120229.GA2201@dft-labs.eu> <20150401121344.GC64665@FreeBSD.org> <20150401122916.GA10926@dft-labs.eu> <20150401151118.GA16151@troutmask.apl.washington.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20150401151118.GA16151@troutmask.apl.washington.edu> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Gleb Smirnoff , 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 Apr 2015 17:41:45 -0000 On Wed, Apr 01, 2015 at 08:11:18AM -0700, Steve Kargl wrote: > On Wed, Apr 01, 2015 at 02:29:16PM +0200, Mateusz Guzik wrote: > > > > > Mateusz, if you keep the momentum, in the next years we will see lots > > > of files with your copyright. :) There is no reason to create one > > > just for this. Also, you can legitimately add your name into header of > > > null.c if you move code of notrandom there. > > > > > > > Yeah, but that's not the same as having my own file, even if I > > copy-pasted most of it. :( > > > > I understand you have concerns, but can we please leave this over the > > weekend? I'll be happy and maybe it will grow on you in the meantime. > > > > I must say this funcionality is so awesome it deserves a separate file > > regardless of who gets the copyright. > > > > Please remove this file. If you copied greater than 50% > of the code from dev/null/null.c, I do not see how you > can remove the names of those individuals listed in null.c. > It appears you are claiming Copyright over others' work. I guess you were right, this was bad. I moved the implementation to null.c, I hope this makes everyone happy. https://lists.freebsd.org/pipermail/svn-src-all/2015-April/101876.html -- Mateusz Guzik From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 17:46:20 2015 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 ED8EBA49 for ; Wed, 1 Apr 2015 17:46:20 +0000 (UTC) Received: from mail-pa0-x22f.google.com (mail-pa0-x22f.google.com [IPv6:2607:f8b0:400e:c03::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AE214FE4 for ; Wed, 1 Apr 2015 17:46:20 +0000 (UTC) Received: by pactp5 with SMTP id tp5so58483745pac.1 for ; Wed, 01 Apr 2015 10:46:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=panzura.com; s=google; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=jzTjkgjE1O1sCpoW7jtTUoDSpKJMbyxYhQXbSJne9KM=; b=Z9GOjXNHgXKwF3kL/5OO3wzXotuygtvV56vLNP1aHr92EzGA9tEhO5GbPh1Pohoab1 eHuim2fwkY1ADWaPEtnYrLtfWcbjv/djKW4Jz73iI+QhHQonFeiIYM1khHVkaVxWaAsk yDSOB04w2zzSlj6Dwie2X3+dk+TlOzc9SuENE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:content-type:mime-version:subject:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=jzTjkgjE1O1sCpoW7jtTUoDSpKJMbyxYhQXbSJne9KM=; b=TW2Ivwr9upIGDWaIrS07tJTKx0/iQqRyDvy5/lqRSza0gdP8xjWebrvvik4mc4rSoI 8OcqcGg7ROX0VTAlw99BU/UukqW3cJq298xhW5YIECf7g+7M5gQXASrjuhmTQj3+jwfq TpTcn7Jy3NilOXjjl85CwQae6LWFC6H56r45ZlnXJ2Xn4nTyx+i3lMMjKsi8iaIUozmV iANt6ljS2Eyl+kaZgmsBKufNSwnwsFUEoc1CYHlmPH9HwaW6IXbxJgGkz4nQ81WOjS3q isa3Z0ssPmeGcaI4G8vipQnqpBuSuWCNxvXCEMu//hHcFxT5Acz6tCbd7ABc/9yfS2lA uYmw== X-Gm-Message-State: ALoCoQkwB5m0rHlnp+G5AS3VxcjZYZYynXnPyiNRNK3pCPDQm8wz200nQBIs41nOr/W2nnC1ytQR X-Received: by 10.66.102.65 with SMTP id fm1mr38021980pab.115.1427910380049; Wed, 01 Apr 2015 10:46:20 -0700 (PDT) Received: from [10.0.0.105] ([64.201.244.132]) by mx.google.com with ESMTPSA id pi2sm2754210pdb.47.2015.04.01.10.46.18 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 01 Apr 2015 10:46:19 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom From: Devin Teske X-Mailer: iPhone Mail (12B440) In-Reply-To: <20150401145945.GA67667@FreeBSD.org> Date: Wed, 1 Apr 2015 10:46:16 -0700 Content-Transfer-Encoding: 7bit Message-Id: <1320D3A9-CA76-45F1-B0EF-F85D3FBE7ED8@panzura.com> References: <20150401113628.GA16649@dft-labs.eu> <20150401114313.GZ64665@FreeBSD.org> <20150401115204.GB16649@dft-labs.eu> <1427897897.82583.62.camel@freebsd.org> <20150401145945.GA67667@FreeBSD.org> To: Alexey Dokuchaev Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , Mateusz Guzik , "src-committers@freebsd.org" , Ian Lepore X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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 Apr 2015 17:46:21 -0000 >> On Apr 1, 2015, at 7:59 AM, Alexey Dokuchaev wrote: >> >>> On Wed, Apr 01, 2015 at 08:18:17AM -0600, Ian Lepore wrote: >>> On Wed, 2015-04-01 at 13:52 +0200, Mateusz Guzik wrote: >>> As a side note I'm surprised with the choice of 7. >>> >>> I would expect 3, no more, no less. 3 would be the number returned, >>> and the number readers receive would be 3. >> >> 5 would be right out. > > I haven't reviewed the code, but I trust you guys that it has to be prime. > Otherwise I'd vote for 42. /me hears a whooshing sound ;) Time to visit Caerbannog ;) For the orangutans! /lob -- -- Devin From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 18:04:16 2015 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 7E335FBD; Wed, 1 Apr 2015 18:04:16 +0000 (UTC) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cloud.theravensnest.org", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 42B4723A; Wed, 1 Apr 2015 18:04:15 +0000 (UTC) Received: from [192.168.0.7] (cpc16-cmbg15-2-0-cust60.5-4.cable.virginm.net [86.5.162.61]) (authenticated bits=0) by theravensnest.org (8.15.1/8.14.9) with ESMTPSA id t31I48KW097431 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 1 Apr 2015 18:04:11 GMT (envelope-from theraven@FreeBSD.org) X-Authentication-Warning: theravensnest.org: Host cpc16-cmbg15-2-0-cust60.5-4.cable.virginm.net [86.5.162.61] claimed to be [192.168.0.7] Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom From: David Chisnall In-Reply-To: <20150401174140.GB2575@dft-labs.eu> Date: Wed, 1 Apr 2015 19:04:03 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <20150401113628.GA16649@dft-labs.eu> <20150401114313.GZ64665@FreeBSD.org> <20150401115204.GB16649@dft-labs.eu> <20150401115729.GA64665@FreeBSD.org> <20150401120229.GA2201@dft-labs.eu> <20150401121344.GC64665@FreeBSD.org> <20150401122916.GA10926@dft-labs.eu> <20150401151118.GA16151@troutmask.apl.washington.edu> <20150401174140.GB2575@dft-labs.eu> To: Mateusz Guzik X-Mailer: Apple Mail (2.2070.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Gleb Smirnoff , src-committers@freebsd.org, Steve Kargl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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 Apr 2015 18:04:16 -0000 On 1 Apr 2015, at 18:41, Mateusz Guzik wrote: >=20 > I guess you were right, this was bad. >=20 > I moved the implementation to null.c, I hope this makes everyone = happy. >=20 > https://lists.freebsd.org/pipermail/svn-src-all/2015-April/101876.html This almost certainly does not make people happy: - * Copyright (c) 2000 Mark R. V. Murray & Jeroen C. van Gelderen - * Copyright (c) 2001-2004 Mark R. V. Murray - * Copyright (c) 2014 Eitan Adler + * Copyright (c) 2015 Mateusz Guzik * All rights reserved. * + * Some dudes which previously held the copyright: + * Marc V. R. Murray, Jeroen C. van Gelderen, Eytan Adrel + * Please try not to violate copyright in commits to the FreeBSD project. = We get cranky when we have to talk to lawyers. This file already had a = good example of how you amend existing copyright notices when you make a = sufficiently significant change to warrant claiming copyright. Your = copyright on your portions does not supersede the copyright held by the = other contributors. David From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 18:07:02 2015 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 6FE1C1D2; Wed, 1 Apr 2015 18:07:02 +0000 (UTC) Received: from mail-ig0-x236.google.com (mail-ig0-x236.google.com [IPv6:2607:f8b0:4001:c05::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 39493263; Wed, 1 Apr 2015 18:07:02 +0000 (UTC) Received: by igbud6 with SMTP id ud6so55725832igb.1; Wed, 01 Apr 2015 11:07:01 -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=A5HWEk+ARJsYWk+nKqr8jaPo8fSqoNx5uvKR3hNZJV0=; b=t1wqhvoKXYB+VQCja39m0c0Kk5REiRE5WZhW3wbKiGKUsg3xCtcUx99RWJVRrh9V2J mR+dud5eQTVinZoNuWnKIrJuA9/hlF8qrnE35YiwWLXuxTsxHOmo5fI0aPe9B+kXIsFc 3/5X0Hi58eW2mn5mTHJppEgZfoT/SGxfFxLSFOqVWJOmwgnHLr3EexbE5CTarcCkr/jI YUD+QbNVnHjUdGSMQfPJlIJvC6pMk6R+nsoUlcyPd1u1cKxJTMta2Fqt0izM0VhIeMqa 5dkY7AQamZJCT6dP0tIp1Y1WC/3QpMMamSqZ3u/Rz6hSB0YG2h7xJ1g5s9q7cleCFqqn RRIw== MIME-Version: 1.0 X-Received: by 10.107.46.155 with SMTP id u27mr64672665iou.87.1427911621473; Wed, 01 Apr 2015 11:07:01 -0700 (PDT) Received: by 10.107.156.75 with HTTP; Wed, 1 Apr 2015 11:07:01 -0700 (PDT) In-Reply-To: <551C0A5B.9060409@rice.edu> References: <201504011242.t31CgRX5061551@svn.freebsd.org> <551C0A5B.9060409@rice.edu> Date: Wed, 1 Apr 2015 14:07:01 -0400 Message-ID: Subject: Re: svn commit: r280957 - in head/sys: amd64/amd64 i386/i386 kern mips/mips powerpc/aim sparc64/sparc64 sys vm From: Ryan Stone To: Alan Cox Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: "svn-src-head@freebsd.org" , Ryan Stone , "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 Apr 2015 18:07:02 -0000 On Wed, Apr 1, 2015 at 11:10 AM, Alan Cox wrote: > On 04/01/2015 07:42, Ryan Stone wrote: > > Note to self: When this is MFCed, sparc64 needs the same fix. > > > > I suspect that you mean ia64 here, not sparc64. Yes? > Apparently. Thanks for the correction. From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 19:11:44 2015 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 5FB59910; Wed, 1 Apr 2015 19:11:44 +0000 (UTC) Received: from nk11p03mm-asmtp001.mac.com (nk11p03mm-asmtpout001.mac.com [17.158.232.236]) (using TLSv1.2 with cipher DHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3B7F1C2F; Wed, 1 Apr 2015 19:11:43 +0000 (UTC) Received: from [10.20.30.57] (75-101-82-48.static.sonic.net [75.101.82.48]) by nk11p03mm-asmtp001.mac.com (Oracle Communications Messaging Server 7.0.5.35.0 64bit (built Dec 4 2014)) with ESMTPSA id <0NM5006HF3UN9Y30@nk11p03mm-asmtp001.mac.com>; Wed, 01 Apr 2015 18:11:15 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.13.68,1.0.33,0.0.0000 definitions=2015-04-01_07:2015-04-01,2015-04-01,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1412110000 definitions=main-1504010160 Content-type: text/plain; charset=utf-8 MIME-version: 1.0 (Mac OS X Mail 8.2 \(2093\)) Subject: Re: svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom From: Jordan Hubbard In-reply-to: Date: Wed, 01 Apr 2015 11:11:11 -0700 Content-transfer-encoding: quoted-printable Message-id: <5FD1C9A1-4B8F-440D-9C34-6BA93764BD55@me.com> References: <20150401113628.GA16649@dft-labs.eu> <20150401114313.GZ64665@FreeBSD.org> <20150401115204.GB16649@dft-labs.eu> <20150401115729.GA64665@FreeBSD.org> <20150401120229.GA2201@dft-labs.eu> <20150401121344.GC64665@FreeBSD.org> <20150401122916.GA10926@dft-labs.eu> <20150401151118.GA16151@troutmask.apl.washington.edu> <20150401174140.GB2575@dft-labs.eu> To: David Chisnall X-Mailer: Apple Mail (2.2093) Cc: Mateusz Guzik , svn-src-all@freebsd.org, src-committers@freebsd.org, Gleb Smirnoff , Steve Kargl , svn-src-head@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 Apr 2015 19:11:44 -0000 > On Apr 1, 2015, at 11:04 AM, David Chisnall = wrote: >=20 > On 1 Apr 2015, at 18:41, Mateusz Guzik wrote: >>=20 >> I guess you were right, this was bad. >>=20 >> I moved the implementation to null.c, I hope this makes everyone = happy. >>=20 >> = https://lists.freebsd.org/pipermail/svn-src-all/2015-April/101876.html >=20 > This almost certainly does not make people happy: =E2=80=9CFreeBSD: Where even April 1st gets a good bike-shedding!=E2=80=9D= I, personally, am disappointed the 3 BSDs did not merge again this year. - Jordan From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 19:48:21 2015 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 1DA165CE; Wed, 1 Apr 2015 19:48: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 E1BE7F93; Wed, 1 Apr 2015 19:48: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 t31JmKpl064719; Wed, 1 Apr 2015 19:48:20 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t31JmKCV064715; Wed, 1 Apr 2015 19:48:20 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201504011948.t31JmKCV064715@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 1 Apr 2015 19:48: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: r280966 - in stable: 10/sys/kern 10/usr.bin/gcore 9/sys/kern 9/usr.bin/gcore 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 Apr 2015 19:48:21 -0000 Author: jhb Date: Wed Apr 1 19:48:19 2015 New Revision: 280966 URL: https://svnweb.freebsd.org/changeset/base/280966 Log: MFC 278761: Include OBJT_PHYS VM objects in ELF core dumps. In particular this includes the shared page allowing debuggers to use the signal trampoline code to identify signal frames in core dumps. Modified: stable/10/sys/kern/imgact_elf.c stable/10/usr.bin/gcore/elfcore.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/kern/imgact_elf.c stable/9/usr.bin/gcore/elfcore.c Directory Properties: stable/9/sys/ (props changed) stable/9/usr.bin/gcore/ (props changed) Modified: stable/10/sys/kern/imgact_elf.c ============================================================================== --- stable/10/sys/kern/imgact_elf.c Wed Apr 1 19:36:54 2015 (r280965) +++ stable/10/sys/kern/imgact_elf.c Wed Apr 1 19:48:19 2015 (r280966) @@ -1392,7 +1392,8 @@ each_writable_segment(td, func, closure) object = backing_object; } ignore_entry = object->type != OBJT_DEFAULT && - object->type != OBJT_SWAP && object->type != OBJT_VNODE; + object->type != OBJT_SWAP && object->type != OBJT_VNODE && + object->type != OBJT_PHYS; VM_OBJECT_RUNLOCK(object); if (ignore_entry) continue; Modified: stable/10/usr.bin/gcore/elfcore.c ============================================================================== --- stable/10/usr.bin/gcore/elfcore.c Wed Apr 1 19:36:54 2015 (r280965) +++ stable/10/usr.bin/gcore/elfcore.c Wed Apr 1 19:48:19 2015 (r280966) @@ -471,7 +471,8 @@ readmap(pid_t pid) ((pflags & PFLAGS_FULL) == 0 && kve->kve_type != KVME_TYPE_DEFAULT && kve->kve_type != KVME_TYPE_VNODE && - kve->kve_type != KVME_TYPE_SWAP)) + kve->kve_type != KVME_TYPE_SWAP && + kve->kve_type != KVME_TYPE_PHYS)) continue; ent = calloc(1, sizeof(*ent)); From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 19:48:22 2015 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 46B1C5CF; Wed, 1 Apr 2015 19:48: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 16DCAF94; Wed, 1 Apr 2015 19:48: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 t31JmLSN064728; Wed, 1 Apr 2015 19:48:21 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t31JmLTO064726; Wed, 1 Apr 2015 19:48:21 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201504011948.t31JmLTO064726@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 1 Apr 2015 19:48:21 +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: r280966 - in stable: 10/sys/kern 10/usr.bin/gcore 9/sys/kern 9/usr.bin/gcore 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 Apr 2015 19:48:22 -0000 Author: jhb Date: Wed Apr 1 19:48:19 2015 New Revision: 280966 URL: https://svnweb.freebsd.org/changeset/base/280966 Log: MFC 278761: Include OBJT_PHYS VM objects in ELF core dumps. In particular this includes the shared page allowing debuggers to use the signal trampoline code to identify signal frames in core dumps. Modified: stable/9/sys/kern/imgact_elf.c stable/9/usr.bin/gcore/elfcore.c Directory Properties: stable/9/sys/ (props changed) stable/9/usr.bin/gcore/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/kern/imgact_elf.c stable/10/usr.bin/gcore/elfcore.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/kern/imgact_elf.c ============================================================================== --- stable/9/sys/kern/imgact_elf.c Wed Apr 1 19:36:54 2015 (r280965) +++ stable/9/sys/kern/imgact_elf.c Wed Apr 1 19:48:19 2015 (r280966) @@ -1392,7 +1392,8 @@ each_writable_segment(td, func, closure) object = backing_object; } ignore_entry = object->type != OBJT_DEFAULT && - object->type != OBJT_SWAP && object->type != OBJT_VNODE; + object->type != OBJT_SWAP && object->type != OBJT_VNODE && + object->type != OBJT_PHYS; VM_OBJECT_UNLOCK(object); if (ignore_entry) continue; Modified: stable/9/usr.bin/gcore/elfcore.c ============================================================================== --- stable/9/usr.bin/gcore/elfcore.c Wed Apr 1 19:36:54 2015 (r280965) +++ stable/9/usr.bin/gcore/elfcore.c Wed Apr 1 19:48:19 2015 (r280966) @@ -464,7 +464,8 @@ readmap(pid_t pid) ((pflags & PFLAGS_FULL) == 0 && kve->kve_type != KVME_TYPE_DEFAULT && kve->kve_type != KVME_TYPE_VNODE && - kve->kve_type != KVME_TYPE_SWAP)) + kve->kve_type != KVME_TYPE_SWAP && + kve->kve_type != KVME_TYPE_PHYS)) continue; ent = calloc(1, sizeof(*ent)); From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 20:36:08 2015 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 F0C46A62; Wed, 1 Apr 2015 20:36: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 DC0AD74B; Wed, 1 Apr 2015 20:36: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 t31Ka7dW089917; Wed, 1 Apr 2015 20:36:07 GMT (envelope-from tychon@FreeBSD.org) Received: (from tychon@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t31Ka7p8089916; Wed, 1 Apr 2015 20:36:07 GMT (envelope-from tychon@FreeBSD.org) Message-Id: <201504012036.t31Ka7p8089916@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tychon set sender to tychon@FreeBSD.org using -f From: Tycho Nightingale Date: Wed, 1 Apr 2015 20:36:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280968 - 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: Wed, 01 Apr 2015 20:36:08 -0000 Author: tychon Date: Wed Apr 1 20:36:07 2015 New Revision: 280968 URL: https://svnweb.freebsd.org/changeset/base/280968 Log: Prior to aborting due to an instruction emulation error, it is always interesting to see what the guest's %rip and instruction bytes are. Reviewed by: grehan Modified: head/usr.sbin/bhyve/bhyverun.c Modified: head/usr.sbin/bhyve/bhyverun.c ============================================================================== --- head/usr.sbin/bhyve/bhyverun.c Wed Apr 1 20:14:00 2015 (r280967) +++ head/usr.sbin/bhyve/bhyverun.c Wed Apr 1 20:36:07 2015 (r280968) @@ -495,22 +495,27 @@ vmexit_mtrap(struct vmctx *ctx, struct v static int vmexit_inst_emul(struct vmctx *ctx, struct vm_exit *vmexit, int *pvcpu) { - int err; + int err, i; + struct vie *vie; + stats.vmexit_inst_emul++; + vie = &vmexit->u.inst_emul.vie; err = emulate_mem(ctx, *pvcpu, vmexit->u.inst_emul.gpa, - &vmexit->u.inst_emul.vie, &vmexit->u.inst_emul.paging); + vie, &vmexit->u.inst_emul.paging); if (err) { - if (err == EINVAL) { - fprintf(stderr, - "Failed to emulate instruction at 0x%lx\n", - vmexit->rip); - } else if (err == ESRCH) { + if (err == ESRCH) { fprintf(stderr, "Unhandled memory access to 0x%lx\n", vmexit->u.inst_emul.gpa); } + fprintf(stderr, "Failed to emulate instruction ["); + for (i = 0; i < vie->num_valid; i++) { + fprintf(stderr, "0x%02x%s", vie->inst[i], + i != (vie->num_valid - 1) ? " " : ""); + } + fprintf(stderr, "] at 0x%lx\n", vmexit->rip); return (VMEXIT_ABORT); } From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 21:11:13 2015 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 B7AF54FF; Wed, 1 Apr 2015 21:11:13 +0000 (UTC) Received: from thyme.infocus-llc.com (thyme.infocus-llc.com [199.15.120.10]) (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 8EB6AA6A; Wed, 1 Apr 2015 21:11:13 +0000 (UTC) Received: from draco.over-yonder.net (c-75-65-60-66.hsd1.ms.comcast.net [75.65.60.66]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by thyme.infocus-llc.com (Postfix) with ESMTPSA id 8486E37B409; Wed, 1 Apr 2015 16:03:09 -0500 (CDT) Received: by draco.over-yonder.net (Postfix, from userid 100) id 3lHKk50GSYz1t2; Wed, 1 Apr 2015 16:03:09 -0500 (CDT) Date: Wed, 1 Apr 2015 16:03:08 -0500 From: "Matthew D. Fuller" To: Mateusz Guzik Subject: Re: svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom Message-ID: <20150401210308.GB52331@over-yonder.net> References: <20150401113628.GA16649@dft-labs.eu> <20150401114313.GZ64665@FreeBSD.org> <20150401115204.GB16649@dft-labs.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150401115204.GB16649@dft-labs.eu> X-Editor: vi X-OS: FreeBSD User-Agent: Mutt/1.5.23-fullermd.4 (2014-03-12) X-Virus-Scanned: clamav-milter 0.98.6 at thyme.infocus-llc.com X-Virus-Status: Clean Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Gleb Smirnoff , 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 Apr 2015 21:11:13 -0000 On Wed, Apr 01, 2015 at 01:52:04PM +0200 I heard the voice of Mateusz Guzik, and lo! it spake thus: > > As a side note I'm surprised with the choice of 7. > > I would expect 3, no more, no less. 3 would be the number returned, > and the number readers receive would be 3. This is BSD: System V is right out. -- Matthew Fuller (MF4839) | fullermd@over-yonder.net Systems/Network Administrator | http://www.over-yonder.net/~fullermd/ On the Internet, nobody can hear you scream. From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 21:16:35 2015 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 5181C77D; Wed, 1 Apr 2015 21:16: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 32979B79; Wed, 1 Apr 2015 21:16: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 t31LGZYr009524; Wed, 1 Apr 2015 21:16:35 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t31LGXss009517; Wed, 1 Apr 2015 21:16:33 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201504012116.t31LGXss009517@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 1 Apr 2015 21:16: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: r280969 - in stable/10/sys/x86: include pci x86 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 Apr 2015 21:16:35 -0000 Author: jhb Date: Wed Apr 1 21:16:33 2015 New Revision: 280969 URL: https://svnweb.freebsd.org/changeset/base/280969 Log: MFC 260973: - Reuse legacy_pcib_(read|write)_config() methods in the QPI pcib driver. - Reuse legacy_pcib_alloc_msi{,x}() methods in the QPI and mptable pcib drivers. Modified: stable/10/sys/x86/include/legacyvar.h stable/10/sys/x86/pci/pci_bus.c stable/10/sys/x86/pci/qpi.c stable/10/sys/x86/x86/mptable_pci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/x86/include/legacyvar.h ============================================================================== --- stable/10/sys/x86/include/legacyvar.h Wed Apr 1 20:36:07 2015 (r280968) +++ stable/10/sys/x86/include/legacyvar.h Wed Apr 1 21:16:33 2015 (r280969) @@ -57,6 +57,9 @@ int legacy_pcib_write_ivar(device_t dev, uintptr_t value); struct resource *legacy_pcib_alloc_resource(device_t dev, device_t child, int type, int *rid, u_long start, u_long end, u_long count, u_int flags); +int legacy_pcib_alloc_msi(device_t pcib, device_t dev, int count, + int maxcount, int *irqs); +int legacy_pcib_alloc_msix(device_t pcib, device_t dev, int *irq); int legacy_pcib_map_msi(device_t pcib, device_t dev, int irq, uint64_t *addr, uint32_t *data); Modified: stable/10/sys/x86/pci/pci_bus.c ============================================================================== --- stable/10/sys/x86/pci/pci_bus.c Wed Apr 1 20:36:07 2015 (r280968) +++ stable/10/sys/x86/pci/pci_bus.c Wed Apr 1 21:16:33 2015 (r280969) @@ -92,7 +92,7 @@ legacy_pcib_route_interrupt(device_t pci /* Pass MSI requests up to the nexus. */ -static int +int legacy_pcib_alloc_msi(device_t pcib, device_t dev, int count, int maxcount, int *irqs) { @@ -103,7 +103,7 @@ legacy_pcib_alloc_msi(device_t pcib, dev irqs)); } -static int +int legacy_pcib_alloc_msix(device_t pcib, device_t dev, int *irq) { device_t bus; Modified: stable/10/sys/x86/pci/qpi.c ============================================================================== --- stable/10/sys/x86/pci/qpi.c Wed Apr 1 20:36:07 2015 (r280968) +++ stable/10/sys/x86/pci/qpi.c Wed Apr 1 21:16:33 2015 (r280969) @@ -45,8 +45,9 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include +#include +#include +#include #include #include @@ -237,42 +238,6 @@ qpi_pcib_read_ivar(device_t dev, device_ } } -static uint32_t -qpi_pcib_read_config(device_t dev, u_int bus, u_int slot, u_int func, - u_int reg, int bytes) -{ - - return (pci_cfgregread(bus, slot, func, reg, bytes)); -} - -static void -qpi_pcib_write_config(device_t dev, u_int bus, u_int slot, u_int func, - u_int reg, uint32_t data, int bytes) -{ - - pci_cfgregwrite(bus, slot, func, reg, data, bytes); -} - -static int -qpi_pcib_alloc_msi(device_t pcib, device_t dev, int count, int maxcount, - int *irqs) -{ - device_t bus; - - bus = device_get_parent(pcib); - return (PCIB_ALLOC_MSI(device_get_parent(bus), dev, count, maxcount, - irqs)); -} - -static int -qpi_pcib_alloc_msix(device_t pcib, device_t dev, int *irq) -{ - device_t bus; - - bus = device_get_parent(pcib); - return (PCIB_ALLOC_MSIX(device_get_parent(bus), dev, irq)); -} - static int qpi_pcib_map_msi(device_t pcib, device_t dev, int irq, uint64_t *addr, uint32_t *data) @@ -302,11 +267,11 @@ static device_method_t qpi_pcib_methods[ /* pcib interface */ DEVMETHOD(pcib_maxslots, pcib_maxslots), - DEVMETHOD(pcib_read_config, qpi_pcib_read_config), - DEVMETHOD(pcib_write_config, qpi_pcib_write_config), - DEVMETHOD(pcib_alloc_msi, qpi_pcib_alloc_msi), + DEVMETHOD(pcib_read_config, legacy_pcib_read_config), + DEVMETHOD(pcib_write_config, legacy_pcib_write_config), + DEVMETHOD(pcib_alloc_msi, legacy_pcib_alloc_msi), DEVMETHOD(pcib_release_msi, pcib_release_msi), - DEVMETHOD(pcib_alloc_msix, qpi_pcib_alloc_msix), + DEVMETHOD(pcib_alloc_msix, legacy_pcib_alloc_msix), DEVMETHOD(pcib_release_msix, pcib_release_msix), DEVMETHOD(pcib_map_msi, qpi_pcib_map_msi), Modified: stable/10/sys/x86/x86/mptable_pci.c ============================================================================== --- stable/10/sys/x86/x86/mptable_pci.c Wed Apr 1 20:36:07 2015 (r280968) +++ stable/10/sys/x86/x86/mptable_pci.c Wed Apr 1 21:16:33 2015 (r280969) @@ -73,27 +73,6 @@ mptable_hostb_attach(device_t dev) return (bus_generic_attach(dev)); } -/* Pass MSI requests up to the nexus. */ -static int -mptable_hostb_alloc_msi(device_t pcib, device_t dev, int count, int maxcount, - int *irqs) -{ - device_t bus; - - bus = device_get_parent(pcib); - return (PCIB_ALLOC_MSI(device_get_parent(bus), dev, count, maxcount, - irqs)); -} - -static int -mptable_hostb_alloc_msix(device_t pcib, device_t dev, int *irq) -{ - device_t bus; - - bus = device_get_parent(pcib); - return (PCIB_ALLOC_MSIX(device_get_parent(bus), dev, irq)); -} - #ifdef NEW_PCIB static int mptable_is_isa_range(u_long start, u_long end) @@ -197,9 +176,9 @@ static device_method_t mptable_hostb_met DEVMETHOD(pcib_read_config, legacy_pcib_read_config), DEVMETHOD(pcib_write_config, legacy_pcib_write_config), DEVMETHOD(pcib_route_interrupt, mptable_pci_route_interrupt), - DEVMETHOD(pcib_alloc_msi, mptable_hostb_alloc_msi), + DEVMETHOD(pcib_alloc_msi, legacy_pcib_alloc_msi), DEVMETHOD(pcib_release_msi, pcib_release_msi), - DEVMETHOD(pcib_alloc_msix, mptable_hostb_alloc_msix), + DEVMETHOD(pcib_alloc_msix, legacy_pcib_alloc_msix), DEVMETHOD(pcib_release_msix, pcib_release_msix), DEVMETHOD(pcib_map_msi, legacy_pcib_map_msi), From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 21:49:00 2015 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 EE3DAA19; Wed, 1 Apr 2015 21:48: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 D6BDBEDA; Wed, 1 Apr 2015 21:48: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 t31LmxJb024496; Wed, 1 Apr 2015 21:48:59 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t31LmtgR024472; Wed, 1 Apr 2015 21:48:55 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201504012148.t31LmtgR024472@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 1 Apr 2015 21:48:55 +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: r280970 - in stable/10/sys: amd64/include dev/acpica dev/cardbus dev/pccbb dev/pci i386/include sparc64/pci x86/include x86/pci x86/x86 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 Apr 2015 21:49:00 -0000 Author: jhb Date: Wed Apr 1 21:48:54 2015 New Revision: 280970 URL: https://svnweb.freebsd.org/changeset/base/280970 Log: MFC 261790: Add support for managing PCI bus numbers. As with BARs and PCI-PCI bridge I/O windows, the default is to preserve the firmware-assigned resources. PCI bus numbers are only managed if NEW_PCIB is enabled and the architecture defines a PCI_RES_BUS resource type. - Add a helper API to create top-level PCI bus resource managers for each PCI domain/segment. Host-PCI bridge drivers use this API to allocate bus numbers from their associated domain. - Change the PCI bus and CardBus drivers to allocate a bus resource for their bus number from the parent PCI bridge device. - Change the PCI-PCI and PCI-CardBus bridge drivers to allocate the full range of bus numbers from secbus to subbus from their parent bridge. The drivers also always program their primary bus register. The bridge drivers also support growing their bus range by extending the bus resource and updating subbus to match the larger range. - Add support for managing PCI bus resources to the Host-PCI bridge drivers used for amd64 and i386 (acpi_pcib, mptable_pcib, legacy_pcib, and qpi_pcib). - Define a PCI_RES_BUS resource type for amd64 and i386. PR: 197076 Modified: stable/10/sys/amd64/include/resource.h stable/10/sys/dev/acpica/acpi_pcib_acpi.c stable/10/sys/dev/acpica/acpi_pcib_pci.c stable/10/sys/dev/cardbus/cardbus.c stable/10/sys/dev/cardbus/cardbusvar.h stable/10/sys/dev/pccbb/pccbb.c stable/10/sys/dev/pccbb/pccbb_isa.c stable/10/sys/dev/pccbb/pccbb_pci.c stable/10/sys/dev/pccbb/pccbbvar.h stable/10/sys/dev/pci/pci.c stable/10/sys/dev/pci/pci_pci.c stable/10/sys/dev/pci/pci_private.h stable/10/sys/dev/pci/pci_subr.c stable/10/sys/dev/pci/pcib_private.h stable/10/sys/i386/include/resource.h stable/10/sys/sparc64/pci/apb.c stable/10/sys/x86/include/legacyvar.h stable/10/sys/x86/pci/pci_bus.c stable/10/sys/x86/pci/qpi.c stable/10/sys/x86/x86/mptable_pci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/include/resource.h ============================================================================== --- stable/10/sys/amd64/include/resource.h Wed Apr 1 21:16:33 2015 (r280969) +++ stable/10/sys/amd64/include/resource.h Wed Apr 1 21:48:54 2015 (r280970) @@ -40,5 +40,8 @@ #define SYS_RES_DRQ 2 /* isa dma lines */ #define SYS_RES_MEMORY 3 /* i/o memory */ #define SYS_RES_IOPORT 4 /* i/o ports */ +#ifdef NEW_PCIB +#define PCI_RES_BUS 5 /* PCI bus numbers */ +#endif #endif /* !_MACHINE_RESOURCE_H_ */ Modified: stable/10/sys/dev/acpica/acpi_pcib_acpi.c ============================================================================== --- stable/10/sys/dev/acpica/acpi_pcib_acpi.c Wed Apr 1 21:16:33 2015 (r280969) +++ stable/10/sys/dev/acpica/acpi_pcib_acpi.c Wed Apr 1 21:48:54 2015 (r280970) @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include "pcib_if.h" @@ -96,6 +97,11 @@ static struct resource *acpi_pcib_acpi_a static int acpi_pcib_acpi_adjust_resource(device_t dev, device_t child, int type, struct resource *r, u_long start, u_long end); +#ifdef PCI_RES_BUS +static int acpi_pcib_acpi_release_resource(device_t dev, + device_t child, int type, int rid, + struct resource *r); +#endif #endif static device_method_t acpi_pcib_acpi_methods[] = { @@ -115,7 +121,11 @@ static device_method_t acpi_pcib_acpi_me #else DEVMETHOD(bus_adjust_resource, bus_generic_adjust_resource), #endif +#if defined(NEW_PCIB) && defined(PCI_RES_BUS) + DEVMETHOD(bus_release_resource, acpi_pcib_acpi_release_resource), +#else DEVMETHOD(bus_release_resource, bus_generic_release_resource), +#endif DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), @@ -271,6 +281,20 @@ acpi_pcib_producer_handler(ACPI_RESOURCE } #endif +#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +static int +first_decoded_bus(struct acpi_hpcib_softc *sc, u_long *startp) +{ + struct resource_list_entry *rle; + + rle = resource_list_find(&sc->ap_host_res.hr_rl, PCI_RES_BUS, 0); + if (rle == NULL) + return (ENXIO); + *startp = rle->start; + return (0); +} +#endif + static int acpi_pcib_acpi_attach(device_t dev) { @@ -278,6 +302,11 @@ acpi_pcib_acpi_attach(device_t dev) ACPI_STATUS status; static int bus0_seen = 0; u_int slot, func, busok; +#if defined(NEW_PCIB) && defined(PCI_RES_BUS) + struct resource *bus_res; + u_long start; + int rid; +#endif uint8_t busno; ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); @@ -389,6 +418,39 @@ acpi_pcib_acpi_attach(device_t dev) } } +#if defined(NEW_PCIB) && defined(PCI_RES_BUS) + /* + * If nothing else worked, hope that ACPI at least lays out the + * Host-PCI bridges in order and that as a result the next free + * bus number is our bus number. + */ + if (busok == 0) { + /* + * If we have a region of bus numbers, use the first + * number for our bus. + */ + if (first_decoded_bus(sc, &start) == 0) + sc->ap_bus = start; + else { + rid = 0; + bus_res = pci_domain_alloc_bus(sc->ap_segment, dev, &rid, 0, + PCI_BUSMAX, 1, 0); + if (bus_res == NULL) { + device_printf(dev, + "could not allocate bus number\n"); + pcib_host_res_free(dev, &sc->ap_host_res); + return (ENXIO); + } + sc->ap_bus = rman_get_start(bus_res); + pci_domain_release_bus(sc->ap_segment, dev, rid, bus_res); + } + } else { +#ifdef INVARIANTS + if (first_decoded_bus(sc, &start) == 0) + KASSERT(start == sc->ap_bus, ("bus number mismatch")); +#endif + } +#else /* * If nothing else worked, hope that ACPI at least lays out the * host-PCI bridges in order and that as a result our unit number @@ -399,6 +461,7 @@ acpi_pcib_acpi_attach(device_t dev) sc->ap_bus = device_get_unit(dev); device_printf(dev, "trying bus number %d\n", sc->ap_bus); } +#endif /* If this is bus 0 on segment 0, note that it has been seen already. */ if (sc->ap_segment == 0 && sc->ap_bus == 0) @@ -534,6 +597,11 @@ acpi_pcib_acpi_alloc_resource(device_t d #ifdef NEW_PCIB sc = device_get_softc(dev); +#ifdef PCI_RES_BUS + if (type == PCI_RES_BUS) + return (pci_domain_alloc_bus(sc->ap_segment, child, rid, start, end, + count, flags)); +#endif res = pcib_host_res_alloc(&sc->ap_host_res, child, type, rid, start, end, count, flags); @@ -562,7 +630,26 @@ acpi_pcib_acpi_adjust_resource(device_t struct acpi_hpcib_softc *sc; sc = device_get_softc(dev); +#ifdef PCI_RES_BUS + if (type == PCI_RES_BUS) + return (pci_domain_adjust_bus(sc->ap_segment, child, r, start, + end)); +#endif return (pcib_host_res_adjust(&sc->ap_host_res, child, type, r, start, end)); } + +#ifdef PCI_RES_BUS +int +acpi_pcib_acpi_release_resource(device_t dev, device_t child, int type, int rid, + struct resource *r) +{ + struct acpi_hpcib_softc *sc; + + sc = device_get_softc(dev); + if (type == PCI_RES_BUS) + return (pci_domain_release_bus(sc->ap_segment, child, rid, r)); + return (bus_generic_release_resource(dev, child, type, rid, r)); +} +#endif #endif Modified: stable/10/sys/dev/acpica/acpi_pcib_pci.c ============================================================================== --- stable/10/sys/dev/acpica/acpi_pcib_pci.c Wed Apr 1 21:16:33 2015 (r280969) +++ stable/10/sys/dev/acpica/acpi_pcib_pci.c Wed Apr 1 21:48:54 2015 (r280970) @@ -120,7 +120,7 @@ acpi_pcib_pci_attach(device_t dev) pcib_attach_common(dev); sc = device_get_softc(dev); sc->ap_handle = acpi_get_handle(dev); - return (acpi_pcib_attach(dev, &sc->ap_prt, sc->ap_pcibsc.secbus)); + return (acpi_pcib_attach(dev, &sc->ap_prt, sc->ap_pcibsc.bus.sec)); } static int Modified: stable/10/sys/dev/cardbus/cardbus.c ============================================================================== --- stable/10/sys/dev/cardbus/cardbus.c Wed Apr 1 21:16:33 2015 (r280969) +++ stable/10/sys/dev/cardbus/cardbus.c Wed Apr 1 21:48:54 2015 (r280970) @@ -96,17 +96,36 @@ static int cardbus_attach(device_t cbdev) { struct cardbus_softc *sc; +#ifdef PCI_RES_BUS + int rid; +#endif sc = device_get_softc(cbdev); sc->sc_dev = cbdev; +#ifdef PCI_RES_BUS + rid = 0; + sc->sc_bus = bus_alloc_resource(cbdev, PCI_RES_BUS, &rid, + pcib_get_bus(cbdev), pcib_get_bus(cbdev), 1, 0); + if (sc->sc_bus == NULL) { + device_printf(cbdev, "failed to allocate bus number\n"); + return (ENXIO); + } +#endif return (0); } static int cardbus_detach(device_t cbdev) { +#ifdef PCI_RES_BUS + struct cardbus_softc *sc; +#endif cardbus_detach_card(cbdev); +#ifdef PCI_RES_BUS + sc = device_get_softc(cbdev); + (void)bus_release_resource(cbdev, PCI_RES_BUS, 0, sc->sc_bus); +#endif return (0); } Modified: stable/10/sys/dev/cardbus/cardbusvar.h ============================================================================== --- stable/10/sys/dev/cardbus/cardbusvar.h Wed Apr 1 21:16:33 2015 (r280969) +++ stable/10/sys/dev/cardbus/cardbusvar.h Wed Apr 1 21:48:54 2015 (r280970) @@ -69,6 +69,9 @@ struct cardbus_devinfo struct cardbus_softc { device_t sc_dev; +#ifdef PCI_RES_BUS + struct resource *sc_bus; +#endif }; /* Modified: stable/10/sys/dev/pccbb/pccbb.c ============================================================================== --- stable/10/sys/dev/pccbb/pccbb.c Wed Apr 1 21:16:33 2015 (r280969) +++ stable/10/sys/dev/pccbb/pccbb.c Wed Apr 1 21:48:54 2015 (r280970) @@ -97,6 +97,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -1548,7 +1549,7 @@ cbb_read_ivar(device_t brdev, device_t c *result = sc->domain; return (0); case PCIB_IVAR_BUS: - *result = sc->secbus; + *result = sc->bus.sec; return (0); } return (ENOENT); @@ -1557,14 +1558,12 @@ cbb_read_ivar(device_t brdev, device_t c int cbb_write_ivar(device_t brdev, device_t child, int which, uintptr_t value) { - struct cbb_softc *sc = device_get_softc(brdev); switch (which) { case PCIB_IVAR_DOMAIN: return (EINVAL); case PCIB_IVAR_BUS: - sc->secbus = value; - return (0); + return (EINVAL); } return (ENOENT); } Modified: stable/10/sys/dev/pccbb/pccbb_isa.c ============================================================================== --- stable/10/sys/dev/pccbb/pccbb_isa.c Wed Apr 1 21:16:33 2015 (r280969) +++ stable/10/sys/dev/pccbb/pccbb_isa.c Wed Apr 1 21:48:54 2015 (r280970) @@ -51,6 +51,9 @@ __FBSDID("$FreeBSD$"); #include +#include +#include + #include #include Modified: stable/10/sys/dev/pccbb/pccbb_pci.c ============================================================================== --- stable/10/sys/dev/pccbb/pccbb_pci.c Wed Apr 1 21:16:33 2015 (r280969) +++ stable/10/sys/dev/pccbb/pccbb_pci.c Wed Apr 1 21:48:54 2015 (r280970) @@ -93,6 +93,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -303,13 +304,15 @@ cbb_print_config(device_t dev) static int cbb_pci_attach(device_t brdev) { +#if !(defined(NEW_PCIB) && defined(PCI_RES_BUS)) static int curr_bus_number = 2; /* XXX EVILE BAD (see below) */ + uint32_t pribus; +#endif struct cbb_softc *sc = (struct cbb_softc *)device_get_softc(brdev); struct sysctl_ctx_list *sctx; struct sysctl_oid *soid; int rid; device_t parent; - uint32_t pribus; parent = device_get_parent(brdev); mtx_init(&sc->mtx, device_get_nameunit(brdev), "cbb", MTX_DEF); @@ -318,9 +321,13 @@ cbb_pci_attach(device_t brdev) sc->cbdev = NULL; sc->exca[0].pccarddev = NULL; sc->domain = pci_get_domain(brdev); - sc->secbus = pci_read_config(brdev, PCIR_SECBUS_2, 1); - sc->subbus = pci_read_config(brdev, PCIR_SUBBUS_2, 1); + sc->bus.sec = pci_read_config(brdev, PCIR_SECBUS_2, 1); + sc->bus.sub = pci_read_config(brdev, PCIR_SUBBUS_2, 1); sc->pribus = pcib_get_bus(parent); +#if defined(NEW_PCIB) && defined(PCI_RES_BUS) + pci_write_config(brdev, PCIR_PRIBUS_2, sc->pribus, 1); + pcib_setup_secbus(brdev, &sc->bus, 1); +#endif SLIST_INIT(&sc->rl); cbb_powerstate_d0(brdev); @@ -352,9 +359,9 @@ cbb_pci_attach(device_t brdev) SYSCTL_ADD_UINT(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "pribus", CTLFLAG_RD, &sc->pribus, 0, "Primary bus number"); SYSCTL_ADD_UINT(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "secbus", - CTLFLAG_RD, &sc->secbus, 0, "Secondary bus number"); + CTLFLAG_RD, &sc->bus.sec, 0, "Secondary bus number"); SYSCTL_ADD_UINT(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "subbus", - CTLFLAG_RD, &sc->subbus, 0, "Subordinate bus number"); + CTLFLAG_RD, &sc->bus.sub, 0, "Subordinate bus number"); #if 0 SYSCTL_ADD_UINT(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "memory", CTLFLAG_RD, &sc->subbus, 0, "Memory window open"); @@ -366,15 +373,16 @@ cbb_pci_attach(device_t brdev) CTLFLAG_RD, &sc->subbus, 0, "io range 2 open"); #endif +#if !(defined(NEW_PCIB) && defined(PCI_RES_BUS)) /* * This is a gross hack. We should be scanning the entire pci * tree, assigning bus numbers in a way such that we (1) can * reserve 1 extra bus just in case and (2) all sub busses * are in an appropriate range. */ - DEVPRINTF((brdev, "Secondary bus is %d\n", sc->secbus)); + DEVPRINTF((brdev, "Secondary bus is %d\n", sc->bus.sec)); pribus = pci_read_config(brdev, PCIR_PRIBUS_2, 1); - if (sc->secbus == 0 || sc->pribus != pribus) { + if (sc->bus.sec == 0 || sc->pribus != pribus) { if (curr_bus_number <= sc->pribus) curr_bus_number = sc->pribus + 1; if (pribus != sc->pribus) { @@ -382,13 +390,14 @@ cbb_pci_attach(device_t brdev) sc->pribus)); pci_write_config(brdev, PCIR_PRIBUS_2, sc->pribus, 1); } - sc->secbus = curr_bus_number++; - sc->subbus = curr_bus_number++; + sc->bus.sec = curr_bus_number++; + sc->bus.sub = curr_bus_number++; DEVPRINTF((brdev, "Secondary bus set to %d subbus %d\n", - sc->secbus, sc->subbus)); - pci_write_config(brdev, PCIR_SECBUS_2, sc->secbus, 1); - pci_write_config(brdev, PCIR_SUBBUS_2, sc->subbus, 1); + sc->bus.sec, sc->bus.sub)); + pci_write_config(brdev, PCIR_SECBUS_2, sc->bus.sec, 1); + pci_write_config(brdev, PCIR_SUBBUS_2, sc->bus.sub, 1); } +#endif /* attach children */ sc->cbdev = device_add_child(brdev, "cardbus", -1); @@ -467,8 +476,8 @@ cbb_chipinit(struct cbb_softc *sc) /* Restore bus configuration */ pci_write_config(sc->dev, PCIR_PRIBUS_2, sc->pribus, 1); - pci_write_config(sc->dev, PCIR_SECBUS_2, sc->secbus, 1); - pci_write_config(sc->dev, PCIR_SUBBUS_2, sc->subbus, 1); + pci_write_config(sc->dev, PCIR_SECBUS_2, sc->bus.sec, 1); + pci_write_config(sc->dev, PCIR_SUBBUS_2, sc->bus.sub, 1); /* Enable memory access */ pci_enable_busmaster(sc->dev); @@ -785,6 +794,58 @@ cbb_pci_filt(void *arg) return retval; } +#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +static struct resource * +cbb_pci_alloc_resource(device_t bus, device_t child, int type, int *rid, + u_long start, u_long end, u_long count, u_int flags) +{ + struct cbb_softc *sc; + + sc = device_get_softc(bus); + if (type == PCI_RES_BUS) + return (pcib_alloc_subbus(&sc->bus, child, rid, start, end, + count, flags)); + return (cbb_alloc_resource(bus, child, type, rid, start, end, count, + flags)); +} + +static int +cbb_pci_adjust_resource(device_t bus, device_t child, int type, + struct resource *r, u_long start, u_long end) +{ + struct cbb_softc *sc; + + sc = device_get_softc(bus); + if (type == PCI_RES_BUS) { + if (!rman_is_region_manager(r, &sc->bus.rman)) + return (EINVAL); + return (rman_adjust_resource(r, start, end)); + } + return (bus_generic_adjust_resource(bus, child, type, r, start, end)); +} + +static int +cbb_pci_release_resource(device_t bus, device_t child, int type, int rid, + struct resource *r) +{ + struct cbb_softc *sc; + int error; + + sc = device_get_softc(bus); + if (type == PCI_RES_BUS) { + if (!rman_is_region_manager(r, &sc->bus.rman)) + return (EINVAL); + if (rman_get_flags(r) & RF_ACTIVE) { + error = bus_deactivate_resource(child, type, rid, r); + if (error) + return (error); + } + return (rman_release_resource(r)); + } + return (cbb_release_resource(bus, child, type, rid, r)); +} +#endif + /************************************************************************/ /* PCI compat methods */ /************************************************************************/ @@ -828,8 +889,14 @@ static device_method_t cbb_methods[] = { /* bus methods */ DEVMETHOD(bus_read_ivar, cbb_read_ivar), DEVMETHOD(bus_write_ivar, cbb_write_ivar), +#if defined(NEW_PCIB) && defined(PCI_RES_BUS) + DEVMETHOD(bus_alloc_resource, cbb_pci_alloc_resource), + DEVMETHOD(bus_adjust_resource, cbb_pci_adjust_resource), + DEVMETHOD(bus_release_resource, cbb_pci_release_resource), +#else DEVMETHOD(bus_alloc_resource, cbb_alloc_resource), DEVMETHOD(bus_release_resource, cbb_release_resource), +#endif DEVMETHOD(bus_activate_resource, cbb_activate_resource), DEVMETHOD(bus_deactivate_resource, cbb_deactivate_resource), DEVMETHOD(bus_driver_added, cbb_driver_added), Modified: stable/10/sys/dev/pccbb/pccbbvar.h ============================================================================== --- stable/10/sys/dev/pccbb/pccbbvar.h Wed Apr 1 21:16:33 2015 (r280969) +++ stable/10/sys/dev/pccbb/pccbbvar.h Wed Apr 1 21:48:54 2015 (r280970) @@ -64,8 +64,7 @@ struct cbb_softc { bus_space_handle_t bsh; uint32_t domain; unsigned int pribus; - unsigned int secbus; - unsigned int subbus; + struct pcib_secbus bus; struct mtx mtx; int cardok; u_int32_t flags; Modified: stable/10/sys/dev/pci/pci.c ============================================================================== --- stable/10/sys/dev/pci/pci.c Wed Apr 1 21:16:33 2015 (r280969) +++ stable/10/sys/dev/pci/pci.c Wed Apr 1 21:48:54 2015 (r280970) @@ -92,6 +92,9 @@ static int pci_add_map(device_t bus, de struct resource_list *rl, int force, int prefetch); static int pci_probe(device_t dev); static int pci_attach(device_t dev); +#ifdef PCI_RES_BUS +static int pci_detach(device_t dev); +#endif static void pci_load_vendor_data(void); static int pci_describe_parse_line(char **ptr, int *vendor, int *device, char **desc); @@ -127,7 +130,11 @@ static device_method_t pci_methods[] = { /* Device interface */ DEVMETHOD(device_probe, pci_probe), DEVMETHOD(device_attach, pci_attach), +#ifdef PCI_RES_BUS + DEVMETHOD(device_detach, pci_detach), +#else DEVMETHOD(device_detach, bus_generic_detach), +#endif DEVMETHOD(device_shutdown, bus_generic_shutdown), DEVMETHOD(device_suspend, pci_suspend), DEVMETHOD(device_resume, pci_resume), @@ -361,6 +368,13 @@ TUNABLE_INT("hw.pci.clear_bars", &pci_cl SYSCTL_INT(_hw_pci, OID_AUTO, clear_bars, CTLFLAG_RDTUN, &pci_clear_bars, 0, "Ignore firmware-assigned resources for BARs."); +#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +static int pci_clear_buses; +TUNABLE_INT("hw.pci.clear_buses", &pci_clear_buses); +SYSCTL_INT(_hw_pci, OID_AUTO, clear_buses, CTLFLAG_RDTUN, &pci_clear_buses, 0, + "Ignore firmware-assigned bus numbers."); +#endif + static int pci_enable_ari = 1; TUNABLE_INT("hw.pci.enable_ari", &pci_enable_ari); SYSCTL_INT(_hw_pci, OID_AUTO, enable_ari, CTLFLAG_RDTUN, &pci_enable_ari, @@ -3226,6 +3240,164 @@ xhci_early_takeover(device_t self) bus_release_resource(self, SYS_RES_MEMORY, rid, res); } +#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +static void +pci_reserve_secbus(device_t bus, device_t dev, pcicfgregs *cfg, + struct resource_list *rl) +{ + struct resource *res; + char *cp; + u_long start, end, count; + int rid, sec_bus, sec_reg, sub_bus, sub_reg, sup_bus; + + switch (cfg->hdrtype & PCIM_HDRTYPE) { + case PCIM_HDRTYPE_BRIDGE: + sec_reg = PCIR_SECBUS_1; + sub_reg = PCIR_SUBBUS_1; + break; + case PCIM_HDRTYPE_CARDBUS: + sec_reg = PCIR_SECBUS_2; + sub_reg = PCIR_SUBBUS_2; + break; + default: + return; + } + + /* + * If the existing bus range is valid, attempt to reserve it + * from our parent. If this fails for any reason, clear the + * secbus and subbus registers. + * + * XXX: Should we reset sub_bus to sec_bus if it is < sec_bus? + * This would at least preserve the existing sec_bus if it is + * valid. + */ + sec_bus = PCI_READ_CONFIG(bus, dev, sec_reg, 1); + sub_bus = PCI_READ_CONFIG(bus, dev, sub_reg, 1); + + /* Quirk handling. */ + switch (pci_get_devid(dev)) { + case 0x12258086: /* Intel 82454KX/GX (Orion) */ + sup_bus = pci_read_config(dev, 0x41, 1); + if (sup_bus != 0xff) { + sec_bus = sup_bus + 1; + sub_bus = sup_bus + 1; + PCI_WRITE_CONFIG(bus, dev, sec_reg, sec_bus, 1); + PCI_WRITE_CONFIG(bus, dev, sub_reg, sub_bus, 1); + } + break; + + case 0x00dd10de: + /* Compaq R3000 BIOS sets wrong subordinate bus number. */ + if ((cp = getenv("smbios.planar.maker")) == NULL) + break; + if (strncmp(cp, "Compal", 6) != 0) { + freeenv(cp); + break; + } + freeenv(cp); + if ((cp = getenv("smbios.planar.product")) == NULL) + break; + if (strncmp(cp, "08A0", 4) != 0) { + freeenv(cp); + break; + } + freeenv(cp); + if (sub_bus < 0xa) { + sub_bus = 0xa; + PCI_WRITE_CONFIG(bus, dev, sub_reg, sub_bus, 1); + } + break; + } + + if (bootverbose) + printf("\tsecbus=%d, subbus=%d\n", sec_bus, sub_bus); + if (sec_bus > 0 && sub_bus >= sec_bus) { + start = sec_bus; + end = sub_bus; + count = end - start + 1; + + resource_list_add(rl, PCI_RES_BUS, 0, 0ul, ~0ul, count); + + /* + * If requested, clear secondary bus registers in + * bridge devices to force a complete renumbering + * rather than reserving the existing range. However, + * preserve the existing size. + */ + if (pci_clear_buses) + goto clear; + + rid = 0; + res = resource_list_reserve(rl, bus, dev, PCI_RES_BUS, &rid, + start, end, count, 0); + if (res != NULL) + return; + + if (bootverbose) + device_printf(bus, + "pci%d:%d:%d:%d secbus failed to allocate\n", + pci_get_domain(dev), pci_get_bus(dev), + pci_get_slot(dev), pci_get_function(dev)); + } + +clear: + PCI_WRITE_CONFIG(bus, dev, sec_reg, 0, 1); + PCI_WRITE_CONFIG(bus, dev, sub_reg, 0, 1); +} + +static struct resource * +pci_alloc_secbus(device_t dev, device_t child, int *rid, u_long start, + u_long end, u_long count, u_int flags) +{ + struct pci_devinfo *dinfo; + pcicfgregs *cfg; + struct resource_list *rl; + struct resource *res; + int sec_reg, sub_reg; + + dinfo = device_get_ivars(child); + cfg = &dinfo->cfg; + rl = &dinfo->resources; + switch (cfg->hdrtype & PCIM_HDRTYPE) { + case PCIM_HDRTYPE_BRIDGE: + sec_reg = PCIR_SECBUS_1; + sub_reg = PCIR_SUBBUS_1; + break; + case PCIM_HDRTYPE_CARDBUS: + sec_reg = PCIR_SECBUS_2; + sub_reg = PCIR_SUBBUS_2; + break; + default: + return (NULL); + } + + if (*rid != 0) + return (NULL); + + if (resource_list_find(rl, PCI_RES_BUS, *rid) == NULL) + resource_list_add(rl, PCI_RES_BUS, *rid, start, end, count); + if (!resource_list_reserved(rl, PCI_RES_BUS, *rid)) { + res = resource_list_reserve(rl, dev, child, PCI_RES_BUS, rid, + start, end, count, flags & ~RF_ACTIVE); + if (res == NULL) { + resource_list_delete(rl, PCI_RES_BUS, *rid); + device_printf(child, "allocating %lu bus%s failed\n", + count, count == 1 ? "" : "es"); + return (NULL); + } + if (bootverbose) + device_printf(child, + "Lazy allocation of %lu bus%s at %lu\n", count, + count == 1 ? "" : "es", rman_get_start(res)); + PCI_WRITE_CONFIG(dev, child, sec_reg, rman_get_start(res), 1); + PCI_WRITE_CONFIG(dev, child, sub_reg, rman_get_end(res), 1); + } + return (resource_list_alloc(rl, dev, child, PCI_RES_BUS, rid, start, + end, count, flags)); +} +#endif + void pci_add_resources(device_t bus, device_t dev, int force, uint32_t prefetchmask) { @@ -3298,6 +3470,14 @@ pci_add_resources(device_t bus, device_t else if (pci_get_progif(dev) == PCIP_SERIALBUS_USB_UHCI) uhci_early_takeover(dev); } + +#if defined(NEW_PCIB) && defined(PCI_RES_BUS) + /* + * Reserve resources for secondary bus ranges behind bridge + * devices. + */ + pci_reserve_secbus(bus, dev, cfg, rl); +#endif } static struct pci_devinfo * @@ -3390,10 +3570,22 @@ pci_attach_common(device_t dev) #ifdef PCI_DMA_BOUNDARY int error, tag_valid; #endif +#ifdef PCI_RES_BUS + int rid; +#endif sc = device_get_softc(dev); domain = pcib_get_domain(dev); busno = pcib_get_bus(dev); +#ifdef PCI_RES_BUS + rid = 0; + sc->sc_bus = bus_alloc_resource(dev, PCI_RES_BUS, &rid, busno, busno, + 1, 0); + if (sc->sc_bus == NULL) { + device_printf(dev, "failed to allocate bus number\n"); + return (ENXIO); + } +#endif if (bootverbose) device_printf(dev, "domain=%d, physical bus=%d\n", domain, busno); @@ -3438,6 +3630,21 @@ pci_attach(device_t dev) return (bus_generic_attach(dev)); } +#ifdef PCI_RES_BUS +static int +pci_detach(device_t dev) +{ + struct pci_softc *sc; + int error; + + error = bus_generic_detach(dev); + if (error) + return (error); + sc = device_get_softc(dev); + return (bus_release_resource(dev, PCI_RES_BUS, 0, sc->sc_bus)); +} +#endif + static void pci_set_power_children(device_t dev, device_t *devlist, int numdevs, int state) @@ -3953,6 +4160,10 @@ pci_child_detached(device_t dev, device_ pci_printf(&dinfo->cfg, "Device leaked memory resources\n"); if (resource_list_release_active(rl, dev, child, SYS_RES_IOPORT) != 0) pci_printf(&dinfo->cfg, "Device leaked I/O resources\n"); +#ifdef PCI_RES_BUS + if (resource_list_release_active(rl, dev, child, PCI_RES_BUS) != 0) + pci_printf(&dinfo->cfg, "Device leaked PCI bus numbers\n"); +#endif pci_cfg_save(child, dinfo, 1); } @@ -4369,6 +4580,11 @@ pci_alloc_resource(device_t dev, device_ rl = &dinfo->resources; cfg = &dinfo->cfg; switch (type) { +#if defined(NEW_PCIB) && defined(PCI_RES_BUS) + case PCI_RES_BUS: + return (pci_alloc_secbus(dev, child, rid, start, end, count, + flags)); +#endif case SYS_RES_IRQ: /* * Can't alloc legacy interrupt once MSI messages have Modified: stable/10/sys/dev/pci/pci_pci.c ============================================================================== --- stable/10/sys/dev/pci/pci_pci.c Wed Apr 1 21:16:33 2015 (r280969) +++ stable/10/sys/dev/pci/pci_pci.c Wed Apr 1 21:48:54 2015 (r280970) @@ -130,6 +130,10 @@ pcib_is_resource_managed(struct pcib_sof { switch (type) { +#ifdef PCI_RES_BUS + case PCI_RES_BUS: + return (rman_is_region_manager(r, &sc->bus.rman)); +#endif case SYS_RES_IOPORT: return (rman_is_region_manager(r, &sc->io.rman)); case SYS_RES_MEMORY: @@ -534,6 +538,173 @@ pcib_probe_windows(struct pcib_softc *sc } } +#ifdef PCI_RES_BUS +/* + * Allocate a suitable secondary bus for this bridge if needed and + * initialize the resource manager for the secondary bus range. Note + * that the minimum count is a desired value and this may allocate a + * smaller range. + */ +void +pcib_setup_secbus(device_t dev, struct pcib_secbus *bus, int min_count) +{ + char buf[64]; + int error, rid; + + switch (pci_read_config(dev, PCIR_HDRTYPE, 1) & PCIM_HDRTYPE) { + case PCIM_HDRTYPE_BRIDGE: + bus->sub_reg = PCIR_SUBBUS_1; + break; + case PCIM_HDRTYPE_CARDBUS: + bus->sub_reg = PCIR_SUBBUS_2; + break; + default: + panic("not a PCI bridge"); + } + bus->dev = dev; + bus->rman.rm_start = 0; + bus->rman.rm_end = PCI_BUSMAX; + bus->rman.rm_type = RMAN_ARRAY; + snprintf(buf, sizeof(buf), "%s bus numbers", device_get_nameunit(dev)); + bus->rman.rm_descr = strdup(buf, M_DEVBUF); + error = rman_init(&bus->rman); + if (error) + panic("Failed to initialize %s bus number rman", + device_get_nameunit(dev)); + + /* + * Allocate a bus range. This will return an existing bus range + * if one exists, or a new bus range if one does not. + */ + rid = 0; + bus->res = bus_alloc_resource(dev, PCI_RES_BUS, &rid, 0ul, ~0ul, + min_count, 0); + if (bus->res == NULL) { + /* + * Fall back to just allocating a range of a single bus + * number. + */ + bus->res = bus_alloc_resource(dev, PCI_RES_BUS, &rid, 0ul, ~0ul, + 1, 0); + } else if (rman_get_size(bus->res) < min_count) + /* + * Attempt to grow the existing range to satisfy the + * minimum desired count. + */ + (void)bus_adjust_resource(dev, PCI_RES_BUS, bus->res, + rman_get_start(bus->res), rman_get_start(bus->res) + + min_count - 1); + + /* + * Add the initial resource to the rman. + */ + if (bus->res != NULL) { + error = rman_manage_region(&bus->rman, rman_get_start(bus->res), + rman_get_end(bus->res)); + if (error) + panic("Failed to add resource to rman"); + bus->sec = rman_get_start(bus->res); + bus->sub = rman_get_end(bus->res); + } +} + +static struct resource * +pcib_suballoc_bus(struct pcib_secbus *bus, device_t child, int *rid, + u_long start, u_long end, u_long count, u_int flags) +{ + struct resource *res; + + res = rman_reserve_resource(&bus->rman, start, end, count, flags, + child); + if (res == NULL) + return (NULL); + + if (bootverbose) + device_printf(bus->dev, + "allocated bus range (%lu-%lu) for rid %d of %s\n", + rman_get_start(res), rman_get_end(res), *rid, + pcib_child_name(child)); + rman_set_rid(res, *rid); + return (res); +} + +/* + * Attempt to grow the secondary bus range. This is much simpler than + * for I/O windows as the range can only be grown by increasing + * subbus. + */ +static int +pcib_grow_subbus(struct pcib_secbus *bus, u_long new_end) +{ + u_long old_end; + int error; + + old_end = rman_get_end(bus->res); + KASSERT(new_end > old_end, ("attempt to shrink subbus")); + error = bus_adjust_resource(bus->dev, PCI_RES_BUS, bus->res, + rman_get_start(bus->res), new_end); + if (error) + return (error); + if (bootverbose) + device_printf(bus->dev, "grew bus range to %lu-%lu\n", + rman_get_start(bus->res), rman_get_end(bus->res)); + error = rman_manage_region(&bus->rman, old_end + 1, + rman_get_end(bus->res)); + if (error) + panic("Failed to add resource to rman"); + bus->sub = rman_get_end(bus->res); + pci_write_config(bus->dev, bus->sub_reg, bus->sub, 1); + return (0); +} + +struct resource * +pcib_alloc_subbus(struct pcib_secbus *bus, device_t child, int *rid, + u_long start, u_long end, u_long count, u_int flags) +{ + struct resource *res; + u_long start_free, end_free, new_end; + + /* + * First, see if the request can be satisified by the existing + * bus range. + */ + res = pcib_suballoc_bus(bus, child, rid, start, end, count, flags); + if (res != NULL) + return (res); + + /* + * Figure out a range to grow the bus range. First, find the + * first bus number after the last allocated bus in the rman and + * enforce that as a minimum starting point for the range. + */ + if (rman_last_free_region(&bus->rman, &start_free, &end_free) != 0 || + end_free != bus->sub) + start_free = bus->sub + 1; + if (start_free < start) + start_free = start; + new_end = start_free + count - 1; + + /* + * See if this new range would satisfy the request if it + * succeeds. + */ + if (new_end > end) + return (NULL); + + /* Finally, attempt to grow the existing resource. */ + if (bootverbose) { + device_printf(bus->dev, + "attempting to grow bus range for %lu buses\n", count); + printf("\tback candidate range: %lu-%lu\n", start_free, + new_end); + } + if (pcib_grow_subbus(bus, new_end) == 0) + return (pcib_suballoc_bus(bus, child, rid, start, end, count, + flags)); + return (NULL); +} +#endif + #else /* @@ -680,8 +851,8 @@ pcib_cfg_save(struct pcib_softc *sc) sc->command = pci_read_config(dev, PCIR_COMMAND, 2); sc->pribus = pci_read_config(dev, PCIR_PRIBUS_1, 1); - sc->secbus = pci_read_config(dev, PCIR_SECBUS_1, 1); - sc->subbus = pci_read_config(dev, PCIR_SUBBUS_1, 1); + sc->bus.sec = pci_read_config(dev, PCIR_SECBUS_1, 1); + sc->bus.sub = pci_read_config(dev, PCIR_SUBBUS_1, 1); sc->bridgectl = pci_read_config(dev, PCIR_BRIDGECTL_1, 2); sc->seclat = pci_read_config(dev, PCIR_SECLAT_1, 1); #ifndef NEW_PCIB @@ -704,8 +875,8 @@ pcib_cfg_restore(struct pcib_softc *sc) pci_write_config(dev, PCIR_COMMAND, sc->command, 2); pci_write_config(dev, PCIR_PRIBUS_1, sc->pribus, 1); - pci_write_config(dev, PCIR_SECBUS_1, sc->secbus, 1); - pci_write_config(dev, PCIR_SUBBUS_1, sc->subbus, 1); + pci_write_config(dev, PCIR_SECBUS_1, sc->bus.sec, 1); + pci_write_config(dev, PCIR_SUBBUS_1, sc->bus.sub, 1); pci_write_config(dev, PCIR_BRIDGECTL_1, sc->bridgectl, 2); pci_write_config(dev, PCIR_SECLAT_1, sc->seclat, 1); #ifdef NEW_PCIB @@ -751,6 +922,13 @@ pcib_attach_common(device_t dev) pcib_cfg_save(sc); /* + * The primary bus register should always be the bus of the + * parent. + */ + sc->pribus = pci_get_bus(dev); + pci_write_config(dev, PCIR_PRIBUS_1, sc->pribus, 1); + + /* * Setup sysctl reporting nodes */ sctx = device_get_sysctl_ctx(dev); @@ -760,25 +938,27 @@ pcib_attach_common(device_t dev) SYSCTL_ADD_UINT(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "pribus", CTLFLAG_RD, &sc->pribus, 0, "Primary bus number"); SYSCTL_ADD_UINT(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "secbus", - CTLFLAG_RD, &sc->secbus, 0, "Secondary bus number"); + CTLFLAG_RD, &sc->bus.sec, 0, "Secondary bus number"); SYSCTL_ADD_UINT(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "subbus", - CTLFLAG_RD, &sc->subbus, 0, "Subordinate bus number"); + CTLFLAG_RD, &sc->bus.sub, 0, "Subordinate bus number"); /* * Quirk handling. */ switch (pci_get_devid(dev)) { +#if !defined(NEW_PCIB) && !defined(PCI_RES_BUS) case 0x12258086: /* Intel 82454KX/GX (Orion) */ { uint8_t supbus; supbus = pci_read_config(dev, 0x41, 1); if (supbus != 0xff) { - sc->secbus = supbus + 1; - sc->subbus = supbus + 1; + sc->bus.sec = supbus + 1; + sc->bus.sub = supbus + 1; } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 22:26:47 2015 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 499C4AEC; Wed, 1 Apr 2015 22:26: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 32595388; Wed, 1 Apr 2015 22:26: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 t31MQlmP044475; Wed, 1 Apr 2015 22:26:47 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t31MQedN044443; Wed, 1 Apr 2015 22:26:40 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201504012226.t31MQedN044443@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 1 Apr 2015 22:26:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280971 - in head: contrib/ipfilter/tools share/man/man4 sys/contrib/ipfilter/netinet sys/netinet sys/netipsec 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 Apr 2015 22:26:47 -0000 Author: glebius Date: Wed Apr 1 22:26:39 2015 New Revision: 280971 URL: https://svnweb.freebsd.org/changeset/base/280971 Log: o Use new function ip_fillid() in all places throughout the kernel, where we want to create a new IP datagram. o Add support for RFC6864, which allows to set IP ID for atomic IP datagrams to any value, to improve performance. The behaviour is controlled by net.inet.ip.rfc6864 sysctl knob, which is enabled by default. o In case if we generate IP ID, use counter(9) to improve performance. o Gather all code related to IP ID into ip_id.c. Differential Revision: https://reviews.freebsd.org/D2177 Reviewed by: adrian, cy, rpaulo Tested by: Emeric POUPON Sponsored by: Netflix Sponsored by: Nginx, Inc. Relnotes: yes Modified: head/contrib/ipfilter/tools/ipftest.c head/share/man/man4/inet.4 head/sys/contrib/ipfilter/netinet/fil.c head/sys/contrib/ipfilter/netinet/ip_fil.h head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c head/sys/contrib/ipfilter/netinet/ip_nat.c head/sys/netinet/ip_carp.c head/sys/netinet/ip_gre.c head/sys/netinet/ip_id.c head/sys/netinet/ip_input.c head/sys/netinet/ip_mroute.c head/sys/netinet/ip_output.c head/sys/netinet/ip_var.h head/sys/netinet/raw_ip.c head/sys/netinet/sctp_output.c head/sys/netipsec/xform_ipip.c head/sys/netpfil/pf/if_pfsync.c head/sys/netpfil/pf/pf_norm.c Modified: head/contrib/ipfilter/tools/ipftest.c ============================================================================== --- head/contrib/ipfilter/tools/ipftest.c Wed Apr 1 21:48:54 2015 (r280970) +++ head/contrib/ipfilter/tools/ipftest.c Wed Apr 1 22:26:39 2015 (r280971) @@ -864,3 +864,11 @@ void fixv4sums(m, ip) *(u_short *)csump = fr_cksum(&tmp, ip, p, hdr); } } + +void +ip_fillid(struct ip *ip) +{ + static uint16_t ip_id; + + ip->ip_id = ip_id++; +} Modified: head/share/man/man4/inet.4 ============================================================================== --- head/share/man/man4/inet.4 Wed Apr 1 21:48:54 2015 (r280970) +++ head/share/man/man4/inet.4 Wed Apr 1 22:26:39 2015 (r280971) @@ -28,7 +28,7 @@ .\" From: @(#)inet.4 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd January 26, 2012 +.Dd April 2, 2015 .Dt INET 4 .Os .Sh NAME @@ -226,12 +226,24 @@ This .Xr sysctl 8 variable affects packets destined for a local host as well as packets forwarded to some other host. +.It Va ip.rfc6864 +Boolean: control IP IDs generation behaviour. +True value enables RFC6864 support, which specifies that IP ID field of +.Em atomic +datagrams can be set to any value. +The +.Fx implementation sets it to zero. +Enabled by default. .It Va ip.random_id Boolean: control IP IDs generation behaviour. Setting this .Xr sysctl 8 -to non-zero causes the ID field in IP packets to be randomized instead of -incremented by 1 with each packet generated. +to 1 causes the ID field in +.Em non-atomic +IP datagrams (or all IP datagrams, if +.Va ip.rfc6864 +is disabled) to be randomized instead of incremented by 1 with each packet +generated. This closes a minor information leak which allows remote observers to determine the rate of packet generation on the machine by watching the counter. Modified: head/sys/contrib/ipfilter/netinet/fil.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/fil.c Wed Apr 1 21:48:54 2015 (r280970) +++ head/sys/contrib/ipfilter/netinet/fil.c Wed Apr 1 22:26:39 2015 (r280971) @@ -6086,23 +6086,24 @@ ipf_updateipid(fin) u_32_t sumd, sum; ip_t *ip; + ip = fin->fin_ip; + ido = ntohs(ip->ip_id); if (fin->fin_off != 0) { sum = ipf_frag_ipidknown(fin); if (sum == 0xffffffff) return -1; sum &= 0xffff; id = (u_short)sum; + ip->ip_id = htons(id); } else { - id = ipf_nextipid(fin); - if (fin->fin_off == 0 && (fin->fin_flx & FI_FRAG) != 0) + ip_fillid(ip); + id = ntohs(ip->ip_id); + if ((fin->fin_flx & FI_FRAG) != 0) (void) ipf_frag_ipidnew(fin, (u_32_t)id); } - ip = fin->fin_ip; - ido = ntohs(ip->ip_id); if (id == ido) return 0; - ip->ip_id = htons(id); CALC_SUMD(ido, id, sumd); /* DESTRUCTIVE MACRO! id,ido change */ sum = (~ntohs(ip->ip_sum)) & 0xffff; sum += sumd; Modified: head/sys/contrib/ipfilter/netinet/ip_fil.h ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_fil.h Wed Apr 1 21:48:54 2015 (r280970) +++ head/sys/contrib/ipfilter/netinet/ip_fil.h Wed Apr 1 22:26:39 2015 (r280971) @@ -1718,6 +1718,7 @@ extern int ipfioctl __P((ipf_main_softc_ extern void m_freem __P((mb_t *)); extern size_t msgdsize __P((mb_t *)); extern int bcopywrap __P((void *, void *, size_t)); +extern void ip_fillid(struct ip *); #else /* #ifndef _KERNEL */ # if defined(__NetBSD__) && defined(PFIL_HOOKS) extern void ipfilterattach __P((int)); @@ -1932,7 +1933,6 @@ extern int ipf_matchtag __P((ipftag_t * extern int ipf_matchicmpqueryreply __P((int, icmpinfo_t *, struct icmp *, int)); extern u_32_t ipf_newisn __P((fr_info_t *)); -extern u_short ipf_nextipid __P((fr_info_t *)); extern u_int ipf_pcksum __P((fr_info_t *, int, u_int)); extern void ipf_rule_expire __P((ipf_main_softc_t *)); extern int ipf_scanlist __P((fr_info_t *, u_32_t)); Modified: head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Wed Apr 1 21:48:54 2015 (r280970) +++ head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Wed Apr 1 22:26:39 2015 (r280971) @@ -97,7 +97,6 @@ MALLOC_DEFINE(M_IPFILTER, "ipfilter", "I # endif -static u_short ipid = 0; static int (*ipf_savep) __P((void *, ip_t *, int, void *, int, struct mbuf **)); static int ipf_send_ip __P((fr_info_t *, mb_t *)); static void ipf_timer_func __P((void *arg)); @@ -231,8 +230,6 @@ ipfattach(softc) if (softc->ipf_control_forwarding & 1) V_ipforwarding = 1; - ipid = 0; - SPL_X(s); #if 0 softc->ipf_slow_ch = timeout(ipf_timer_func, softc, @@ -1074,31 +1071,6 @@ ipf_newisn(fin) } -/* ------------------------------------------------------------------------ */ -/* Function: ipf_nextipid */ -/* Returns: int - 0 == success, -1 == error (packet should be droppped) */ -/* Parameters: fin(I) - pointer to packet information */ -/* */ -/* Returns the next IPv4 ID to use for this packet. */ -/* ------------------------------------------------------------------------ */ -u_short -ipf_nextipid(fin) - fr_info_t *fin; -{ - u_short id; - -#ifndef RANDOM_IP_ID - MUTEX_ENTER(&ipfmain.ipf_rw); - id = ipid++; - MUTEX_EXIT(&ipfmain.ipf_rw); -#else - id = ip_randomid(); -#endif - - return id; -} - - INLINE int ipf_checkv4sum(fin) fr_info_t *fin; Modified: head/sys/contrib/ipfilter/netinet/ip_nat.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_nat.c Wed Apr 1 21:48:54 2015 (r280970) +++ head/sys/contrib/ipfilter/netinet/ip_nat.c Wed Apr 1 22:26:39 2015 (r280971) @@ -5221,7 +5221,7 @@ ipf_nat_out(fin, nat, natadd, nflags) } ip = MTOD(m, ip_t *); - ip->ip_id = htons(ipf_nextipid(fin)); + ip_fillid(ip); s2 = ntohs(ip->ip_id); s1 = ip->ip_len; @@ -5666,7 +5666,7 @@ ipf_nat_in(fin, nat, natadd, nflags) } ip = MTOD(m, ip_t *); - ip->ip_id = htons(ipf_nextipid(fin)); + ip_fillid(ip); sum1 = ntohs(ip->ip_len); ip->ip_len = ntohs(ip->ip_len); ip->ip_len += fin->fin_plen; Modified: head/sys/netinet/ip_carp.c ============================================================================== --- head/sys/netinet/ip_carp.c Wed Apr 1 21:48:54 2015 (r280970) +++ head/sys/netinet/ip_carp.c Wed Apr 1 22:26:39 2015 (r280971) @@ -838,11 +838,11 @@ carp_send_ad_locked(struct carp_softc *s ip->ip_hl = sizeof(*ip) >> 2; ip->ip_tos = IPTOS_LOWDELAY; ip->ip_len = htons(len); - ip->ip_id = ip_newid(); ip->ip_off = htons(IP_DF); ip->ip_ttl = CARP_DFLTTL; ip->ip_p = IPPROTO_CARP; ip->ip_sum = 0; + ip_fillid(ip); bzero(&sa, sizeof(sa)); sa.sa_family = AF_INET; Modified: head/sys/netinet/ip_gre.c ============================================================================== --- head/sys/netinet/ip_gre.c Wed Apr 1 21:48:54 2015 (r280970) +++ head/sys/netinet/ip_gre.c Wed Apr 1 22:26:39 2015 (r280971) @@ -145,7 +145,7 @@ in_gre_output(struct mbuf *m, int af, in #ifdef INET6 case AF_INET6: gi->gi_ip.ip_tos = 0; /* XXX */ - gi->gi_ip.ip_id = ip_newid(); + ip_fillid(&gi->gi_ip); break; #endif } Modified: head/sys/netinet/ip_id.c ============================================================================== --- head/sys/netinet/ip_id.c Wed Apr 1 21:48:54 2015 (r280970) +++ head/sys/netinet/ip_id.c Wed Apr 1 22:26:39 2015 (r280971) @@ -74,26 +74,37 @@ __FBSDID("$FreeBSD$"); * enabled. */ -#include -#include #include -#include -#include -#include +#include +#include +#include #include #include #include -#include +#include #include #include #include #include +#include #include -static MALLOC_DEFINE(M_IPID, "ipid", "randomized ip id state"); +/* + * By default we generate IP ID only for non-atomic datagrams, as + * suggested by RFC6864. We use per-CPU counter for that, or if + * user wants to, we can turn on random ID generation. + */ +static VNET_DEFINE(int, ip_rfc6864) = 1; +static VNET_DEFINE(int, ip_do_randomid) = 0; +#define V_ip_rfc6864 VNET(ip_rfc6864) +#define V_ip_do_randomid VNET(ip_do_randomid) +/* + * Random ID state engine. + */ +static MALLOC_DEFINE(M_IPID, "ipid", "randomized ip id state"); static VNET_DEFINE(uint16_t *, id_array); static VNET_DEFINE(bitstr_t *, id_bits); static VNET_DEFINE(int, array_ptr); @@ -109,12 +120,27 @@ static VNET_DEFINE(struct mtx, ip_id_mtx #define V_random_id_total VNET(random_id_total) #define V_ip_id_mtx VNET(ip_id_mtx) -static void ip_initid(int); +/* + * Non-random ID state engine is simply a per-cpu counter. + */ +static VNET_DEFINE(counter_u64_t, ip_id); +#define V_ip_id VNET(ip_id) + +static int sysctl_ip_randomid(SYSCTL_HANDLER_ARGS); static int sysctl_ip_id_change(SYSCTL_HANDLER_ARGS); +static void ip_initid(int); +static uint16_t ip_randomid(void); static void ipid_sysinit(void); static void ipid_sysuninit(void); SYSCTL_DECL(_net_inet_ip); +SYSCTL_PROC(_net_inet_ip, OID_AUTO, random_id, + CTLTYPE_INT | CTLFLAG_VNET | CTLFLAG_RW, + &VNET_NAME(ip_do_randomid), 0, sysctl_ip_randomid, "IU", + "Assign random ip_id values"); +SYSCTL_INT(_net_inet_ip, OID_AUTO, rfc6864, CTLFLAG_VNET | CTLFLAG_RW, + &VNET_NAME(ip_rfc6864), 0, + "Use constant IP ID for atomic datagrams"); SYSCTL_PROC(_net_inet_ip, OID_AUTO, random_id_period, CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_VNET, &VNET_NAME(array_size), 0, sysctl_ip_id_change, "IU", "IP ID Array size"); @@ -125,6 +151,26 @@ SYSCTL_INT(_net_inet_ip, OID_AUTO, rando &VNET_NAME(random_id_total), 0, "Count of IP IDs created"); static int +sysctl_ip_randomid(SYSCTL_HANDLER_ARGS) +{ + int error, new; + + new = V_ip_do_randomid; + error = sysctl_handle_int(oidp, &new, 0, req); + if (error || req->newptr == NULL) + return (error); + if (new != 0 && new != 1) + return (EINVAL); + if (new == V_ip_do_randomid) + return (0); + if (new == 1 && V_ip_do_randomid == 0) + ip_initid(8192); + /* We don't free memory when turning random ID off, due to race. */ + V_ip_do_randomid = new; + return (0); +} + +static int sysctl_ip_id_change(SYSCTL_HANDLER_ARGS) { int error, new; @@ -164,7 +210,7 @@ ip_initid(int new_size) mtx_unlock(&V_ip_id_mtx); } -uint16_t +static uint16_t ip_randomid(void) { uint16_t new_id; @@ -191,12 +237,34 @@ ip_randomid(void) return (new_id); } +void +ip_fillid(struct ip *ip) +{ + + /* + * Per RFC6864 Section 4 + * + * o Atomic datagrams: (DF==1) && (MF==0) && (frag_offset==0) + * o Non-atomic datagrams: (DF==0) || (MF==1) || (frag_offset>0) + */ + if (V_ip_rfc6864 && (ip->ip_off & htons(IP_DF)) == htons(IP_DF)) + ip->ip_id = 0; + else if (V_ip_do_randomid) + ip->ip_id = ip_randomid(); + else { + counter_u64_add(V_ip_id, 1); + ip->ip_id = htons((*(uint64_t *)zpcpu_get(V_ip_id)) & 0xffff); + } +} + static void ipid_sysinit(void) { mtx_init(&V_ip_id_mtx, "ip_id_mtx", NULL, MTX_DEF); - ip_initid(8192); + V_ip_id = counter_u64_alloc(M_WAITOK); + for (int i = 0; i < mp_ncpus; i++) + arc4rand(zpcpu_get_cpu(V_ip_id, i), sizeof(uint64_t), 0); } VNET_SYSINIT(ip_id, SI_SUB_PROTO_DOMAIN, SI_ORDER_ANY, ipid_sysinit, NULL); @@ -205,7 +273,10 @@ ipid_sysuninit(void) { mtx_destroy(&V_ip_id_mtx); - free(V_id_array, M_IPID); - free(V_id_bits, M_IPID); + if (V_id_array != NULL) { + free(V_id_array, M_IPID); + free(V_id_bits, M_IPID); + } + counter_u64_free(V_ip_id); } VNET_SYSUNINIT(ip_id, SI_SUB_PROTO_DOMAIN, SI_ORDER_ANY, ipid_sysuninit, NULL); Modified: head/sys/netinet/ip_input.c ============================================================================== --- head/sys/netinet/ip_input.c Wed Apr 1 21:48:54 2015 (r280970) +++ head/sys/netinet/ip_input.c Wed Apr 1 22:26:39 2015 (r280971) @@ -105,11 +105,6 @@ SYSCTL_INT(_net_inet_ip, IPCTL_SENDREDIR &VNET_NAME(ipsendredirects), 0, "Enable sending IP redirects"); -VNET_DEFINE(int, ip_do_randomid); -SYSCTL_INT(_net_inet_ip, OID_AUTO, random_id, CTLFLAG_VNET | CTLFLAG_RW, - &VNET_NAME(ip_do_randomid), 0, - "Assign random ip_id values"); - /* * XXX - Setting ip_checkinterface mostly implements the receive side of * the Strong ES model described in RFC 1122, but since the routing table @@ -331,8 +326,6 @@ ip_init(void) struct protosw *pr; int i; - V_ip_id = time_second & 0xffff; - TAILQ_INIT(&V_in_ifaddrhead); V_in_ifaddrhashtbl = hashinit(INADDR_NHASH, M_IFADDR, &V_in_ifaddrhmask); Modified: head/sys/netinet/ip_mroute.c ============================================================================== --- head/sys/netinet/ip_mroute.c Wed Apr 1 21:48:54 2015 (r280970) +++ head/sys/netinet/ip_mroute.c Wed Apr 1 22:26:39 2015 (r280971) @@ -2501,7 +2501,6 @@ pim_register_send_rp(struct ip *ip, stru */ ip_outer = mtod(mb_first, struct ip *); *ip_outer = pim_encap_iphdr; - ip_outer->ip_id = ip_newid(); ip_outer->ip_len = htons(len + sizeof(pim_encap_iphdr) + sizeof(pim_encap_pimhdr)); ip_outer->ip_src = V_viftable[vifi].v_lcl_addr; @@ -2513,6 +2512,7 @@ pim_register_send_rp(struct ip *ip, stru ip_outer->ip_tos = ip->ip_tos; if (ip->ip_off & htons(IP_DF)) ip_outer->ip_off |= htons(IP_DF); + ip_fillid(ip_outer); pimhdr = (struct pim_encap_pimhdr *)((caddr_t)ip_outer + sizeof(pim_encap_iphdr)); *pimhdr = pim_encap_pimhdr; Modified: head/sys/netinet/ip_output.c ============================================================================== --- head/sys/netinet/ip_output.c Wed Apr 1 21:48:54 2015 (r280970) +++ head/sys/netinet/ip_output.c Wed Apr 1 22:26:39 2015 (r280971) @@ -91,8 +91,6 @@ __FBSDID("$FreeBSD$"); #include -VNET_DEFINE(uint32_t, ip_id); - #ifdef MBUF_STRESS_TEST static int mbuf_frag_size = 0; SYSCTL_INT(_net_inet_ip, OID_AUTO, mbuf_frag_size, CTLFLAG_RW, @@ -174,21 +172,10 @@ ip_output(struct mbuf *m, struct mbuf *o ip_len = ntohs(ip->ip_len); ip_off = ntohs(ip->ip_off); - /* - * Fill in IP header. If we are not allowing fragmentation, - * then the ip_id field is meaningless, but we don't set it - * to zero. Doing so causes various problems when devices along - * the path (routers, load balancers, firewalls, etc.) illegally - * disable DF on our packet. Note that a 16-bit counter - * will wrap around in less than 10 seconds at 100 Mbit/s on a - * medium with MTU 1500. See Steven M. Bellovin, "A Technique - * for Counting NATted Hosts", Proc. IMW'02, available at - * . - */ if ((flags & (IP_FORWARDING|IP_RAWOUTPUT)) == 0) { ip->ip_v = IPVERSION; ip->ip_hl = hlen >> 2; - ip->ip_id = ip_newid(); + ip_fillid(ip); IPSTAT_INC(ips_localout); } else { /* Header already set, fetch hlen from there */ Modified: head/sys/netinet/ip_var.h ============================================================================== --- head/sys/netinet/ip_var.h Wed Apr 1 21:48:54 2015 (r280970) +++ head/sys/netinet/ip_var.h Wed Apr 1 22:26:39 2015 (r280971) @@ -174,7 +174,6 @@ struct inpcb; struct route; struct sockopt; -VNET_DECLARE(uint32_t, ip_id); /* ip packet ctr, for ids */ VNET_DECLARE(int, ip_defttl); /* default IP ttl */ VNET_DECLARE(int, ipforwarding); /* ip forwarding */ #ifdef IPSTEALTH @@ -228,7 +227,7 @@ struct in_ifaddr * void ip_savecontrol(struct inpcb *, struct mbuf **, struct ip *, struct mbuf *); void ip_slowtimo(void); -uint16_t ip_randomid(void); +void ip_fillid(struct ip *); int rip_ctloutput(struct socket *, struct sockopt *); void rip_ctlinput(int, struct sockaddr *, void *); void rip_init(void); @@ -302,22 +301,6 @@ extern int (*ng_ipfw_input_p)(struct mbu extern int (*ip_dn_ctl_ptr)(struct sockopt *); extern int (*ip_dn_io_ptr)(struct mbuf **, int, struct ip_fw_args *); - -VNET_DECLARE(int, ip_do_randomid); -#define V_ip_do_randomid VNET(ip_do_randomid) -static __inline uint16_t -ip_newid(void) -{ - uint16_t res; - - if (V_ip_do_randomid != 0) - return (ip_randomid()); - else { - res = atomic_fetchadd_32(&V_ip_id, 1) & 0xFFFF; - return (htons(res)); - } -} - #endif /* _KERNEL */ #endif /* !_NETINET_IP_VAR_H_ */ Modified: head/sys/netinet/raw_ip.c ============================================================================== --- head/sys/netinet/raw_ip.c Wed Apr 1 21:48:54 2015 (r280970) +++ head/sys/netinet/raw_ip.c Wed Apr 1 22:26:39 2015 (r280971) @@ -505,8 +505,12 @@ rip_output(struct mbuf *m, struct socket m_freem(m); return (EINVAL); } + /* + * This doesn't allow application to specify ID of zero, + * but we got this limitation from the beginning of history. + */ if (ip->ip_id == 0) - ip->ip_id = ip_newid(); + ip_fillid(ip); /* * XXX prevent ip_output from overwriting header fields. Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Wed Apr 1 21:48:54 2015 (r280970) +++ head/sys/netinet/sctp_output.c Wed Apr 1 22:26:39 2015 (r280971) @@ -4106,7 +4106,7 @@ sctp_lowlevel_chunk_output(struct sctp_i ip->ip_off = htons(0); } /* FreeBSD has a function for ip_id's */ - ip->ip_id = ip_newid(); + ip_fillid(ip); ip->ip_ttl = inp->ip_inp.inp.inp_ip_ttl; ip->ip_len = htons(packet_length); @@ -10949,8 +10949,8 @@ sctp_send_resp_msg(struct sockaddr *src, ip->ip_v = IPVERSION; ip->ip_hl = (sizeof(struct ip) >> 2); ip->ip_tos = 0; - ip->ip_id = ip_newid(); ip->ip_off = 0; + ip_fillid(ip); ip->ip_ttl = MODULE_GLOBAL(ip_defttl); if (port) { ip->ip_p = IPPROTO_UDP; Modified: head/sys/netipsec/xform_ipip.c ============================================================================== --- head/sys/netipsec/xform_ipip.c Wed Apr 1 21:48:54 2015 (r280970) +++ head/sys/netipsec/xform_ipip.c Wed Apr 1 22:26:39 2015 (r280971) @@ -136,9 +136,6 @@ ipip_output(struct mbuf *m, struct ipsec ipo->ip_sum = 0; ipo->ip_src = saidx->src.sin.sin_addr; ipo->ip_dst = saidx->dst.sin.sin_addr; - - ipo->ip_id = ip_newid(); - /* If the inner protocol is IP... */ switch (tp) { case IPVERSION: @@ -178,6 +175,7 @@ ipip_output(struct mbuf *m, struct ipsec default: goto nofamily; } + ip_fillid(ipo); otos = 0; ip_ecn_ingress(ECN_ALLOWED, &otos, &itos); Modified: head/sys/netpfil/pf/if_pfsync.c ============================================================================== --- head/sys/netpfil/pf/if_pfsync.c Wed Apr 1 21:48:54 2015 (r280970) +++ head/sys/netpfil/pf/if_pfsync.c Wed Apr 1 22:26:39 2015 (r280971) @@ -1538,7 +1538,7 @@ pfsync_sendout(int schedswi) offset = sizeof(*ip); ip->ip_len = htons(m->m_pkthdr.len); - ip->ip_id = htons(ip_randomid()); + ip_fillid(ip); /* build the pfsync header */ ph = (struct pfsync_header *)(m->m_data + offset); Modified: head/sys/netpfil/pf/pf_norm.c ============================================================================== --- head/sys/netpfil/pf/pf_norm.c Wed Apr 1 21:48:54 2015 (r280970) +++ head/sys/netpfil/pf/pf_norm.c Wed Apr 1 22:26:39 2015 (r280971) @@ -2271,9 +2271,9 @@ pf_scrub_ip(struct mbuf **m0, u_int32_t /* random-id, but not for fragments */ if (flags & PFRULE_RANDOMID && !(h->ip_off & ~htons(IP_DF))) { - u_int16_t ip_id = h->ip_id; + uint16_t ip_id = h->ip_id; - h->ip_id = ip_randomid(); + ip_fillid(h); h->ip_sum = pf_cksum_fixup(h->ip_sum, ip_id, h->ip_id, 0); } } From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 23:07:40 2015 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 D98B256B; Wed, 1 Apr 2015 23:07:40 +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 6324FA2A; Wed, 1 Apr 2015 23:07:39 +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 BF53725D3AF8; Wed, 1 Apr 2015 23:07:30 +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 1AA16C76FDC; Wed, 1 Apr 2015 23:07:30 +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 Rw-SM_SKdh1s; Wed, 1 Apr 2015 23:07:28 +0000 (UTC) Received: from [IPv6:fde9:577b:c1a9:4410:9493:5ffd:7abc:91bb] (unknown [IPv6:fde9:577b:c1a9:4410:9493:5ffd:7abc:91bb]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 46D49C76FD3; Wed, 1 Apr 2015 23:07:27 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: svn commit: r280971 - in head: contrib/ipfilter/tools share/man/man4 sys/contrib/ipfilter/netinet sys/netinet sys/netipsec sys/netpfil/pf From: "Bjoern A. Zeeb" In-Reply-To: <201504012226.t31MQedN044443@svn.freebsd.org> Date: Wed, 1 Apr 2015 23:06:54 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <78B754F0-60D9-4E75-84B5-C260094AAFD0@FreeBSD.org> References: <201504012226.t31MQedN044443@svn.freebsd.org> To: Gleb Smirnoff X-Mailer: Apple Mail (2.2070.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: Wed, 01 Apr 2015 23:07:41 -0000 > On 01 Apr 2015, at 22:26 , Gleb Smirnoff wrote: >=20 > Author: glebius > Date: Wed Apr 1 22:26:39 2015 > New Revision: 280971 > URL: https://svnweb.freebsd.org/changeset/base/280971 >=20 > Log: > o Use new function ip_fillid() in all places throughout the kernel, > where we want to create a new IP datagram. > o Add support for RFC6864, which allows to set IP ID for atomic IP > datagrams to any value, to improve performance. The behaviour is > controlled by net.inet.ip.rfc6864 sysctl knob, which is enabled by > default. > o In case if we generate IP ID, use counter(9) to improve = performance. > o Gather all code related to IP ID into ip_id.c. >=20 > Differential Revision: = https://reviews.freebsd.org/D2177 > Reviewed by: adrian, cy, rpaulo > Tested by: Emeric POUPON > Sponsored by: Netflix > Sponsored by: Nginx, Inc. > Relnotes: yes >=20 breaks build, e.g. sparc64 generic-nodebug: /scratch/tmp/bz/head.svn/sys/netinet/ip_id.c:107: warning: data = definition has no type or storage class /scratch/tmp/bz/head.svn/sys/netinet/ip_id.c:107: warning: type defaults = to 'int' in declaration of 'SYSINIT' /scratch/tmp/bz/head.svn/sys/netinet/ip_id.c:107: warning: parameter = names (without types) in function declaration /scratch/tmp/bz/head.svn/sys/netinet/ip_id.c:107: warning: data = definition has no type or storage class /scratch/tmp/bz/head.svn/sys/netinet/ip_id.c:107: warning: type defaults = to 'int' in declaration of 'SYSUNINIT' /scratch/tmp/bz/head.svn/sys/netinet/ip_id.c:107: warning: parameter = names (without types) in function declaration /scratch/tmp/bz/head.svn/sys/netinet/ip_id.c:269: error: expected ')' = before '(' token /scratch/tmp/bz/head.svn/sys/netinet/ip_id.c:282: error: expected =E2=80=98= )' before '(' token i386 GENERIC has more info =E2=80=A6 07:8: error: type specifier missing, defaults to 'int' = [-Werror,-Wimplicit-int] static MALLOC_DEFINE(M_IPID, "ipid", "randomized ip id state"); ^ /scratch/tmp/bz/head.svn/sys/sys/malloc.h:137:2: note: expanded from = macro 'MALLOC_DEFINE' SYSINIT(type##_init, SI_SUB_KMEM, SI_ORDER_THIRD, malloc_init, = \ ^ /scratch/tmp/bz/head.svn/sys/netinet/ip_id.c:107:8: error: a parameter = list without types is only allowed in a function definition /scratch/tmp/bz/head.svn/sys/sys/malloc.h:137:10: note: expanded from = macro 'MALLOC_DEFINE' SYSINIT(type##_init, SI_SUB_KMEM, SI_ORDER_THIRD, malloc_init, = \ ^ :235:1: note: expanded from here M_IPID_init ^ > Modified: > head/contrib/ipfilter/tools/ipftest.c > head/share/man/man4/inet.4 > head/sys/contrib/ipfilter/netinet/fil.c > head/sys/contrib/ipfilter/netinet/ip_fil.h > head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c > head/sys/contrib/ipfilter/netinet/ip_nat.c > head/sys/netinet/ip_carp.c > head/sys/netinet/ip_gre.c > head/sys/netinet/ip_id.c > head/sys/netinet/ip_input.c > head/sys/netinet/ip_mroute.c > head/sys/netinet/ip_output.c > head/sys/netinet/ip_var.h > head/sys/netinet/raw_ip.c > head/sys/netinet/sctp_output.c > head/sys/netipsec/xform_ipip.c > head/sys/netpfil/pf/if_pfsync.c > head/sys/netpfil/pf/pf_norm.c =E2=80=94=20 Bjoern A. Zeeb Charles Haddon Spurgeon: "Friendship is one of the sweetest joys of life. Many might have failed beneath the bitterness of their trial had they not found a friend." From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 23:26:03 2015 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 09FA3E66; Wed, 1 Apr 2015 23:26:03 +0000 (UTC) Received: from relay.mailchannels.net (si-002-i69.relay.mailchannels.net [184.154.112.243]) by mx1.freebsd.org (Postfix) with ESMTP id 86EF7C59; Wed, 1 Apr 2015 23:26:00 +0000 (UTC) X-Sender-Id: duocircle|x-authuser|hippie Received: from smtp5.ore.mailhop.org (ip-10-204-4-183.us-west-2.compute.internal [10.204.4.183]) by relay.mailchannels.net (Postfix) with ESMTPA id A44651D0195; Wed, 1 Apr 2015 23:08:00 +0000 (UTC) X-Sender-Id: duocircle|x-authuser|hippie Received: from smtp5.ore.mailhop.org (smtp5.ore.mailhop.org [10.21.145.197]) (using TLSv1 with cipher DHE-RSA-AES256-SHA) by 0.0.0.0:2500 (trex/5.4.8); Wed, 01 Apr 2015 23:08:00 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: duocircle|x-authuser|hippie X-MailChannels-Auth-Id: duocircle X-MC-Loop-Signature: 1427929680804:2776705836 X-MC-Ingress-Time: 1427929680804 Received: from c-73-34-117-227.hsd1.co.comcast.net ([73.34.117.227] helo=ilsoft.org) by smtp5.ore.mailhop.org with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.82) (envelope-from ) id 1YdRjq-0003G8-Rr; Wed, 01 Apr 2015 23:07:59 +0000 Received: from revolution.hippie.lan (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t31N7uvQ062422; Wed, 1 Apr 2015 17:07:56 -0600 (MDT) (envelope-from ian@freebsd.org) X-Mail-Handler: DuoCircle Outbound SMTP X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@duocircle.com (see https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information for abuse reporting information) X-MHO-User: U2FsdGVkX1/kUCmAFny9qAzcRZ0mNxYX Message-ID: <1427929676.82583.103.camel@freebsd.org> Subject: Re: svn commit: r280971 - in head: contrib/ipfilter/tools share/man/man4 sys/contrib/ipfilter/netinet sys/netinet sys/netipsec sys/netpfil/pf From: Ian Lepore To: Gleb Smirnoff Date: Wed, 01 Apr 2015 17:07:56 -0600 In-Reply-To: <201504012226.t31MQedN044443@svn.freebsd.org> References: <201504012226.t31MQedN044443@svn.freebsd.org> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.12.10 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-AuthUser: hippie 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 Apr 2015 23:26:03 -0000 On Wed, 2015-04-01 at 22:26 +0000, Gleb Smirnoff wrote: > Author: glebius > Date: Wed Apr 1 22:26:39 2015 > New Revision: 280971 > URL: https://svnweb.freebsd.org/changeset/base/280971 > > Log: > o Use new function ip_fillid() in all places throughout the kernel, > where we want to create a new IP datagram. > o Add support for RFC6864, which allows to set IP ID for atomic IP > datagrams to any value, to improve performance. The behaviour is > controlled by net.inet.ip.rfc6864 sysctl knob, which is enabled by > default. > o In case if we generate IP ID, use counter(9) to improve performance. > o Gather all code related to IP ID into ip_id.c. > > Differential Revision: https://reviews.freebsd.org/D2177 > Reviewed by: adrian, cy, rpaulo > Tested by: Emeric POUPON > Sponsored by: Netflix > Sponsored by: Nginx, Inc. > Relnotes: yes > [...] > +void > +ip_fillid(struct ip *ip) > +{ > + > + /* > + * Per RFC6864 Section 4 > + * > + * o Atomic datagrams: (DF==1) && (MF==0) && (frag_offset==0) > + * o Non-atomic datagrams: (DF==0) || (MF==1) || (frag_offset>0) > + */ > + if (V_ip_rfc6864 && (ip->ip_off & htons(IP_DF)) == htons(IP_DF)) > + ip->ip_id = 0; > + else if (V_ip_do_randomid) > + ip->ip_id = ip_randomid(); > + else { > + counter_u64_add(V_ip_id, 1); > + ip->ip_id = htons((*(uint64_t *)zpcpu_get(V_ip_id)) & 0xffff); > + } > +} > + This is completely bogus. It's a big opacity violation (it relies on what should be opaque private internal implementation details of counter(9)). The fact that the counter api doesn't provide a function for retrieving one cpu's counter value should be a big clue there -- the fact that you know the internals doesn't make it okay to reach behind the counter and grab a value like that. It may not even be safe to do so on any given architecture; it certainly isn't safe on arm, and that line of code above will work only by accident because you're throwing way all but 16 bits. But even more importantly, this WILL result in multiple threads using the same value at the same time... - Thread A on CPU 1 and thread B on CPU 2 both begin executing here at the same time, and both get through counter_u64_add(). - Thread A keeps running and uses CPU 1's new value, call it 27. - Thread B gets prempted between counter_u64_add() and zpcpu_get(). When it resumes it's now on CPU 1, so it retrieves value 27 as well. -- Ian From owner-svn-src-all@FreeBSD.ORG Thu Apr 2 00:30:54 2015 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 8E438AC6; Thu, 2 Apr 2015 00:30: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 7978B23A; Thu, 2 Apr 2015 00:30: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 t320Usa5003604; Thu, 2 Apr 2015 00:30:54 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t320UsKf003603; Thu, 2 Apr 2015 00:30:54 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201504020030.t320UsKf003603@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Thu, 2 Apr 2015 00:30:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280972 - 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: Thu, 02 Apr 2015 00:30:54 -0000 Author: bz Date: Thu Apr 2 00:30:53 2015 New Revision: 280972 URL: https://svnweb.freebsd.org/changeset/base/280972 Log: Try to unbreak the build after r280971 by providing the missing #include header for SYSINIT. Modified: head/sys/netinet/ip_id.c Modified: head/sys/netinet/ip_id.c ============================================================================== --- head/sys/netinet/ip_id.c Wed Apr 1 22:26:39 2015 (r280971) +++ head/sys/netinet/ip_id.c Thu Apr 2 00:30:53 2015 (r280972) @@ -77,6 +77,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include From owner-svn-src-all@FreeBSD.ORG Thu Apr 2 01:02:50 2015 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 2EA7518E; Thu, 2 Apr 2015 01:02: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 16A8182E; Thu, 2 Apr 2015 01:02: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 t3212nO1021513; Thu, 2 Apr 2015 01:02:49 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3212lTO021499; Thu, 2 Apr 2015 01:02:47 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201504020102.t3212lTO021499@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 2 Apr 2015 01:02: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: r280973 - in stable: 10/sys/amd64/amd64 10/sys/dev/acpica 10/sys/i386/i386 10/sys/kern 10/sys/sys 10/sys/x86/x86 9/sys/amd64/amd64 9/sys/dev/acpica 9/sys/i386/i386 9/sys/kern 9/sys/sys ... 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 Apr 2015 01:02:50 -0000 Author: jhb Date: Thu Apr 2 01:02:42 2015 New Revision: 280973 URL: https://svnweb.freebsd.org/changeset/base/280973 Log: MFC 276724: On some Intel CPUs with a P-state but not C-state invariant TSC the TSC may also halt in C2 and not just C3 (it seems that in some cases the BIOS advertises its C3 state as a C2 state in _CST). Just play it safe and disable both C2 and C3 states if a user forces the use of the TSC as the timecounter on such CPUs. PR: 192316 Modified: stable/9/sys/amd64/amd64/machdep.c stable/9/sys/dev/acpica/acpi_cpu.c stable/9/sys/i386/i386/machdep.c stable/9/sys/kern/kern_clocksource.c stable/9/sys/kern/kern_tc.c stable/9/sys/sys/systm.h stable/9/sys/sys/timetc.h stable/9/sys/x86/x86/tsc.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/amd64/amd64/machdep.c stable/10/sys/dev/acpica/acpi_cpu.c stable/10/sys/i386/i386/machdep.c stable/10/sys/kern/kern_clocksource.c stable/10/sys/kern/kern_tc.c stable/10/sys/sys/systm.h stable/10/sys/sys/timetc.h stable/10/sys/x86/x86/tsc.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/amd64/amd64/machdep.c ============================================================================== --- stable/9/sys/amd64/amd64/machdep.c Thu Apr 2 00:30:53 2015 (r280972) +++ stable/9/sys/amd64/amd64/machdep.c Thu Apr 2 01:02:42 2015 (r280973) @@ -797,7 +797,7 @@ cpu_idle(int busy) } /* Apply AMD APIC timer C1E workaround. */ - if (cpu_ident_amdc1e && cpu_disable_deep_sleep) { + if (cpu_ident_amdc1e && cpu_disable_c3_sleep) { msr = rdmsr(MSR_AMDK8_IPM); if (msr & AMDK8_CMPHALT) wrmsr(MSR_AMDK8_IPM, msr & ~AMDK8_CMPHALT); Modified: stable/9/sys/dev/acpica/acpi_cpu.c ============================================================================== --- stable/9/sys/dev/acpica/acpi_cpu.c Thu Apr 2 00:30:53 2015 (r280972) +++ stable/9/sys/dev/acpica/acpi_cpu.c Thu Apr 2 01:02:42 2015 (r280973) @@ -85,6 +85,7 @@ struct acpi_cpu_softc { int cpu_prev_sleep;/* Last idle sleep duration. */ int cpu_features; /* Child driver supported features. */ /* Runtime state. */ + int cpu_non_c2; /* Index of lowest non-C2 state. */ int cpu_non_c3; /* Index of lowest non-C3 state. */ u_int cpu_cx_stats[MAX_CX_STATES];/* Cx usage history. */ /* Values for sysctl. */ @@ -664,8 +665,10 @@ acpi_cpu_generic_cx_probe(struct acpi_cp cx_ptr->type = ACPI_STATE_C1; cx_ptr->trans_lat = 0; cx_ptr++; + sc->cpu_non_c2 = sc->cpu_cx_count; sc->cpu_non_c3 = sc->cpu_cx_count; sc->cpu_cx_count++; + cpu_deepest_sleep = 1; /* * The spec says P_BLK must be 6 bytes long. However, some systems @@ -691,6 +694,7 @@ acpi_cpu_generic_cx_probe(struct acpi_cp cx_ptr++; sc->cpu_non_c3 = sc->cpu_cx_count; sc->cpu_cx_count++; + cpu_deepest_sleep = 2; } } if (sc->cpu_p_blk_len < 6) @@ -707,7 +711,7 @@ acpi_cpu_generic_cx_probe(struct acpi_cp cx_ptr->trans_lat = AcpiGbl_FADT.C3Latency; cx_ptr++; sc->cpu_cx_count++; - cpu_can_deep_sleep = 1; + cpu_deepest_sleep = 3; } } } @@ -753,6 +757,7 @@ acpi_cpu_cx_cst(struct acpi_cpu_softc *s count = MAX_CX_STATES; } + sc->cpu_non_c2 = 0; sc->cpu_non_c3 = 0; sc->cpu_cx_count = 0; cx_ptr = sc->cpu_cx_states; @@ -764,6 +769,7 @@ acpi_cpu_cx_cst(struct acpi_cpu_softc *s cx_ptr->type = ACPI_STATE_C0; cx_ptr++; sc->cpu_cx_count++; + cpu_deepest_sleep = 1; /* Set up all valid states. */ for (i = 0; i < count; i++) { @@ -784,6 +790,7 @@ acpi_cpu_cx_cst(struct acpi_cpu_softc *s /* This is the first C1 state. Use the reserved slot. */ sc->cpu_cx_states[0] = *cx_ptr; } else { + sc->cpu_non_c2 = sc->cpu_cx_count; sc->cpu_non_c3 = sc->cpu_cx_count; cx_ptr++; sc->cpu_cx_count++; @@ -791,6 +798,8 @@ acpi_cpu_cx_cst(struct acpi_cpu_softc *s continue; case ACPI_STATE_C2: sc->cpu_non_c3 = sc->cpu_cx_count; + if (cpu_deepest_sleep < 2) + cpu_deepest_sleep = 2; break; case ACPI_STATE_C3: default: @@ -800,7 +809,7 @@ acpi_cpu_cx_cst(struct acpi_cpu_softc *s device_get_unit(sc->cpu_dev), i)); continue; } else - cpu_can_deep_sleep = 1; + cpu_deepest_sleep = 3; break; } @@ -981,7 +990,9 @@ acpi_cpu_idle() /* Find the lowest state that has small enough latency. */ cx_next_idx = 0; - if (cpu_disable_deep_sleep) + if (cpu_disable_c2_sleep) + i = min(sc->cpu_cx_lowest, sc->cpu_non_c2); + else if (cpu_disable_c3_sleep) i = min(sc->cpu_cx_lowest, sc->cpu_non_c3); else i = sc->cpu_cx_lowest; Modified: stable/9/sys/i386/i386/machdep.c ============================================================================== --- stable/9/sys/i386/i386/machdep.c Thu Apr 2 00:30:53 2015 (r280972) +++ stable/9/sys/i386/i386/machdep.c Thu Apr 2 01:02:42 2015 (r280973) @@ -1373,7 +1373,7 @@ cpu_idle(int busy) #ifndef XEN /* Apply AMD APIC timer C1E workaround. */ - if (cpu_ident_amdc1e && cpu_disable_deep_sleep) { + if (cpu_ident_amdc1e && cpu_disable_c3_sleep) { msr = rdmsr(MSR_AMDK8_IPM); if (msr & AMDK8_CMPHALT) wrmsr(MSR_AMDK8_IPM, msr & ~AMDK8_CMPHALT); Modified: stable/9/sys/kern/kern_clocksource.c ============================================================================== --- stable/9/sys/kern/kern_clocksource.c Thu Apr 2 00:30:53 2015 (r280972) +++ stable/9/sys/kern/kern_clocksource.c Thu Apr 2 01:02:42 2015 (r280973) @@ -59,8 +59,9 @@ __FBSDID("$FreeBSD$"); cyclic_clock_func_t cyclic_clock_func = NULL; #endif -int cpu_can_deep_sleep = 0; /* C3 state is available. */ -int cpu_disable_deep_sleep = 0; /* Timer dies in C3. */ +int cpu_deepest_sleep = 0; /* Deepest Cx state available. */ +int cpu_disable_c2_sleep = 0; /* Timer dies in C2. */ +int cpu_disable_c3_sleep = 0; /* Timer dies in C3. */ static void setuptimer(void); static void loadtimer(struct bintime *now, int first); @@ -655,7 +656,7 @@ cpu_initclocks_bsp(void) else if (!periodic && (timer->et_flags & ET_FLAGS_ONESHOT) == 0) periodic = 1; if (timer->et_flags & ET_FLAGS_C3STOP) - cpu_disable_deep_sleep++; + cpu_disable_c3_sleep++; /* * We honor the requested 'hz' value. @@ -939,9 +940,9 @@ sysctl_kern_eventtimer_timer(SYSCTL_HAND configtimer(0); et_free(timer); if (et->et_flags & ET_FLAGS_C3STOP) - cpu_disable_deep_sleep++; + cpu_disable_c3_sleep++; if (timer->et_flags & ET_FLAGS_C3STOP) - cpu_disable_deep_sleep--; + cpu_disable_c3_sleep--; periodic = want_periodic; timer = et; et_init(timer, timercb, NULL, NULL); Modified: stable/9/sys/kern/kern_tc.c ============================================================================== --- stable/9/sys/kern/kern_tc.c Thu Apr 2 00:30:53 2015 (r280972) +++ stable/9/sys/kern/kern_tc.c Thu Apr 2 01:02:42 2015 (r280973) @@ -515,10 +515,10 @@ tc_windup(void) /* Now is a good time to change timecounters. */ if (th->th_counter != timecounter) { #ifndef __arm__ - if ((timecounter->tc_flags & TC_FLAGS_C3STOP) != 0) - cpu_disable_deep_sleep++; - if ((th->th_counter->tc_flags & TC_FLAGS_C3STOP) != 0) - cpu_disable_deep_sleep--; + if ((timecounter->tc_flags & TC_FLAGS_C2STOP) != 0) + cpu_disable_c2_sleep++; + if ((th->th_counter->tc_flags & TC_FLAGS_C2STOP) != 0) + cpu_disable_c2_sleep--; #endif th->th_counter = timecounter; th->th_offset_count = ncount; Modified: stable/9/sys/sys/systm.h ============================================================================== --- stable/9/sys/sys/systm.h Thu Apr 2 00:30:53 2015 (r280972) +++ stable/9/sys/sys/systm.h Thu Apr 2 01:02:42 2015 (r280973) @@ -268,8 +268,9 @@ void cpu_startprofclock(void); void cpu_stopprofclock(void); void cpu_idleclock(void); void cpu_activeclock(void); -extern int cpu_can_deep_sleep; -extern int cpu_disable_deep_sleep; +extern int cpu_deepest_sleep; +extern int cpu_disable_c2_sleep; +extern int cpu_disable_c3_sleep; int cr_cansee(struct ucred *u1, struct ucred *u2); int cr_canseesocket(struct ucred *cred, struct socket *so); Modified: stable/9/sys/sys/timetc.h ============================================================================== --- stable/9/sys/sys/timetc.h Thu Apr 2 00:30:53 2015 (r280972) +++ stable/9/sys/sys/timetc.h Thu Apr 2 01:02:42 2015 (r280973) @@ -58,7 +58,7 @@ struct timecounter { * means "only use at explicit request". */ u_int tc_flags; -#define TC_FLAGS_C3STOP 1 /* Timer dies in C3. */ +#define TC_FLAGS_C2STOP 1 /* Timer dies in C2+. */ void *tc_priv; /* Pointer to the timecounter's private parts. */ Modified: stable/9/sys/x86/x86/tsc.c ============================================================================== --- stable/9/sys/x86/x86/tsc.c Thu Apr 2 00:30:53 2015 (r280972) +++ stable/9/sys/x86/x86/tsc.c Thu Apr 2 01:02:42 2015 (r280973) @@ -554,16 +554,16 @@ init_TSC_tc(void) } /* - * We cannot use the TSC if it stops incrementing in deep sleep. - * Currently only Intel CPUs are known for this problem unless - * the invariant TSC bit is set. + * We cannot use the TSC if it stops incrementing while idle. + * Intel CPUs without a C-state invariant TSC can stop the TSC + * in either C2 or C3. */ - if (cpu_can_deep_sleep && cpu_vendor_id == CPU_VENDOR_INTEL && + if (cpu_deepest_sleep >= 2 && cpu_vendor_id == CPU_VENDOR_INTEL && (amd_pminfo & AMDPM_TSC_INVARIANT) == 0) { tsc_timecounter.tc_quality = -1000; - tsc_timecounter.tc_flags |= TC_FLAGS_C3STOP; + tsc_timecounter.tc_flags |= TC_FLAGS_C2STOP; if (bootverbose) - printf("TSC timecounter disabled: C3 enabled.\n"); + printf("TSC timecounter disabled: C2/C3 may halt it.\n"); goto init; } From owner-svn-src-all@FreeBSD.ORG Thu Apr 2 01:02:46 2015 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 B8913AF; Thu, 2 Apr 2015 01:02: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 A08A882D; Thu, 2 Apr 2015 01:02: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 t3212knJ021491; Thu, 2 Apr 2015 01:02:46 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3212hx0021480; Thu, 2 Apr 2015 01:02:43 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201504020102.t3212hx0021480@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 2 Apr 2015 01:02: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: r280973 - in stable: 10/sys/amd64/amd64 10/sys/dev/acpica 10/sys/i386/i386 10/sys/kern 10/sys/sys 10/sys/x86/x86 9/sys/amd64/amd64 9/sys/dev/acpica 9/sys/i386/i386 9/sys/kern 9/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: Thu, 02 Apr 2015 01:02:46 -0000 Author: jhb Date: Thu Apr 2 01:02:42 2015 New Revision: 280973 URL: https://svnweb.freebsd.org/changeset/base/280973 Log: MFC 276724: On some Intel CPUs with a P-state but not C-state invariant TSC the TSC may also halt in C2 and not just C3 (it seems that in some cases the BIOS advertises its C3 state as a C2 state in _CST). Just play it safe and disable both C2 and C3 states if a user forces the use of the TSC as the timecounter on such CPUs. PR: 192316 Modified: stable/10/sys/amd64/amd64/machdep.c stable/10/sys/dev/acpica/acpi_cpu.c stable/10/sys/i386/i386/machdep.c stable/10/sys/kern/kern_clocksource.c stable/10/sys/kern/kern_tc.c stable/10/sys/sys/systm.h stable/10/sys/sys/timetc.h stable/10/sys/x86/x86/tsc.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/amd64/amd64/machdep.c stable/9/sys/dev/acpica/acpi_cpu.c stable/9/sys/i386/i386/machdep.c stable/9/sys/kern/kern_clocksource.c stable/9/sys/kern/kern_tc.c stable/9/sys/sys/systm.h stable/9/sys/sys/timetc.h stable/9/sys/x86/x86/tsc.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/sys/ (props changed) Modified: stable/10/sys/amd64/amd64/machdep.c ============================================================================== --- stable/10/sys/amd64/amd64/machdep.c Thu Apr 2 00:30:53 2015 (r280972) +++ stable/10/sys/amd64/amd64/machdep.c Thu Apr 2 01:02:42 2015 (r280973) @@ -827,7 +827,7 @@ cpu_idle(int busy) } /* Apply AMD APIC timer C1E workaround. */ - if (cpu_ident_amdc1e && cpu_disable_deep_sleep) { + if (cpu_ident_amdc1e && cpu_disable_c3_sleep) { msr = rdmsr(MSR_AMDK8_IPM); if (msr & AMDK8_CMPHALT) wrmsr(MSR_AMDK8_IPM, msr & ~AMDK8_CMPHALT); Modified: stable/10/sys/dev/acpica/acpi_cpu.c ============================================================================== --- stable/10/sys/dev/acpica/acpi_cpu.c Thu Apr 2 00:30:53 2015 (r280972) +++ stable/10/sys/dev/acpica/acpi_cpu.c Thu Apr 2 01:02:42 2015 (r280973) @@ -85,6 +85,7 @@ struct acpi_cpu_softc { int cpu_prev_sleep;/* Last idle sleep duration. */ int cpu_features; /* Child driver supported features. */ /* Runtime state. */ + int cpu_non_c2; /* Index of lowest non-C2 state. */ int cpu_non_c3; /* Index of lowest non-C3 state. */ u_int cpu_cx_stats[MAX_CX_STATES];/* Cx usage history. */ /* Values for sysctl. */ @@ -664,8 +665,10 @@ acpi_cpu_generic_cx_probe(struct acpi_cp cx_ptr->type = ACPI_STATE_C1; cx_ptr->trans_lat = 0; cx_ptr++; + sc->cpu_non_c2 = sc->cpu_cx_count; sc->cpu_non_c3 = sc->cpu_cx_count; sc->cpu_cx_count++; + cpu_deepest_sleep = 1; /* * The spec says P_BLK must be 6 bytes long. However, some systems @@ -691,6 +694,7 @@ acpi_cpu_generic_cx_probe(struct acpi_cp cx_ptr++; sc->cpu_non_c3 = sc->cpu_cx_count; sc->cpu_cx_count++; + cpu_deepest_sleep = 2; } } if (sc->cpu_p_blk_len < 6) @@ -707,7 +711,7 @@ acpi_cpu_generic_cx_probe(struct acpi_cp cx_ptr->trans_lat = AcpiGbl_FADT.C3Latency; cx_ptr++; sc->cpu_cx_count++; - cpu_can_deep_sleep = 1; + cpu_deepest_sleep = 3; } } } @@ -753,6 +757,7 @@ acpi_cpu_cx_cst(struct acpi_cpu_softc *s count = MAX_CX_STATES; } + sc->cpu_non_c2 = 0; sc->cpu_non_c3 = 0; sc->cpu_cx_count = 0; cx_ptr = sc->cpu_cx_states; @@ -764,6 +769,7 @@ acpi_cpu_cx_cst(struct acpi_cpu_softc *s cx_ptr->type = ACPI_STATE_C0; cx_ptr++; sc->cpu_cx_count++; + cpu_deepest_sleep = 1; /* Set up all valid states. */ for (i = 0; i < count; i++) { @@ -784,6 +790,7 @@ acpi_cpu_cx_cst(struct acpi_cpu_softc *s /* This is the first C1 state. Use the reserved slot. */ sc->cpu_cx_states[0] = *cx_ptr; } else { + sc->cpu_non_c2 = sc->cpu_cx_count; sc->cpu_non_c3 = sc->cpu_cx_count; cx_ptr++; sc->cpu_cx_count++; @@ -791,6 +798,8 @@ acpi_cpu_cx_cst(struct acpi_cpu_softc *s continue; case ACPI_STATE_C2: sc->cpu_non_c3 = sc->cpu_cx_count; + if (cpu_deepest_sleep < 2) + cpu_deepest_sleep = 2; break; case ACPI_STATE_C3: default: @@ -800,7 +809,7 @@ acpi_cpu_cx_cst(struct acpi_cpu_softc *s device_get_unit(sc->cpu_dev), i)); continue; } else - cpu_can_deep_sleep = 1; + cpu_deepest_sleep = 3; break; } @@ -984,7 +993,9 @@ acpi_cpu_idle(sbintime_t sbt) if (sbt >= 0 && us > (sbt >> 12)) us = (sbt >> 12); cx_next_idx = 0; - if (cpu_disable_deep_sleep) + if (cpu_disable_c2_sleep) + i = min(sc->cpu_cx_lowest, sc->cpu_non_c2); + else if (cpu_disable_c3_sleep) i = min(sc->cpu_cx_lowest, sc->cpu_non_c3); else i = sc->cpu_cx_lowest; Modified: stable/10/sys/i386/i386/machdep.c ============================================================================== --- stable/10/sys/i386/i386/machdep.c Thu Apr 2 00:30:53 2015 (r280972) +++ stable/10/sys/i386/i386/machdep.c Thu Apr 2 01:02:42 2015 (r280973) @@ -1478,7 +1478,7 @@ cpu_idle(int busy) #ifndef XEN /* Apply AMD APIC timer C1E workaround. */ - if (cpu_ident_amdc1e && cpu_disable_deep_sleep) { + if (cpu_ident_amdc1e && cpu_disable_c3_sleep) { msr = rdmsr(MSR_AMDK8_IPM); if (msr & AMDK8_CMPHALT) wrmsr(MSR_AMDK8_IPM, msr & ~AMDK8_CMPHALT); Modified: stable/10/sys/kern/kern_clocksource.c ============================================================================== --- stable/10/sys/kern/kern_clocksource.c Thu Apr 2 00:30:53 2015 (r280972) +++ stable/10/sys/kern/kern_clocksource.c Thu Apr 2 01:02:42 2015 (r280973) @@ -60,8 +60,9 @@ __FBSDID("$FreeBSD$"); cyclic_clock_func_t cyclic_clock_func = NULL; #endif -int cpu_can_deep_sleep = 0; /* C3 state is available. */ -int cpu_disable_deep_sleep = 0; /* Timer dies in C3. */ +int cpu_deepest_sleep = 0; /* Deepest Cx state available. */ +int cpu_disable_c2_sleep = 0; /* Timer dies in C2. */ +int cpu_disable_c3_sleep = 0; /* Timer dies in C3. */ static void setuptimer(void); static void loadtimer(sbintime_t now, int first); @@ -630,7 +631,7 @@ cpu_initclocks_bsp(void) else if (!periodic && (timer->et_flags & ET_FLAGS_ONESHOT) == 0) periodic = 1; if (timer->et_flags & ET_FLAGS_C3STOP) - cpu_disable_deep_sleep++; + cpu_disable_c3_sleep++; /* * We honor the requested 'hz' value. @@ -931,9 +932,9 @@ sysctl_kern_eventtimer_timer(SYSCTL_HAND configtimer(0); et_free(timer); if (et->et_flags & ET_FLAGS_C3STOP) - cpu_disable_deep_sleep++; + cpu_disable_c3_sleep++; if (timer->et_flags & ET_FLAGS_C3STOP) - cpu_disable_deep_sleep--; + cpu_disable_c3_sleep--; periodic = want_periodic; timer = et; et_init(timer, timercb, NULL, NULL); Modified: stable/10/sys/kern/kern_tc.c ============================================================================== --- stable/10/sys/kern/kern_tc.c Thu Apr 2 00:30:53 2015 (r280972) +++ stable/10/sys/kern/kern_tc.c Thu Apr 2 01:02:42 2015 (r280973) @@ -1331,10 +1331,10 @@ tc_windup(void) /* Now is a good time to change timecounters. */ if (th->th_counter != timecounter) { #ifndef __arm__ - if ((timecounter->tc_flags & TC_FLAGS_C3STOP) != 0) - cpu_disable_deep_sleep++; - if ((th->th_counter->tc_flags & TC_FLAGS_C3STOP) != 0) - cpu_disable_deep_sleep--; + if ((timecounter->tc_flags & TC_FLAGS_C2STOP) != 0) + cpu_disable_c2_sleep++; + if ((th->th_counter->tc_flags & TC_FLAGS_C2STOP) != 0) + cpu_disable_c2_sleep--; #endif th->th_counter = timecounter; th->th_offset_count = ncount; Modified: stable/10/sys/sys/systm.h ============================================================================== --- stable/10/sys/sys/systm.h Thu Apr 2 00:30:53 2015 (r280972) +++ stable/10/sys/sys/systm.h Thu Apr 2 01:02:42 2015 (r280973) @@ -295,8 +295,9 @@ sbintime_t cpu_idleclock(void); void cpu_activeclock(void); void cpu_new_callout(int cpu, sbintime_t bt, sbintime_t bt_opt); void cpu_et_frequency(struct eventtimer *et, uint64_t newfreq); -extern int cpu_can_deep_sleep; -extern int cpu_disable_deep_sleep; +extern int cpu_deepest_sleep; +extern int cpu_disable_c2_sleep; +extern int cpu_disable_c3_sleep; int cr_cansee(struct ucred *u1, struct ucred *u2); int cr_canseesocket(struct ucred *cred, struct socket *so); Modified: stable/10/sys/sys/timetc.h ============================================================================== --- stable/10/sys/sys/timetc.h Thu Apr 2 00:30:53 2015 (r280972) +++ stable/10/sys/sys/timetc.h Thu Apr 2 01:02:42 2015 (r280973) @@ -58,7 +58,7 @@ struct timecounter { * means "only use at explicit request". */ u_int tc_flags; -#define TC_FLAGS_C3STOP 1 /* Timer dies in C3. */ +#define TC_FLAGS_C2STOP 1 /* Timer dies in C2+. */ #define TC_FLAGS_SUSPEND_SAFE 2 /* * Timer functional across * suspend/resume. Modified: stable/10/sys/x86/x86/tsc.c ============================================================================== --- stable/10/sys/x86/x86/tsc.c Thu Apr 2 00:30:53 2015 (r280972) +++ stable/10/sys/x86/x86/tsc.c Thu Apr 2 01:02:42 2015 (r280973) @@ -528,16 +528,16 @@ init_TSC_tc(void) } /* - * We cannot use the TSC if it stops incrementing in deep sleep. - * Currently only Intel CPUs are known for this problem unless - * the invariant TSC bit is set. + * We cannot use the TSC if it stops incrementing while idle. + * Intel CPUs without a C-state invariant TSC can stop the TSC + * in either C2 or C3. */ - if (cpu_can_deep_sleep && cpu_vendor_id == CPU_VENDOR_INTEL && + if (cpu_deepest_sleep >= 2 && cpu_vendor_id == CPU_VENDOR_INTEL && (amd_pminfo & AMDPM_TSC_INVARIANT) == 0) { tsc_timecounter.tc_quality = -1000; - tsc_timecounter.tc_flags |= TC_FLAGS_C3STOP; + tsc_timecounter.tc_flags |= TC_FLAGS_C2STOP; if (bootverbose) - printf("TSC timecounter disabled: C3 enabled.\n"); + printf("TSC timecounter disabled: C2/C3 may halt it.\n"); goto init; } From owner-svn-src-all@FreeBSD.ORG Thu Apr 2 01:46:19 2015 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 2231A737; Thu, 2 Apr 2015 01:46: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 0DC95C14; Thu, 2 Apr 2015 01:46: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 t321kITW040586; Thu, 2 Apr 2015 01:46:18 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t321kI40040584; Thu, 2 Apr 2015 01:46:18 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201504020146.t321kI40040584@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Thu, 2 Apr 2015 01:46:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280974 - head/sys/boot/forth X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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 Apr 2015 01:46:19 -0000 Author: dteske Date: Thu Apr 2 01:46:17 2015 New Revision: 280974 URL: https://svnweb.freebsd.org/changeset/base/280974 Log: Use fg/b/me from screen.4th instead of literals MFC after: 3 days X-MFC-to: stable/10 Modified: head/sys/boot/forth/menu.4th head/sys/boot/forth/version.4th Modified: head/sys/boot/forth/menu.4th ============================================================================== --- head/sys/boot/forth/menu.4th Thu Apr 2 01:02:42 2015 (r280973) +++ head/sys/boot/forth/menu.4th Thu Apr 2 01:46:17 2015 (r280974) @@ -216,13 +216,10 @@ also menu-infrastructure definitions dup menuX @ swap at-xy \ Print the value of menuidx - loader_color? if - ." " (  ) - then + loader_color? dup ( -- bool bool ) + if b then menuidx @ . - loader_color? if - ." " (  ) - then + if me then \ Move the cursor forward 1 column dup menuX @ 1+ swap at-xy Modified: head/sys/boot/forth/version.4th ============================================================================== --- head/sys/boot/forth/version.4th Thu Apr 2 01:02:42 2015 (r280973) +++ head/sys/boot/forth/version.4th Thu Apr 2 01:46:17 2015 (r280974) @@ -85,11 +85,10 @@ only forth definitions also version-proc dup versionX @ swap - versionY @ at-xy \ Print the version (optionally in cyan) - loader_color? if - ." " type ." " - else - type - then + loader_color? dup ( -- bool bool ) + if 6 fg then + type + if me then ; only forth definitions From owner-svn-src-all@FreeBSD.ORG Thu Apr 2 01:48:16 2015 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 B761F88B; Thu, 2 Apr 2015 01:48: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 A14ABC23; Thu, 2 Apr 2015 01:48: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 t321mGr7040888; Thu, 2 Apr 2015 01:48:16 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t321mDU1040875; Thu, 2 Apr 2015 01:48:13 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201504020148.t321mDU1040875@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Thu, 2 Apr 2015 01:48:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280975 - head/sys/boot/forth X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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 Apr 2015 01:48:16 -0000 Author: dteske Date: Thu Apr 2 01:48:12 2015 New Revision: 280975 URL: https://svnweb.freebsd.org/changeset/base/280975 Log: Eliminate literal escape sequences from *.4th Suggested by: alfred MFC after: 3 days X-MFC-to: stable/10 Modified: head/sys/boot/forth/brand-fbsd.4th head/sys/boot/forth/logo-beastie.4th head/sys/boot/forth/logo-beastiebw.4th head/sys/boot/forth/logo-fbsdbw.4th head/sys/boot/forth/logo-orb.4th head/sys/boot/forth/logo-orbbw.4th head/sys/boot/forth/menu.4th head/sys/boot/forth/screen.4th Modified: head/sys/boot/forth/brand-fbsd.4th ============================================================================== --- head/sys/boot/forth/brand-fbsd.4th Thu Apr 2 01:46:17 2015 (r280974) +++ head/sys/boot/forth/brand-fbsd.4th Thu Apr 2 01:48:12 2015 (r280975) @@ -26,13 +26,21 @@ 2 brandX ! 1 brandY ! \ Initialize brand placement defaults +: brand+ ( x y c-addr/u -- x y' ) + 2swap 2dup at-xy 2swap \ position the cursor + type \ print to the screen + 1+ \ increase y for next time we're called +; + : brand ( x y -- ) \ "FreeBSD" [wide] logo in B/W (7 rows x 42 columns) - 2dup at-xy ." ______ ____ _____ _____ " 1+ - 2dup at-xy ." | ____| | _ \ / ____| __ \ " 1+ - 2dup at-xy ." | |___ _ __ ___ ___ | |_) | (___ | | | |" 1+ - 2dup at-xy ." | ___| '__/ _ \/ _ \| _ < \___ \| | | |" 1+ - 2dup at-xy ." | | | | | __/ __/| |_) |____) | |__| |" 1+ - 2dup at-xy ." | | | | | | || | | |" 1+ - at-xy ." |_| |_| \___|\___||____/|_____/|_____/ " + s" ______ ____ _____ _____ " brand+ + s" | ____| | _ \ / ____| __ \ " brand+ + s" | |___ _ __ ___ ___ | |_) | (___ | | | |" brand+ + s" | ___| '__/ _ \/ _ \| _ < \___ \| | | |" brand+ + s" | | | | | __/ __/| |_) |____) | |__| |" brand+ + s" | | | | | | || | | |" brand+ + s" |_| |_| \___|\___||____/|_____/|_____/ " brand+ + + 2drop ; Modified: head/sys/boot/forth/logo-beastie.4th ============================================================================== --- head/sys/boot/forth/logo-beastie.4th Thu Apr 2 01:46:17 2015 (r280974) +++ head/sys/boot/forth/logo-beastie.4th Thu Apr 2 01:48:12 2015 (r280975) @@ -28,25 +28,34 @@ 46 logoX ! 4 logoY ! \ Initialize logo placement defaults +: logo+ ( x y c-addr/u -- x y' ) + 2swap 2dup at-xy 2swap \ position the cursor + [char] @ escc! \ replace @ with Esc + type \ print to the screen + 1+ \ increase y for next time we're called +; + : logo ( x y -- ) \ color BSD mascot (19 rows x 34 columns) -2dup at-xy ." , ," 1+ -2dup at-xy ." /( )`" 1+ -2dup at-xy ." \ \___ / |" 1+ -2dup at-xy ." /- _ `-/ '" 1+ -2dup at-xy ." (/\/ \ \ /\" 1+ -2dup at-xy ." / / | ` \" 1+ -2dup at-xy ." O O ) / |" 1+ -2dup at-xy ." `-^--'`< '" 1+ -2dup at-xy ." (_.) _ ) /" 1+ -2dup at-xy ." `.___/` /" 1+ -2dup at-xy ." `-----' /" 1+ -2dup at-xy ." <----. __ / __ \" 1+ -2dup at-xy ." <----|====O)))==) \) /====|" 1+ -2dup at-xy ." <----' `--' `.__,' \" 1+ -2dup at-xy ." | |" 1+ -2dup at-xy ." \ / /\" 1+ -2dup at-xy ." ______( (_ / \______/" 1+ -2dup at-xy ." ,' ,-----' |" 1+ - at-xy ." `--{__________)" + s" @[31m, ," logo+ + s" /( )`" logo+ + s" \ \___ / |" logo+ + s" /- @[m_@[31m `-/ '" logo+ + s" (@[m/\/ \@[31m \ /\" logo+ + s" @[m/ / |@[31m ` \" logo+ + s" @[34mO O @[m) @[31m/ |" logo+ + s" @[m`-^--'@[31m`< '" logo+ + s" (_.) _ ) /" logo+ + s" `.___/` /" logo+ + s" `-----' /" logo+ + s" @[33m<----.@[31m __ / __ \" logo+ + s" @[33m<----|====@[31mO)))@[33m==@[31m) \) /@[33m====|" logo+ + s" @[33m<----'@[31m `--' `.__,' \" logo+ + s" | |" logo+ + s" \ / /\" logo+ + s" @[36m______@[31m( (_ / \______/" logo+ + s" @[36m,' ,-----' |" logo+ + s" `--{__________)@[m" logo+ + + 2drop ; Modified: head/sys/boot/forth/logo-beastiebw.4th ============================================================================== --- head/sys/boot/forth/logo-beastiebw.4th Thu Apr 2 01:46:17 2015 (r280974) +++ head/sys/boot/forth/logo-beastiebw.4th Thu Apr 2 01:48:12 2015 (r280975) @@ -27,25 +27,33 @@ 46 logoX ! 4 logoY ! \ Initialize logo placement defaults +: logo+ ( x y c-addr/u -- x y' ) + 2swap 2dup at-xy 2swap \ position the cursor + type \ print to the screen + 1+ \ increase y for next time we're called +; + : logo ( x y -- ) \ B/W BSD mascot (19 rows x 34 columns) - 2dup at-xy ." , ," 1+ - 2dup at-xy ." /( )`" 1+ - 2dup at-xy ." \ \___ / |" 1+ - 2dup at-xy ." /- _ `-/ '" 1+ - 2dup at-xy ." (/\/ \ \ /\" 1+ - 2dup at-xy ." / / | ` \" 1+ - 2dup at-xy ." O O ) / |" 1+ - 2dup at-xy ." `-^--'`< '" 1+ - 2dup at-xy ." (_.) _ ) /" 1+ - 2dup at-xy ." `.___/` /" 1+ - 2dup at-xy ." `-----' /" 1+ - 2dup at-xy ." <----. __ / __ \" 1+ - 2dup at-xy ." <----|====O)))==) \) /====|" 1+ - 2dup at-xy ." <----' `--' `.__,' \" 1+ - 2dup at-xy ." | |" 1+ - 2dup at-xy ." \ / /\" 1+ - 2dup at-xy ." ______( (_ / \______/" 1+ - 2dup at-xy ." ,' ,-----' |" 1+ - at-xy ." `--{__________)" + s" , ," logo+ + s" /( )`" logo+ + s" \ \___ / |" logo+ + s" /- _ `-/ '" logo+ + s" (/\/ \ \ /\" logo+ + s" / / | ` \" logo+ + s" O O ) / |" logo+ + s" `-^--'`< '" logo+ + s" (_.) _ ) /" logo+ + s" `.___/` /" logo+ + s" `-----' /" logo+ + s" <----. __ / __ \" logo+ + s" <----|====O)))==) \) /====|" logo+ + s" <----' `--' `.__,' \" logo+ + s" | |" logo+ + s" \ / /\" logo+ + s" ______( (_ / \______/" logo+ + s" ,' ,-----' |" logo+ + s" `--{__________)" logo+ + + 2drop ; Modified: head/sys/boot/forth/logo-fbsdbw.4th ============================================================================== --- head/sys/boot/forth/logo-fbsdbw.4th Thu Apr 2 01:46:17 2015 (r280974) +++ head/sys/boot/forth/logo-fbsdbw.4th Thu Apr 2 01:48:12 2015 (r280975) @@ -27,19 +27,27 @@ 52 logoX ! 9 logoY ! \ Initialize logo placement defaults +: logo+ ( x y c-addr/u -- x y' ) + 2swap 2dup at-xy 2swap \ position the cursor + type \ print to the screen + 1+ \ increase y for next time we're called +; + : logo ( x y -- ) \ "FreeBSD" logo in B/W (13 rows x 21 columns) - 2dup at-xy ." ______" 1+ - 2dup at-xy ." | ____| __ ___ ___ " 1+ - 2dup at-xy ." | |__ | '__/ _ \/ _ \" 1+ - 2dup at-xy ." | __|| | | __/ __/" 1+ - 2dup at-xy ." | | | | | | |" 1+ - 2dup at-xy ." |_| |_| \___|\___|" 1+ - 2dup at-xy ." ____ _____ _____" 1+ - 2dup at-xy ." | _ \ / ____| __ \" 1+ - 2dup at-xy ." | |_) | (___ | | | |" 1+ - 2dup at-xy ." | _ < \___ \| | | |" 1+ - 2dup at-xy ." | |_) |____) | |__| |" 1+ - 2dup at-xy ." | | | |" 1+ - at-xy ." |____/|_____/|_____/" + s" ______" logo+ + s" | ____| __ ___ ___ " logo+ + s" | |__ | '__/ _ \/ _ \" logo+ + s" | __|| | | __/ __/" logo+ + s" | | | | | | |" logo+ + s" |_| |_| \___|\___|" logo+ + s" ____ _____ _____" logo+ + s" | _ \ / ____| __ \" logo+ + s" | |_) | (___ | | | |" logo+ + s" | _ < \___ \| | | |" logo+ + s" | |_) |____) | |__| |" logo+ + s" | | | |" logo+ + s" |____/|_____/|_____/" logo+ + + 2drop ; Modified: head/sys/boot/forth/logo-orb.4th ============================================================================== --- head/sys/boot/forth/logo-orb.4th Thu Apr 2 01:46:17 2015 (r280974) +++ head/sys/boot/forth/logo-orb.4th Thu Apr 2 01:48:12 2015 (r280975) @@ -26,21 +26,30 @@ 46 logoX ! 7 logoY ! \ Initialize logo placement defaults +: logo+ ( x y c-addr/u -- x y' ) + 2swap 2dup at-xy 2swap \ position the cursor + [char] @ escc! \ replace @ with Esc + type \ print to the screen + 1+ \ increase y for next time we're called +; + : logo ( x y -- ) \ color Orb mascot (15 rows x 30 columns) - 2dup at-xy ." ``` `" 1+ - 2dup at-xy ." s` `.....---.......--.``` -/" 1+ - 2dup at-xy ." +o .--` /y:` +." 1+ - 2dup at-xy ." yo`:. :o `+-" 1+ - 2dup at-xy ." y/ -/` -o/" 1+ - 2dup at-xy ." .- ::/sy+:." 1+ - 2dup at-xy ." / `-- /" 1+ - 2dup at-xy ." `: :`" 1+ - 2dup at-xy ." `: :`" 1+ - 2dup at-xy ." / /" 1+ - 2dup at-xy ." .- -." 1+ - 2dup at-xy ." -- -." 1+ - 2dup at-xy ." `:` `:`" 1+ - 2dup at-xy ." .-- `--." 1+ - at-xy ." .---.....----." + s" @[31m``` @[31;1m`@[31m" logo+ + s" s` `.....---...@[31;1m....--.``` -/@[31m" logo+ + s" +o .--` @[31;1m/y:` +.@[31m" logo+ + s" yo`:. @[31;1m:o `+-@[31m" logo+ + s" y/ @[31;1m-/` -o/@[31m" logo+ + s" .- @[31;1m::/sy+:.@[31m" logo+ + s" / @[31;1m`-- /@[31m" logo+ + s" `: @[31;1m:`@[31m" logo+ + s" `: @[31;1m:`@[31m" logo+ + s" / @[31;1m/@[31m" logo+ + s" .- @[31;1m-.@[31m" logo+ + s" -- @[31;1m-.@[31m" logo+ + s" `:` @[31;1m`:`" logo+ + s" @[31;1m.-- `--." logo+ + s" .---.....----.@[m" logo+ + + 2drop ; Modified: head/sys/boot/forth/logo-orbbw.4th ============================================================================== --- head/sys/boot/forth/logo-orbbw.4th Thu Apr 2 01:46:17 2015 (r280974) +++ head/sys/boot/forth/logo-orbbw.4th Thu Apr 2 01:48:12 2015 (r280975) @@ -26,21 +26,29 @@ 46 logoX ! 7 logoY ! \ Initialize logo placement defaults +: logo+ ( x y c-addr/u -- x y' ) + 2swap 2dup at-xy 2swap \ position the cursor + type \ print to the screen + 1+ \ increase y for next time we're called +; + : logo ( x y -- ) \ B/W Orb mascot (15 rows x 32 columns) - 2dup at-xy ." ``` `" 1+ - 2dup at-xy ." s` `.....---.......--.``` -/" 1+ - 2dup at-xy ." +o .--` /y:` +." 1+ - 2dup at-xy ." yo`:. :o `+-" 1+ - 2dup at-xy ." y/ -/` -o/" 1+ - 2dup at-xy ." .- ::/sy+:." 1+ - 2dup at-xy ." / `-- /" 1+ - 2dup at-xy ." `: :`" 1+ - 2dup at-xy ." `: :`" 1+ - 2dup at-xy ." / /" 1+ - 2dup at-xy ." .- -." 1+ - 2dup at-xy ." -- -." 1+ - 2dup at-xy ." `:` `:`" 1+ - 2dup at-xy ." .-- `--." 1+ - at-xy ." .---.....----." + s" ``` `" logo+ + s" s` `.....---.......--.``` -/" logo+ + s" +o .--` /y:` +." logo+ + s" yo`:. :o `+-" logo+ + s" y/ -/` -o/" logo+ + s" .- ::/sy+:." logo+ + s" / `-- /" logo+ + s" `: :`" logo+ + s" `: :`" logo+ + s" / /" logo+ + s" .- -." logo+ + s" -- -." logo+ + s" `:` `:`" logo+ + s" .-- `--." logo+ + s" .---.....----." logo+ + + 2drop ; Modified: head/sys/boot/forth/menu.4th ============================================================================== --- head/sys/boot/forth/menu.4th Thu Apr 2 01:46:17 2015 (r280974) +++ head/sys/boot/forth/menu.4th Thu Apr 2 01:48:12 2015 (r280975) @@ -395,14 +395,15 @@ also menu-infrastructure definitions setenv \ Assign third to ansi_caption[x][y] - kerncapbuf 0 s" Kernel: " strcat + kerncapbuf 0 s" @[1mK@[37mernel: " [char] @ escc! strcat kernmenuidx @ [char] 0 = if - s" default/" + s" default/@[32m" else - s" " - then strcat + s" @[34;1m" + then + [char] @ escc! strcat 2over strcat - s" " strcat + s" @[37m" [char] @ escc! strcat kernidx @ kernmenuidx @ ansi_caption[x][y] setenv Modified: head/sys/boot/forth/screen.4th ============================================================================== --- head/sys/boot/forth/screen.4th Thu Apr 2 01:46:17 2015 (r280974) +++ head/sys/boot/forth/screen.4th Thu Apr 2 01:48:12 2015 (r280975) @@ -62,3 +62,13 @@ marker task-screen.4th \ Disable inverse foreground/background mode ( Esc-[27m ) : -inv ( -- ) escc 27 .# [char] m emit ; + +\ Convert all occurrences of given character (c) in string (c-addr/u) to Esc +: escc! ( c-addr/u c -- c-addr/u ) + 2 pick 2 pick + begin dup 0> while + over c@ 3 pick = if over 27 swap c! then + 1- swap 1+ swap + repeat + 2drop drop +; From owner-svn-src-all@FreeBSD.ORG Thu Apr 2 01:49:14 2015 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 126A39DF; Thu, 2 Apr 2015 01:49: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 E7E80C2E; Thu, 2 Apr 2015 01:49: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 t321nD1R041046; Thu, 2 Apr 2015 01:49:13 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t321nDIZ041045; Thu, 2 Apr 2015 01:49:13 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201504020149.t321nDIZ041045@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Thu, 2 Apr 2015 01:49:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280976 - head/sys/boot/forth X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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 Apr 2015 01:49:14 -0000 Author: dteske Date: Thu Apr 2 01:49:12 2015 New Revision: 280976 URL: https://svnweb.freebsd.org/changeset/base/280976 Log: Use ^[[m mode-ending (as-in screen.4th `me') versus ^[[37m MFC after: 3 days X-MFC-to: stable/10 Modified: head/sys/boot/forth/menu.rc Modified: head/sys/boot/forth/menu.rc ============================================================================== --- head/sys/boot/forth/menu.rc Thu Apr 2 01:48:12 2015 (r280975) +++ head/sys/boot/forth/menu.rc Thu Apr 2 01:49:12 2015 (r280976) @@ -28,22 +28,22 @@ set mainmenu_init[1]="init_boot" set mainmenu_caption[1]="Boot Multi User [Enter]" set maintoggled_text[1]="Boot [S]ingle User [Enter]" set mainmenu_command[1]="boot" -set mainansi_caption[1]="Boot Multi User [Enter]" -set maintoggled_ansi[1]="Boot Single User [Enter]" +set mainansi_caption[1]="Boot Multi User [Enter]" +set maintoggled_ansi[1]="Boot Single User [Enter]" \ keycode set by init_boot set mainmenu_init[2]="init_altboot" set mainmenu_caption[2]="Boot [S]ingle User" set maintoggled_text[2]="Boot [M]ulti User" set mainmenu_command[2]="altboot" -set mainansi_caption[2]="Boot Single User" -set maintoggled_ansi[2]="Boot Multi User" +set mainansi_caption[2]="Boot Single User" +set maintoggled_ansi[2]="Boot Multi User" \ keycode set by init_altboot set mainmenu_caption[3]="[Esc]ape to loader prompt" set mainmenu_command[3]="goto_prompt" set mainmenu_keycode[3]=27 -set mainansi_caption[3]="Escape to loader prompt" +set mainansi_caption[3]="Escape to loader prompt" \ Enable built-in "Reboot" trailing menuitem \ NOTE: appears before menu_options if configured @@ -62,7 +62,7 @@ set mainmenu_keycode[5]=107 set mainmenu_caption[6]="Configure Boot [O]ptions..." set mainmenu_command[6]="2 goto_menu" set mainmenu_keycode[6]=111 -set mainansi_caption[6]="Configure Boot Options..." +set mainansi_caption[6]="Configure Boot Options..." \ \ BOOT OPTIONS MENU @@ -73,12 +73,12 @@ set menuset_name2="options" set optionsmenu_caption[1]="Back to Main Menu [Backspace]" set optionsmenu_command[1]="1 goto_menu" set optionsmenu_keycode[1]=8 -set optionsansi_caption[1]="Back to Main Menu [Backspace]" +set optionsansi_caption[1]="Back to Main Menu [Backspace]" set optionsmenu_caption[2]="Load System [D]efaults" set optionsmenu_command[2]="set_default_boot_options" set optionsmenu_keycode[2]=100 -set optionsansi_caption[2]="Load System Defaults" +set optionsansi_caption[2]="Load System Defaults" set optionsmenu_options=3 set optionsmenu_optionstext="Boot Options:" @@ -88,32 +88,32 @@ set optionsmenu_caption[3]="[A]CPI Suppo set optionstoggled_text[3]="[A]CPI Support On" set optionsmenu_command[3]="toggle_acpi" set optionsmenu_keycode[3]=97 -set optionsansi_caption[3]="ACPI Support Off" -set optionstoggled_ansi[3]="ACPI Support On" +set optionsansi_caption[3]="ACPI Support Off" +set optionstoggled_ansi[3]="ACPI Support On" set optionsmenu_init[4]="init_safemode" set optionsmenu_caption[4]="Safe [M]ode... off" set optionstoggled_text[4]="Safe [M]ode... On" set optionsmenu_command[4]="toggle_safemode" set optionsmenu_keycode[4]=109 -set optionsansi_caption[4]="Safe Mode... Off" -set optionstoggled_ansi[4]="Safe Mode... On" +set optionsansi_caption[4]="Safe Mode... Off" +set optionstoggled_ansi[4]="Safe Mode... On" set optionsmenu_init[5]="init_singleuser" set optionsmenu_caption[5]="[S]ingle User. off" set optionstoggled_text[5]="[S]ingle User. On" set optionsmenu_command[5]="toggle_singleuser" set optionsmenu_keycode[5]=115 -set optionsansi_caption[5]="Single User. Off" -set optionstoggled_ansi[5]="Single User. On" +set optionsansi_caption[5]="Single User. Off" +set optionstoggled_ansi[5]="Single User. On" set optionsmenu_init[6]="init_verbose" set optionsmenu_caption[6]="[V]erbose..... off" set optionstoggled_text[6]="[V]erbose..... On" set optionsmenu_command[6]="toggle_verbose" set optionsmenu_keycode[6]=118 -set optionsansi_caption[6]="Verbose..... Off" -set optionstoggled_ansi[6]="Verbose..... On" +set optionsansi_caption[6]="Verbose..... Off" +set optionstoggled_ansi[6]="Verbose..... On" \ Enable automatic booting (add ``autoboot_delay=N'' to loader.conf(5) to \ customize the timeout; default is 10-seconds) From owner-svn-src-all@FreeBSD.ORG Thu Apr 2 02:15:00 2015 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 6AF67CC0; Thu, 2 Apr 2015 02:15: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 55D8BEB4; Thu, 2 Apr 2015 02:15: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 t322ExBK054603; Thu, 2 Apr 2015 02:14:59 GMT (envelope-from wblock@FreeBSD.org) Received: (from wblock@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t322Exvl054602; Thu, 2 Apr 2015 02:14:59 GMT (envelope-from wblock@FreeBSD.org) Message-Id: <201504020214.t322Exvl054602@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: wblock set sender to wblock@FreeBSD.org using -f From: Warren Block Date: Thu, 2 Apr 2015 02:14: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: r280977 - stable/10/usr.bin/logger 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 Apr 2015 02:15:00 -0000 Author: wblock (doc committer) Date: Thu Apr 2 02:14:58 2015 New Revision: 280977 URL: https://svnweb.freebsd.org/changeset/base/280977 Log: MFC r262769: - Clarify usage of the -f option. MFC r280336: Describe the behavior when both -f and a message are given. Pointed out by Raphael Abreu on freebsd-doc. Modified: stable/10/usr.bin/logger/logger.1 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/logger/logger.1 ============================================================================== --- stable/10/usr.bin/logger/logger.1 Thu Apr 2 01:49:12 2015 (r280976) +++ stable/10/usr.bin/logger/logger.1 Thu Apr 2 02:14:58 2015 (r280977) @@ -28,7 +28,7 @@ .\" @(#)logger.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd August 2, 2006 +.Dd March 21, 2015 .Dt LOGGER 1 .Os .Sh NAME @@ -74,7 +74,8 @@ with each line. .It Fl s Log the message to standard error, as well as the system log. .It Fl f Ar file -Log the specified file. +Read the contents of the specified file into syslog. +This option is ignored when a message is also specified. .It Fl h Ar host Send the message to the remote system .Ar host From owner-svn-src-all@FreeBSD.ORG Thu Apr 2 02:43:49 2015 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 8F1F330F; Thu, 2 Apr 2015 02:43: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 7A5BC1DA; Thu, 2 Apr 2015 02:43: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 t322hnVd068497; Thu, 2 Apr 2015 02:43:49 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t322hnpg068496; Thu, 2 Apr 2015 02:43:49 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201504020243.t322hnpg068496@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Thu, 2 Apr 2015 02:43:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280978 - head/sys/dev/gpio 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 Apr 2015 02:43:49 -0000 Author: gonzo Date: Thu Apr 2 02:43:48 2015 New Revision: 280978 URL: https://svnweb.freebsd.org/changeset/base/280978 Log: Handle multiple "gpio-leds"-compatible nodes There are cases when gpioled nodes in DTS come from different sources (e.g. standard Beaglebone Black LEDs in main DTS + shield LEDs in overlay DTS) so instead of handling only first compatible node go through all child nodes Modified: head/sys/dev/gpio/gpioled.c Modified: head/sys/dev/gpio/gpioled.c ============================================================================== --- head/sys/dev/gpio/gpioled.c Thu Apr 2 02:14:58 2015 (r280977) +++ head/sys/dev/gpio/gpioled.c Thu Apr 2 02:43:48 2015 (r280978) @@ -106,15 +106,16 @@ gpioled_identify(driver_t *driver, devic root = OF_finddevice("/"); if (root == 0) return; - leds = fdt_find_compatible(root, "gpio-leds", 1); - if (leds == 0) - return; - /* Traverse the 'gpio-leds' node and add its children. */ - for (child = OF_child(leds); child != 0; child = OF_peer(child)) { - if (!OF_hasprop(child, "gpios")) - continue; - if (ofw_gpiobus_add_fdt_child(bus, driver->name, child) == NULL) + for (leds = OF_child(root); leds != 0; leds = OF_peer(leds)) { + if (!fdt_is_compatible_strict(leds, "gpio-leds")) continue; + /* Traverse the 'gpio-leds' node and add its children. */ + for (child = OF_child(leds); child != 0; child = OF_peer(child)) { + if (!OF_hasprop(child, "gpios")) + continue; + if (ofw_gpiobus_add_fdt_child(bus, driver->name, child) == NULL) + continue; + } } } #endif From owner-svn-src-all@FreeBSD.ORG Thu Apr 2 03:25:37 2015 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 34D9EC7E; Thu, 2 Apr 2015 03:25: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 0644F935; Thu, 2 Apr 2015 03:25: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 t323Pa8P088201; Thu, 2 Apr 2015 03:25:36 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t323PaNE088200; Thu, 2 Apr 2015 03:25:36 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201504020325.t323PaNE088200@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Thu, 2 Apr 2015 03:25:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280979 - 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: Thu, 02 Apr 2015 03:25:37 -0000 Author: gonzo Date: Thu Apr 2 03:25:35 2015 New Revision: 280979 URL: https://svnweb.freebsd.org/changeset/base/280979 Log: - Make interrupt resource optional: some upstream FDT blobs (e.g. TI's) do not have interupt property in pl310 node. Interrupt is used only to detect cache activity when L2 cache is disabled, it's not vital for normal operations. - Fix intrhook allocation/initialization Modified: head/sys/arm/arm/pl310.c Modified: head/sys/arm/arm/pl310.c ============================================================================== --- head/sys/arm/arm/pl310.c Thu Apr 2 02:43:48 2015 (r280978) +++ head/sys/arm/arm/pl310.c Thu Apr 2 03:25:35 2015 (r280979) @@ -420,6 +420,7 @@ pl310_config_intr(void *arg) config_intrhook_disestablish(sc->sc_ich); free(sc->sc_ich, M_DEVBUF); + sc->sc_ich = NULL; } static int @@ -453,7 +454,7 @@ pl310_attach(device_t dev) sc->sc_irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_ACTIVE | RF_SHAREABLE); if (sc->sc_irq_res == NULL) { - panic("Cannot allocate IRQ\n"); + device_printf(dev, "cannot allocate IRQ, not using interrupt\n"); } pl310_softc = sc; @@ -505,14 +506,18 @@ pl310_attach(device_t dev) if (bootverbose) pl310_print_config(sc); } else { - malloc(sizeof(*sc->sc_ich), M_DEVBUF, M_WAITOK); - sc->sc_ich->ich_func = pl310_config_intr; - sc->sc_ich->ich_arg = sc; - if (config_intrhook_establish(sc->sc_ich) != 0) { - device_printf(dev, - "config_intrhook_establish failed\n"); - return(ENXIO); + if (sc->sc_irq_res != NULL) { + sc->sc_ich = malloc(sizeof(*sc->sc_ich), M_DEVBUF, M_WAITOK); + sc->sc_ich->ich_func = pl310_config_intr; + sc->sc_ich->ich_arg = sc; + if (config_intrhook_establish(sc->sc_ich) != 0) { + device_printf(dev, + "config_intrhook_establish failed\n"); + free(sc->sc_ich, M_DEVBUF); + return(ENXIO); + } } + device_printf(dev, "L2 Cache disabled\n"); } From owner-svn-src-all@FreeBSD.ORG Thu Apr 2 04:24:46 2015 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 4F58D357; Thu, 2 Apr 2015 04:24:46 +0000 (UTC) Received: from mail.strugglingcoder.info (strugglingcoder.info [65.19.130.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 380BBE76; Thu, 2 Apr 2015 04:24:45 +0000 (UTC) Received: from localhost (unknown [10.1.1.3]) (Authenticated sender: hiren@strugglingcoder.info) by mail.strugglingcoder.info (Postfix) with ESMTPSA id B2C2A10B741; Wed, 1 Apr 2015 21:24:44 -0700 (PDT) Date: Wed, 1 Apr 2015 21:24:44 -0700 From: hiren panchasara To: Randall Stewart Subject: Re: svn commit: r280872 - in head/sys: kern sys Message-ID: <20150402042444.GB70040@strugglingcoder.info> References: <201503310018.t2V0I1o7015125@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="7ZAtKRhVyVSsbBD2" Content-Disposition: inline In-Reply-To: <201503310018.t2V0I1o7015125@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 Apr 2015 04:24:46 -0000 --7ZAtKRhVyVSsbBD2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 03/31/15 at 12:18P, Randall Stewart wrote: > Author: rrs > Date: Tue Mar 31 00:18:00 2015 > New Revision: 280872 > URL: https://svnweb.freebsd.org/changeset/base/280872 >=20 > Log: > Adopt jhb's suggested changes, updated comments and callout_migration()= moving > to kern/kern_timeout.c > =20 > This does *not* address his -1 -> NOCPU comment. > =20 > Sponsored by: Netflix Inc. Thanks a lot for all the work, Randall! With r280871 now we should be able to MFC all these fixes back to 10, right? cheers, Hiren --7ZAtKRhVyVSsbBD2 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQF8BAEBCgBmBQJVHMSMXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRBNEUyMEZBMUQ4Nzg4RjNGMTdFNjZGMDI4 QjkyNTBFMTU2M0VERkU1AAoJEIuSUOFWPt/lrjUH/2tEMdpmGhPYnfXYNVXABiL/ PcHxKkPKKCMTAFIXuVWAbJUp+rRJDhVOqdtKnUHnjASrfBhxpbABafnXPQwyPaMt BIq2R3yXQUlLSWtdmbxI929nwhul87bnBJ1hcKUuUsWl+SL5Og3lHlVHP331ILHL xS3k0iVG3m8Nu4+55t3DMD5MapoUa/gYWihj28N1KCTgEH5tH0NHDrL40qwpA2Jz FvpkE1foN9Qm8y0b5QKH1nfLFUFE5RkTWmzb6RaJgDGW9eoH0F3U+FMYkEJHBovO ACZDkCU7ZZzXFlBzHM2LI8WuOXAuhlVFt0OUjVTZpDSf6ysIXEDZYxfcxUQRctM= =tQD0 -----END PGP SIGNATURE----- --7ZAtKRhVyVSsbBD2-- From owner-svn-src-all@FreeBSD.ORG Thu Apr 2 06:15:21 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id 4C1E7F9E; Thu, 2 Apr 2015 06:15:21 +0000 (UTC) Date: Thu, 2 Apr 2015 06:15:21 +0000 From: Alexey Dokuchaev To: David Chisnall Subject: Re: svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom Message-ID: <20150402061521.GA89620@FreeBSD.org> References: <20150401113628.GA16649@dft-labs.eu> <20150401114313.GZ64665@FreeBSD.org> <20150401115204.GB16649@dft-labs.eu> <20150401115729.GA64665@FreeBSD.org> <20150401120229.GA2201@dft-labs.eu> <20150401121344.GC64665@FreeBSD.org> <20150401122916.GA10926@dft-labs.eu> <20150401151118.GA16151@troutmask.apl.washington.edu> <20150401174140.GB2575@dft-labs.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Cc: Mateusz Guzik , svn-src-all@freebsd.org, src-committers@freebsd.org, Gleb Smirnoff , Steve Kargl , svn-src-head@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 Apr 2015 06:15:21 -0000 On Wed, Apr 01, 2015 at 07:04:03PM +0100, David Chisnall wrote: > This almost certainly does not make people happy: > > - * Copyright (c) 2000 Mark R. V. Murray & Jeroen C. van Gelderen > - * Copyright (c) 2001-2004 Mark R. V. Murray > - * Copyright (c) 2014 Eitan Adler > + * Copyright (c) 2015 Mateusz Guzik > * All rights reserved. > * > + * Some dudes which previously held the copyright: > + * Marc V. R. Murray, Jeroen C. van Gelderen, Eytan Adrel > + * > > Please try not to violate copyright in commits to the FreeBSD project. > We get cranky when we have to talk to lawyers. [...] I also want to point out that Jeroen's name (all of it) was mistyped; that is disrespectful and rude and should be fixed. ./danfe From owner-svn-src-all@FreeBSD.ORG Thu Apr 2 06:58:22 2015 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 C1644BC6; Thu, 2 Apr 2015 06:58: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 A1AEAF07; Thu, 2 Apr 2015 06:58: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 t326wMOa086733; Thu, 2 Apr 2015 06:58:22 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t326wI8q086711; Thu, 2 Apr 2015 06:58:18 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201504020658.t326wI8q086711@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 2 Apr 2015 06:58:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280980 - in head: . lib/csu/i386-elf sys/boot/i386/boot2 sys/boot/i386/gptboot sys/boot/i386/gptzfsboot sys/boot/i386/zfsboot sys/boot/mips/beri/boot2 sys/boot/pc98/boot0 sys/boot/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: Thu, 02 Apr 2015 06:58:22 -0000 Author: dim Date: Thu Apr 2 06:58:17 2015 New Revision: 280980 URL: https://svnweb.freebsd.org/changeset/base/280980 Log: Ensure the cross assembler, linker and objcopy are used for the build32 stage, just like for the regular world stage. Reviewed by: rodrigc, imp, bapt, emaste MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D2187 Modified: head/Makefile.inc1 head/lib/csu/i386-elf/Makefile head/sys/boot/i386/boot2/Makefile head/sys/boot/i386/gptboot/Makefile head/sys/boot/i386/gptzfsboot/Makefile head/sys/boot/i386/zfsboot/Makefile head/sys/boot/mips/beri/boot2/Makefile head/sys/boot/pc98/boot0.5/Makefile head/sys/boot/pc98/boot0/Makefile head/sys/boot/pc98/boot2/Makefile Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Thu Apr 2 03:25:35 2015 (r280979) +++ head/Makefile.inc1 Thu Apr 2 06:58:17 2015 (r280980) @@ -411,8 +411,9 @@ LIB32CPUFLAGS= -march=${TARGET_CPUTYPE} LIB32WMAKEENV= MACHINE=i386 MACHINE_ARCH=i386 \ MACHINE_CPU="i686 mmx sse sse2" LIB32WMAKEFLAGS= \ - AS="${AS} --32" \ - LD="${LD} -m elf_i386_fbsd -Y P,${LIB32TMP}/usr/lib32" + AS="${XAS} --32" \ + LD="${XLD} -m elf_i386_fbsd -Y P,${LIB32TMP}/usr/lib32" \ + OBJCOPY="${XOBJCOPY}" .elif ${TARGET_ARCH} == "powerpc64" .if empty(TARGET_CPUTYPE) @@ -422,7 +423,8 @@ LIB32CPUFLAGS= -mcpu=${TARGET_CPUTYPE} .endif LIB32WMAKEENV= MACHINE=powerpc MACHINE_ARCH=powerpc LIB32WMAKEFLAGS= \ - LD="${LD} -m elf32ppc_fbsd" + LD="${XLD} -m elf32ppc_fbsd" \ + OBJCOPY="${XOBJCOPY}" .endif Modified: head/lib/csu/i386-elf/Makefile ============================================================================== --- head/lib/csu/i386-elf/Makefile Thu Apr 2 03:25:35 2015 (r280979) +++ head/lib/csu/i386-elf/Makefile Thu Apr 2 06:58:17 2015 (r280980) @@ -35,7 +35,7 @@ crt1_c.o: crt1_c.s crt1.o: crt1_c.o crt1_s.o ${LD} ${_LDFLAGS} -o crt1.o -r crt1_s.o crt1_c.o - objcopy --localize-symbol _start1 crt1.o + ${OBJCOPY} --localize-symbol _start1 crt1.o Scrt1_c.s: crt1_c.c ${CC} ${CFLAGS} -fPIC -DPIC -S -o ${.TARGET} ${.CURDIR}/crt1_c.c @@ -46,7 +46,7 @@ Scrt1_c.o: Scrt1_c.s Scrt1.o: Scrt1_c.o crt1_s.o ${LD} ${_LDFLAGS} -o Scrt1.o -r crt1_s.o Scrt1_c.o - objcopy --localize-symbol _start1 Scrt1.o + ${OBJCOPY} --localize-symbol _start1 Scrt1.o realinstall: ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ Modified: head/sys/boot/i386/boot2/Makefile ============================================================================== --- head/sys/boot/i386/boot2/Makefile Thu Apr 2 03:25:35 2015 (r280979) +++ head/sys/boot/i386/boot2/Makefile Thu Apr 2 06:58:17 2015 (r280980) @@ -61,7 +61,7 @@ boot: boot1 boot2 CLEANFILES+= boot1 boot1.out boot1.o boot1: boot1.out - objcopy -S -O binary boot1.out ${.TARGET} + ${OBJCOPY} -S -O binary boot1.out ${.TARGET} boot1.out: boot1.o ${LD} ${LD_FLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} boot1.o @@ -82,7 +82,7 @@ boot2.ldr: dd if=/dev/zero of=${.TARGET} bs=512 count=1 boot2.bin: boot2.out - objcopy -S -O binary boot2.out ${.TARGET} + ${OBJCOPY} -S -O binary boot2.out ${.TARGET} boot2.out: ${BTXCRT} boot2.o sio.o ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} Modified: head/sys/boot/i386/gptboot/Makefile ============================================================================== --- head/sys/boot/i386/gptboot/Makefile Thu Apr 2 03:25:35 2015 (r280979) +++ head/sys/boot/i386/gptboot/Makefile Thu Apr 2 06:58:17 2015 (r280980) @@ -55,7 +55,7 @@ gptboot: gptldr.bin gptboot.bin ${BTXKER CLEANFILES+= gptldr.bin gptldr.out gptldr.o gptldr.bin: gptldr.out - objcopy -S -O binary gptldr.out ${.TARGET} + ${OBJCOPY} -S -O binary gptldr.out ${.TARGET} gptldr.out: gptldr.o ${LD} ${LD_FLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} gptldr.o @@ -64,7 +64,7 @@ CLEANFILES+= gptboot.bin gptboot.out gpt cons.o util.o gptboot.bin: gptboot.out - objcopy -S -O binary gptboot.out ${.TARGET} + ${OBJCOPY} -S -O binary gptboot.out ${.TARGET} gptboot.out: ${BTXCRT} gptboot.o sio.o gpt.o crc32.o drv.o cons.o util.o ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBSTAND} Modified: head/sys/boot/i386/gptzfsboot/Makefile ============================================================================== --- head/sys/boot/i386/gptzfsboot/Makefile Thu Apr 2 03:25:35 2015 (r280979) +++ head/sys/boot/i386/gptzfsboot/Makefile Thu Apr 2 06:58:17 2015 (r280980) @@ -53,7 +53,7 @@ gptzfsboot: gptldr.bin gptzfsboot.bin ${ CLEANFILES+= gptldr.bin gptldr.out gptldr.o gptldr.bin: gptldr.out - objcopy -S -O binary gptldr.out ${.TARGET} + ${OBJCOPY} -S -O binary gptldr.out ${.TARGET} gptldr.out: gptldr.o ${LD} ${LD_FLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} gptldr.o @@ -62,7 +62,7 @@ CLEANFILES+= gptzfsboot.bin gptzfsboot.o drv.o gpt.o util.o gptzfsboot.bin: gptzfsboot.out - objcopy -S -O binary gptzfsboot.out ${.TARGET} + ${OBJCOPY} -S -O binary gptzfsboot.out ${.TARGET} gptzfsboot.out: ${BTXCRT} zfsboot.o sio.o gpt.o drv.o cons.o util.o ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBSTAND} Modified: head/sys/boot/i386/zfsboot/Makefile ============================================================================== --- head/sys/boot/i386/zfsboot/Makefile Thu Apr 2 03:25:35 2015 (r280979) +++ head/sys/boot/i386/zfsboot/Makefile Thu Apr 2 06:58:17 2015 (r280980) @@ -49,7 +49,7 @@ zfsboot: zfsboot1 zfsboot2 CLEANFILES+= zfsboot1 zfsldr.out zfsldr.o zfsboot1: zfsldr.out - objcopy -S -O binary zfsldr.out ${.TARGET} + ${OBJCOPY} -S -O binary zfsldr.out ${.TARGET} zfsldr.out: zfsldr.o ${LD} ${LD_FLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} zfsldr.o @@ -75,7 +75,7 @@ zfsboot.ldr: cp /dev/null ${.TARGET} zfsboot.bin: zfsboot.out - objcopy -S -O binary zfsboot.out ${.TARGET} + ${OBJCOPY} -S -O binary zfsboot.out ${.TARGET} zfsboot.out: ${BTXCRT} zfsboot.o sio.o drv.o cons.o util.o ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBSTAND} Modified: head/sys/boot/mips/beri/boot2/Makefile ============================================================================== --- head/sys/boot/mips/beri/boot2/Makefile Thu Apr 2 03:25:35 2015 (r280979) +++ head/sys/boot/mips/beri/boot2/Makefile Thu Apr 2 06:58:17 2015 (r280980) @@ -74,7 +74,7 @@ flashboot.elf: relocate.o start.o boot2. ${LD} ${_LDFLAGS} -T ${.CURDIR}/flashboot.ldscript -o ${.TARGET} \ ${.ALLSRC} ${LIBSTAND} flashboot: flashboot.elf - objcopy -S -O binary ${.TARGET}.elf ${.TARGET} + ${OBJCOPY} -S -O binary ${.TARGET}.elf ${.TARGET} flashboot.md5: flashboot md5 flashboot > flashboot.md5 Modified: head/sys/boot/pc98/boot0.5/Makefile ============================================================================== --- head/sys/boot/pc98/boot0.5/Makefile Thu Apr 2 03:25:35 2015 (r280979) +++ head/sys/boot/pc98/boot0.5/Makefile Thu Apr 2 06:58:17 2015 (r280980) @@ -21,6 +21,6 @@ ${BOOT}: ${BOOT}.bin cat ${BOOT}.bin /dev/zero | dd of=${BOOT} bs=1 count=7168 ${BOOT}.bin: ${BOOT}.out - objcopy -S -O binary ${BOOT}.out ${.TARGET} + ${OBJCOPY} -S -O binary ${BOOT}.out ${.TARGET} .include Modified: head/sys/boot/pc98/boot0/Makefile ============================================================================== --- head/sys/boot/pc98/boot0/Makefile Thu Apr 2 03:25:35 2015 (r280979) +++ head/sys/boot/pc98/boot0/Makefile Thu Apr 2 06:58:17 2015 (r280980) @@ -16,6 +16,6 @@ BOOT_BOOT0_ORG?= 0x0000 LDFLAGS=-e start -Ttext ${BOOT_BOOT0_ORG} -Wl,-N ${BOOT}: ${BOOT}.out - objcopy -S -O binary ${BOOT}.out ${.TARGET} + ${OBJCOPY} -S -O binary ${BOOT}.out ${.TARGET} .include Modified: head/sys/boot/pc98/boot2/Makefile ============================================================================== --- head/sys/boot/pc98/boot2/Makefile Thu Apr 2 03:25:35 2015 (r280979) +++ head/sys/boot/pc98/boot2/Makefile Thu Apr 2 06:58:17 2015 (r280980) @@ -67,7 +67,7 @@ boot: boot1 boot2 CLEANFILES+= boot1 boot1.out boot1.o boot1: boot1.out - objcopy -S -O binary boot1.out ${.TARGET} + ${OBJCOPY} -S -O binary boot1.out ${.TARGET} boot1.out: boot1.o ${LD} ${LD_FLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} boot1.o @@ -88,7 +88,7 @@ boot2.ldr: dd if=/dev/zero of=${.TARGET} bs=276 count=1 boot2.bin: boot2.out - objcopy -S -O binary boot2.out ${.TARGET} + ${OBJCOPY} -S -O binary boot2.out ${.TARGET} boot2.out: ${BTXCRT} boot2.o sio.o ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} From owner-svn-src-all@FreeBSD.ORG Thu Apr 2 07:21:27 2015 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 0370039E; Thu, 2 Apr 2015 07:21:27 +0000 (UTC) Received: from mail-pd0-x235.google.com (mail-pd0-x235.google.com [IPv6:2607:f8b0:400e:c02::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B6829309; Thu, 2 Apr 2015 07:21:26 +0000 (UTC) Received: by pdbni2 with SMTP id ni2so80958008pdb.1; Thu, 02 Apr 2015 00:21: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=m/pISeYw6PcGwwydvkmGbK6soCN9WWhtoa/3wYtdd00=; b=sDDftKylcF3+aa5SNUKSu64wpVyotCUU5dhmdoWBwfBQ0ty90d1MFy6baa9FZ/QFfb 86xqBt6SBpej1Zk/MnzsHQZzw/zQ1gqe+38smW6DgLdCLmnkChLgv+dKnkRd4EX92Omd QhZCnTFPu/WBqPUuTtqhG0l6qy3WnUNfmMdZJQXrlkKtDPUyyg5SoDUKILD2xUargdQL jbG67QhH593RhEmyMJyKbj7l3Rjs3BH7Fphgza+WiELUHIbE4EK9gpwpb490s6xWQqHD up9QsaLbbeRZ8DJ5EscBpeSDUuYV/rAq3FDEQMZoTI0tcvHYnHvYPitQOi0UnsFKNGr8 4OWw== X-Received: by 10.70.2.98 with SMTP id 2mr83290982pdt.91.1427959286120; Thu, 02 Apr 2015 00:21:26 -0700 (PDT) Received: from ?IPv6:2601:8:ab80:7d6:b1a7:5863:b214:9024? ([2601:8:ab80:7d6:b1a7:5863:b214:9024]) by mx.google.com with ESMTPSA id ks6sm4182025pbc.68.2015.04.02.00.21.24 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 02 Apr 2015 00:21:25 -0700 (PDT) Content-Type: multipart/signed; boundary="Apple-Mail=_99BC0E1E-E1C7-4975-B2A5-C2EC881FFBC4"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom From: Garrett Cooper In-Reply-To: <20150402061521.GA89620@FreeBSD.org> Date: Thu, 2 Apr 2015 00:21:22 -0700 Message-Id: <9A74F95B-C3BE-4EAD-96A1-E7285712CB61@gmail.com> References: <20150401113628.GA16649@dft-labs.eu> <20150401114313.GZ64665@FreeBSD.org> <20150401115204.GB16649@dft-labs.eu> <20150401115729.GA64665@FreeBSD.org> <20150401120229.GA2201@dft-labs.eu> <20150401121344.GC64665@FreeBSD.org> <20150401122916.GA10926@dft-labs.eu> <20150401151118.GA16151@troutmask.apl.washington.edu> <20150401174140.GB2575@dft-labs.eu> <20150402061521.GA89620@FreeBSD.org> To: Alexey Dokuchaev X-Mailer: Apple Mail (2.1878.6) Cc: Mateusz Guzik , src-committers@freebsd.org, svn-src-all@freebsd.org, David Chisnall , Gleb Smirnoff , Steve Kargl , svn-src-head@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 Apr 2015 07:21:27 -0000 --Apple-Mail=_99BC0E1E-E1C7-4975-B2A5-C2EC881FFBC4 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On Apr 1, 2015, at 23:15, Alexey Dokuchaev wrote: > On Wed, Apr 01, 2015 at 07:04:03PM +0100, David Chisnall wrote: >> This almost certainly does not make people happy: >>=20 >> - * Copyright (c) 2000 Mark R. V. Murray & Jeroen C. van Gelderen >> - * Copyright (c) 2001-2004 Mark R. V. Murray >> - * Copyright (c) 2014 Eitan Adler >> + * Copyright (c) 2015 Mateusz Guzik >> * All rights reserved. >> * >> + * Some dudes which previously held the copyright: >> + * Marc V. R. Murray, Jeroen C. van Gelderen, Eytan Adrel >> + * >>=20 >> Please try not to violate copyright in commits to the FreeBSD = project. >> We get cranky when we have to talk to lawyers. [...] >=20 > I also want to point out that Jeroen's name (all of it) was mistyped; = that > is disrespectful and rude and should be fixed. To those who didn=92t get the joke earlier, you were April = Fool=92ed. Cheers... $ svn log -r 280955 ^/head r280955 | kp | 2015-04-01 05:15:01 -0700 (Wed, 01 Apr 2015) | 13 lines Preserve IPv6 fragment IDs accross reassembly and refragmentation When forwarding fragmented IPv6 packets and filtering with PF we reassemble and refragment. That means we generate new fragment headers and a new fragment ID. We already save the fragment IDs so we can do the reassembly so it's straightforward to apply the incoming fragment ID on the refragmented packets. Differential Revision: https://reviews.freebsd.org/D2188 Approved by: gnn (mentor) --Apple-Mail=_99BC0E1E-E1C7-4975-B2A5-C2EC881FFBC4 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 iQEcBAEBCgAGBQJVHO3yAAoJEMZr5QU6S73eJ3oH/jJzKatIb4wMnMTmhWr94qJ/ cM6QlllY4zCaCW6MUU8qP4pfgZ/IAv10AB3jPYpo7mB93Mc3UlmzQZ/oPviEudt7 84pc7IqPB1cXs0K1R9BQXGoVhjok70hK1xVGa8lW1omPz1+0VnZn7rLdjAqRDRdf 9DCTNxz8IDmJ0sf6kKiqRwHeka53chHeoYQ5Z8YgyfcAFGCYVHqbIWSJJXFlaIJb eKOa+82xIffaR47JiUlf++Pvd0g3suHA04AvB0Cb3WE1yC1Zo63FvubfJg9Xnp0w b/39XHQQJleeZwa6leBqjnxF68iEFsMXuay0gM7TgNnkQrzWvrDmohKF5ov1+EY= =70ig -----END PGP SIGNATURE----- --Apple-Mail=_99BC0E1E-E1C7-4975-B2A5-C2EC881FFBC4-- From owner-svn-src-all@FreeBSD.ORG Thu Apr 2 10:19:25 2015 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 6B2CFDE2; Thu, 2 Apr 2015 10: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 56730A7D; Thu, 2 Apr 2015 10: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 t32AJPuG080430; Thu, 2 Apr 2015 10:19:25 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t32AJPHu080429; Thu, 2 Apr 2015 10:19:25 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201504021019.t32AJPHu080429@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 Apr 2015 10:19:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280981 - head/sys/compat/linprocfs 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 Apr 2015 10:19:25 -0000 Author: trasz Date: Thu Apr 2 10:19:24 2015 New Revision: 280981 URL: https://svnweb.freebsd.org/changeset/base/280981 Log: Remove unused code. Differential Revision: https://reviews.freebsd.org/D2195 Reviewed by: kib@, imp@ MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/sys/compat/linprocfs/linprocfs.c Modified: head/sys/compat/linprocfs/linprocfs.c ============================================================================== --- head/sys/compat/linprocfs/linprocfs.c Thu Apr 2 06:58:17 2015 (r280980) +++ head/sys/compat/linprocfs/linprocfs.c Thu Apr 2 10:19:24 2015 (r280981) @@ -394,7 +394,6 @@ linprocfs_domtab(PFS_FILL_ARGS) /* * Filler function for proc/partitions - * */ static int linprocfs_dopartitions(PFS_FILL_ARGS) @@ -402,27 +401,9 @@ linprocfs_dopartitions(PFS_FILL_ARGS) struct g_class *cp; struct g_geom *gp; struct g_provider *pp; - struct nameidata nd; - const char *lep; - char *dlep, *flep; - size_t lep_len; - int error; int major, minor; - /* resolve symlinks etc. in the emulation tree prefix */ - NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, linux_emul_path, td); - flep = NULL; - error = namei(&nd); - lep = linux_emul_path; - if (error == 0) { - if (vn_fullpath(td, nd.ni_vp, &dlep, &flep) == 0) - lep = dlep; - vrele(nd.ni_vp); - } - lep_len = strlen(lep); - g_topology_lock(); - error = 0; sbuf_printf(sb, "major minor #blocks name rio rmerge rsect " "ruse wio wmerge wsect wuse running use aveq\n"); @@ -448,8 +429,7 @@ linprocfs_dopartitions(PFS_FILL_ARGS) } g_topology_unlock(); - free(flep, M_TEMP); - return (error); + return (0); } From owner-svn-src-all@FreeBSD.ORG Thu Apr 2 10:22:55 2015 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 24877F8F; Thu, 2 Apr 2015 10:22:55 +0000 (UTC) Received: from mail-wg0-x231.google.com (mail-wg0-x231.google.com [IPv6:2a00:1450:400c:c00::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AB461B97; Thu, 2 Apr 2015 10:22:54 +0000 (UTC) Received: by wgra20 with SMTP id a20so80479534wgr.3; Thu, 02 Apr 2015 03:22:53 -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:content-transfer-encoding :in-reply-to:user-agent; bh=axnsYgoST4Hpmrbl3oKtnvpLSF+Q3e/pZf+kThyx+pU=; b=nXFHAB/QMkSn1m+d88sENSbHHyNLoks90bnlWDekx6wWLNzSOuUVeEMupERoXz4pRL 8Ly6g5Gge25/ov0id6JoG4Bd27VP5K9c3Wv9EEgUj8ACryEVGyefQay4daSJLGApy8EN ccj91JOZLl4bCe6Uu2C5WvoQQAjyQEgBHcJpsRWB9/LUE0wDcZ4A8rHGxl+u4o5SePcZ wix4tujsUh7BzCI9LxgpyigZm2fuDm1B/Cf8qPfBxw4ll6uqSMOK9jH7gQjamkI7rec4 2iP67If8i8FHC7WDm0eny+4Pp8T/+SRPlC6G9RlmmLD5H6cBlyr8Ay9rjtObE0glEi9O TNug== X-Received: by 10.180.77.100 with SMTP id r4mr21338169wiw.42.1427970173218; Thu, 02 Apr 2015 03:22:53 -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 w8sm6609314wja.4.2015.04.02.03.22.51 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 02 Apr 2015 03:22:52 -0700 (PDT) Date: Thu, 2 Apr 2015 12:22:49 +0200 From: Mateusz Guzik To: Jordan Hubbard Subject: Re: svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom Message-ID: <20150402102249.GE2575@dft-labs.eu> References: <20150401114313.GZ64665@FreeBSD.org> <20150401115204.GB16649@dft-labs.eu> <20150401115729.GA64665@FreeBSD.org> <20150401120229.GA2201@dft-labs.eu> <20150401121344.GC64665@FreeBSD.org> <20150401122916.GA10926@dft-labs.eu> <20150401151118.GA16151@troutmask.apl.washington.edu> <20150401174140.GB2575@dft-labs.eu> <5FD1C9A1-4B8F-440D-9C34-6BA93764BD55@me.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <5FD1C9A1-4B8F-440D-9C34-6BA93764BD55@me.com> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, David Chisnall , Gleb Smirnoff , Steve Kargl , svn-src-head@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 Apr 2015 10:22:55 -0000 On Wed, Apr 01, 2015 at 11:11:11AM -0700, Jordan Hubbard wrote: > > > On Apr 1, 2015, at 11:04 AM, David Chisnall wrote: > > > > On 1 Apr 2015, at 18:41, Mateusz Guzik wrote: > >> > >> I guess you were right, this was bad. > >> > >> I moved the implementation to null.c, I hope this makes everyone happy. > >> > >> https://lists.freebsd.org/pipermail/svn-src-all/2015-April/101876.html > > > > This almost certainly does not make people happy: > > “FreeBSD: Where even April 1st gets a good bike-shedding!†> > I, personally, am disappointed the 3 BSDs did not merge again this year. > Now one has to wonder how obnoxious one has to get so that people think "this can't be real". I tried really hard. :) -- Mateusz Guzik From owner-svn-src-all@FreeBSD.ORG Thu Apr 2 11:18:45 2015 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 0C1F7E01; Thu, 2 Apr 2015 11:18: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 EB2E814B; Thu, 2 Apr 2015 11:18: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 t32BIi94008514; Thu, 2 Apr 2015 11:18:44 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t32BIiBS008513; Thu, 2 Apr 2015 11:18:44 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201504021118.t32BIiBS008513@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 Apr 2015 11:18:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280982 - head/usr.bin/iscsictl 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 Apr 2015 11:18:45 -0000 Author: trasz Date: Thu Apr 2 11:18:43 2015 New Revision: 280982 URL: https://svnweb.freebsd.org/changeset/base/280982 Log: Rewrite iscsi.conf(5) to better match iscsictl(8). MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/usr.bin/iscsictl/iscsi.conf.5 Modified: head/usr.bin/iscsictl/iscsi.conf.5 ============================================================================== --- head/usr.bin/iscsictl/iscsi.conf.5 Thu Apr 2 10:19:24 2015 (r280981) +++ head/usr.bin/iscsictl/iscsi.conf.5 Thu Apr 2 11:18:43 2015 (r280982) @@ -24,132 +24,111 @@ .\" .\" $FreeBSD$ .\" -.Dd February 4, 2015 +.Dd April 2, 2015 .Dt ISCSI.CONF 5 .Os .Sh NAME .Nm iscsi.conf .Nd iSCSI initiator configuration file .Sh DESCRIPTION -The file -.Nm , -is used by the +The +.Nm +configuration file is used by the .Xr iscsictl 8 and .Xr iscontrol 8 utilities. -It contains declarations and parameter/key-options. -The syntax is very simple, -.D1 Li variable = value; -and they can be grouped via a -.Em block -declaration: +The general syntax is: .Bf Li .Bd -literal # this is a comment - target_1 { # nickname + nickname_1 { variable = value; ... - } # this must be on a line by itself. + } + nickname_2 { + variable = value; + ... + } + ... .Ed .Ef -.Pp -The following are specified in the iSCSI RFC 3720, -for a full description see sections 11/12 of the RFC. .Bl -tag -width MaxConnections .It Cm AuthMethod -currently only supported authentication method is CHAP, with -digest either MD5 or SHA. -Default is none. +Sets the authentication type. +Type can be either +.Qq Ar None , +or +.Qq Ar CHAP . +Default is +.Qq Ar None . +When set to +.Cm CHAP , +both +.Cm chapIName +and +.Cm chapSecret +must be defined. +.It Cm chapIName +Login for CHAP authentication. +.It Cm chapSecret +Secret for CHAP authentication. +.It Cm tgtChapName +Target login for Mutual CHAP authentication. +.It Cm tgtChapSecret +Target secret for Mutual CHAP authentication. .It Cm HeaderDigest -a -.Em digest -is calculated on the header of all iSCSI PDUs, and -checked. -Only CRC32C is implemented. -Default is none. +Sets the header digest; a checksum calculated over the header of iSCSI +PDUs, and verified on receive. +Digest can be either +.Qq Ar None , +or +.Qq Ar CRC32C . +Default is +.Qq Ar None . .It Cm DataDigest -same as for HeaderDigest, but on the data part of the iSCSI PDU. -(not yet tested) +Sets the data digest; a checksum calculated over the Data Section of iSCSI +PDUs, and verified on receive. +Digest can be either +.Qq Ar None , +or +.Qq Ar CRC32C . +Default is +.Qq Ar None . .It Cm TargetName -is the name by which the target is known, not to be confused with -target address, either obtained via the target administrator, or -from a -.Em discovery session . +Sets the target name. +Not required for discovery sessions. .It Cm InitiatorName -if not specified, defaults to -.Sy iqn.2005-01.il.ac.huji.cs: -.Aq hostname . +Sets the initiator name. +By default, the name is concatenation of +.Qq Ar iqn.1994-09.org.freebsd: +with the hostname. .It Cm TargetAddress -is of the form -.Sy domainname[:port][,portal-group-tag] -to quote the RFC: -.Bd -ragged -compact -The domainname can be specified as either a DNS host name, a -dotted-decimal IPv4 address, or a bracketed IPv6 address as specified -in [RFC2732]. -.Ed -Note: portal-group-tag is unused at the moment. -.Em not implemented yet. -.It Cm MaxRecvDataSegmentLength -the maximum data segment length in -bytes it can receive in an iSCSI PDU, default is 8192. -.It Cm MaxOutstandingR2T -is used to calculate/negotiate the -.Em tag opening , -can be overridden by the -.Sy tag -option. +Sets the target address and port, in +.Sy address[:port] +format. +The +.Sy address +can be either an IP address, or hostname. +The optional port defaults to 3260. .It Cm SessionType -either Discovery or Normal, default is Normal, see the -.Fl d -flag of -.Cm iscontrol . -.El -.sp -The following are not specified in the -.Sy RFC 3720 -.Bl -tag -width sockbufsize -.It Cm offload +Sets the session type. +Type can be either +.Qq Ar Discovery , +or +.Qq Ar Normal . +Default is +.Qq Ar Normal . +For normal sessions, the +.Sy TargetName +must be defined. +Discovery sessions result in the initiator connecting to all the targets +returned by SendTargets iSCSI discovery with the defined +.Sy TargetAddress . +.It Cm Offload Name of selected iSCSI hardware offload driver. -.It Cm port -The iSCSI port used by the iSCSI protocol, defaults to 3260. -.It Cm tags -Sets the -.Em tag opening -to the value specified. -.It Cm maxluns -overrides the compiled value of -.Sy luns , -see -.Xr iscsi_initiator 4 . -This value can only be reduced. -.It Cm sockbufsize -sets the receiver and transmitter socket buffer size to -.Em size , -in kilobytes. -The default is 128. -.El -.sp -If -.Em AuthMethod -is set to -.Cm CHAP , -then the following must also be set: -.Bl -tag -width chapSecret -.It Cm chapSecret -this -.Em shared-secret . -Can be either an ASCII string (e.g. hello world), a hex string (e.g -0xababcd0987654321...), or base64 string (eg 0b...) -.It Cm chapIName -the chap-name, defaults to -.Em hostname . -.It Cm chapDigest -can be MD5 or SHA1. -.It Cm tgtChapName/tgtChapSecret -name and secret used for mutual CHAP; by default, mutual CHAP -is not used. +Default is +.Qq Ar None . .El .Sh FILES .Bl -tag -width indent @@ -157,34 +136,21 @@ is not used. .El .Sh EXAMPLES .Bd -literal -# -# Globals -# -port = 3260 -# myiscsi { # nickname - targetaddress = iscsi1 - targetname = iqn.1900.com.com:sn.123456 + targetaddress = iscsi1 + targetname = iqn.1900.com.com:sn.123456 } chaptest { - targetaddress= 10.0.0.1; - targetname = iqn.1900.com.com:sn.123456 - initiatorname= iqn.2005-01.il.ac.huji.cs:nobody - authmethod = CHAP; chapDigest = SHA1; - chapsecret = 0x3713c3336d9a224c2791c873d3d2b174 - tags = 256 + targetaddress = 10.0.0.1; + targetname = iqn.1900.com.com:sn.123456; + initiatorname = iqn.2005-01.il.ac.huji.cs:nobody; + authmethod = CHAP; + chapiname = iqn.2005-01.il.ac.huji.cs:nobody; + chapsecret = "secretsecret"; } .Ed .Sh SEE ALSO -.Xr iscsi_initiator 4 , .Xr iscontrol 8 , .Xr iscsictl 8 -.Sh STANDARDS -ISCSI RFC 3720 .\"Sh HISTORY .\"Sh AUTHORS -.Sh BUGS -Some options have not been implemented, either they were found -to be unnecessary, or not understood, this can change in the future. -.br -The tags opening value is difficult to calculate, use wisely. From owner-svn-src-all@FreeBSD.ORG Thu Apr 2 11:34:41 2015 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 00CD6237; Thu, 2 Apr 2015 11:34:40 +0000 (UTC) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cloud.theravensnest.org", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id B42F0346; Thu, 2 Apr 2015 11:34:40 +0000 (UTC) Received: from [192.168.0.7] (cpc16-cmbg15-2-0-cust60.5-4.cable.virginm.net [86.5.162.61]) (authenticated bits=0) by theravensnest.org (8.15.1/8.14.9) with ESMTPSA id t32BYOeO003316 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 2 Apr 2015 11:34:26 GMT (envelope-from theraven@FreeBSD.org) X-Authentication-Warning: theravensnest.org: Host cpc16-cmbg15-2-0-cust60.5-4.cable.virginm.net [86.5.162.61] claimed to be [192.168.0.7] Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom From: David Chisnall In-Reply-To: <20150402102249.GE2575@dft-labs.eu> Date: Thu, 2 Apr 2015 12:34:18 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <20150401114313.GZ64665@FreeBSD.org> <20150401115204.GB16649@dft-labs.eu> <20150401115729.GA64665@FreeBSD.org> <20150401120229.GA2201@dft-labs.eu> <20150401121344.GC64665@FreeBSD.org> <20150401122916.GA10926@dft-labs.eu> <20150401151118.GA16151@troutmask.apl.washington.edu> <20150401174140.GB2575@dft-labs.eu> <5FD1C9A1-4B8F-440D-9C34-6BA93764BD55@me.com> <20150402102249.GE2575@dft-labs.eu> To: Mateusz Guzik X-Mailer: Apple Mail (2.2070.6) Cc: src-committers@freebsd.org, Jordan Hubbard , svn-src-all@freebsd.org, Gleb Smirnoff , Steve Kargl , svn-src-head@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 Apr 2015 11:34:41 -0000 On 2 Apr 2015, at 11:22, Mateusz Guzik wrote: >=20 > Now one has to wonder how obnoxious one has to get so that people = think > "this can't be real". >=20 > I tried really hard. :) Not sure about your locale, but here (where the tradition originated) if = you fool someone in the morning then they are an April Fool, if you = attempt to fool them in the afternoon then you are the April Fool. Your = mail was timestamped 12:36 (ah, the perils of time zones...), though = looking back at it I do rather like the commit time: Date: Wed Apr 1 13:37:00 2015 David (Blaming illness for not spotting the joke)= From owner-svn-src-all@FreeBSD.ORG Thu Apr 2 11:41:05 2015 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 441A962F; Thu, 2 Apr 2015 11:41: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 2FAE461B; Thu, 2 Apr 2015 11:41: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 t32Bf5P8021615; Thu, 2 Apr 2015 11:41:05 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t32Bf503021614; Thu, 2 Apr 2015 11:41:05 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201504021141.t32Bf503021614@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 Apr 2015 11:41:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280983 - 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: Thu, 02 Apr 2015 11:41:05 -0000 Author: trasz Date: Thu Apr 2 11:41:04 2015 New Revision: 280983 URL: https://svnweb.freebsd.org/changeset/base/280983 Log: Update open(2) to make it more obvious that O_NOCTTY and O_TTY_INIT are ignored. MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/lib/libc/sys/open.2 Modified: head/lib/libc/sys/open.2 ============================================================================== --- head/lib/libc/sys/open.2 Thu Apr 2 11:18:43 2015 (r280982) +++ head/lib/libc/sys/open.2 Thu Apr 2 11:41:04 2015 (r280983) @@ -28,7 +28,7 @@ .\" @(#)open.2 8.2 (Berkeley) 11/16/93 .\" $FreeBSD$ .\" -.Dd February 7, 2013 +.Dd April 2, 2015 .Dt OPEN 2 .Os .Sh NAME @@ -115,8 +115,8 @@ O_DIRECT eliminate or reduce cache effec O_FSYNC synchronous writes O_SYNC synchronous writes O_NOFOLLOW do not follow symlinks -O_NOCTTY don't assign controlling terminal -O_TTY_INIT restore default terminal attributes +O_NOCTTY ignored +O_TTY_INIT ignored O_DIRECTORY error if file is not a directory O_CLOEXEC set FD_CLOEXEC upon open .Ed From owner-svn-src-all@FreeBSD.ORG Thu Apr 2 11:52:35 2015 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 7062787E; Thu, 2 Apr 2015 11:52: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 5B808783; Thu, 2 Apr 2015 11:52: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 t32BqZvE026424; Thu, 2 Apr 2015 11:52:35 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t32BqZXN026422; Thu, 2 Apr 2015 11:52:35 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201504021152.t32BqZXN026422@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 Apr 2015 11:52:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280984 - head/usr.bin/iscsictl 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 Apr 2015 11:52:35 -0000 Author: trasz Date: Thu Apr 2 11:52:34 2015 New Revision: 280984 URL: https://svnweb.freebsd.org/changeset/base/280984 Log: Add IPv6 example to iscsi.conf(5) and tweak ordering. MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/usr.bin/iscsictl/iscsi.conf.5 Modified: head/usr.bin/iscsictl/iscsi.conf.5 ============================================================================== --- head/usr.bin/iscsictl/iscsi.conf.5 Thu Apr 2 11:41:04 2015 (r280983) +++ head/usr.bin/iscsictl/iscsi.conf.5 Thu Apr 2 11:52:34 2015 (r280984) @@ -95,14 +95,14 @@ or .Qq Ar CRC32C . Default is .Qq Ar None . -.It Cm TargetName -Sets the target name. -Not required for discovery sessions. .It Cm InitiatorName Sets the initiator name. By default, the name is concatenation of .Qq Ar iqn.1994-09.org.freebsd: with the hostname. +.It Cm TargetName +Sets the target name. +Not required for discovery sessions. .It Cm TargetAddress Sets the target address and port, in .Sy address[:port] @@ -140,6 +140,12 @@ myiscsi { # nickname targetaddress = iscsi1 targetname = iqn.1900.com.com:sn.123456 } + +myiscsi6 { # nickname + targetaddress = [2001:db8::de:ef]:3260 + targetname = iqn.1900.com.com:sn.123456 +} + chaptest { targetaddress = 10.0.0.1; targetname = iqn.1900.com.com:sn.123456; From owner-svn-src-all@FreeBSD.ORG Thu Apr 2 12:35:33 2015 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 DD7ED553; Thu, 2 Apr 2015 12:35:32 +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 62D2DCDC; Thu, 2 Apr 2015 12:35:31 +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 t32CZMfv065836 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 2 Apr 2015 15:35:22 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t32CZMe2065835; Thu, 2 Apr 2015 15:35:22 +0300 (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 Apr 2015 15:35:22 +0300 From: Gleb Smirnoff To: Ian Lepore Subject: Re: svn commit: r280971 - in head: contrib/ipfilter/tools share/man/man4 sys/contrib/ipfilter/netinet sys/netinet sys/netipsec sys/netpfil/pf Message-ID: <20150402123522.GC64665@FreeBSD.org> References: <201504012226.t31MQedN044443@svn.freebsd.org> <1427929676.82583.103.camel@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1427929676.82583.103.camel@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 Apr 2015 12:35:33 -0000 On Wed, Apr 01, 2015 at 05:07:56PM -0600, Ian Lepore wrote: I> > Author: glebius I> > Date: Wed Apr 1 22:26:39 2015 I> > New Revision: 280971 I> > URL: https://svnweb.freebsd.org/changeset/base/280971 I> > I> > Log: I> > o Use new function ip_fillid() in all places throughout the kernel, I> > where we want to create a new IP datagram. I> > o Add support for RFC6864, which allows to set IP ID for atomic IP I> > datagrams to any value, to improve performance. The behaviour is I> > controlled by net.inet.ip.rfc6864 sysctl knob, which is enabled by I> > default. I> > o In case if we generate IP ID, use counter(9) to improve performance. I> > o Gather all code related to IP ID into ip_id.c. I> > I> > Differential Revision: https://reviews.freebsd.org/D2177 I> > Reviewed by: adrian, cy, rpaulo I> > Tested by: Emeric POUPON I> > Sponsored by: Netflix I> > Sponsored by: Nginx, Inc. I> > Relnotes: yes I> > I> [...] I> > +void I> > +ip_fillid(struct ip *ip) I> > +{ I> > + I> > + /* I> > + * Per RFC6864 Section 4 I> > + * I> > + * o Atomic datagrams: (DF==1) && (MF==0) && (frag_offset==0) I> > + * o Non-atomic datagrams: (DF==0) || (MF==1) || (frag_offset>0) I> > + */ I> > + if (V_ip_rfc6864 && (ip->ip_off & htons(IP_DF)) == htons(IP_DF)) I> > + ip->ip_id = 0; I> > + else if (V_ip_do_randomid) I> > + ip->ip_id = ip_randomid(); I> > + else { I> > + counter_u64_add(V_ip_id, 1); I> > + ip->ip_id = htons((*(uint64_t *)zpcpu_get(V_ip_id)) & 0xffff); I> > + } I> > +} I> > + I> I> This is completely bogus. It's a big opacity violation (it relies on I> what should be opaque private internal implementation details of I> counter(9)). The fact that the counter api doesn't provide a function I> for retrieving one cpu's counter value should be a big clue there -- the I> fact that you know the internals doesn't make it okay to reach behind I> the counter and grab a value like that. It may not even be safe to do I> so on any given architecture; it certainly isn't safe on arm, and that I> line of code above will work only by accident because you're throwing I> way all but 16 bits. I though about providing that API, but since it isn't safe in general, I decided to not do that. I> But even more importantly, this WILL result in multiple threads using I> the same value at the same time... I> I> - Thread A on CPU 1 and thread B on CPU 2 both begin executing here at I> the same time, and both get through counter_u64_add(). I> - Thread A keeps running and uses CPU 1's new value, call it 27. I> - Thread B gets prempted between counter_u64_add() and zpcpu_get(). I> When it resumes it's now on CPU 1, so it retrieves value 27 as well. This was already discussed in this thread: https://lists.freebsd.org/pipermail/svn-src-head/2015-March/069864.html -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Thu Apr 2 12:37:18 2015 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 6BBC66B7; Thu, 2 Apr 2015 12:37:18 +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 E63C7CF9; Thu, 2 Apr 2015 12:37: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 t32CbFX9065863 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 2 Apr 2015 15:37:15 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t32CbFPt065862; Thu, 2 Apr 2015 15:37:15 +0300 (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 Apr 2015 15:37:15 +0300 From: Gleb Smirnoff To: "Bjoern A. Zeeb" Subject: Re: svn commit: r280972 - head/sys/netinet Message-ID: <20150402123715.GD64665@FreeBSD.org> References: <201504020030.t320UsKf003603@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201504020030.t320UsKf003603@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 Apr 2015 12:37:18 -0000 On Thu, Apr 02, 2015 at 12:30:54AM +0000, Bjoern A. Zeeb wrote: B> Author: bz B> Date: Thu Apr 2 00:30:53 2015 B> New Revision: 280972 B> URL: https://svnweb.freebsd.org/changeset/base/280972 B> B> Log: B> Try to unbreak the build after r280971 by providing the missing B> #include header for SYSINIT. Hmm, I wonder what wasn't it required for amd64... -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Thu Apr 2 12:56:08 2015 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 A1E4CC40; Thu, 2 Apr 2015 12:56: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 8C06DF17; Thu, 2 Apr 2015 12:56: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 t32Cu8MM055458; Thu, 2 Apr 2015 12:56:08 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t32Cu7ta055453; Thu, 2 Apr 2015 12:56:07 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504021256.t32Cu7ta055453@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 2 Apr 2015 12:56:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280985 - in head/sys/arm: 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: Thu, 02 Apr 2015 12:56:08 -0000 Author: andrew Date: Thu Apr 2 12:56:06 2015 New Revision: 280985 URL: https://svnweb.freebsd.org/changeset/base/280985 Log: Add the generic timer registers to sysreg.h and cpu-v6.h, and use the access functions in the generic timer driver. Differential Revision: https://reviews.freebsd.org/D2198 Sponsored by: The FreeBSD Foundation Modified: head/sys/arm/arm/generic_timer.c head/sys/arm/include/cpu-v6.h head/sys/arm/include/sysreg.h Modified: head/sys/arm/arm/generic_timer.c ============================================================================== --- head/sys/arm/arm/generic_timer.c Thu Apr 2 11:52:34 2015 (r280984) +++ head/sys/arm/arm/generic_timer.c Thu Apr 2 12:56:06 2015 (r280985) @@ -105,12 +105,7 @@ static struct timecounter arm_tmr_timeco static int get_freq(void) { - uint32_t val; - - /* cntfrq */ - __asm volatile("mrc p15, 0, %0, c14, c0, 0" : "=r" (val)); - - return (val); + return (cp15_cntfrq_get()); } static long @@ -120,11 +115,9 @@ get_cntxct(bool physical) isb(); if (physical) - /* cntpct */ - __asm volatile("mrrc p15, 0, %Q0, %R0, c14" : "=r" (val)); + val = cp15_cntpct_get(); else - /* cntvct */ - __asm volatile("mrrc p15, 1, %Q0, %R0, c14" : "=r" (val)); + val = cp15_cntvct_get(); return (val); } @@ -134,13 +127,9 @@ set_ctrl(uint32_t val, bool physical) { if (physical) - /* cntp_ctl */ - __asm volatile("mcr p15, 0, %[val], c14, c2, 1" : : - [val] "r" (val)); + cp15_cntp_ctl_set(val); else - /* cntv_ctl */ - __asm volatile("mcr p15, 0, %[val], c14, c3, 1" : : - [val] "r" (val)); + cp15_cntv_ctl_set(val); isb(); return (0); @@ -151,13 +140,9 @@ set_tval(uint32_t val, bool physical) { if (physical) - /* cntp_tval */ - __asm volatile("mcr p15, 0, %[val], c14, c2, 0" : : - [val] "r" (val)); + cp15_cntp_tval_set(val); else - /* cntv_tval */ - __asm volatile("mcr p15, 0, %[val], c14, c3, 0" : : - [val] "r" (val)); + cp15_cntv_tval_set(val); isb(); return (0); @@ -169,11 +154,9 @@ get_ctrl(bool physical) uint32_t val; if (physical) - /* cntp_ctl */ - __asm volatile("mrc p15, 0, %0, c14, c2, 1" : "=r" (val)); + val = cp15_cntp_ctl_get(); else - /* cntv_ctl */ - __asm volatile("mrc p15, 0, %0, c14, c3, 1" : "=r" (val)); + val = cp15_cntv_ctl_get(); return (val); } @@ -183,10 +166,10 @@ disable_user_access(void) { uint32_t cntkctl; - __asm volatile("mrc p15, 0, %0, c14, c1, 0" : "=r" (cntkctl)); + cntkctl = cp15_cntkctl_get(); cntkctl &= ~(GT_CNTKCTL_PL0PTEN | GT_CNTKCTL_PL0VTEN | GT_CNTKCTL_EVNTEN | GT_CNTKCTL_PL0VCTEN | GT_CNTKCTL_PL0PCTEN); - __asm volatile("mcr p15, 0, %0, c14, c1, 0" : : "r" (cntkctl)); + cp15_cntkctl_set(cntkctl); isb(); } Modified: head/sys/arm/include/cpu-v6.h ============================================================================== --- head/sys/arm/include/cpu-v6.h Thu Apr 2 11:52:34 2015 (r280984) +++ head/sys/arm/include/cpu-v6.h Thu Apr 2 12:56:06 2015 (r280985) @@ -54,6 +54,15 @@ fname(void) \ return(reg); \ } +#define _R64F0(fname, aname) \ +static __inline uint64_t \ +fname(void) \ +{ \ + uint64_t reg; \ + __asm __volatile("mrrc\t" _FX(aname): "=r" (reg)); \ + return(reg); \ +} + #define _WF0(fname, aname...) \ static __inline void \ fname(void) \ @@ -68,6 +77,13 @@ fname(register_t reg) \ __asm __volatile("mcr\t" _FX(aname):: "r" (reg)); \ } +#define _W64F1(fname, aname...) \ +static __inline void \ +fname(uint64_t reg) \ +{ \ + __asm __volatile("mcrr\t" _FX(aname):: "r" (reg)); \ +} + /* * Raw CP15 maintenance operations * !!! not for external use !!! @@ -189,6 +205,37 @@ _WF1(cp15_tpidruro_set, CP15_TPIDRURO(%0 _RF0(cp15_tpidrpwr_get, CP15_TPIDRPRW(%0)) _WF1(cp15_tpidrpwr_set, CP15_TPIDRPRW(%0)) +/* Generic Timer registers - only use when you know the hardware is available */ +_RF0(cp15_cntfrq_get, CP15_CNTFRQ(%0)) +_WF1(cp15_cntfrq_set, CP15_CNTFRQ(%0)) +_RF0(cp15_cntkctl_get, CP15_CNTKCTL(%0)) +_WF1(cp15_cntkctl_set, CP15_CNTKCTL(%0)) +_RF0(cp15_cntp_tval_get, CP15_CNTP_TVAL(%0)) +_WF1(cp15_cntp_tval_set, CP15_CNTP_TVAL(%0)) +_RF0(cp15_cntp_ctl_get, CP15_CNTP_CTL(%0)) +_WF1(cp15_cntp_ctl_set, CP15_CNTP_CTL(%0)) +_RF0(cp15_cntv_tval_get, CP15_CNTV_TVAL(%0)) +_WF1(cp15_cntv_tval_set, CP15_CNTV_TVAL(%0)) +_RF0(cp15_cntv_ctl_get, CP15_CNTV_CTL(%0)) +_WF1(cp15_cntv_ctl_set, CP15_CNTV_CTL(%0)) +_RF0(cp15_cnthctl_get, CP15_CNTHCTL(%0)) +_WF1(cp15_cnthctl_set, CP15_CNTHCTL(%0)) +_RF0(cp15_cnthp_tval_get, CP15_CNTHP_TVAL(%0)) +_WF1(cp15_cnthp_tval_set, CP15_CNTHP_TVAL(%0)) +_RF0(cp15_cnthp_ctl_get, CP15_CNTHP_CTL(%0)) +_WF1(cp15_cnthp_ctl_set, CP15_CNTHP_CTL(%0)) + +_R64F0(cp15_cntpct_get, CP15_CNTPCT(%Q0, %R0)) +_R64F0(cp15_cntvct_get, CP15_CNTVCT(%Q0, %R0)) +_R64F0(cp15_cntp_cval_get, CP15_CNTP_CVAL(%Q0, %R0)) +_W64F1(cp15_cntp_cval_set, CP15_CNTP_CVAL(%Q0, %R0)) +_R64F0(cp15_cntv_cval_get, CP15_CNTV_CVAL(%Q0, %R0)) +_W64F1(cp15_cntv_cval_set, CP15_CNTV_CVAL(%Q0, %R0)) +_R64F0(cp15_cntvoff_get, CP15_CNTVOFF(%Q0, %R0)) +_W64F1(cp15_cntvoff_set, CP15_CNTVOFF(%Q0, %R0)) +_R64F0(cp15_cnthp_cval_get, CP15_CNTHP_CVAL(%Q0, %R0)) +_W64F1(cp15_cnthp_cval_set, CP15_CNTHP_CVAL(%Q0, %R0)) + #undef _FX #undef _RF0 #undef _WF0 Modified: head/sys/arm/include/sysreg.h ============================================================================== --- head/sys/arm/include/sysreg.h Thu Apr 2 11:52:34 2015 (r280984) +++ head/sys/arm/include/sysreg.h Thu Apr 2 12:56:06 2015 (r280985) @@ -257,6 +257,28 @@ #define CP15_TPIDRPRW(rr) p15, 0, rr, c13, c0, 4 /* PL1 only Thread ID Register */ /* + * CP15 C14 registers + * These are the Generic Timer registers and may be unallocated on some SoCs. + * Only use these when you know the Generic Timer is available. + */ +#define CP15_CNTFRQ(rr) p15, 0, rr, c14, c0, 0 /* Counter Frequency Register */ +#define CP15_CNTKCTL(rr) p15, 0, rr, c14, c1, 0 /* Timer PL1 Control Register */ +#define CP15_CNTP_TVAL(rr) p15, 0, rr, c14, c2, 0 /* PL1 Physical Timer Value Register */ +#define CP15_CNTP_CTL(rr) p15, 0, rr, c14, c2, 1 /* PL1 Physical Timer Control Register */ +#define CP15_CNTV_TVAL(rr) p15, 0, rr, c14, c3, 0 /* Virtual Timer Value Register */ +#define CP15_CNTV_CTL(rr) p15, 0, rr, c14, c3, 1 /* Virtual Timer Control Register */ +#define CP15_CNTHCTL(rr) p15, 4, rr, c14, c1, 0 /* Timer PL2 Control Register */ +#define CP15_CNTHP_TVAL(rr) p15, 4, rr, c14, c2, 0 /* PL2 Physical Timer Value Register */ +#define CP15_CNTHP_CTL(rr) p15, 4, rr, c14, c2, 1 /* PL2 Physical Timer Control Register */ +/* 64-bit registers for use with mcrr/mrrc */ +#define CP15_CNTPCT(rq, rr) p15, 0, rq, rr, c14 /* Physical Count Register */ +#define CP15_CNTVCT(rq, rr) p15, 1, rq, rr, c14 /* Virtual Count Register */ +#define CP15_CNTP_CVAL(rq, rr) p15, 2, rq, rr, c14 /* PL1 Physical Timer Compare Value Register */ +#define CP15_CNTV_CVAL(rq, rr) p15, 3, rq, rr, c14 /* Virtual Timer Compare Value Register */ +#define CP15_CNTVOFF(rq, rr) p15, 4, rq, rr, c14 /* Virtual Offset Register */ +#define CP15_CNTHP_CVAL(rq, rr) p15, 6, rq, rr, c14 /* PL2 Physical Timer Compare Value Register */ + +/* * CP15 C15 registers */ #define CP15_CBAR(rr) p15, 4, rr, c15, c0, 0 /* Configuration Base Address Register */ From owner-svn-src-all@FreeBSD.ORG Thu Apr 2 12:58:05 2015 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 BD7EFE78; Thu, 2 Apr 2015 12: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 A8CF5F37; Thu, 2 Apr 2015 12: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 t32Cw5BH055842; Thu, 2 Apr 2015 12:58:05 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t32Cw56Z055841; Thu, 2 Apr 2015 12:58:05 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504021258.t32Cw56Z055841@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 2 Apr 2015 12:58:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280986 - 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: Thu, 02 Apr 2015 12:58:05 -0000 Author: andrew Date: Thu Apr 2 12:58:04 2015 New Revision: 280986 URL: https://svnweb.freebsd.org/changeset/base/280986 Log: We may not be using gcc to compile this. Sponsored by: The FreeBSD Foundation Modified: head/sys/arm/arm/generic_timer.c Modified: head/sys/arm/arm/generic_timer.c ============================================================================== --- head/sys/arm/arm/generic_timer.c Thu Apr 2 12:56:06 2015 (r280985) +++ head/sys/arm/arm/generic_timer.c Thu Apr 2 12:58:04 2015 (r280986) @@ -353,7 +353,7 @@ DELAY(int usec) for (; usec > 0; usec--) for (counts = 200; counts > 0; counts--) /* - * Prevent gcc from optimizing + * Prevent the compiler from optimizing * out the loop */ cpufunc_nullop(); From owner-svn-src-all@FreeBSD.ORG Thu Apr 2 13:02:26 2015 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 84EA3178; Thu, 2 Apr 2015 13:02: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 704E88; Thu, 2 Apr 2015 13:02: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 t32D2QWm060065; Thu, 2 Apr 2015 13:02:26 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t32D2Q6J060064; Thu, 2 Apr 2015 13:02:26 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504021302.t32D2Q6J060064@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 2 Apr 2015 13:02:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280987 - 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: Thu, 02 Apr 2015 13:02:26 -0000 Author: andrew Date: Thu Apr 2 13:02:25 2015 New Revision: 280987 URL: https://svnweb.freebsd.org/changeset/base/280987 Log: Stop including machine/fdt.h, it's not needed. Sponsored by: The FreeBSD Foundation Modified: head/sys/arm/arm/generic_timer.c Modified: head/sys/arm/arm/generic_timer.c ============================================================================== --- head/sys/arm/arm/generic_timer.c Thu Apr 2 12:58:04 2015 (r280986) +++ head/sys/arm/arm/generic_timer.c Thu Apr 2 13:02:25 2015 (r280987) @@ -57,7 +57,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #define GT_CTRL_ENABLE (1 << 0) #define GT_CTRL_INT_MASK (1 << 1) From owner-svn-src-all@FreeBSD.ORG Thu Apr 2 13:03:55 2015 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 93BCE2F8; Thu, 2 Apr 2015 13:03:55 +0000 (UTC) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1CCCF81; Thu, 2 Apr 2015 13:03:54 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id A057E1FE022; Thu, 2 Apr 2015 15:03:45 +0200 (CEST) Message-ID: <551D3E5D.6060606@selasky.org> Date: Thu, 02 Apr 2015 15:04:29 +0200 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Gleb Smirnoff , Ian Lepore Subject: Re: svn commit: r280971 - in head: contrib/ipfilter/tools share/man/man4 sys/contrib/ipfilter/netinet sys/netinet sys/netipsec sys/netpfil/pf References: <201504012226.t31MQedN044443@svn.freebsd.org> <1427929676.82583.103.camel@freebsd.org> <20150402123522.GC64665@FreeBSD.org> In-Reply-To: <20150402123522.GC64665@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, 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 Apr 2015 13:03:55 -0000 On 04/02/15 14:35, Gleb Smirnoff wrote: > On Wed, Apr 01, 2015 at 05:07:56PM -0600, Ian Lepore wrote: > I> > Author: glebius > I> > Date: Wed Apr 1 22:26:39 2015 > I> > New Revision: 280971 > I> > URL: https://svnweb.freebsd.org/changeset/base/280971 > I> > > I> > Log: > I> > o Use new function ip_fillid() in all places throughout the kernel, > I> > where we want to create a new IP datagram. > I> > o Add support for RFC6864, which allows to set IP ID for atomic IP > I> > datagrams to any value, to improve performance. The behaviour is > I> > controlled by net.inet.ip.rfc6864 sysctl knob, which is enabled by > I> > default. > I> > o In case if we generate IP ID, use counter(9) to improve performance. > I> > o Gather all code related to IP ID into ip_id.c. > I> > > I> > Differential Revision: https://reviews.freebsd.org/D2177 > I> > Reviewed by: adrian, cy, rpaulo > I> > Tested by: Emeric POUPON > I> > Sponsored by: Netflix > I> > Sponsored by: Nginx, Inc. > I> > Relnotes: yes > I> > > I> [...] > I> > +void > I> > +ip_fillid(struct ip *ip) > I> > +{ > I> > + > I> > + /* > I> > + * Per RFC6864 Section 4 > I> > + * > I> > + * o Atomic datagrams: (DF==1) && (MF==0) && (frag_offset==0) > I> > + * o Non-atomic datagrams: (DF==0) || (MF==1) || (frag_offset>0) > I> > + */ > I> > + if (V_ip_rfc6864 && (ip->ip_off & htons(IP_DF)) == htons(IP_DF)) > I> > + ip->ip_id = 0; > I> > + else if (V_ip_do_randomid) > I> > + ip->ip_id = ip_randomid(); > I> > + else { > I> > + counter_u64_add(V_ip_id, 1); > I> > + ip->ip_id = htons((*(uint64_t *)zpcpu_get(V_ip_id)) & 0xffff); > I> > + } > I> > +} > I> > + > I> > I> This is completely bogus. It's a big opacity violation (it relies on > I> what should be opaque private internal implementation details of > I> counter(9)). The fact that the counter api doesn't provide a function > I> for retrieving one cpu's counter value should be a big clue there -- the > I> fact that you know the internals doesn't make it okay to reach behind > I> the counter and grab a value like that. It may not even be safe to do > I> so on any given architecture; it certainly isn't safe on arm, and that > I> line of code above will work only by accident because you're throwing > I> way all but 16 bits. > > I though about providing that API, but since it isn't safe in general, > I decided to not do that. > > I> But even more importantly, this WILL result in multiple threads using > I> the same value at the same time... > I> > I> - Thread A on CPU 1 and thread B on CPU 2 both begin executing here at > I> the same time, and both get through counter_u64_add(). > I> - Thread A keeps running and uses CPU 1's new value, call it 27. > I> - Thread B gets prempted between counter_u64_add() and zpcpu_get(). > I> When it resumes it's now on CPU 1, so it retrieves value 27 as well. > > This was already discussed in this thread: > > https://lists.freebsd.org/pipermail/svn-src-head/2015-March/069864.html > Hi, At least the generation of IP IDs is now in a common place. I think the random likelyhood argument is not acceptable. Also there should be a critical section around the incrementing of the counter and fetching it. What if a different CPU is handling the same IP connection, then ID ranges are are likely to repeat. What I don't understand is in the following link: https://tools.ietf.org/html/rfc6864 It says: "is required to be unique within the maximum lifetime for all datagrams with a given source address/destination address/protocol tuple." When you have a IP based socket, why is this counter not part of the IP based socket? Why do we have a global counter? --HPS From owner-svn-src-all@FreeBSD.ORG Thu Apr 2 13:28:25 2015 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 2B18E9A6; Thu, 2 Apr 2015 13:28:25 +0000 (UTC) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DE0522DD; Thu, 2 Apr 2015 13:28:24 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 2C74F1FE022; Thu, 2 Apr 2015 15:28:22 +0200 (CEST) Message-ID: <551D4422.4000100@selasky.org> Date: Thu, 02 Apr 2015 15:29:06 +0200 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Gleb Smirnoff , Ian Lepore Subject: Re: svn commit: r280971 - in head: contrib/ipfilter/tools share/man/man4 sys/contrib/ipfilter/netinet sys/netinet sys/netipsec sys/netpfil/pf References: <201504012226.t31MQedN044443@svn.freebsd.org> <1427929676.82583.103.camel@freebsd.org> <20150402123522.GC64665@FreeBSD.org> <551D3E5D.6060606@selasky.org> In-Reply-To: <551D3E5D.6060606@selasky.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, 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 Apr 2015 13:28:25 -0000 On 04/02/15 15:04, Hans Petter Selasky wrote: > I think the random likelyhood argument is not acceptable. For example if a particular CPU load causes ip_output() to be called 1 time on CPU #0 and 2 times on CPU #1 and this pattern repeats ... --HPS From owner-svn-src-all@FreeBSD.ORG Thu Apr 2 13:37:57 2015 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 68AD7EC1; Thu, 2 Apr 2015 13:37:57 +0000 (UTC) Received: from mail-wg0-x232.google.com (mail-wg0-x232.google.com [IPv6:2a00:1450:400c:c00::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1617360A; Thu, 2 Apr 2015 13:37:57 +0000 (UTC) Received: by wgoe14 with SMTP id e14so85487811wgo.0; Thu, 02 Apr 2015 06:37:55 -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=qH7/pF/6bui25o/hxOf2y5hCCSjMz/sq7/PqaX2viBw=; b=LQZ/xqtx7iPVeun1E6zF5ssKVJ0tY0nSk8xJNuyNPkZHiaJ6mURbEJp75LgjYwp3Ps TzpwXL/00myeJrSG6jT0Lm1y2lzX+DtHp525QrAnKjWgXPuXswL9Uc+c2TNFAMUPv5F+ qNJvoLMIIGfxvuMmEslVsfMc1m9IJhjZJ5L/xSSFgBNQQFiw1c/iWpqab1J1PxxMilqO yWa1vi//S4l3tmBPtMdl/datmKxYP/CaM6g0VaSsdhKO5ImW2YTDV0MU0FqSCJW+Kn9L y3pFVKYPVmDQyhSdyfeqRxgYUTUzg08sMeWAnaKcHKcG19Cp/Jpqmr/3nGPaurzpe/Jj 2wyg== X-Received: by 10.180.107.5 with SMTP id gy5mr25226382wib.0.1427981875525; Thu, 02 Apr 2015 06:37:55 -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 n6sm7316991wjy.8.2015.04.02.06.37.53 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 02 Apr 2015 06:37:54 -0700 (PDT) Date: Thu, 2 Apr 2015 15:37:51 +0200 From: Mateusz Guzik To: Gleb Smirnoff Subject: Re: svn commit: r280971 - in head: contrib/ipfilter/tools share/man/man4 sys/contrib/ipfilter/netinet sys/netinet sys/netipsec sys/netpfil/pf Message-ID: <20150402133751.GA549@dft-labs.eu> References: <201504012226.t31MQedN044443@svn.freebsd.org> <1427929676.82583.103.camel@freebsd.org> <20150402123522.GC64665@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20150402123522.GC64665@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, Ian Lepore X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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 Apr 2015 13:37:57 -0000 On Thu, Apr 02, 2015 at 03:35:22PM +0300, Gleb Smirnoff wrote: > On Wed, Apr 01, 2015 at 05:07:56PM -0600, Ian Lepore wrote: > I> > Author: glebius > I> > Date: Wed Apr 1 22:26:39 2015 > I> > New Revision: 280971 > I> > URL: https://svnweb.freebsd.org/changeset/base/280971 > I> > > I> > Log: > I> > o Use new function ip_fillid() in all places throughout the kernel, > I> > where we want to create a new IP datagram. > I> > o Add support for RFC6864, which allows to set IP ID for atomic IP > I> > datagrams to any value, to improve performance. The behaviour is > I> > controlled by net.inet.ip.rfc6864 sysctl knob, which is enabled by > I> > default. > I> > o In case if we generate IP ID, use counter(9) to improve performance. > I> > o Gather all code related to IP ID into ip_id.c. > I> > > I> > Differential Revision: https://reviews.freebsd.org/D2177 > I> > Reviewed by: adrian, cy, rpaulo > I> > Tested by: Emeric POUPON > I> > Sponsored by: Netflix > I> > Sponsored by: Nginx, Inc. > I> > Relnotes: yes > I> > > I> [...] > I> > +void > I> > +ip_fillid(struct ip *ip) > I> > +{ > I> > + > I> > + /* > I> > + * Per RFC6864 Section 4 > I> > + * > I> > + * o Atomic datagrams: (DF==1) && (MF==0) && (frag_offset==0) > I> > + * o Non-atomic datagrams: (DF==0) || (MF==1) || (frag_offset>0) > I> > + */ > I> > + if (V_ip_rfc6864 && (ip->ip_off & htons(IP_DF)) == htons(IP_DF)) > I> > + ip->ip_id = 0; > I> > + else if (V_ip_do_randomid) > I> > + ip->ip_id = ip_randomid(); > I> > + else { > I> > + counter_u64_add(V_ip_id, 1); > I> > + ip->ip_id = htons((*(uint64_t *)zpcpu_get(V_ip_id)) & 0xffff); > I> > + } > I> > +} > I> > + > I> > I> This is completely bogus. It's a big opacity violation (it relies on > I> what should be opaque private internal implementation details of > I> counter(9)). The fact that the counter api doesn't provide a function > I> for retrieving one cpu's counter value should be a big clue there -- the > I> fact that you know the internals doesn't make it okay to reach behind > I> the counter and grab a value like that. It may not even be safe to do > I> so on any given architecture; it certainly isn't safe on arm, and that > I> line of code above will work only by accident because you're throwing > I> way all but 16 bits. > > I though about providing that API, but since it isn't safe in general, > I decided to not do that. > > I> But even more importantly, this WILL result in multiple threads using > I> the same value at the same time... > I> > I> - Thread A on CPU 1 and thread B on CPU 2 both begin executing here at > I> the same time, and both get through counter_u64_add(). > I> - Thread A keeps running and uses CPU 1's new value, call it 27. > I> - Thread B gets prempted between counter_u64_add() and zpcpu_get(). > I> When it resumes it's now on CPU 1, so it retrieves value 27 as well. > > This was already discussed in this thread: > > https://lists.freebsd.org/pipermail/svn-src-head/2015-March/069864.html > For this particular use-case you never care what CPU you are executing on, you only want to obtain a unique number. per-cpu counters can serve this purpose no problem, just provide an operation which guarantees to return the new value of the counter it incremented. Should be easily achieved with e.g. just pinning curthread to the cpu it executes on for the duration of inc + fetch. -- Mateusz Guzik From owner-svn-src-all@FreeBSD.ORG Thu Apr 2 13:42:26 2015 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 145AA10E; Thu, 2 Apr 2015 13:42:26 +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 A37AE6EB; Thu, 2 Apr 2015 13:42: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 t32DgHnX066200 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 2 Apr 2015 16:42:17 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t32DgHnh066199; Thu, 2 Apr 2015 16:42:17 +0300 (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 Apr 2015 16:42:17 +0300 From: Gleb Smirnoff To: Mateusz Guzik Subject: Re: svn commit: r280971 - in head: contrib/ipfilter/tools share/man/man4 sys/contrib/ipfilter/netinet sys/netinet sys/netipsec sys/netpfil/pf Message-ID: <20150402134217.GG64665@FreeBSD.org> References: <201504012226.t31MQedN044443@svn.freebsd.org> <1427929676.82583.103.camel@freebsd.org> <20150402123522.GC64665@FreeBSD.org> <20150402133751.GA549@dft-labs.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150402133751.GA549@dft-labs.eu> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Ian Lepore X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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 Apr 2015 13:42:26 -0000 On Thu, Apr 02, 2015 at 03:37:51PM +0200, Mateusz Guzik wrote: M> On Thu, Apr 02, 2015 at 03:35:22PM +0300, Gleb Smirnoff wrote: M> > On Wed, Apr 01, 2015 at 05:07:56PM -0600, Ian Lepore wrote: M> > I> > Author: glebius M> > I> > Date: Wed Apr 1 22:26:39 2015 M> > I> > New Revision: 280971 M> > I> > URL: https://svnweb.freebsd.org/changeset/base/280971 M> > I> > M> > I> > Log: M> > I> > o Use new function ip_fillid() in all places throughout the kernel, M> > I> > where we want to create a new IP datagram. M> > I> > o Add support for RFC6864, which allows to set IP ID for atomic IP M> > I> > datagrams to any value, to improve performance. The behaviour is M> > I> > controlled by net.inet.ip.rfc6864 sysctl knob, which is enabled by M> > I> > default. M> > I> > o In case if we generate IP ID, use counter(9) to improve performance. M> > I> > o Gather all code related to IP ID into ip_id.c. M> > I> > M> > I> > Differential Revision: https://reviews.freebsd.org/D2177 M> > I> > Reviewed by: adrian, cy, rpaulo M> > I> > Tested by: Emeric POUPON M> > I> > Sponsored by: Netflix M> > I> > Sponsored by: Nginx, Inc. M> > I> > Relnotes: yes M> > I> > M> > I> [...] M> > I> > +void M> > I> > +ip_fillid(struct ip *ip) M> > I> > +{ M> > I> > + M> > I> > + /* M> > I> > + * Per RFC6864 Section 4 M> > I> > + * M> > I> > + * o Atomic datagrams: (DF==1) && (MF==0) && (frag_offset==0) M> > I> > + * o Non-atomic datagrams: (DF==0) || (MF==1) || (frag_offset>0) M> > I> > + */ M> > I> > + if (V_ip_rfc6864 && (ip->ip_off & htons(IP_DF)) == htons(IP_DF)) M> > I> > + ip->ip_id = 0; M> > I> > + else if (V_ip_do_randomid) M> > I> > + ip->ip_id = ip_randomid(); M> > I> > + else { M> > I> > + counter_u64_add(V_ip_id, 1); M> > I> > + ip->ip_id = htons((*(uint64_t *)zpcpu_get(V_ip_id)) & 0xffff); M> > I> > + } M> > I> > +} M> > I> > + M> > I> M> > I> This is completely bogus. It's a big opacity violation (it relies on M> > I> what should be opaque private internal implementation details of M> > I> counter(9)). The fact that the counter api doesn't provide a function M> > I> for retrieving one cpu's counter value should be a big clue there -- the M> > I> fact that you know the internals doesn't make it okay to reach behind M> > I> the counter and grab a value like that. It may not even be safe to do M> > I> so on any given architecture; it certainly isn't safe on arm, and that M> > I> line of code above will work only by accident because you're throwing M> > I> way all but 16 bits. M> > M> > I though about providing that API, but since it isn't safe in general, M> > I decided to not do that. M> > M> > I> But even more importantly, this WILL result in multiple threads using M> > I> the same value at the same time... M> > I> M> > I> - Thread A on CPU 1 and thread B on CPU 2 both begin executing here at M> > I> the same time, and both get through counter_u64_add(). M> > I> - Thread A keeps running and uses CPU 1's new value, call it 27. M> > I> - Thread B gets prempted between counter_u64_add() and zpcpu_get(). M> > I> When it resumes it's now on CPU 1, so it retrieves value 27 as well. M> > M> > This was already discussed in this thread: M> > M> > https://lists.freebsd.org/pipermail/svn-src-head/2015-March/069864.html M> > M> M> For this particular use-case you never care what CPU you are executing M> on, you only want to obtain a unique number. M> M> per-cpu counters can serve this purpose no problem, just provide an M> operation which guarantees to return the new value of the counter it M> incremented. Should be easily achieved with e.g. just pinning curthread M> to the cpu it executes on for the duration of inc + fetch. I'd ask to pay attention to this particular email: https://lists.freebsd.org/pipermail/svn-src-head/2015-March/069966.html Just to justify probabilities, risks and countermeasures. For those, who don't believe in theory and prefers practice: https://lists.freebsd.org/pipermail/svn-src-head/2015-March/070091.html Note that Emeric was the one who observed collisions for the ip_id++ code, that we used before. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Thu Apr 2 13:51:07 2015 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 4AF903DA; Thu, 2 Apr 2015 13:51: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 1D48E7B7; Thu, 2 Apr 2015 13:51: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 t32Dp6Kf080887; Thu, 2 Apr 2015 13:51:06 GMT (envelope-from wblock@FreeBSD.org) Received: (from wblock@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t32Dp6vR080886; Thu, 2 Apr 2015 13:51:06 GMT (envelope-from wblock@FreeBSD.org) Message-Id: <201504021351.t32Dp6vR080886@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: wblock set sender to wblock@FreeBSD.org using -f From: Warren Block Date: Thu, 2 Apr 2015 13:51:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280988 - head/sbin/ggate/ggatec 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 Apr 2015 13:51:07 -0000 Author: wblock (doc committer) Date: Thu Apr 2 13:51:06 2015 New Revision: 280988 URL: https://svnweb.freebsd.org/changeset/base/280988 Log: Add articles, avoid use of "you", simplify a few sentences. MFC after: 1 week Modified: head/sbin/ggate/ggatec/ggatec.8 Modified: head/sbin/ggate/ggatec/ggatec.8 ============================================================================== --- head/sbin/ggate/ggatec/ggatec.8 Thu Apr 2 13:02:25 2015 (r280987) +++ head/sbin/ggate/ggatec/ggatec.8 Thu Apr 2 13:51:06 2015 (r280988) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 26, 2004 +.Dd April 2, 2015 .Dt GGATEC 8 .Os .Sh NAME @@ -67,29 +67,29 @@ .Sh DESCRIPTION The .Nm -utility is a network client for GEOM Gate class. -It is responsible for creation of +utility is a network client for the GEOM Gate class. +It is responsible for the creation of .Nm ggate -devices and forwarding I/O requests between +devices and forwarding I/O requests between the .Nm geom_gate.ko -kernel module and +kernel module and the .Xr ggated 8 network daemon. Available commands: .Bl -tag -width ".Cm destroy" .It Cm create -Connect to given +Connect to a .Xr ggated 8 -daemon and create a +daemon on the specified host and create a .Nm ggate -provider related to the given remote file or device. +provider for the specified remote file or device. .It Cm rescue -If +Create a new connection after the .Nm -process died/has been killed, you can save situation with this -command, which creates new connection to the +process has died or been killed. +The new connection to the .Xr ggated 8 -daemon and will handle pending and future requests. +daemon handles pending and future requests. .It Cm destroy Destroy the given .Nm ggate @@ -139,12 +139,11 @@ provider. If not specified, it is taken from device, or set to 512 bytes for files. .It Fl t Ar timeout Number of seconds to wait before an I/O request will be canceled. -0 means no timeout. -Default is 0. +Default is 0, which means no timeout. .It Fl u Ar unit Unit number to use. .It Fl v -Do not fork, run in foreground and print debug informations on standard +Do not fork, run in foreground and print debug information on standard output. .It Ar host Remote host to connect to. @@ -159,7 +158,7 @@ should be called with the .Fl v option. .Sh EXAMPLES -Make use of CD-ROM device from remote host. +Use a CD-ROM device on a remote host. .Bd -literal -offset indent server# cat /etc/gg.exports client RO /dev/acd0 From owner-svn-src-all@FreeBSD.ORG Thu Apr 2 13:52:02 2015 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 B6496548; Thu, 2 Apr 2015 13:52:02 +0000 (UTC) Received: from mail-wi0-x22d.google.com (mail-wi0-x22d.google.com [IPv6:2a00:1450:400c:c05::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 54209869; Thu, 2 Apr 2015 13:52:02 +0000 (UTC) Received: by widdi4 with SMTP id di4so79522196wid.0; Thu, 02 Apr 2015 06:52:00 -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=RNyWOZSwijIboKTJHnIkRVzyeAS0xT7qHS0wNRSITGk=; b=DdadLy7esbYI3q2NID3E6choz9XiakEriJiNwh9FdtOkyTGnlgHDL1OrIIn1KCmFyT pJK3xwdj2WgRJB8RnN7CosZnAFnL1w/JHC5vgwUBNkfLlLCsvcIJ9TcavtwDnu4u4fnP N1FjViBRe6Q8pSMRGLv4sBLrH1yKMNTBQ5X4yMhI1OV6IySbqsAxAIuqVVuzFfOajftu wMYfu+Gga+QyJn8C7jvXG7RAC8zyA9mpk7b2vgmoLKLwZDcUv2G8YyPxFzMqzXSiLGlG XmI1G1fQq4jp9IRohJ900QMTYgxmguOmVG5rzHLpfrz9ykdFkUsl0/84MLDmVlssjjCF hmrw== X-Received: by 10.180.107.5 with SMTP id gy5mr25348043wib.0.1427982720720; Thu, 02 Apr 2015 06:52:00 -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 cf12sm7368600wjb.10.2015.04.02.06.51.59 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 02 Apr 2015 06:51:59 -0700 (PDT) Date: Thu, 2 Apr 2015 15:51:57 +0200 From: Mateusz Guzik To: Gleb Smirnoff Subject: Re: svn commit: r280971 - in head: contrib/ipfilter/tools share/man/man4 sys/contrib/ipfilter/netinet sys/netinet sys/netipsec sys/netpfil/pf Message-ID: <20150402135157.GB549@dft-labs.eu> References: <201504012226.t31MQedN044443@svn.freebsd.org> <1427929676.82583.103.camel@freebsd.org> <20150402123522.GC64665@FreeBSD.org> <20150402133751.GA549@dft-labs.eu> <20150402134217.GG64665@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20150402134217.GG64665@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, Ian Lepore X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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 Apr 2015 13:52:02 -0000 On Thu, Apr 02, 2015 at 04:42:17PM +0300, Gleb Smirnoff wrote: > On Thu, Apr 02, 2015 at 03:37:51PM +0200, Mateusz Guzik wrote: > M> On Thu, Apr 02, 2015 at 03:35:22PM +0300, Gleb Smirnoff wrote: > M> > On Wed, Apr 01, 2015 at 05:07:56PM -0600, Ian Lepore wrote: > M> > I> > Author: glebius > M> > I> > Date: Wed Apr 1 22:26:39 2015 > M> > I> > New Revision: 280971 > M> > I> > URL: https://svnweb.freebsd.org/changeset/base/280971 > M> > I> > > M> > I> > Log: > M> > I> > o Use new function ip_fillid() in all places throughout the kernel, > M> > I> > where we want to create a new IP datagram. > M> > I> > o Add support for RFC6864, which allows to set IP ID for atomic IP > M> > I> > datagrams to any value, to improve performance. The behaviour is > M> > I> > controlled by net.inet.ip.rfc6864 sysctl knob, which is enabled by > M> > I> > default. > M> > I> > o In case if we generate IP ID, use counter(9) to improve performance. > M> > I> > o Gather all code related to IP ID into ip_id.c. > M> > I> > > M> > I> > Differential Revision: https://reviews.freebsd.org/D2177 > M> > I> > Reviewed by: adrian, cy, rpaulo > M> > I> > Tested by: Emeric POUPON > M> > I> > Sponsored by: Netflix > M> > I> > Sponsored by: Nginx, Inc. > M> > I> > Relnotes: yes > M> > I> > > M> > I> [...] > M> > I> > +void > M> > I> > +ip_fillid(struct ip *ip) > M> > I> > +{ > M> > I> > + > M> > I> > + /* > M> > I> > + * Per RFC6864 Section 4 > M> > I> > + * > M> > I> > + * o Atomic datagrams: (DF==1) && (MF==0) && (frag_offset==0) > M> > I> > + * o Non-atomic datagrams: (DF==0) || (MF==1) || (frag_offset>0) > M> > I> > + */ > M> > I> > + if (V_ip_rfc6864 && (ip->ip_off & htons(IP_DF)) == htons(IP_DF)) > M> > I> > + ip->ip_id = 0; > M> > I> > + else if (V_ip_do_randomid) > M> > I> > + ip->ip_id = ip_randomid(); > M> > I> > + else { > M> > I> > + counter_u64_add(V_ip_id, 1); > M> > I> > + ip->ip_id = htons((*(uint64_t *)zpcpu_get(V_ip_id)) & 0xffff); > M> > I> > + } > M> > I> > +} > M> > I> > + > M> > I> > M> > I> This is completely bogus. It's a big opacity violation (it relies on > M> > I> what should be opaque private internal implementation details of > M> > I> counter(9)). The fact that the counter api doesn't provide a function > M> > I> for retrieving one cpu's counter value should be a big clue there -- the > M> > I> fact that you know the internals doesn't make it okay to reach behind > M> > I> the counter and grab a value like that. It may not even be safe to do > M> > I> so on any given architecture; it certainly isn't safe on arm, and that > M> > I> line of code above will work only by accident because you're throwing > M> > I> way all but 16 bits. > M> > > M> > I though about providing that API, but since it isn't safe in general, > M> > I decided to not do that. > M> > > M> > I> But even more importantly, this WILL result in multiple threads using > M> > I> the same value at the same time... > M> > I> > M> > I> - Thread A on CPU 1 and thread B on CPU 2 both begin executing here at > M> > I> the same time, and both get through counter_u64_add(). > M> > I> - Thread A keeps running and uses CPU 1's new value, call it 27. > M> > I> - Thread B gets prempted between counter_u64_add() and zpcpu_get(). > M> > I> When it resumes it's now on CPU 1, so it retrieves value 27 as well. > M> > > M> > This was already discussed in this thread: > M> > > M> > https://lists.freebsd.org/pipermail/svn-src-head/2015-March/069864.html > M> > > M> > M> For this particular use-case you never care what CPU you are executing > M> on, you only want to obtain a unique number. > M> > M> per-cpu counters can serve this purpose no problem, just provide an > M> operation which guarantees to return the new value of the counter it > M> incremented. Should be easily achieved with e.g. just pinning curthread > M> to the cpu it executes on for the duration of inc + fetch. > > I'd ask to pay attention to this particular email: > > https://lists.freebsd.org/pipermail/svn-src-head/2015-March/069966.html > > Just to justify probabilities, risks and countermeasures. > > For those, who don't believe in theory and prefers practice: > > https://lists.freebsd.org/pipermail/svn-src-head/2015-March/070091.html > > Note that Emeric was the one who observed collisions for the ip_id++ > code, that we used before. > Well in that case this at least deserves a comment in the code. Everyone spotting that counter_u64_add + zpcpu_get will think it's a bug. -- Mateusz Guzik From owner-svn-src-all@FreeBSD.ORG Thu Apr 2 13:59:05 2015 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 EE5AEAAB; Thu, 2 Apr 2015 13:59:04 +0000 (UTC) Received: from relay.mailchannels.net (nov-007-i588.relay.mailchannels.net [46.232.183.142]) by mx1.freebsd.org (Postfix) with ESMTP id CED7C8D3; Thu, 2 Apr 2015 13:58:59 +0000 (UTC) X-Sender-Id: duocircle|x-authuser|hippie Received: from smtp4.ore.mailhop.org (ip-10-33-12-218.us-west-2.compute.internal [10.33.12.218]) by relay.mailchannels.net (Postfix) with ESMTPA id DE49D48DA; Thu, 2 Apr 2015 13:58:47 +0000 (UTC) X-Sender-Id: duocircle|x-authuser|hippie Received: from smtp4.ore.mailhop.org ([TEMPUNAVAIL]. [10.83.15.107]) (using TLSv1 with cipher DHE-RSA-AES256-SHA) by 0.0.0.0:2500 (trex/5.4.8); Thu, 02 Apr 2015 13:58:48 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: duocircle|x-authuser|hippie X-MailChannels-Auth-Id: duocircle X-MC-Loop-Signature: 1427983128063:2896112750 X-MC-Ingress-Time: 1427983128062 Received: from c-73-34-117-227.hsd1.co.comcast.net ([73.34.117.227] helo=ilsoft.org) by smtp4.ore.mailhop.org with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.82) (envelope-from ) id 1Ydfdn-0001nk-99; Thu, 02 Apr 2015 13:58:39 +0000 Received: from revolution.hippie.lan (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t32DwTRK063916; Thu, 2 Apr 2015 07:58:29 -0600 (MDT) (envelope-from ian@freebsd.org) X-Mail-Handler: DuoCircle Outbound SMTP X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@duocircle.com (see https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information for abuse reporting information) X-MHO-User: U2FsdGVkX1/blXF53oipMzf/nUqSsYyG Message-ID: <1427983109.82583.115.camel@freebsd.org> Subject: Re: svn commit: r280971 - in head: contrib/ipfilter/tools share/man/man4 sys/contrib/ipfilter/netinet sys/netinet sys/netipsec sys/netpfil/pf From: Ian Lepore To: Mateusz Guzik Date: Thu, 02 Apr 2015 07:58:29 -0600 In-Reply-To: <20150402135157.GB549@dft-labs.eu> References: <201504012226.t31MQedN044443@svn.freebsd.org> <1427929676.82583.103.camel@freebsd.org> <20150402123522.GC64665@FreeBSD.org> <20150402133751.GA549@dft-labs.eu> <20150402134217.GG64665@FreeBSD.org> <20150402135157.GB549@dft-labs.eu> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.12.10 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-AuthUser: hippie Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Gleb Smirnoff , 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 Apr 2015 13:59:05 -0000 On Thu, 2015-04-02 at 15:51 +0200, Mateusz Guzik wrote: > On Thu, Apr 02, 2015 at 04:42:17PM +0300, Gleb Smirnoff wrote: > > On Thu, Apr 02, 2015 at 03:37:51PM +0200, Mateusz Guzik wrote: > > M> On Thu, Apr 02, 2015 at 03:35:22PM +0300, Gleb Smirnoff wrote: > > M> > On Wed, Apr 01, 2015 at 05:07:56PM -0600, Ian Lepore wrote: > > M> > I> > Author: glebius > > M> > I> > Date: Wed Apr 1 22:26:39 2015 > > M> > I> > New Revision: 280971 > > M> > I> > URL: https://svnweb.freebsd.org/changeset/base/280971 > > M> > I> > > > M> > I> > Log: > > M> > I> > o Use new function ip_fillid() in all places throughout the kernel, > > M> > I> > where we want to create a new IP datagram. > > M> > I> > o Add support for RFC6864, which allows to set IP ID for atomic IP > > M> > I> > datagrams to any value, to improve performance. The behaviour is > > M> > I> > controlled by net.inet.ip.rfc6864 sysctl knob, which is enabled by > > M> > I> > default. > > M> > I> > o In case if we generate IP ID, use counter(9) to improve performance. > > M> > I> > o Gather all code related to IP ID into ip_id.c. > > M> > I> > > > M> > I> > Differential Revision: https://reviews.freebsd.org/D2177 > > M> > I> > Reviewed by: adrian, cy, rpaulo > > M> > I> > Tested by: Emeric POUPON > > M> > I> > Sponsored by: Netflix > > M> > I> > Sponsored by: Nginx, Inc. > > M> > I> > Relnotes: yes > > M> > I> > > > M> > I> [...] > > M> > I> > +void > > M> > I> > +ip_fillid(struct ip *ip) > > M> > I> > +{ > > M> > I> > + > > M> > I> > + /* > > M> > I> > + * Per RFC6864 Section 4 > > M> > I> > + * > > M> > I> > + * o Atomic datagrams: (DF==1) && (MF==0) && (frag_offset==0) > > M> > I> > + * o Non-atomic datagrams: (DF==0) || (MF==1) || (frag_offset>0) > > M> > I> > + */ > > M> > I> > + if (V_ip_rfc6864 && (ip->ip_off & htons(IP_DF)) == htons(IP_DF)) > > M> > I> > + ip->ip_id = 0; > > M> > I> > + else if (V_ip_do_randomid) > > M> > I> > + ip->ip_id = ip_randomid(); > > M> > I> > + else { > > M> > I> > + counter_u64_add(V_ip_id, 1); > > M> > I> > + ip->ip_id = htons((*(uint64_t *)zpcpu_get(V_ip_id)) & 0xffff); > > M> > I> > + } > > M> > I> > +} > > M> > I> > + > > M> > I> > > M> > I> This is completely bogus. It's a big opacity violation (it relies on > > M> > I> what should be opaque private internal implementation details of > > M> > I> counter(9)). The fact that the counter api doesn't provide a function > > M> > I> for retrieving one cpu's counter value should be a big clue there -- the > > M> > I> fact that you know the internals doesn't make it okay to reach behind > > M> > I> the counter and grab a value like that. It may not even be safe to do > > M> > I> so on any given architecture; it certainly isn't safe on arm, and that > > M> > I> line of code above will work only by accident because you're throwing > > M> > I> way all but 16 bits. > > M> > > > M> > I though about providing that API, but since it isn't safe in general, > > M> > I decided to not do that. > > M> > > > M> > I> But even more importantly, this WILL result in multiple threads using > > M> > I> the same value at the same time... > > M> > I> > > M> > I> - Thread A on CPU 1 and thread B on CPU 2 both begin executing here at > > M> > I> the same time, and both get through counter_u64_add(). > > M> > I> - Thread A keeps running and uses CPU 1's new value, call it 27. > > M> > I> - Thread B gets prempted between counter_u64_add() and zpcpu_get(). > > M> > I> When it resumes it's now on CPU 1, so it retrieves value 27 as well. > > M> > > > M> > This was already discussed in this thread: > > M> > > > M> > https://lists.freebsd.org/pipermail/svn-src-head/2015-March/069864.html > > M> > > > M> > > M> For this particular use-case you never care what CPU you are executing > > M> on, you only want to obtain a unique number. > > M> > > M> per-cpu counters can serve this purpose no problem, just provide an > > M> operation which guarantees to return the new value of the counter it > > M> incremented. Should be easily achieved with e.g. just pinning curthread > > M> to the cpu it executes on for the duration of inc + fetch. > > > > I'd ask to pay attention to this particular email: > > > > https://lists.freebsd.org/pipermail/svn-src-head/2015-March/069966.html > > > > Just to justify probabilities, risks and countermeasures. > > > > For those, who don't believe in theory and prefers practice: > > > > https://lists.freebsd.org/pipermail/svn-src-head/2015-March/070091.html > > > > Note that Emeric was the one who observed collisions for the ip_id++ > > code, that we used before. > > > > Well in that case this at least deserves a comment in the code. Everyone > spotting that counter_u64_add + zpcpu_get will think it's a bug. > Because it IS a bug. That isn't changed by the fact that it works reliably on one platform due to what should be an opque implementation detail, and works by accident on other platforms (at least until the details of their implementations change in the future). As soon as somebody sees this code, thinks it's a good way to do things, and cut and pastes it into another venue and removes the & 0xffff, it just turns into a bug on every platform except amd64. -- Ian From owner-svn-src-all@FreeBSD.ORG Thu Apr 2 14:01:02 2015 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 2ACD7C0A; Thu, 2 Apr 2015 14:01:02 +0000 (UTC) Received: from relay.mailchannels.net (tkt-001-i373.relay.mailchannels.net [174.136.5.175]) by mx1.freebsd.org (Postfix) with ESMTP id 8DC1B8E7; Thu, 2 Apr 2015 14:01:00 +0000 (UTC) X-Sender-Id: duocircle|x-authuser|hippie Received: from smtp5.ore.mailhop.org (ip-10-220-9-73.us-west-2.compute.internal [10.220.9.73]) by relay.mailchannels.net (Postfix) with ESMTPA id D90801001AF; Thu, 2 Apr 2015 13:53:21 +0000 (UTC) X-Sender-Id: duocircle|x-authuser|hippie Received: from smtp5.ore.mailhop.org (smtp5.ore.mailhop.org [10.21.145.197]) (using TLSv1 with cipher DHE-RSA-AES256-SHA) by 0.0.0.0:2500 (trex/5.4.8); Thu, 02 Apr 2015 13:53:22 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: duocircle|x-authuser|hippie X-MailChannels-Auth-Id: duocircle X-MC-Loop-Signature: 1427982801982:177892084 X-MC-Ingress-Time: 1427982801982 Received: from c-73-34-117-227.hsd1.co.comcast.net ([73.34.117.227] helo=ilsoft.org) by smtp5.ore.mailhop.org with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.82) (envelope-from ) id 1YdfYb-0005Sp-8K; Thu, 02 Apr 2015 13:53:17 +0000 Received: from revolution.hippie.lan (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t32Dr77w063902; Thu, 2 Apr 2015 07:53:07 -0600 (MDT) (envelope-from ian@freebsd.org) X-Mail-Handler: DuoCircle Outbound SMTP X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@duocircle.com (see https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information for abuse reporting information) X-MHO-User: U2FsdGVkX1+Acop99Wjzl9pyVlOCYvy9 Message-ID: <1427982787.82583.111.camel@freebsd.org> Subject: Re: svn commit: r280971 - in head: contrib/ipfilter/tools share/man/man4 sys/contrib/ipfilter/netinet sys/netinet sys/netipsec sys/netpfil/pf From: Ian Lepore To: Gleb Smirnoff Date: Thu, 02 Apr 2015 07:53:07 -0600 In-Reply-To: <20150402123522.GC64665@FreeBSD.org> References: <201504012226.t31MQedN044443@svn.freebsd.org> <1427929676.82583.103.camel@freebsd.org> <20150402123522.GC64665@FreeBSD.org> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.12.10 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-AuthUser: hippie 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 Apr 2015 14:01:02 -0000 On Thu, 2015-04-02 at 15:35 +0300, Gleb Smirnoff wrote: > On Wed, Apr 01, 2015 at 05:07:56PM -0600, Ian Lepore wrote: > I> > Author: glebius > I> > Date: Wed Apr 1 22:26:39 2015 > I> > New Revision: 280971 > I> > URL: https://svnweb.freebsd.org/changeset/base/280971 > I> > > I> > Log: > I> > o Use new function ip_fillid() in all places throughout the kernel, > I> > where we want to create a new IP datagram. > I> > o Add support for RFC6864, which allows to set IP ID for atomic IP > I> > datagrams to any value, to improve performance. The behaviour is > I> > controlled by net.inet.ip.rfc6864 sysctl knob, which is enabled by > I> > default. > I> > o In case if we generate IP ID, use counter(9) to improve performance. > I> > o Gather all code related to IP ID into ip_id.c. > I> > > I> > Differential Revision: https://reviews.freebsd.org/D2177 > I> > Reviewed by: adrian, cy, rpaulo > I> > Tested by: Emeric POUPON > I> > Sponsored by: Netflix > I> > Sponsored by: Nginx, Inc. > I> > Relnotes: yes > I> > > I> [...] > I> > +void > I> > +ip_fillid(struct ip *ip) > I> > +{ > I> > + > I> > + /* > I> > + * Per RFC6864 Section 4 > I> > + * > I> > + * o Atomic datagrams: (DF==1) && (MF==0) && (frag_offset==0) > I> > + * o Non-atomic datagrams: (DF==0) || (MF==1) || (frag_offset>0) > I> > + */ > I> > + if (V_ip_rfc6864 && (ip->ip_off & htons(IP_DF)) == htons(IP_DF)) > I> > + ip->ip_id = 0; > I> > + else if (V_ip_do_randomid) > I> > + ip->ip_id = ip_randomid(); > I> > + else { > I> > + counter_u64_add(V_ip_id, 1); > I> > + ip->ip_id = htons((*(uint64_t *)zpcpu_get(V_ip_id)) & 0xffff); > I> > + } > I> > +} > I> > + > I> > I> This is completely bogus. It's a big opacity violation (it relies on > I> what should be opaque private internal implementation details of > I> counter(9)). The fact that the counter api doesn't provide a function > I> for retrieving one cpu's counter value should be a big clue there -- the > I> fact that you know the internals doesn't make it okay to reach behind > I> the counter and grab a value like that. It may not even be safe to do > I> so on any given architecture; it certainly isn't safe on arm, and that > I> line of code above will work only by accident because you're throwing > I> way all but 16 bits. > > I though about providing that API, but since it isn't safe in general, > I decided to not do that. > > I> But even more importantly, this WILL result in multiple threads using > I> the same value at the same time... > I> > I> - Thread A on CPU 1 and thread B on CPU 2 both begin executing here at > I> the same time, and both get through counter_u64_add(). > I> - Thread A keeps running and uses CPU 1's new value, call it 27. > I> - Thread B gets prempted between counter_u64_add() and zpcpu_get(). > I> When it resumes it's now on CPU 1, so it retrieves value 27 as well. > > This was already discussed in this thread: > > https://lists.freebsd.org/pipermail/svn-src-head/2015-March/069864.html > Discussed, but not really resolved, or even reasonably addressed. But I guess if you think it's done, more words at this point aren't going to make you see the problems clearly enough to make the required changes. -- Ian From owner-svn-src-all@FreeBSD.ORG Thu Apr 2 14:20:20 2015 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 3315E1ED; Thu, 2 Apr 2015 14:20:20 +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 ABFA0B6B; Thu, 2 Apr 2015 14:20:19 +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 t32EKHsm066440 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 2 Apr 2015 17:20:17 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t32EKHAM066439; Thu, 2 Apr 2015 17:20:17 +0300 (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 Apr 2015 17:20:17 +0300 From: Gleb Smirnoff To: Ian Lepore Subject: Re: svn commit: r280971 - in head: contrib/ipfilter/tools share/man/man4 sys/contrib/ipfilter/netinet sys/netinet sys/netipsec sys/netpfil/pf Message-ID: <20150402142017.GH64665@FreeBSD.org> References: <201504012226.t31MQedN044443@svn.freebsd.org> <1427929676.82583.103.camel@freebsd.org> <20150402123522.GC64665@FreeBSD.org> <1427982787.82583.111.camel@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1427982787.82583.111.camel@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 Apr 2015 14:20:20 -0000 On Thu, Apr 02, 2015 at 07:53:07AM -0600, Ian Lepore wrote: I> Discussed, but not really resolved, or even reasonably addressed. I> I> But I guess if you think it's done, more words at this point aren't I> going to make you see the problems clearly enough to make the required I> changes. I didn't see arguments that would prove the following assertions wrong. 1) There is legitimate case of IP ID reuse withing datagram lifetime, that happens due to overflow of uint16_t. Its probability is X. 2) There is a case of IP ID reuse due to migration between counter_u64_add() and memory fetch. Its probability is Y. 3) Y << X 4) Fixing X is impossible. 5) Fixing Y requires additional computing resources per packet. 6) Due to X being considerably high, the modern Internet has learnt to cope with the problem. >From this assertions I estimate that speaking of Y: (probability * risk cost) < countermeasures cost Please prove wrong my assertions, or the conclusion. P.S. Note that up to this week we had ip_id++ code, which was extremele prone to quick ID reuse. And no one (except Emeric of StormShield) was so worried about the case. But as soon as I made it per-CPU, together with disabling the code for 99% packets (thanks RFC6864), some people got extremely concerned by the possible reuse in the per-CPU case. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Thu Apr 2 14:23:01 2015 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 045196CE; Thu, 2 Apr 2015 14:23: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 E2EF9C40; Thu, 2 Apr 2015 14:23: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 t32EN0KL098230; Thu, 2 Apr 2015 14:23:00 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t32EN0Qu098229; Thu, 2 Apr 2015 14:23:00 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201504021423.t32EN0Qu098229@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 2 Apr 2015 14:23:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280989 - 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: Thu, 02 Apr 2015 14:23:01 -0000 Author: glebius Date: Thu Apr 2 14:22:59 2015 New Revision: 280989 URL: https://svnweb.freebsd.org/changeset/base/280989 Log: Provide a comment explaining issues with the counter(9) trick, so that people won't copy and paste it blindly. Prodded by: ian Sponsored by: Nginx, Inc. Modified: head/sys/netinet/ip_id.c Modified: head/sys/netinet/ip_id.c ============================================================================== --- head/sys/netinet/ip_id.c Thu Apr 2 13:51:06 2015 (r280988) +++ head/sys/netinet/ip_id.c Thu Apr 2 14:22:59 2015 (r280989) @@ -254,6 +254,20 @@ ip_fillid(struct ip *ip) ip->ip_id = ip_randomid(); else { counter_u64_add(V_ip_id, 1); + /* + * There are two issues about this trick, to be kept in mind. + * 1) We can migrate between counter_u64_add() and next + * line, and grab counter from other CPU, resulting in too + * quick ID reuse. This is tolerable in our particular case, + * since probability of such event is much lower then reuse + * of ID due to legitimate overflow, that at modern Internet + * speeds happens all the time. + * 2) We are relying on the fact that counter(9) is based on + * UMA_ZONE_PCPU uma(9) zone. We also take only last + * sixteen bits of a counter, so we don't care about the + * fact that machines with 32-bit word update their counters + * not atomically. + */ ip->ip_id = htons((*(uint64_t *)zpcpu_get(V_ip_id)) & 0xffff); } } From owner-svn-src-all@FreeBSD.ORG Thu Apr 2 14:23:24 2015 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 5B45B819; Thu, 2 Apr 2015 14:23:24 +0000 (UTC) Received: from mail-wg0-x229.google.com (mail-wg0-x229.google.com [IPv6:2a00:1450:400c:c00::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D6DF1C49; Thu, 2 Apr 2015 14:23:23 +0000 (UTC) Received: by wgbdm7 with SMTP id dm7so87178012wgb.1; Thu, 02 Apr 2015 07:23:22 -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=IWubHRkQ9yeUXh5XxE0jIFXrg70BGUeFeiw7yy1YcT8=; b=MfxpY9KrDn6j4XEIpUQOS6vGDjrckXfy7BHFGHtWZNBi4Acw4ZmzK70H/Amw3xkSF8 qz/M2qX1AeGN4tyH1qC43SK5uwNdYUQAtdJU9L5sDvjZwH3T4GJLm4u8Gt2vnMjfAfU1 Buf4y+YjE4raN6dwKBtuAN6J68RXcgFrxC2zzWENm4PHg5M7EULC2g4Y2q9rD905Ws+j in0PUBLe3jFn+FY/nuUPZvUriNk7z21kASrcna+pLJs8K9Tnwhqvhw2dF1TKunlUbZib oJnmqAI9r808CmmfCitrtJl+/vwglwXhwIOV/Pbe7WPF46ccz8XM7iaByFCzFiFQvmdK FuGg== X-Received: by 10.194.47.201 with SMTP id f9mr92486629wjn.17.1427984601958; Thu, 02 Apr 2015 07:23:21 -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 bp1sm7472205wjb.31.2015.04.02.07.23.20 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 02 Apr 2015 07:23:21 -0700 (PDT) Date: Thu, 2 Apr 2015 16:23:18 +0200 From: Mateusz Guzik To: Ian Lepore Subject: Re: svn commit: r280971 - in head: contrib/ipfilter/tools share/man/man4 sys/contrib/ipfilter/netinet sys/netinet sys/netipsec sys/netpfil/pf Message-ID: <20150402142318.GC549@dft-labs.eu> References: <201504012226.t31MQedN044443@svn.freebsd.org> <1427929676.82583.103.camel@freebsd.org> <20150402123522.GC64665@FreeBSD.org> <20150402133751.GA549@dft-labs.eu> <20150402134217.GG64665@FreeBSD.org> <20150402135157.GB549@dft-labs.eu> <1427983109.82583.115.camel@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1427983109.82583.115.camel@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Gleb Smirnoff , 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 Apr 2015 14:23:24 -0000 On Thu, Apr 02, 2015 at 07:58:29AM -0600, Ian Lepore wrote: > On Thu, 2015-04-02 at 15:51 +0200, Mateusz Guzik wrote: > > On Thu, Apr 02, 2015 at 04:42:17PM +0300, Gleb Smirnoff wrote: > > > On Thu, Apr 02, 2015 at 03:37:51PM +0200, Mateusz Guzik wrote: > > > M> For this particular use-case you never care what CPU you are executing > > > M> on, you only want to obtain a unique number. > > > M> > > > M> per-cpu counters can serve this purpose no problem, just provide an > > > M> operation which guarantees to return the new value of the counter it > > > M> incremented. Should be easily achieved with e.g. just pinning curthread > > > M> to the cpu it executes on for the duration of inc + fetch. > > > > > > I'd ask to pay attention to this particular email: > > > > > > https://lists.freebsd.org/pipermail/svn-src-head/2015-March/069966.html > > > > > > Just to justify probabilities, risks and countermeasures. > > > > > > For those, who don't believe in theory and prefers practice: > > > > > > https://lists.freebsd.org/pipermail/svn-src-head/2015-March/070091.html > > > > > > Note that Emeric was the one who observed collisions for the ip_id++ > > > code, that we used before. > > > > > > > Well in that case this at least deserves a comment in the code. Everyone > > spotting that counter_u64_add + zpcpu_get will think it's a bug. > > > > Because it IS a bug. That isn't changed by the fact that it works > reliably on one platform due to what should be an opque implementation > detail, and works by accident on other platforms (at least until the > details of their implementations change in the future). > > As soon as somebody sees this code, thinks it's a good way to do things, > and cut and pastes it into another venue and removes the & 0xffff, it > just turns into a bug on every platform except amd64. > Well, a thread migrating to another cpu is the standard thing everyone sees. Are you referring to the fact that the counter is 64-bit, so 32-bit arches must perform 2 reads and the thread can be migrated in-between? Indeed that would look like a solid problem, mitigated 'by accident' with 0xffff. I don't feel that strongly about changing the code. If it stays as it is, it definitely needs the comment I mentioned explaining why migration is fine. If the code was to be changed a machdep counter_u64_fetchadd seems like the only course of action. -- Mateusz Guzik From owner-svn-src-all@FreeBSD.ORG Thu Apr 2 14:34:26 2015 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 0021BB2F; Thu, 2 Apr 2015 14:34: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 78529D6A; Thu, 2 Apr 2015 14:34: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 t32EYKnU066532 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 2 Apr 2015 17:34:20 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t32EYKOv066531; Thu, 2 Apr 2015 17:34:20 +0300 (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 Apr 2015 17:34:20 +0300 From: Gleb Smirnoff To: Mateusz Guzik Subject: Re: svn commit: r280971 - in head: contrib/ipfilter/tools share/man/man4 sys/contrib/ipfilter/netinet sys/netinet sys/netipsec sys/netpfil/pf Message-ID: <20150402143420.GI64665@FreeBSD.org> References: <201504012226.t31MQedN044443@svn.freebsd.org> <1427929676.82583.103.camel@freebsd.org> <20150402123522.GC64665@FreeBSD.org> <20150402133751.GA549@dft-labs.eu> <20150402134217.GG64665@FreeBSD.org> <20150402135157.GB549@dft-labs.eu> <1427983109.82583.115.camel@freebsd.org> <20150402142318.GC549@dft-labs.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150402142318.GC549@dft-labs.eu> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Ian Lepore X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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 Apr 2015 14:34:26 -0000 On Thu, Apr 02, 2015 at 04:23:18PM +0200, Mateusz Guzik wrote: M> Well, a thread migrating to another cpu is the standard thing everyone M> sees. How often do you see it right in a particular window of 2 or 3 instructions? If you carefully read the thread I referred to, you would notice that on many arches, save amd64 and i386, all systems stats are prone to mangling the stats due to migration within PCPU_INC. Look here: grep '^#define PCPU_ADD' sys/*/include/pcpu.h Do we have reports on not precise enough statistics, yet? M> I don't feel that strongly about changing the code. If it stays as it M> is, it definitely needs the comment I mentioned explaining why migration M> is fine. I just added the comment. M> If the code was to be changed a machdep counter_u64_fetchadd seems like M> the only course of action. If we have more places in kernel, where such API is required, I would do it. Alas, seems like not possible to make it without critical section, even on amd64. Note that counter_u64_add() on amd64 is critical-less. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Thu Apr 2 14:43:08 2015 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 628C1E1F; Thu, 2 Apr 2015 14:43: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 4CED7E7B; Thu, 2 Apr 2015 14:43: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 t32Eh7Gb007850; Thu, 2 Apr 2015 14:43:07 GMT (envelope-from jch@FreeBSD.org) Received: (from jch@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t32Eh7NI007849; Thu, 2 Apr 2015 14:43:07 GMT (envelope-from jch@FreeBSD.org) Message-Id: <201504021443.t32Eh7NI007849@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jch set sender to jch@FreeBSD.org using -f From: Julien Charbon Date: Thu, 2 Apr 2015 14:43:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280990 - 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: Thu, 02 Apr 2015 14:43:08 -0000 Author: jch Date: Thu Apr 2 14:43:07 2015 New Revision: 280990 URL: https://svnweb.freebsd.org/changeset/base/280990 Log: Provide better debugging information in tcp_timer_activate() and tcp_timer_active() Differential Revision: https://reviews.freebsd.org/D2179 Suggested by: bz Reviewed by: jhb Approved by: jhb Modified: head/sys/netinet/tcp_timer.c Modified: head/sys/netinet/tcp_timer.c ============================================================================== --- head/sys/netinet/tcp_timer.c Thu Apr 2 14:22:59 2015 (r280989) +++ head/sys/netinet/tcp_timer.c Thu Apr 2 14:43:07 2015 (r280990) @@ -884,7 +884,7 @@ tcp_timer_activate(struct tcpcb *tp, int f_callout = tcp_timer_2msl; break; default: - panic("bad timer_type"); + panic("tp %p bad timer_type %#x", tp, timer_type); } if (delta == 0) { callout_stop(t_callout); @@ -915,7 +915,7 @@ tcp_timer_active(struct tcpcb *tp, int t t_callout = &tp->t_timers->tt_2msl; break; default: - panic("bad timer_type"); + panic("tp %p bad timer_type %#x", tp, timer_type); } return callout_active(t_callout); } From owner-svn-src-all@FreeBSD.ORG Thu Apr 2 14:50:55 2015 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 17FF425E; Thu, 2 Apr 2015 14:50:55 +0000 (UTC) Received: from mail-pd0-x236.google.com (mail-pd0-x236.google.com [IPv6:2607:f8b0:400e:c02::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D4F31ED3; Thu, 2 Apr 2015 14:50:54 +0000 (UTC) Received: by pddn5 with SMTP id n5so91676822pdd.2; Thu, 02 Apr 2015 07:50: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=D76ORG078h9T+1jjWX/8EPrR4N6b2NN+Yh199xkDzNU=; b=Fjmf4a03TT19lwg15gHQHr2V8ADFUVsPuPl4GNfHa0+BnaIk+TRY7w7uyZq2D1MIRt 2ix7jfx7IQwFG+3lD7m9pGejAGpbnbgrrq4odI9fVkZnVGocUDtbX6xp7ZMU97i7tbOH uMtTicwCBpcXKnBVFj9+jnqlBCH0Os3axuy5TLbgpZFs6lH6V18eJaa1JD5LCx38ndKp kP1mLaUDeTJh4pmROhKV9vRQ6h9hFfvD/XjntzQU+xlP69yH6nGgv3lf++EQql4XbiAn 1KmeG9HR9z7o0xe9RsSJC7rEo3RCSb16Oi6TibZTirlnjmEQr95RdU6aBUsqNfpffkyP DeVQ== X-Received: by 10.66.248.132 with SMTP id ym4mr85841796pac.147.1427986254385; Thu, 02 Apr 2015 07:50:54 -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 i2sm5480388pdo.62.2015.04.02.07.50.53 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 02 Apr 2015 07:50:53 -0700 (PDT) References: <201504021118.t32BIiBS008513@svn.freebsd.org> Mime-Version: 1.0 (1.0) In-Reply-To: <201504021118.t32BIiBS008513@svn.freebsd.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Message-Id: X-Mailer: iPhone Mail (12D508) From: Garrett Cooper Subject: Re: svn commit: r280982 - head/usr.bin/iscsictl Date: Thu, 2 Apr 2015 07:50:51 -0700 To: Edward Tomasz Napierala 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 Apr 2015 14:50:55 -0000 > On Apr 2, 2015, at 04:18, Edward Tomasz Napierala wrot= e: >=20 > Author: trasz > Date: Thu Apr 2 11:18:43 2015 > New Revision: 280982 > URL: https://svnweb.freebsd.org/changeset/base/280982 >=20 > Log: > Rewrite iscsi.conf(5) to better match iscsictl(8). >=20 > MFC after: 1 month > Sponsored by: The FreeBSD Foundation Relnotes: yes/add an updating entry?= From owner-svn-src-all@FreeBSD.ORG Thu Apr 2 15:38:11 2015 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 558CA65B; Thu, 2 Apr 2015 15:38:11 +0000 (UTC) Received: from mail-wi0-x230.google.com (mail-wi0-x230.google.com [IPv6:2a00:1450:400c:c05::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D43F26D7; Thu, 2 Apr 2015 15:38:10 +0000 (UTC) Received: by wixm2 with SMTP id m2so58364689wix.0; Thu, 02 Apr 2015 08:38:09 -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=1MXf1x2wgxdd7DNjBWM0B7w9l+sFJmRpb2qoXwlb8es=; b=sxsLRXpkY3XDY1dl+nnDoeauNSR90khWpIYOyiAZ9l4LI+28MIFEAMVcoP37pBswfn FKXCtNuwzc+MI63TYv+FDgqY4c7VzeYm4QxVz/V4DhVJFQtbI+QbQoIwtKZvZ4kerYoE BzbFeHSyrdifOdeK6Auht52Pe2g3uOBixs9WRfkrLbRMx7pxmp258oP2iRjdGMYKuAaA FfznHHerj5I6Ukpp2aHdmJ/7VsJCl7EhKFvwID+EL63mF6hMVSNZh4ejmAdQ6wKQOKjJ iX9W+bY8nqTP6JpVbnAohYFEmt1M4IcZlTeyGY/fCaOuhcoz9rlm5O1VhM25QkN7V92g FedQ== X-Received: by 10.180.88.65 with SMTP id be1mr25134305wib.50.1427989089283; Thu, 02 Apr 2015 08:38:09 -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 l3sm3500955wiv.18.2015.04.02.08.38.07 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 02 Apr 2015 08:38:08 -0700 (PDT) Date: Thu, 2 Apr 2015 17:38:05 +0200 From: Mateusz Guzik To: Gleb Smirnoff Subject: Re: svn commit: r280971 - in head: contrib/ipfilter/tools share/man/man4 sys/contrib/ipfilter/netinet sys/netinet sys/netipsec sys/netpfil/pf Message-ID: <20150402153805.GD549@dft-labs.eu> References: <201504012226.t31MQedN044443@svn.freebsd.org> <1427929676.82583.103.camel@freebsd.org> <20150402123522.GC64665@FreeBSD.org> <20150402133751.GA549@dft-labs.eu> <20150402134217.GG64665@FreeBSD.org> <20150402135157.GB549@dft-labs.eu> <1427983109.82583.115.camel@freebsd.org> <20150402142318.GC549@dft-labs.eu> <20150402143420.GI64665@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20150402143420.GI64665@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, Ian Lepore X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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 Apr 2015 15:38:11 -0000 On Thu, Apr 02, 2015 at 05:34:20PM +0300, Gleb Smirnoff wrote: > On Thu, Apr 02, 2015 at 04:23:18PM +0200, Mateusz Guzik wrote: > M> Well, a thread migrating to another cpu is the standard thing everyone > M> sees. > > How often do you see it right in a particular window of 2 or > 3 instructions? > > If you carefully read the thread I referred to, you would notice that > on many arches, save amd64 and i386, all systems stats are prone > to mangling the stats due to migration within PCPU_INC. Look here: > > grep '^#define PCPU_ADD' sys/*/include/pcpu.h > > Do we have reports on not precise enough statistics, yet? How many non-x86 installations with multiple cpus and high traffic are out there? Also note that stats should be roughly equally distributed amongst CPUs which do the work, so an occasional mismatch is likely to go unnoticed. Would be nice to get this fixed at some point though. > > M> I don't feel that strongly about changing the code. If it stays as it > M> is, it definitely needs the comment I mentioned explaining why migration > M> is fine. > > I just added the comment. > Thanks! > M> If the code was to be changed a machdep counter_u64_fetchadd seems like > M> the only course of action. > > If we have more places in kernel, where such API is required, I would do > it. Alas, seems like not possible to make it without critical section, > even on amd64. Note that counter_u64_add() on amd64 is critical-less. > Yeah, but that should be cheap. Worst case on amd64 it could be microoptimised with removal of func call and inline critnest manipulation with compiler barrier. Afair Ian said that on arm they could hack around it nicer with atomics, don't remember atm what's the holdup (if any). tl;dr this should be doable without technical problems and does not have to affect counter_u64_add. -- Mateusz Guzik From owner-svn-src-all@FreeBSD.ORG Thu Apr 2 15:47:38 2015 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 4E93AABE; Thu, 2 Apr 2015 15:47: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 1F30086F; Thu, 2 Apr 2015 15:47: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 t32FlbA0036993; Thu, 2 Apr 2015 15:47:37 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t32FlbOv036992; Thu, 2 Apr 2015 15:47:37 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201504021547.t32FlbOv036992@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 Apr 2015 15:47:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280991 - 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: Thu, 02 Apr 2015 15:47:38 -0000 Author: hselasky Date: Thu Apr 2 15:47:37 2015 New Revision: 280991 URL: https://svnweb.freebsd.org/changeset/base/280991 Log: Extend fixes made in r278103 and r38754 by copying the complete packet header and not only partial flags and fields. Firewalls can attach classification tags to the outgoing mbufs which should be copied to all the new fragments. Else only the first fragment will be let through by the firewall. This can easily be tested by sending a large ping packet through a firewall. It was also discovered that VLAN related flags and fields should be copied for packets traversing through VLANs. This is all handled by "m_dup_pkthdr()". Regarding the MAC policy check in ip_fragment(), the tag provided by the originating mbuf is copied instead of using the default one provided by m_gethdr(). Tested by: Karim Fodil-Lemelin MFC after: 2 weeks Sponsored by: Mellanox Technologies PR: 7802 Modified: head/sys/netinet/ip_output.c Modified: head/sys/netinet/ip_output.c ============================================================================== --- head/sys/netinet/ip_output.c Thu Apr 2 14:43:07 2015 (r280990) +++ head/sys/netinet/ip_output.c Thu Apr 2 15:47:37 2015 (r280991) @@ -774,11 +774,19 @@ smart_frag_failure: IPSTAT_INC(ips_odropped); goto done; } - /* make sure the flowid is the same for the fragmented mbufs */ - M_HASHTYPE_SET(m, M_HASHTYPE_GET(m0)); - m->m_pkthdr.flowid = m0->m_pkthdr.flowid; - /* copy multicast flag, if any */ - m->m_flags |= (m0->m_flags & M_MCAST); + /* + * Make sure the complete packet header gets copied + * from the originating mbuf to the newly created + * mbuf. This also ensures that existing firewall + * classification(s), VLAN tags and so on get copied + * to the resulting fragmented packet(s): + */ + if (m_dup_pkthdr(m, m0, M_NOWAIT) == 0) { + m_free(m); + error = ENOBUFS; + IPSTAT_INC(ips_odropped); + goto done; + } /* * In the first mbuf, leave room for the link header, then * copy the original IP header including options. The payload @@ -808,11 +816,9 @@ smart_frag_failure: goto done; } m->m_pkthdr.len = mhlen + len; - m->m_pkthdr.rcvif = NULL; #ifdef MAC mac_netinet_fragment(m0, m); #endif - m->m_pkthdr.csum_flags = m0->m_pkthdr.csum_flags; mhip->ip_off = htons(mhip->ip_off); mhip->ip_sum = 0; if (m->m_pkthdr.csum_flags & CSUM_IP & ~if_hwassist_flags) { From owner-svn-src-all@FreeBSD.ORG Thu Apr 2 16:00:27 2015 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 4520C5AC; Thu, 2 Apr 2015 16:00:27 +0000 (UTC) Received: from cyrus.watson.org (cyrus.watson.org [198.74.231.69]) by mx1.freebsd.org (Postfix) with ESMTP id 02EC69D5; Thu, 2 Apr 2015 16:00:27 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [198.74.231.63]) by cyrus.watson.org (Postfix) with ESMTPS id 23CE246B5C; Thu, 2 Apr 2015 12:00:26 -0400 (EDT) Date: Thu, 2 Apr 2015 17:00:26 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Mateusz Guzik Subject: Re: svn commit: r280971 - in head: contrib/ipfilter/tools share/man/man4 sys/contrib/ipfilter/netinet sys/netinet sys/netipsec sys/netpfil/pf In-Reply-To: <20150402153805.GD549@dft-labs.eu> Message-ID: References: <201504012226.t31MQedN044443@svn.freebsd.org> <1427929676.82583.103.camel@freebsd.org> <20150402123522.GC64665@FreeBSD.org> <20150402133751.GA549@dft-labs.eu> <20150402134217.GG64665@FreeBSD.org> <20150402135157.GB549@dft-labs.eu> <1427983109.82583.115.camel@freebsd.org> <20150402142318.GC549@dft-labs.eu> <20150402143420.GI64665@FreeBSD.org> <20150402153805.GD549@dft-labs.eu> User-Agent: Alpine 2.11 (BSF 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Gleb Smirnoff , src-committers@freebsd.org, Ian Lepore X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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 Apr 2015 16:00:27 -0000 On Thu, 2 Apr 2015, Mateusz Guzik wrote: >> If you carefully read the thread I referred to, you would notice that on >> many arches, save amd64 and i386, all systems stats are prone to mangling >> the stats due to migration within PCPU_INC. Look here: >> >> grep '^#define PCPU_ADD' sys/*/include/pcpu.h >> >> Do we have reports on not precise enough statistics, yet? > > How many non-x86 installations with multiple cpus and high traffic are out > there? Not sure if this was a rhetorical question or not, but: quite a few. We have support for several highly threaded 64-bit MIPS systems including those from Cavium and Broadcom (was NetLogic Micro was RMI). Several reference systems are in the netperf cluster including 16- and 32-thread systems normally deployed in high-performance network products. It's possible that ARMv8 systems will gradually displayce 64-bit MIPS systems in this arena in the future, but hard to say. Either way, it's not x86. :-) Robert From owner-svn-src-all@FreeBSD.ORG Thu Apr 2 17:03:03 2015 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 964ECA69; Thu, 2 Apr 2015 17:03: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 80F501CA; Thu, 2 Apr 2015 17:03: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 t32H33oS074598; Thu, 2 Apr 2015 17:03:03 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t32H33je074597; Thu, 2 Apr 2015 17:03:03 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504021703.t32H33je074597@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 2 Apr 2015 17:03:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280992 - 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: Thu, 02 Apr 2015 17:03:03 -0000 Author: andrew Date: Thu Apr 2 17:03:02 2015 New Revision: 280992 URL: https://svnweb.freebsd.org/changeset/base/280992 Log: Only use the CROSS_BINUTILS_PREFIX tool if it exists. Reviewed by: emaste Sponsored by: The FreeBSD Foundation Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Thu Apr 2 15:47:37 2015 (r280991) +++ head/Makefile.inc1 Thu Apr 2 17:03:02 2015 (r280992) @@ -344,7 +344,8 @@ X${COMPILER}?= ${${COMPILER}} .endfor XBINUTILS= AS AR LD NM OBJCOPY OBJDUMP RANLIB SIZE STRINGS .for BINUTIL in ${XBINUTILS} -.if defined(CROSS_BINUTILS_PREFIX) +.if defined(CROSS_BINUTILS_PREFIX) && \ + exists(${CROSS_BINUTILS_PREFIX}${${BINUTIL}}) X${BINUTIL}?= ${CROSS_BINUTILS_PREFIX}${${BINUTIL}} .else X${BINUTIL}?= ${${BINUTIL}} From owner-svn-src-all@FreeBSD.ORG Thu Apr 2 17:06:17 2015 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 0ACC9DFD; Thu, 2 Apr 2015 17:06: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 E8B5E229; Thu, 2 Apr 2015 17:06: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 t32H6GRF075290; Thu, 2 Apr 2015 17:06:16 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t32H6GiW075289; Thu, 2 Apr 2015 17:06:16 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504021706.t32H6GiW075289@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 2 Apr 2015 17:06:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280993 - head/gnu/lib/libgcc 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 Apr 2015 17:06:17 -0000 Author: andrew Date: Thu Apr 2 17:06:15 2015 New Revision: 280993 URL: https://svnweb.freebsd.org/changeset/base/280993 Log: Exclude the floating-point functions from libgcc_s on arm64, they are unneeded and will be provided by compiler-rt. Sponsored by: The FreeBSD Foundation Modified: head/gnu/lib/libgcc/Makefile Modified: head/gnu/lib/libgcc/Makefile ============================================================================== --- head/gnu/lib/libgcc/Makefile Thu Apr 2 17:03:02 2015 (r280992) +++ head/gnu/lib/libgcc/Makefile Thu Apr 2 17:06:15 2015 (r280993) @@ -55,7 +55,7 @@ LIB2FUNCS+= _fixuns${mode}si .endfor # Likewise double-word routines. -.if ${TARGET_CPUARCH} != "arm" +.if ${TARGET_CPUARCH} != "aarch64" && ${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 From owner-svn-src-all@FreeBSD.ORG Thu Apr 2 17:09:32 2015 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 3A36B17F; Thu, 2 Apr 2015 17:09:32 +0000 (UTC) Received: from mail-wi0-x22e.google.com (mail-wi0-x22e.google.com [IPv6:2a00:1450:400c:c05::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B848A281; Thu, 2 Apr 2015 17:09:31 +0000 (UTC) Received: by widdi4 with SMTP id di4so85596401wid.0; Thu, 02 Apr 2015 10:09:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=b6i04yMcpmQkeyWUYi6+G54JdwVOxJpUBVAUhGUUy+s=; b=DR7X46fd+zMynARRoRJTobz4qKROg1Sl2Yc/hMg3/ajNDKwt843+1itw90CtiYLwDL Env9qK3LTI659zcMdP40isAZcVOYWLWmArvBTsy8bWbgUIQEgC9hnDcJYWQDXH+PINTZ hKh0y78sEXMeeziECOP2w6AXCtT3M1vKQUOCqpzAsjClbGWeKhnzSGK4wM1esRWe/5H+ ntNqo/fBee0L5GukUjrkM4Yneb291ce39Xhot55KieCKpy5rUZGlGBqVjv+yMhDGCWze q3PgExArg43UpJjNHzimaYRIRef6JdVi8bVIy5rMILZIu1kDAyK1z3fxhUiedw+DJRw3 XqxQ== X-Received: by 10.194.61.100 with SMTP id o4mr96790295wjr.28.1427994570140; Thu, 02 Apr 2015 10:09:30 -0700 (PDT) Received: from brick.home (eia111.neoplus.adsl.tpnet.pl. [83.21.116.111]) by mx.google.com with ESMTPSA id w8sm8073169wja.4.2015.04.02.10.09.28 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Apr 2015 10:09:28 -0700 (PDT) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Date: Thu, 2 Apr 2015 19:09:26 +0200 From: Edward Tomasz Napierala To: Garrett Cooper Subject: Re: svn commit: r280982 - head/usr.bin/iscsictl Message-ID: <20150402170926.GA1163@brick.home> Mail-Followup-To: Garrett Cooper , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" References: <201504021118.t32BIiBS008513@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.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 Apr 2015 17:09:32 -0000 On 0402T0750, Garrett Cooper wrote: > > > On Apr 2, 2015, at 04:18, Edward Tomasz Napierala wrote: > > > > Author: trasz > > Date: Thu Apr 2 11:18:43 2015 > > New Revision: 280982 > > URL: https://svnweb.freebsd.org/changeset/base/280982 > > > > Log: > > Rewrite iscsi.conf(5) to better match iscsictl(8). > > > > MFC after: 1 month > > Sponsored by: The FreeBSD Foundation > > Relnotes: yes/add an updating entry? I'm not sure, it's only a man page update - the file format syntax didn't change. From owner-svn-src-all@FreeBSD.ORG Thu Apr 2 17:30:20 2015 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 8C3D1FCD; Thu, 2 Apr 2015 17:30: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 5E6C575F; Thu, 2 Apr 2015 17:30: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 t32HUKhg086410; Thu, 2 Apr 2015 17:30:20 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t32HUK42086409; Thu, 2 Apr 2015 17:30:20 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504021730.t32HUK42086409@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 2 Apr 2015 17:30:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280997 - head/lib/libkvm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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 Apr 2015 17:30:20 -0000 Author: andrew Date: Thu Apr 2 17:30:19 2015 New Revision: 280997 URL: https://svnweb.freebsd.org/changeset/base/280997 Log: Add stub functions to build libkvm. There will be added, but we need them now get the toolchain target building. Differential Revision: https://reviews.freebsd.org/D2185 Sponsored by: The FreeBSD Foundation Added: head/lib/libkvm/kvm_aarch64.c (contents, props changed) Added: head/lib/libkvm/kvm_aarch64.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libkvm/kvm_aarch64.c Thu Apr 2 17:30:19 2015 (r280997) @@ -0,0 +1,64 @@ +/*- + * Copyright (c) 2014 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Andrew Turner under + * sponsorship from the FreeBSD Foundation. + * + * 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 "kvm_private.h" + +void +_kvm_freevtop(kvm_t *kd) +{ + + printf("_kvm_freevtop\n"); + abort(); +} + +int +_kvm_initvtop(kvm_t *kd) +{ + + printf("_kvm_initvtop\n"); + abort(); +} + +int +_kvm_kvatop(kvm_t *kd, u_long va, off_t *pa) +{ + + printf("_kvm_kvatop\n"); + abort(); +} From owner-svn-src-all@FreeBSD.ORG Thu Apr 2 17:49:14 2015 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 B4EB27FB; Thu, 2 Apr 2015 17:49:14 +0000 (UTC) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6A09E9AB; Thu, 2 Apr 2015 17:49:14 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id E0C1C1FE022; Thu, 2 Apr 2015 19:49:11 +0200 (CEST) Message-ID: <551D8143.4060509@selasky.org> Date: Thu, 02 Apr 2015 19:49:55 +0200 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Robert Watson , Mateusz Guzik Subject: Re: svn commit: r280971 - in head: contrib/ipfilter/tools share/man/man4 sys/contrib/ipfilter/netinet sys/netinet sys/netipsec sys/netpfil/pf References: <201504012226.t31MQedN044443@svn.freebsd.org> <1427929676.82583.103.camel@freebsd.org> <20150402123522.GC64665@FreeBSD.org> <20150402133751.GA549@dft-labs.eu> <20150402134217.GG64665@FreeBSD.org> <20150402135157.GB549@dft-labs.eu> <1427983109.82583.115.camel@freebsd.org> <20150402142318.GC549@dft-labs.eu> <20150402143420.GI64665@FreeBSD.org> <20150402153805.GD549@dft-labs.eu> In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Gleb Smirnoff , src-committers@freebsd.org, Ian Lepore X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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 Apr 2015 17:49:14 -0000 On 04/02/15 18:00, Robert Watson wrote: > On Thu, 2 Apr 2015, Mateusz Guzik wrote: > >>> If you carefully read the thread I referred to, you would notice that >>> on many arches, save amd64 and i386, all systems stats are prone to >>> mangling the stats due to migration within PCPU_INC. Look here: >>> >>> grep '^#define PCPU_ADD' sys/*/include/pcpu.h >>> >>> Do we have reports on not precise enough statistics, yet? >> >> How many non-x86 installations with multiple cpus and high traffic are >> out there? > > Not sure if this was a rhetorical question or not, but: quite a few. We > have support for several highly threaded 64-bit MIPS systems including > those from Cavium and Broadcom (was NetLogic Micro was RMI). Several > reference systems are in the netperf cluster including 16- and 32-thread > systems normally deployed in high-performance network products. It's > possible that ARMv8 systems will gradually displayce 64-bit MIPS systems > in this arena in the future, but hard to say. Either way, it's not x86. > :-) > Hi, I've sketched up my proposal here, please have a look. https://reviews.freebsd.org/D2211 --HPS From owner-svn-src-all@FreeBSD.ORG Thu Apr 2 18:18:42 2015 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 5F0CADA8; Thu, 2 Apr 2015 18:18: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 49E23CF6; Thu, 2 Apr 2015 18:18: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 t32IIg0k009576; Thu, 2 Apr 2015 18:18:42 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t32IIgWk009575; Thu, 2 Apr 2015 18:18:42 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201504021818.t32IIgWk009575@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 2 Apr 2015 18:18:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280998 - head/usr.sbin/arp 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 Apr 2015 18:18:42 -0000 Author: markj Date: Thu Apr 2 18:18:40 2015 New Revision: 280998 URL: https://svnweb.freebsd.org/changeset/base/280998 Log: arp(8): add support for printing and deleting entries of type IFT_INFINIBAND, used in IPoIB. PR: 151594 Submitted by: Anthony Cornehl Reviewed by: hselasky MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/usr.sbin/arp/arp.c Modified: head/usr.sbin/arp/arp.c ============================================================================== --- head/usr.sbin/arp/arp.c Thu Apr 2 17:30:19 2015 (r280997) +++ head/usr.sbin/arp/arp.c Thu Apr 2 18:18:40 2015 (r280998) @@ -282,6 +282,7 @@ valid_type(int type) switch (type) { case IFT_ETHER: case IFT_FDDI: + case IFT_INFINIBAND: case IFT_ISO88023: case IFT_ISO88024: case IFT_ISO88025: @@ -656,6 +657,9 @@ print_entry(struct sockaddr_dl *sdl, case IFT_BRIDGE: printf(" [bridge]"); break; + case IFT_INFINIBAND: + printf(" [infiniband]"); + break; default: break; } From owner-svn-src-all@FreeBSD.ORG Thu Apr 2 18:21:28 2015 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 CCFDDFC1; Thu, 2 Apr 2015 18:21:28 +0000 (UTC) Received: from mail-pd0-x22d.google.com (mail-pd0-x22d.google.com [IPv6:2607:f8b0:400e:c02::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9E788DBE; Thu, 2 Apr 2015 18:21:28 +0000 (UTC) Received: by pdea3 with SMTP id a3so45641929pde.3; Thu, 02 Apr 2015 11:21:28 -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=4Hwv8SEVwwvjT5BoQrHxFmls4iMAZHHl3c0lQytQaso=; b=lh+c5cJsdmfCjVXW6nQNqaR2il/oUBk10kwuJjq9kIRCEO+DqoGjP7BfG0+NB338oN 1E4hy+onndp+WJgB5b5Qba0OckFhdIztdz5Rwtx1Ab4vppT/UphpsaDo5Nf0ErVy+bhs vOaGDs+yjhEjTQG51L9OB5CuCNFcM9Xda+yuUpSZgcM6FqAsaTSNKtFZ7pGo2VHMXk0w KzG+G1KKOD9jW5hDyI7IMElP7R7K6eQS8cCY0trrScnVf3aVFfHkeVKKMPRdsxxKsylO iGnfaa6NJBmgobIZoeLNm+vLeeFI2UBl6dNQMPCfwhJXF6CUNemWPOwIjSjkuRE/b6qo 9mqw== X-Received: by 10.68.139.225 with SMTP id rb1mr18629626pbb.93.1427998888143; Thu, 02 Apr 2015 11:21:28 -0700 (PDT) Received: from [10.48.86.211] ([166.170.42.11]) by mx.google.com with ESMTPSA id ap4sm5887626pbd.2.2015.04.02.11.21.27 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 02 Apr 2015 11:21:27 -0700 (PDT) References: <201504021118.t32BIiBS008513@svn.freebsd.org> <20150402170926.GA1163@brick.home> Mime-Version: 1.0 (1.0) In-Reply-To: <20150402170926.GA1163@brick.home> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Message-Id: X-Mailer: iPhone Mail (12D508) From: Garrett Cooper Subject: Re: svn commit: r280982 - head/usr.bin/iscsictl Date: Thu, 2 Apr 2015 11:15:54 -0700 To: Edward Tomasz Napierala 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 Apr 2015 18:21:28 -0000 > On Apr 2, 2015, at 10:09, Edward Tomasz Napierala wrot= e: >=20 >> On 0402T0750, Garrett Cooper wrote: >>=20 >>> On Apr 2, 2015, at 04:18, Edward Tomasz Napierala wr= ote: >>>=20 >>> Author: trasz >>> Date: Thu Apr 2 11:18:43 2015 >>> New Revision: 280982 >>> URL: https://svnweb.freebsd.org/changeset/base/280982 >>>=20 >>> Log: >>> Rewrite iscsi.conf(5) to better match iscsictl(8). >>>=20 >>> MFC after: 1 month >>> Sponsored by: The FreeBSD Foundation >>=20 >> Relnotes: yes/add an updating entry? >=20 > I'm not sure, it's only a man page update - the file format syntax > didn't change. Ah, ok. I thought the format changes. Nevermind :)..= From owner-svn-src-all@FreeBSD.ORG Thu Apr 2 18:23:24 2015 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 BEF96198; Thu, 2 Apr 2015 18:23:24 +0000 (UTC) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 74A8EDD0; Thu, 2 Apr 2015 18:23:24 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 610851FE022; Thu, 2 Apr 2015 20:23:22 +0200 (CEST) Message-ID: <551D8945.8050906@selasky.org> Date: Thu, 02 Apr 2015 20:24:05 +0200 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Robert Watson , Mateusz Guzik Subject: Re: svn commit: r280971 - in head: contrib/ipfilter/tools share/man/man4 sys/contrib/ipfilter/netinet sys/netinet sys/netipsec sys/netpfil/pf References: <201504012226.t31MQedN044443@svn.freebsd.org> <1427929676.82583.103.camel@freebsd.org> <20150402123522.GC64665@FreeBSD.org> <20150402133751.GA549@dft-labs.eu> <20150402134217.GG64665@FreeBSD.org> <20150402135157.GB549@dft-labs.eu> <1427983109.82583.115.camel@freebsd.org> <20150402142318.GC549@dft-labs.eu> <20150402143420.GI64665@FreeBSD.org> <20150402153805.GD549@dft-labs.eu> <551D8143.4060509@selasky.org> In-Reply-To: <551D8143.4060509@selasky.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, Gleb Smirnoff , src-committers@freebsd.org, Ian Lepore X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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 Apr 2015 18:23:24 -0000 On 04/02/15 19:49, Hans Petter Selasky wrote: > On 04/02/15 18:00, Robert Watson wrote: >> On Thu, 2 Apr 2015, Mateusz Guzik wrote: >> >>>> If you carefully read the thread I referred to, you would notice that >>>> on many arches, save amd64 and i386, all systems stats are prone to >>>> mangling the stats due to migration within PCPU_INC. Look here: >>>> >>>> grep '^#define PCPU_ADD' sys/*/include/pcpu.h >>>> >>>> Do we have reports on not precise enough statistics, yet? >>> >>> How many non-x86 installations with multiple cpus and high traffic are >>> out there? >> >> Not sure if this was a rhetorical question or not, but: quite a few. We >> have support for several highly threaded 64-bit MIPS systems including >> those from Cavium and Broadcom (was NetLogic Micro was RMI). Several >> reference systems are in the netperf cluster including 16- and 32-thread >> systems normally deployed in high-performance network products. It's >> possible that ARMv8 systems will gradually displayce 64-bit MIPS systems >> in this arena in the future, but hard to say. Either way, it's not x86. >> :-) >> > > Hi, > > I've sketched up my proposal here, please have a look. > > https://reviews.freebsd.org/D2211 > > --HPS > Hi, In my sketchup I assume that packets for the same destination will not be re-ordered. I see that the current ip_reass() code does not care about TCP or UDP port numbers at all. Maybe we should add code to check that the packet belongs to the same ports too? Does somebody here know what happens in these two cases: If we are transmitting using TSO, will the network adapter increment the IP ID field somehow? What happens if an outgoing IP packet resulting from a TSO packet get fragmented by a router? In ip_fragment() when we create fragments we should increment the ip_id value for each fragment? --HPS From owner-svn-src-all@FreeBSD.ORG Thu Apr 2 18:32:22 2015 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 9A628636; Thu, 2 Apr 2015 18:32:22 +0000 (UTC) Received: from cyrus.watson.org (cyrus.watson.org [198.74.231.69]) by mx1.freebsd.org (Postfix) with ESMTP id 647ABEBA; Thu, 2 Apr 2015 18:32:22 +0000 (UTC) Received: from [10.0.1.17] (host81-157-243-31.range81-157.btcentralplus.com [81.157.243.31]) by cyrus.watson.org (Postfix) with ESMTPSA id A6BF546B35; Thu, 2 Apr 2015 14:32:20 -0400 (EDT) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: svn commit: r280971 - in head: contrib/ipfilter/tools share/man/man4 sys/contrib/ipfilter/netinet sys/netinet sys/netipsec sys/netpfil/pf From: "Robert N. M. Watson" In-Reply-To: <551D8945.8050906@selasky.org> Date: Thu, 2 Apr 2015 19:32:19 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <8900318B-8155-4131-A0C3-3DE169782EFC@FreeBSD.org> References: <201504012226.t31MQedN044443@svn.freebsd.org> <1427929676.82583.103.camel@freebsd.org> <20150402123522.GC64665@FreeBSD.org> <20150402133751.GA549@dft-labs.eu> <20150402134217.GG64665@FreeBSD.org> <20150402135157.GB549@dft-labs.eu> <1427983109.82583.115.camel@freebsd.org> <20150402142318.GC549@dft-labs.eu> <20150402143420.GI64665@FreeBSD.org> <20150402153805.GD549@dft-labs.eu> <551D8143.4060509@selasky.org> <551D8945.8050906@selasky.org> To: Hans Petter Selasky X-Mailer: Apple Mail (2.2070.6) Cc: Mateusz Guzik , Ian Lepore , svn-src-all@freebsd.org, src-committers@freebsd.org, Gleb Smirnoff , svn-src-head@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 Apr 2015 18:32:22 -0000 On 2 Apr 2015, at 19:24, Hans Petter Selasky wrote: > In my sketchup I assume that packets for the same destination will not = be re-ordered. I see that the current ip_reass() code does not care = about TCP or UDP port numbers at all. Maybe we should add code to check = that the packet belongs to the same ports too? Higher-level network headers will appear only in the first fragment, so = can't be used in matching later fragments. > Does somebody here know what happens in these two cases: >=20 > If we are transmitting using TSO, will the network adapter increment = the IP ID field somehow? What happens if an outgoing IP packet resulting = from a TSO packet get fragmented by a router? Quite possibly -- this is presumably specified by the NIC vendor, but it = would be good to do a bit of a survey and see what happens in practice. > In ip_fragment() when we create fragments we should increment the = ip_id value for each fragment? That you are asking this question while hacking on the IP ID code is = deeply troubling. Please go read up on how IP fragmentation works before = going any further with these changes! Robert= From owner-svn-src-all@FreeBSD.ORG Thu Apr 2 18:36:52 2015 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 22145DD0; Thu, 2 Apr 2015 18:36:52 +0000 (UTC) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CB1ACF1D; Thu, 2 Apr 2015 18:36:51 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 862F81FE022; Thu, 2 Apr 2015 20:36:49 +0200 (CEST) Message-ID: <551D8C6C.9060504@selasky.org> Date: Thu, 02 Apr 2015 20:37:32 +0200 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: "Robert N. M. Watson" Subject: Re: svn commit: r280971 - in head: contrib/ipfilter/tools share/man/man4 sys/contrib/ipfilter/netinet sys/netinet sys/netipsec sys/netpfil/pf References: <201504012226.t31MQedN044443@svn.freebsd.org> <1427929676.82583.103.camel@freebsd.org> <20150402123522.GC64665@FreeBSD.org> <20150402133751.GA549@dft-labs.eu> <20150402134217.GG64665@FreeBSD.org> <20150402135157.GB549@dft-labs.eu> <1427983109.82583.115.camel@freebsd.org> <20150402142318.GC549@dft-labs.eu> <20150402143420.GI64665@FreeBSD.org> <20150402153805.GD549@dft-labs.eu> <551D8143.4060509@selasky.org> <551D8945.8050906@selasky.org> <8900318B-8155-4131-A0C3-3DE169782EFC@FreeBSD.org> In-Reply-To: <8900318B-8155-4131-A0C3-3DE169782EFC@FreeBSD.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: Mateusz Guzik , Ian Lepore , svn-src-all@freebsd.org, src-committers@freebsd.org, Gleb Smirnoff , svn-src-head@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 Apr 2015 18:36:52 -0000 Hi Robert, On 04/02/15 20:32, Robert N. M. Watson wrote: > On 2 Apr 2015, at 19:24, Hans Petter Selasky wrote: > >> In my sketchup I assume that packets for the same destination will not be re-ordered. I see that the current ip_reass() code does not care about TCP or UDP port numbers at all. Maybe we should add code to check that the packet belongs to the same ports too? > > Higher-level network headers will appear only in the first fragment, so can't be used in matching later fragments. Right. > >> Does somebody here know what happens in these two cases: >> >> If we are transmitting using TSO, will the network adapter increment the IP ID field somehow? What happens if an outgoing IP packet resulting from a TSO packet get fragmented by a router? > > Quite possibly -- this is presumably specified by the NIC vendor, but it would be good to do a bit of a survey and see what happens in practice. > >> In ip_fragment() when we create fragments we should increment the ip_id value for each fragment? > I'm asking because the code in FreeBSD, since the beginning probably, just copies the IP header, and use the same IP ID for all the fragments ! This just hit my mind after some recent work in this area. > > That you are asking this question while hacking on the IP ID code is deeply troubling. > Please go read up on how IP fragmentation works before going any further with these changes! I see from ip_reass() how it works. --HPS From owner-svn-src-all@FreeBSD.ORG Thu Apr 2 18:43:27 2015 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 2319F234; Thu, 2 Apr 2015 18:43: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 0D7D379; Thu, 2 Apr 2015 18:43: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 t32IhQsJ023835; Thu, 2 Apr 2015 18:43:26 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t32IhQEo023834; Thu, 2 Apr 2015 18:43:26 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201504021843.t32IhQEo023834@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 2 Apr 2015 18:43:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280999 - head/crypto/openssh 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 Apr 2015 18:43:27 -0000 Author: bdrewery Date: Thu Apr 2 18:43:25 2015 New Revision: 280999 URL: https://svnweb.freebsd.org/changeset/base/280999 Log: Use proper CHAN_TCP_PACKET_DEFAULT for agent forwarding when HPN disabled. The use of CHAN_TCP_WINDOW_DEFAULT here was fixed in upstream OpenSSH in CVS 1.4810, git 5baa170d771de9e95cf30b4c469ece684244cf3e: - dtucker@cvs.openbsd.org 2007/12/28 22:34:47 [clientloop.c] Use the correct packet maximum sizes for remote port and agent forwarding. Prevents the server from killing the connection if too much data is queued and an excessively large packet gets sent. bz #1360, ok djm@. The change was lost due to the the way the original upstream HPN patch modified this code. It was re-adding the original OpenSSH code and never was properly fixed to use the new value. MFC after: 2 weeks Modified: head/crypto/openssh/clientloop.c Modified: head/crypto/openssh/clientloop.c ============================================================================== --- head/crypto/openssh/clientloop.c Thu Apr 2 18:18:40 2015 (r280998) +++ head/crypto/openssh/clientloop.c Thu Apr 2 18:43:25 2015 (r280999) @@ -1923,7 +1923,7 @@ client_request_agent(const char *request if (options.hpn_disabled) c = channel_new("authentication agent connection", SSH_CHANNEL_OPEN, sock, sock, -1, - CHAN_X11_WINDOW_DEFAULT, CHAN_TCP_WINDOW_DEFAULT, 0, + CHAN_X11_WINDOW_DEFAULT, CHAN_TCP_PACKET_DEFAULT, 0, "authentication agent connection", 1); else c = channel_new("authentication agent connection", From owner-svn-src-all@FreeBSD.ORG Thu Apr 2 18:46:33 2015 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 9D84758C; Thu, 2 Apr 2015 18:46:33 +0000 (UTC) Received: from cyrus.watson.org (cyrus.watson.org [198.74.231.69]) by mx1.freebsd.org (Postfix) with ESMTP id 6A524C0; Thu, 2 Apr 2015 18:46:33 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [198.74.231.63]) by cyrus.watson.org (Postfix) with ESMTPS id 1276D46B66; Thu, 2 Apr 2015 14:46:33 -0400 (EDT) Date: Thu, 2 Apr 2015 19:46:32 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Hans Petter Selasky Subject: Re: svn commit: r280971 - in head: contrib/ipfilter/tools share/man/man4 sys/contrib/ipfilter/netinet sys/netinet sys/netipsec sys/netpfil/pf In-Reply-To: <551D8C6C.9060504@selasky.org> Message-ID: References: <201504012226.t31MQedN044443@svn.freebsd.org> <1427929676.82583.103.camel@freebsd.org> <20150402123522.GC64665@FreeBSD.org> <20150402133751.GA549@dft-labs.eu> <20150402134217.GG64665@FreeBSD.org> <20150402135157.GB549@dft-labs.eu> <1427983109.82583.115.camel@freebsd.org> <20150402142318.GC549@dft-labs.eu> <20150402143420.GI64665@FreeBSD.org> <20150402153805.GD549@dft-labs.eu> <551D8143.4060509@selasky.org> <551D8945.8050906@selasky.org> <8900318B-8155-4131-A0C3-3DE169782EFC@FreeBSD.org> <551D8C6C.9060504@selasky.org> User-Agent: Alpine 2.11 (BSF 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Mateusz Guzik , Ian Lepore , svn-src-all@freebsd.org, src-committers@freebsd.org, Gleb Smirnoff , svn-src-head@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 Apr 2015 18:46:33 -0000 On Thu, 2 Apr 2015, Hans Petter Selasky wrote: >>> Does somebody here know what happens in these two cases: >>> >>> If we are transmitting using TSO, will the network adapter increment the >>> IP ID field somehow? What happens if an outgoing IP packet resulting from >>> a TSO packet get fragmented by a router? >> >> Quite possibly -- this is presumably specified by the NIC vendor, but it >> would be good to do a bit of a survey and see what happens in practice. >> >>> In ip_fragment() when we create fragments we should increment the ip_id >>> value for each fragment? > > I'm asking because the code in FreeBSD, since the beginning probably, just > copies the IP header, and use the same IP ID for all the fragments ! This > just hit my mind after some recent work in this area. I honestly cannot believe you are proposing that. Please go read about how IP fragmentation works. Having an identical IP ID in ip_fragment() is the point of the function! Robert From owner-svn-src-all@FreeBSD.ORG Thu Apr 2 18:57:38 2015 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 815A48AC; Thu, 2 Apr 2015 18:57: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 6950A1EE; Thu, 2 Apr 2015 18:57: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 t32Ivc3G029387; Thu, 2 Apr 2015 18:57:38 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t32Ivapa029375; Thu, 2 Apr 2015 18:57:36 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201504021857.t32Ivapa029375@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 2 Apr 2015 18:57:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281000 - in head/sys/boot: efi/loader/arch/i386 i386/efi 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 Apr 2015 18:57:38 -0000 Author: emaste Date: Thu Apr 2 18:57:35 2015 New Revision: 281000 URL: https://svnweb.freebsd.org/changeset/base/281000 Log: Move i386/efi files to new home in efi/loader/arch/i386 This was not (and still is not) connected to the build, but the EFI loader is in the process of being built for other than amd64 so these files ought to live in their eventual MD location. Added: head/sys/boot/efi/loader/arch/i386/ head/sys/boot/efi/loader/arch/i386/bootinfo.c - copied unchanged from r280999, head/sys/boot/i386/efi/bootinfo.c head/sys/boot/efi/loader/arch/i386/efimd.c - copied unchanged from r280999, head/sys/boot/i386/efi/efimd.c head/sys/boot/efi/loader/arch/i386/elf32_freebsd.c - copied unchanged from r280999, head/sys/boot/i386/efi/elf32_freebsd.c head/sys/boot/efi/loader/arch/i386/exec.c - copied unchanged from r280999, head/sys/boot/i386/efi/exec.c head/sys/boot/efi/loader/arch/i386/i386_copy.c - copied unchanged from r280999, head/sys/boot/i386/efi/i386_copy.c head/sys/boot/efi/loader/arch/i386/ldscript.i386 - copied unchanged from r280999, head/sys/boot/i386/efi/ldscript.i386 head/sys/boot/efi/loader/arch/i386/start.S - copied unchanged from r280999, head/sys/boot/i386/efi/start.S Deleted: head/sys/boot/i386/efi/ Copied: head/sys/boot/efi/loader/arch/i386/bootinfo.c (from r280999, head/sys/boot/i386/efi/bootinfo.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/efi/loader/arch/i386/bootinfo.c Thu Apr 2 18:57:35 2015 (r281000, copy of r280999, head/sys/boot/i386/efi/bootinfo.c) @@ -0,0 +1,275 @@ +/*- + * Copyright (c) 1998 Michael Smith + * Copyright (c) 2006 Marcel Moolenaar + * 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 "bootstrap.h" +#include "libi386.h" +#include + +static const char howto_switches[] = "aCdrgDmphsv"; +static int howto_masks[] = { + RB_ASKNAME, RB_CDROM, RB_KDB, RB_DFLTROOT, RB_GDB, RB_MULTIPLE, + RB_MUTE, RB_PAUSE, RB_SERIAL, RB_SINGLE, RB_VERBOSE +}; + +int +bi_getboothowto(char *kargs) +{ + const char *sw; + char *opts; + int howto, i; + + howto = 0; + + /* Get the boot options from the environment first. */ + for (i = 0; howto_names[i].ev != NULL; i++) { + if (getenv(howto_names[i].ev) != NULL) + howto |= howto_names[i].mask; + } + + /* Parse kargs */ + if (kargs == NULL) + return (howto); + + opts = strchr(kargs, '-'); + while (opts != NULL) { + while (*(++opts) != '\0') { + sw = strchr(howto_switches, *opts); + if (sw == NULL) + break; + howto |= howto_masks[sw - howto_switches]; + } + opts = strchr(opts, '-'); + } + + return (howto); +} + +/* + * Copy the environment into the load area starting at (addr). + * Each variable is formatted as =, with a single nul + * separating each variable, and a double nul terminating the environment. + */ +vm_offset_t +bi_copyenv(vm_offset_t start) +{ + struct env_var *ep; + vm_offset_t addr, last; + size_t len; + + addr = last = start; + + /* Traverse the environment. */ + for (ep = environ; ep != NULL; ep = ep->ev_next) { + len = strlen(ep->ev_name); + if (i386_copyin(ep->ev_name, addr, len) != len) + break; + addr += len; + if (i386_copyin("=", addr, 1) != 1) + break; + addr++; + if (ep->ev_value != NULL) { + len = strlen(ep->ev_value); + if (i386_copyin(ep->ev_value, addr, len) != len) + break; + addr += len; + } + if (i386_copyin("", addr, 1) != 1) + break; + last = ++addr; + } + + if (i386_copyin("", last++, 1) != 1) + last = start; + return(last); +} + +/* + * Copy module-related data into the load area, where it can be + * used as a directory for loaded modules. + * + * Module data is presented in a self-describing format. Each datum + * is preceded by a 32-bit identifier and a 32-bit size field. + * + * Currently, the following data are saved: + * + * MOD_NAME (variable) module name (string) + * MOD_TYPE (variable) module type (string) + * MOD_ARGS (variable) module parameters (string) + * MOD_ADDR sizeof(vm_offset_t) module load address + * MOD_SIZE sizeof(size_t) module size + * MOD_METADATA (variable) type-specific metadata + */ +#define COPY32(v, a) { \ + u_int32_t x = (v); \ + i386_copyin(&x, a, sizeof(x)); \ + a += sizeof(x); \ +} + +#define MOD_STR(t, a, s) { \ + COPY32(t, a); \ + COPY32(strlen(s) + 1, a); \ + i386_copyin(s, a, strlen(s) + 1); \ + a += roundup(strlen(s) + 1, sizeof(u_int64_t));\ +} + +#define MOD_NAME(a, s) MOD_STR(MODINFO_NAME, a, s) +#define MOD_TYPE(a, s) MOD_STR(MODINFO_TYPE, a, s) +#define MOD_ARGS(a, s) MOD_STR(MODINFO_ARGS, a, s) + +#define MOD_VAR(t, a, s) { \ + COPY32(t, a); \ + COPY32(sizeof(s), a); \ + i386_copyin(&s, a, sizeof(s)); \ + a += roundup(sizeof(s), sizeof(u_int64_t)); \ +} + +#define MOD_ADDR(a, s) MOD_VAR(MODINFO_ADDR, a, s) +#define MOD_SIZE(a, s) MOD_VAR(MODINFO_SIZE, a, s) + +#define MOD_METADATA(a, mm) { \ + COPY32(MODINFO_METADATA | mm->md_type, a); \ + COPY32(mm->md_size, a); \ + i386_copyin(mm->md_data, a, mm->md_size); \ + a += roundup(mm->md_size, sizeof(u_int64_t));\ +} + +#define MOD_END(a) { \ + COPY32(MODINFO_END, a); \ + COPY32(0, a); \ +} + +vm_offset_t +bi_copymodules(vm_offset_t addr) +{ + struct preloaded_file *fp; + struct file_metadata *md; + + /* Start with the first module on the list, should be the kernel. */ + for (fp = file_findfile(NULL, NULL); fp != NULL; fp = fp->f_next) { + /* The name field must come first. */ + MOD_NAME(addr, fp->f_name); + MOD_TYPE(addr, fp->f_type); + if (fp->f_args) + MOD_ARGS(addr, fp->f_args); + MOD_ADDR(addr, fp->f_addr); + MOD_SIZE(addr, fp->f_size); + for (md = fp->f_metadata; md != NULL; md = md->md_next) { + if (!(md->md_type & MODINFOMD_NOCOPY)) + MOD_METADATA(addr, md); + } + } + MOD_END(addr); + return(addr); +} + +/* + * Load the information expected by the kernel. + * + * - The kernel environment is copied into kernel space. + * - Module metadata are formatted and placed in kernel space. + */ +int +bi_load(struct preloaded_file *fp, uint64_t *bi_addr) +{ + struct bootinfo bi; + struct preloaded_file *xp; + struct file_metadata *md; + struct devdesc *rootdev; + char *rootdevname; + vm_offset_t addr, ssym, esym; + + bzero(&bi, sizeof(struct bootinfo)); + bi.bi_version = 1; +// bi.bi_boothowto = bi_getboothowto(fp->f_args); + + /* + * Allow the environment variable 'rootdev' to override the supplied + * device. This should perhaps go to MI code and/or have $rootdev + * tested/set by MI code before launching the kernel. + */ + rootdevname = getenv("rootdev"); + i386_getdev((void**)&rootdev, rootdevname, NULL); + if (rootdev != NULL) { + /* Try reading /etc/fstab to select the root device. */ + getrootmount(i386_fmtdev(rootdev)); + free(rootdev); + } + + md = file_findmetadata(fp, MODINFOMD_SSYM); + ssym = (md != NULL) ? *((vm_offset_t *)&(md->md_data)) : 0; + md = file_findmetadata(fp, MODINFOMD_ESYM); + esym = (md != NULL) ? *((vm_offset_t *)&(md->md_data)) : 0; + if (ssym != 0 && esym != 0) { + bi.bi_symtab = ssym; + bi.bi_esymtab = esym; + } + + /* Find the last module in the chain. */ + addr = 0; + for (xp = file_findfile(NULL, NULL); xp != NULL; xp = xp->f_next) { + if (addr < (xp->f_addr + xp->f_size)) + addr = xp->f_addr + xp->f_size; + } + + addr = (addr + 15) & ~15; + + /* Copy module list and metadata. */ + bi.bi_modulep = addr; + addr = bi_copymodules(addr); + if (addr <= bi.bi_modulep) { + addr = bi.bi_modulep; + bi.bi_modulep = 0; + } + + addr = (addr + 15) & ~15; + + /* Copy our environment. */ + bi.bi_envp = addr; + addr = bi_copyenv(addr); + if (addr <= bi.bi_envp) { + addr = bi.bi_envp; + bi.bi_envp = 0; + } + + addr = (addr + PAGE_MASK) & ~PAGE_MASK; + bi.bi_kernend = addr; + + return (ldr_bootinfo(&bi, bi_addr)); +} Copied: head/sys/boot/efi/loader/arch/i386/efimd.c (from r280999, head/sys/boot/i386/efi/efimd.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/efi/loader/arch/i386/efimd.c Thu Apr 2 18:57:35 2015 (r281000, copy of r280999, head/sys/boot/i386/efi/efimd.c) @@ -0,0 +1,139 @@ +/*- + * Copyright (c) 2004, 2006 Marcel Moolenaar + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include + +#include +#include + +#include +#include + +#define EFI_INTEL_FPSWA \ + {0xc41b6531,0x97b9,0x11d3,{0x9a,0x29,0x00,0x90,0x27,0x3f,0xc1,0x4d}} + +static EFI_GUID fpswa_guid = EFI_INTEL_FPSWA; + +/* DIG64 Headless Console & Debug Port Table. */ +#define HCDP_TABLE_GUID \ + {0xf951938d,0x620b,0x42ef,{0x82,0x79,0xa8,0x4b,0x79,0x61,0x78,0x98}} + +static EFI_GUID hcdp_guid = HCDP_TABLE_GUID; + +static UINTN mapkey; + +uint64_t +ldr_alloc(vm_offset_t va) +{ + + return (0); +} + +int +ldr_bootinfo(struct bootinfo *bi, uint64_t *bi_addr) +{ + VOID *fpswa; + EFI_MEMORY_DESCRIPTOR *mm; + EFI_PHYSICAL_ADDRESS addr; + EFI_HANDLE handle; + EFI_STATUS status; + size_t bisz; + UINTN mmsz, pages, sz; + UINT32 mmver; + + bi->bi_systab = (uint64_t)ST; + bi->bi_hcdp = (uint64_t)efi_get_table(&hcdp_guid); + + sz = sizeof(EFI_HANDLE); + status = BS->LocateHandle(ByProtocol, &fpswa_guid, 0, &sz, &handle); + if (status == 0) + status = BS->HandleProtocol(handle, &fpswa_guid, &fpswa); + bi->bi_fpswa = (status == 0) ? (uint64_t)fpswa : 0; + + bisz = (sizeof(struct bootinfo) + 0x0f) & ~0x0f; + + /* + * Allocate enough pages to hold the bootinfo block and the memory + * map EFI will return to us. The memory map has an unknown size, + * so we have to determine that first. Note that the AllocatePages + * call can itself modify the memory map, so we have to take that + * into account as well. The changes to the memory map are caused + * by splitting a range of free memory into two (AFAICT), so that + * one is marked as being loader data. + */ + sz = 0; + BS->GetMemoryMap(&sz, NULL, &mapkey, &mmsz, &mmver); + sz += mmsz; + sz = (sz + 15) & ~15; + pages = EFI_SIZE_TO_PAGES(sz + bisz); + status = BS->AllocatePages(AllocateAnyPages, EfiLoaderData, pages, + &addr); + if (EFI_ERROR(status)) { + printf("%s: AllocatePages() returned 0x%lx\n", __func__, + (long)status); + return (ENOMEM); + } + + /* + * Read the memory map and stash it after bootinfo. Align the + * memory map on a 16-byte boundary (the bootinfo block is page + * aligned). + */ + *bi_addr = addr; + mm = (void *)(addr + bisz); + sz = (EFI_PAGE_SIZE * pages) - bisz; + status = BS->GetMemoryMap(&sz, mm, &mapkey, &mmsz, &mmver); + if (EFI_ERROR(status)) { + printf("%s: GetMemoryMap() returned 0x%lx\n", __func__, + (long)status); + return (EINVAL); + } + bi->bi_memmap = (uint64_t)mm; + bi->bi_memmap_size = sz; + bi->bi_memdesc_size = mmsz; + bi->bi_memdesc_version = mmver; + + bcopy(bi, (void *)(*bi_addr), sizeof(*bi)); + return (0); +} + +int +ldr_enter(const char *kernel) +{ + EFI_STATUS status; + + status = BS->ExitBootServices(IH, mapkey); + if (EFI_ERROR(status)) { + printf("%s: ExitBootServices() returned 0x%lx\n", __func__, + (long)status); + return (EINVAL); + } + + return (0); +} Copied: head/sys/boot/efi/loader/arch/i386/elf32_freebsd.c (from r280999, head/sys/boot/i386/efi/elf32_freebsd.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/efi/loader/arch/i386/elf32_freebsd.c Thu Apr 2 18:57:35 2015 (r281000, copy of r280999, head/sys/boot/i386/efi/elf32_freebsd.c) @@ -0,0 +1,87 @@ +/*- + * Copyright (c) 1998 Michael Smith + * 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 "bootstrap.h" +#include "../libi386/libi386.h" +#include "../btx/lib/btxv86.h" + +extern void __exec(caddr_t addr, ...); + + +static int elf32_exec(struct preloaded_file *amp); +static int elf32_obj_exec(struct preloaded_file *amp); + +struct file_format i386_elf = { elf32_loadfile, elf32_exec }; +struct file_format i386_elf_obj = { elf32_obj_loadfile, elf32_obj_exec }; + +/* + * There is an ELF kernel and one or more ELF modules loaded. + * We wish to start executing the kernel image, so make such + * preparations as are required, and do so. + */ +static int +elf32_exec(struct preloaded_file *fp) +{ + struct file_metadata *md; + Elf_Ehdr *ehdr; + vm_offset_t entry, bootinfop, modulep, kernend; + int boothowto, err, bootdev; + + if ((md = file_findmetadata(fp, MODINFOMD_ELFHDR)) == NULL) + return(EFTYPE); + ehdr = (Elf_Ehdr *)&(md->md_data); + + err = bi_load(fp->f_args, &boothowto, &bootdev, &bootinfop, &modulep, &kernend); + if (err != 0) + return(err); + entry = ehdr->e_entry & 0xffffff; + + printf("Start @ 0x%lx ...\n", entry); + + ldr_enter(fp->f_name); + + dev_cleanup(); + __exec((void *)entry, boothowto, bootdev, 0, 0, 0, bootinfop, modulep, kernend); + + panic("exec returned"); +} + +static int +elf32_obj_exec(struct preloaded_file *fp) +{ + return (EFTYPE); +} Copied: head/sys/boot/efi/loader/arch/i386/exec.c (from r280999, head/sys/boot/i386/efi/exec.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/efi/loader/arch/i386/exec.c Thu Apr 2 18:57:35 2015 (r281000, copy of r280999, head/sys/boot/i386/efi/exec.c) @@ -0,0 +1,49 @@ +/*- + * Copyright (c) 2010 Rui Paulo + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include "../btx/lib/btxv86.h" + +#include "../../common/bootstrap.h" + +uint32_t __base; +struct __v86 __v86; + +void +__v86int() +{ + printf("%s\n", __func__); + exit(1); +} + +void +__exec(caddr_t addr, ...) +{ +} Copied: head/sys/boot/efi/loader/arch/i386/i386_copy.c (from r280999, head/sys/boot/i386/efi/i386_copy.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/efi/loader/arch/i386/i386_copy.c Thu Apr 2 18:57:35 2015 (r281000, copy of r280999, head/sys/boot/i386/efi/i386_copy.c) @@ -0,0 +1,59 @@ +/*- + * Copyright (c) 1998 Michael Smith + * 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$"); + +/* + * MD primitives supporting placement of module data + * + * XXX should check load address/size against memory top. + */ +#include + +#include "libi386.h" +#include "btxv86.h" + +ssize_t +i386_copyin(const void *src, vm_offset_t dest, const size_t len) +{ + bcopy(src, PTOV(dest), len); + return(len); +} + +ssize_t +i386_copyout(const vm_offset_t src, void *dest, const size_t len) +{ + bcopy(PTOV(src), dest, len); + return(len); +} + + +ssize_t +i386_readin(const int fd, vm_offset_t dest, const size_t len) +{ + return (read(fd, PTOV(dest), len)); +} Copied: head/sys/boot/efi/loader/arch/i386/ldscript.i386 (from r280999, head/sys/boot/i386/efi/ldscript.i386) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/efi/loader/arch/i386/ldscript.i386 Thu Apr 2 18:57:35 2015 (r281000, copy of r280999, head/sys/boot/i386/efi/ldscript.i386) @@ -0,0 +1,72 @@ +/* $FreeBSD$ */ +OUTPUT_FORMAT("elf32-i386-freebsd", "elf32-i386-freebsd", "elf32-i386-freebsd") +OUTPUT_ARCH(i386) +ENTRY(_start) +SECTIONS +{ + /* Read-only sections, merged into text segment: */ + . = 0; + ImageBase = .; + . = SIZEOF_HEADERS; + . = ALIGN(4096); + .text : { + *(.text .stub .text.* .gnu.linkonce.t.*) + /* .gnu.warning sections are handled specially by elf32.em. */ + *(.gnu.warning) + *(.plt) + } =0x00300000010070000002000001000400 + . = ALIGN(4096); + .data : { + *(.rodata .rodata.* .gnu.linkonce.r.*) + *(.rodata1) + *(.sdata2 .sdata2.* .gnu.linkonce.s2.*) + *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*) + *(.opd) + *(.data .data.* .gnu.linkonce.d.*) + *(.data1) + *(.plabel) + *(.dynbss) + *(.bss .bss.* .gnu.linkonce.b.*) + *(COMMON) + } + . = ALIGN(4096); + set_Xcommand_set : { + __start_set_Xcommand_set = .; + *(set_Xcommand_set) + __stop_set_Xcommand_set = .; + } + . = ALIGN(4096); + __gp = .; + .sdata : { + *(.got.plt .got) + *(.sdata .sdata.* .gnu.linkonce.s.*) + *(dynsbss) + *(.sbss .sbss.* .gnu.linkonce.sb.*) + *(.scommon) + } + . = ALIGN(4096); + .dynamic : { *(.dynamic) } + . = ALIGN(4096); + .rel.dyn : { + *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) + *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) + *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) + *(.rel.got) + *(.rel.sdata .rel.sdata.* .rel.gnu.linkonce.s.*) + *(.rel.sbss .rel.sbss.* .rel.gnu.linkonce.sb.*) + *(.rel.sdata2 .rel.sdata2.* .rel.gnu.linkonce.s2.*) + *(.rel.sbss2 .rel.sbss2.* .rel.gnu.linkonce.sb2.*) + *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) + *(.rel.plt) + *(.relset_*) + *(.rel.dyn .rel.dyn.*) + } + . = ALIGN(4096); + .reloc : { *(.reloc) } + . = ALIGN(4096); + .hash : { *(.hash) } + . = ALIGN(4096); + .dynsym : { *(.dynsym) } + . = ALIGN(4096); + .dynstr : { *(.dynstr) } +} Copied: head/sys/boot/efi/loader/arch/i386/start.S (from r280999, head/sys/boot/i386/efi/start.S) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/efi/loader/arch/i386/start.S Thu Apr 2 18:57:35 2015 (r281000, copy of r280999, head/sys/boot/i386/efi/start.S) @@ -0,0 +1,70 @@ +/*- + * Copyright (c) 2008-2010 Rui Paulo + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + + .text + +#include + +#define EFI_SUCCESS 0 + +/* + * EFI entry point. + * _start(EFI_IMAGE image_handle, EFI_SYSTEM_TABLE *system_table); + * + * We calculate the base address along with _DYNAMIC, relocate us and finally + * pass control to efi_main. + */ + +ENTRY(_start) + pushl %ebp + movl %esp, %ebp + + pushl 12(%ebp) /* image_handle */ + pushl 8(%ebp) /* system_table */ + call 0f +0: popl %eax + movl %eax, %ebx + addl $ImageBase-0b, %eax + addl $_DYNAMIC-0b, %ebx + pushl %ebx /* dynamic */ + pushl %eax /* ImageBase */ + call _reloc + cmpl $EFI_SUCCESS, %eax + jne 1f + popl %ebx /* remove ImageBase from the stack */ + popl %ebx /* remove dynamic from the stack */ + call efi_main +1: leave + ret +END(_start) + + .data + .section .reloc, "a" + .long 0 + .long 10 + .word 0 From owner-svn-src-all@FreeBSD.ORG Thu Apr 2 19:10:34 2015 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 83E32B1F; Thu, 2 Apr 2015 19:10: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 6E74432D; Thu, 2 Apr 2015 19:10: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 t32JAYUb036382; Thu, 2 Apr 2015 19:10:34 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t32JAYo2036381; Thu, 2 Apr 2015 19:10:34 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201504021910.t32JAYo2036381@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Thu, 2 Apr 2015 19:10:34 +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: r281001 - 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: Thu, 02 Apr 2015 19:10:34 -0000 Author: alc Date: Thu Apr 2 19:10:33 2015 New Revision: 281001 URL: https://svnweb.freebsd.org/changeset/base/281001 Log: MFC r280238 Fix the root cause of the "vm_reserv_populate: reserv
is already promoted" panics. PR: 198163 Modified: stable/10/sys/vm/vm_fault.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/vm_fault.c ============================================================================== --- stable/10/sys/vm/vm_fault.c Thu Apr 2 18:57:35 2015 (r281000) +++ stable/10/sys/vm/vm_fault.c Thu Apr 2 19:10:33 2015 (r281001) @@ -101,6 +101,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #define PFBAK 4 #define PFFOR 4 @@ -844,6 +845,14 @@ vnode_locked: unlock_and_deallocate(&fs); goto RetryFault; } +#if VM_NRESERVLEVEL > 0 + /* + * Rename the reservation. + */ + vm_reserv_rename(fs.m, fs.first_object, + fs.object, OFF_TO_IDX( + fs.first_object->backing_object_offset)); +#endif vm_page_xbusy(fs.m); fs.first_m = fs.m; fs.m = NULL; From owner-svn-src-all@FreeBSD.ORG Thu Apr 2 20:07:09 2015 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 E28AC6C0; Thu, 2 Apr 2015 20:07: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 C2C5EC7C; Thu, 2 Apr 2015 20:07: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 t32K79WB064314; Thu, 2 Apr 2015 20:07:09 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t32K76bE064298; Thu, 2 Apr 2015 20:07:06 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201504022007.t32K76bE064298@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 Apr 2015 20:07:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281002 - in head/sys/boot: arm/uboot forth i386/loader mips/beri/loader pc98/loader powerpc/kboot powerpc/ofw powerpc/ps3 sparc64/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: Thu, 02 Apr 2015 20:07:10 -0000 Author: jkim Date: Thu Apr 2 20:07:05 2015 New Revision: 281002 URL: https://svnweb.freebsd.org/changeset/base/281002 Log: Install newly added brand-*.4th and logo-*.4th files and reduce duplication. Reviewed by: dteske Pointy hat to: dteske Added: head/sys/boot/forth/Makefile.inc (contents, props changed) Modified: head/sys/boot/arm/uboot/Makefile head/sys/boot/i386/loader/Makefile head/sys/boot/mips/beri/loader/Makefile head/sys/boot/pc98/loader/Makefile head/sys/boot/powerpc/kboot/Makefile head/sys/boot/powerpc/ofw/Makefile head/sys/boot/powerpc/ps3/Makefile head/sys/boot/sparc64/loader/Makefile Modified: head/sys/boot/arm/uboot/Makefile ============================================================================== --- head/sys/boot/arm/uboot/Makefile Thu Apr 2 19:10:33 2015 (r281001) +++ head/sys/boot/arm/uboot/Makefile Thu Apr 2 20:07:05 2015 (r281002) @@ -136,12 +136,7 @@ ldscript.generated:: fi .if !defined(LOADER_ONLY) -.PATH: ${.CURDIR}/../../forth -FILES+= loader.help loader.4th support.4th loader.conf -FILES+= screen.4th frames.4th beastie.4th -FILES+= brand.4th check-password.4th color.4th delay.4th -FILES+= menu.4th menu-commands.4th menusets.4th shortcuts.4th version.4th -FILESDIR_loader.conf= /boot/defaults +.include "${.CURDIR}/../../forth/Makefile.inc" # Put sample loader.rc and menu.rc on disk but don't enable them # by default. Added: head/sys/boot/forth/Makefile.inc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/forth/Makefile.inc Thu Apr 2 20:07:05 2015 (r281002) @@ -0,0 +1,26 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR}/../../forth +FILES+= beastie.4th +FILES+= brand.4th +FILES+= brand-fbsd.4th +FILES+= check-password.4th +FILES+= color.4th +FILES+= delay.4th +FILES+= frames.4th +FILES+= loader.4th +FILES+= loader.conf +FILES+= loader.help +FILES+= logo-beastie.4th +FILES+= logo-beastiebw.4th +FILES+= logo-fbsdbw.4th +FILES+= logo-orb.4th +FILES+= logo-orbbw.4th +FILES+= menu.4th +FILES+= menu-commands.4th +FILES+= menusets.4th +FILES+= screen.4th +FILES+= shortcuts.4th +FILES+= support.4th +FILES+= version.4th +FILESDIR_loader.conf= /boot/defaults Modified: head/sys/boot/i386/loader/Makefile ============================================================================== --- head/sys/boot/i386/loader/Makefile Thu Apr 2 19:10:33 2015 (r281001) +++ head/sys/boot/i386/loader/Makefile Thu Apr 2 20:07:05 2015 (r281002) @@ -105,13 +105,8 @@ FILES= ${LOADER} FILESMODE_${LOADER}= ${BINMODE} -b .if !defined(LOADER_ONLY) -.PATH: ${.CURDIR}/../../forth -FILES+= loader.help loader.4th support.4th loader.conf -FILES+= screen.4th frames.4th beastie.4th -FILES+= brand.4th check-password.4th color.4th delay.4th -FILES+= menu.4th menu-commands.4th menusets.4th shortcuts.4th version.4th -FILES+= pcibios.4th -FILESDIR_loader.conf= /boot/defaults +.include "${.CURDIR}/../../forth/Makefile.inc" +FILES+= pcibios.4th .if !exists(${DESTDIR}/boot/loader.rc) FILES+= loader.rc Modified: head/sys/boot/mips/beri/loader/Makefile ============================================================================== --- head/sys/boot/mips/beri/loader/Makefile Thu Apr 2 19:10:33 2015 (r281001) +++ head/sys/boot/mips/beri/loader/Makefile Thu Apr 2 20:07:05 2015 (r281002) @@ -121,12 +121,7 @@ loader.help: help.common help.mips cat ${.ALLSRC} | \ awk -f ${.CURDIR}/../../../common/merge_help.awk > ${.TARGET} -.PATH: ${.CURDIR}/../../../forth -FILES= loader.help loader.4th support.4th loader.conf -FILES+= screen.4th frames.4th -FILES+= beastie.4th brand.4th check-password.4th color.4th delay.4th -FILES+= menu.4th menu-commands.4th menusets.4th shortcuts.4th version.4th -FILESDIR_loader.conf= /boot/defaults +.include "${.CURDIR}/../../forth/Makefile.inc" .if !exists(${DESTDIR}/boot/loader.rc) FILES+= loader.rc Modified: head/sys/boot/pc98/loader/Makefile ============================================================================== --- head/sys/boot/pc98/loader/Makefile Thu Apr 2 19:10:33 2015 (r281001) +++ head/sys/boot/pc98/loader/Makefile Thu Apr 2 20:07:05 2015 (r281002) @@ -86,12 +86,7 @@ FILES= ${LOADER} # XXX INSTALLFLAGS_loader= -b FILESMODE_${LOADER}= ${BINMODE} -b -.PATH: ${.CURDIR}/../../forth -FILES+= loader.help loader.4th support.4th loader.conf -FILES+= screen.4th frames.4th beastie.4th -FILES+= brand.4th check-password.4th color.4th delay.4th -FILES+= menu.4th menu-commands.4th menusets.4th shortcuts.4th version.4th -FILESDIR_loader.conf= /boot/defaults +.include "${.CURDIR}/../../forth/Makefile.inc" .if !exists(${DESTDIR}/boot/loader.rc) FILES+= ${.CURDIR}/../../i386/loader/loader.rc Modified: head/sys/boot/powerpc/kboot/Makefile ============================================================================== --- head/sys/boot/powerpc/kboot/Makefile Thu Apr 2 19:10:33 2015 (r281001) +++ head/sys/boot/powerpc/kboot/Makefile Thu Apr 2 20:07:05 2015 (r281002) @@ -113,12 +113,7 @@ loader.help: help.common help.kboot ${.C cat ${.ALLSRC} | \ awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET} -.PATH: ${.CURDIR}/../../forth -FILES= loader.help loader.4th support.4th loader.conf -FILES+= screen.4th frames.4th -FILES+= beastie.4th brand.4th check-password.4th color.4th delay.4th -FILES+= menu.4th menu-commands.4th menusets.4th shortcuts.4th version.4th -FILESDIR_loader.conf= /boot/defaults +.include "${.CURDIR}/../../forth/Makefile.inc" .if !exists(${DESTDIR}/boot/loader.rc) FILES+= loader.rc Modified: head/sys/boot/powerpc/ofw/Makefile ============================================================================== --- head/sys/boot/powerpc/ofw/Makefile Thu Apr 2 19:10:33 2015 (r281001) +++ head/sys/boot/powerpc/ofw/Makefile Thu Apr 2 20:07:05 2015 (r281002) @@ -108,12 +108,7 @@ loader.help: help.common help.ofw ${.CUR cat ${.ALLSRC} | \ awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET} -.PATH: ${.CURDIR}/../../forth -FILES= loader.help loader.4th support.4th loader.conf -FILES+= screen.4th frames.4th -FILES+= beastie.4th brand.4th check-password.4th color.4th delay.4th -FILES+= menu.4th menu-commands.4th menusets.4th shortcuts.4th version.4th -FILESDIR_loader.conf= /boot/defaults +.include "${.CURDIR}/../../forth/Makefile.inc" .if !exists(${DESTDIR}/boot/loader.rc) FILES+= loader.rc Modified: head/sys/boot/powerpc/ps3/Makefile ============================================================================== --- head/sys/boot/powerpc/ps3/Makefile Thu Apr 2 19:10:33 2015 (r281001) +++ head/sys/boot/powerpc/ps3/Makefile Thu Apr 2 20:07:05 2015 (r281002) @@ -110,12 +110,7 @@ loader.help: help.common help.ps3 ${.CUR cat ${.ALLSRC} | \ awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET} -.PATH: ${.CURDIR}/../../forth -FILES= loader.help loader.4th support.4th loader.conf -FILES+= screen.4th frames.4th -FILES+= beastie.4th brand.4th check-password.4th color.4th delay.4th -FILES+= menu.4th menu-commands.4th menusets.4th shortcuts.4th version.4th -FILESDIR_loader.conf= /boot/defaults +.include "${.CURDIR}/../../forth/Makefile.inc" .if !exists(${DESTDIR}/boot/loader.rc) FILES+= loader.rc Modified: head/sys/boot/sparc64/loader/Makefile ============================================================================== --- head/sys/boot/sparc64/loader/Makefile Thu Apr 2 19:10:33 2015 (r281001) +++ head/sys/boot/sparc64/loader/Makefile Thu Apr 2 20:07:05 2015 (r281002) @@ -95,12 +95,7 @@ loader.help: help.common help.sparc64 cat ${.ALLSRC} | \ awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET} -.PATH: ${.CURDIR}/../../forth -FILES= loader.help loader.4th support.4th loader.conf -FILES+= screen.4th frames.4th -FILES+= beastie.4th brand.4th check-password.4th color.4th delay.4th -FILES+= menu.4th menu-commands.4th menusets.4th shortcuts.4th version.4th -FILESDIR_loader.conf= /boot/defaults +.include "${.CURDIR}/../../forth/Makefile.inc" .if !exists(${DESTDIR}/boot/loader.rc) FILES+= loader.rc From owner-svn-src-all@FreeBSD.ORG Thu Apr 2 20:14:52 2015 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 A791AB7A; Thu, 2 Apr 2015 20:14: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 92754D75; Thu, 2 Apr 2015 20:14: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 t32KEqEj068960; Thu, 2 Apr 2015 20:14:52 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t32KEqvL068958; Thu, 2 Apr 2015 20:14:52 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201504022014.t32KEqvL068958@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 2 Apr 2015 20:14:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281003 - 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: Thu, 02 Apr 2015 20:14:52 -0000 Author: kib Date: Thu Apr 2 20:14:51 2015 New Revision: 281003 URL: https://svnweb.freebsd.org/changeset/base/281003 Log: Speed up symbol lookup for the amd64 kernel modules. Amd64 uses relocatable object files as the modules format. It is good WRT not having unneeded overhead for PIC code, in particular, due to absence of useless GOT and PLT. But the cost is that the module linking process cannot use hash to speed up the symbol lookup, and that each reference to the symbol requiring a relocation, instead of single-place relocation in GOT. Cache the successfull symbol lookup results in the module symbol table, using the newly allocated SHN_FBSD_CACHED value from SHN_LOOS-HIOS range as an indicator. The SHN_FBSD_CACHED together with the non-existent definition of the found symbol are reverted after successfull relocations, which is done under kld_sx lock, so it should not be visible to other consumers of the symbol table. Submitted by: Conrad Meyer Differential Revision: https://reviews.freebsd.org/D1718 MFC after: 3 weeks Modified: head/sys/kern/link_elf_obj.c head/sys/sys/elf_common.h Modified: head/sys/kern/link_elf_obj.c ============================================================================== --- head/sys/kern/link_elf_obj.c Thu Apr 2 20:07:05 2015 (r281002) +++ head/sys/kern/link_elf_obj.c Thu Apr 2 20:14:51 2015 (r281003) @@ -173,6 +173,7 @@ static struct linker_class link_elf_clas }; static int relocate_file(elf_file_t ef); +static void elf_obj_cleanup_globals_cache(elf_file_t); static void link_elf_error(const char *filename, const char *s) @@ -1075,6 +1076,13 @@ relocate_file(elf_file_t ef) } } + /* + * Only clean SHN_FBSD_CACHED for successfull return. If we + * modified symbol table for the object but found an + * unresolved symbol, there is no reason to roll back. + */ + elf_obj_cleanup_globals_cache(ef); + return 0; } @@ -1223,6 +1231,21 @@ link_elf_each_function_nameval(linker_fi return (0); } +static void +elf_obj_cleanup_globals_cache(elf_file_t ef) +{ + Elf_Sym *sym; + Elf_Size i; + + for (i = 0; i < ef->ddbsymcnt; i++) { + sym = ef->ddbsymtab + i; + if (sym->st_shndx == SHN_FBSD_CACHED) { + sym->st_shndx = SHN_UNDEF; + sym->st_value = 0; + } + } +} + /* * Symbol lookup function that can be used when the symbol index is known (ie * in relocations). It uses the symbol index instead of doing a fully fledged @@ -1234,7 +1257,7 @@ static Elf_Addr elf_obj_lookup(linker_file_t lf, Elf_Size symidx, int deps) { elf_file_t ef = (elf_file_t)lf; - const Elf_Sym *sym; + Elf_Sym *sym; const char *symbol; Elf_Addr ret; @@ -1262,7 +1285,22 @@ elf_obj_lookup(linker_file_t lf, Elf_Siz if (*symbol == 0) return (0); ret = ((Elf_Addr)linker_file_lookup_symbol(lf, symbol, deps)); - return ret; + + /* + * Cache global lookups during module relocation. The failure + * case is particularly expensive for callers, who must scan + * through the entire globals table doing strcmp(). Cache to + * avoid doing such work repeatedly. + * + * After relocation is complete, undefined globals will be + * restored to SHN_UNDEF in elf_obj_cleanup_globals_cache(), + * above. + */ + if (ret != 0) { + sym->st_shndx = SHN_FBSD_CACHED; + sym->st_value = ret; + } + return (ret); case STB_WEAK: printf("link_elf_obj: Weak symbols not supported\n"); Modified: head/sys/sys/elf_common.h ============================================================================== --- head/sys/sys/elf_common.h Thu Apr 2 20:07:05 2015 (r281002) +++ head/sys/sys/elf_common.h Thu Apr 2 20:14:51 2015 (r281003) @@ -363,6 +363,9 @@ typedef struct { #define SHN_LOPROC 0xff00 /* First processor-specific. */ #define SHN_HIPROC 0xff1f /* Last processor-specific. */ #define SHN_LOOS 0xff20 /* First operating system-specific. */ +#define SHN_FBSD_CACHED SHN_LOOS /* Transient, for sys/kern/link_elf_obj + linker only: Cached global in local + symtab. */ #define SHN_HIOS 0xff3f /* Last operating system-specific. */ #define SHN_ABS 0xfff1 /* Absolute values. */ #define SHN_COMMON 0xfff2 /* Common data. */ From owner-svn-src-all@FreeBSD.ORG Thu Apr 2 20:25:39 2015 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 BFAD1CF; Thu, 2 Apr 2015 20:25:39 +0000 (UTC) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 74043EB5; Thu, 2 Apr 2015 20:25:39 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 1A4B01FE022; Thu, 2 Apr 2015 22:25:35 +0200 (CEST) Message-ID: <551DA5EA.1080908@selasky.org> Date: Thu, 02 Apr 2015 22:26:18 +0200 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Robert Watson Subject: Re: svn commit: r280971 - in head: contrib/ipfilter/tools share/man/man4 sys/contrib/ipfilter/netinet sys/netinet sys/netipsec sys/netpfil/pf References: <201504012226.t31MQedN044443@svn.freebsd.org> <1427929676.82583.103.camel@freebsd.org> <20150402123522.GC64665@FreeBSD.org> <20150402133751.GA549@dft-labs.eu> <20150402134217.GG64665@FreeBSD.org> <20150402135157.GB549@dft-labs.eu> <1427983109.82583.115.camel@freebsd.org> <20150402142318.GC549@dft-labs.eu> <20150402143420.GI64665@FreeBSD.org> <20150402153805.GD549@dft-labs.eu> <551D8143.4060509@selasky.org> <551D8945.8050906@selasky.org> <8900318B-8155-4131-A0C3-3DE169782EFC@FreeBSD.org> <551D8C6C.9060504@selasky.org> In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: Mateusz Guzik , Ian Lepore , svn-src-all@freebsd.org, src-committers@freebsd.org, Gleb Smirnoff , svn-src-head@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 Apr 2015 20:25:39 -0000 On 04/02/15 20:46, Robert Watson wrote: > On Thu, 2 Apr 2015, Hans Petter Selasky wrote: > >>>> Does somebody here know what happens in these two cases: >>>> >>>> If we are transmitting using TSO, will the network adapter increment >>>> the IP ID field somehow? What happens if an outgoing IP packet >>>> resulting from a TSO packet get fragmented by a router? >>> >>> Quite possibly -- this is presumably specified by the NIC vendor, but >>> it would be good to do a bit of a survey and see what happens in >>> practice. >>> >>>> In ip_fragment() when we create fragments we should increment the >>>> ip_id value for each fragment? >> >> I'm asking because the code in FreeBSD, since the beginning probably, >> just copies the IP header, and use the same IP ID for all the >> fragments ! This just hit my mind after some recent work in this area. > > I honestly cannot believe you are proposing that. > > Please go read about how IP fragmentation works. Having an identical IP > ID in ip_fragment() is the point of the function! > Hi, rwatson: You're right, the more fragment flag gets set there, I overlooked that bit. Sorry. glebius: Given that you admit there is a small chance of an IP ID collision in the previous e-mails exchanged in this thread, why don't we have checks for that in ip_reass() when receiving fragmented IP packets? For example when ip->ip_off == 0 we know the TCP and/or UDP port numbers for TCP and UDP payloads and can check if a new fragment is starting before the previous one is completed. Then we would know if a collision has happened and could discard that packet. Not ideal, but better than data corruption. --HPS From owner-svn-src-all@FreeBSD.ORG Thu Apr 2 20:54:14 2015 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 82742E2A; Thu, 2 Apr 2015 20:54:14 +0000 (UTC) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0BB762BD; Thu, 2 Apr 2015 20:54:13 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 4B4D91FE022; Thu, 2 Apr 2015 22:54:11 +0200 (CEST) Message-ID: <551DAC9E.9010303@selasky.org> Date: Thu, 02 Apr 2015 22:54:54 +0200 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Robert Watson Subject: Re: svn commit: r280971 - in head: contrib/ipfilter/tools share/man/man4 sys/contrib/ipfilter/netinet sys/netinet sys/netipsec sys/netpfil/pf References: <201504012226.t31MQedN044443@svn.freebsd.org> <1427929676.82583.103.camel@freebsd.org> <20150402123522.GC64665@FreeBSD.org> <20150402133751.GA549@dft-labs.eu> <20150402134217.GG64665@FreeBSD.org> <20150402135157.GB549@dft-labs.eu> <1427983109.82583.115.camel@freebsd.org> <20150402142318.GC549@dft-labs.eu> <20150402143420.GI64665@FreeBSD.org> <20150402153805.GD549@dft-labs.eu> <551D8143.4060509@selasky.org> <551D8945.8050906@selasky.org> <8900318B-8155-4131-A0C3-3DE169782EFC@FreeBSD.org> <551D8C6C.9060504@selasky.org> <551DA5EA.1080908@selasky.org> In-Reply-To: <551DA5EA.1080908@selasky.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: Mateusz Guzik , Ian Lepore , svn-src-all@freebsd.org, src-committers@freebsd.org, Gleb Smirnoff , svn-src-head@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 Apr 2015 20:54:14 -0000 On 04/02/15 22:26, Hans Petter Selasky wrote: > On 04/02/15 20:46, Robert Watson wrote: >> On Thu, 2 Apr 2015, Hans Petter Selasky wrote: >> >>>>> Does somebody here know what happens in these two cases: >>>>> >>>>> If we are transmitting using TSO, will the network adapter increment >>>>> the IP ID field somehow? What happens if an outgoing IP packet >>>>> resulting from a TSO packet get fragmented by a router? >>>> >>>> Quite possibly -- this is presumably specified by the NIC vendor, but >>>> it would be good to do a bit of a survey and see what happens in >>>> practice. >>>> >>>>> In ip_fragment() when we create fragments we should increment the >>>>> ip_id value for each fragment? >>> >>> I'm asking because the code in FreeBSD, since the beginning probably, >>> just copies the IP header, and use the same IP ID for all the >>> fragments ! This just hit my mind after some recent work in this area. >> >> I honestly cannot believe you are proposing that. >> >> Please go read about how IP fragmentation works. Having an identical IP >> ID in ip_fragment() is the point of the function! >> > > Hi, > > rwatson: You're right, the more fragment flag gets set there, I > overlooked that bit. Sorry. > > glebius: Given that you admit there is a small chance of an IP ID > collision in the previous e-mails exchanged in this thread, why don't we > have checks for that in ip_reass() when receiving fragmented IP packets? > For example when ip->ip_off == 0 we know the TCP and/or UDP port numbers > for TCP and UDP payloads and can check if a new fragment is starting > before the previous one is completed. Then we would know if a collision > has happened and could discard that packet. Not ideal, but better than > data corruption. > Hi, I see from the code that if two frags have the same IP offset, the whole fragment list gets dropped, unless the IP payload is zero bytes long. Maybe a "last" variable should be added? > * only n will ever be stored. (n = maxfragsperpacket.) > * > */ > next = 0; last = -1; > for (p = NULL, q = fp->ipq_frags; q; p = q, q = q->m_nextpkt) { > if (ntohs(GETIP(q)->ip_off) != next || + ntohs(GETIP(q)->ip_off) == last > ) { > if (fp->ipq_nfrags > V_maxfragsperpacket) { > IPSTAT_ADD(ips_fragdropped, fp->ipq_nfrags); > ip_freef(head, fp); > } > goto done; > } last = next; > next += ntohs(GETIP(q)->ip_len); > } --HPS From owner-svn-src-all@FreeBSD.ORG Thu Apr 2 21:18:14 2015 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 83C1D842; Thu, 2 Apr 2015 21:18: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 6552F7C9; Thu, 2 Apr 2015 21:18: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 t32LIEcI098616; Thu, 2 Apr 2015 21:18:14 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t32LICdb098609; Thu, 2 Apr 2015 21:18:12 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201504022118.t32LICdb098609@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 2 Apr 2015 21:18:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281004 - in head/lib/libc: arm/sys mips/sys powerpc powerpc/sys powerpc64 powerpc64/sys sparc64 sparc64/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: Thu, 02 Apr 2015 21:18:14 -0000 Author: emaste Date: Thu Apr 2 21:18:11 2015 New Revision: 281004 URL: https://svnweb.freebsd.org/changeset/base/281004 Log: libc: Eliminate duplicate copies of __vdso_gettc.c Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D2152 Added: head/lib/libc/sys/trivial-vdso_tc.c - copied unchanged from r281003, head/lib/libc/sparc64/sys/__vdso_gettc.c Deleted: head/lib/libc/arm/sys/__vdso_gettc.c head/lib/libc/mips/sys/__vdso_gettc.c head/lib/libc/powerpc/sys/__vdso_gettc.c head/lib/libc/powerpc64/sys/__vdso_gettc.c head/lib/libc/sparc64/sys/__vdso_gettc.c Modified: head/lib/libc/arm/sys/Makefile.inc head/lib/libc/mips/sys/Makefile.inc head/lib/libc/powerpc/Makefile.inc head/lib/libc/powerpc64/Makefile.inc head/lib/libc/sparc64/Makefile.inc Modified: head/lib/libc/arm/sys/Makefile.inc ============================================================================== --- head/lib/libc/arm/sys/Makefile.inc Thu Apr 2 20:14:51 2015 (r281003) +++ head/lib/libc/arm/sys/Makefile.inc Thu Apr 2 21:18:11 2015 (r281004) @@ -1,6 +1,6 @@ # $FreeBSD$ -SRCS+= __vdso_gettc.c +SRCS+= trivial-vdso_tc.c MDASM= Ovfork.S brk.S cerror.S pipe.S ptrace.S sbrk.S shmat.S sigreturn.S syscall.S Modified: head/lib/libc/mips/sys/Makefile.inc ============================================================================== --- head/lib/libc/mips/sys/Makefile.inc Thu Apr 2 20:14:51 2015 (r281003) +++ head/lib/libc/mips/sys/Makefile.inc Thu Apr 2 21:18:11 2015 (r281004) @@ -1,6 +1,6 @@ # $FreeBSD$ -SRCS+= __vdso_gettc.c +SRCS+= trivial-vdso_tc.c MDASM= Ovfork.S brk.S cerror.S exect.S \ fork.S pipe.S ptrace.S sbrk.S syscall.S Modified: head/lib/libc/powerpc/Makefile.inc ============================================================================== --- head/lib/libc/powerpc/Makefile.inc Thu Apr 2 20:14:51 2015 (r281003) +++ head/lib/libc/powerpc/Makefile.inc Thu Apr 2 21:18:11 2015 (r281004) @@ -1,6 +1,6 @@ # $FreeBSD$ -SRCS+= __vdso_gettc.c +SRCS+= trivial-vdso_tc.c # Long double is 64-bits MDSRCS+=machdep_ldisd.c Modified: head/lib/libc/powerpc64/Makefile.inc ============================================================================== --- head/lib/libc/powerpc64/Makefile.inc Thu Apr 2 20:14:51 2015 (r281003) +++ head/lib/libc/powerpc64/Makefile.inc Thu Apr 2 21:18:11 2015 (r281004) @@ -1,6 +1,6 @@ # $FreeBSD$ -SRCS+= __vdso_gettc.c +SRCS+= trivial-vdso_tc.c # Long double is 64-bits MDSRCS+=machdep_ldisd.c Modified: head/lib/libc/sparc64/Makefile.inc ============================================================================== --- head/lib/libc/sparc64/Makefile.inc Thu Apr 2 20:14:51 2015 (r281003) +++ head/lib/libc/sparc64/Makefile.inc Thu Apr 2 21:18:11 2015 (r281004) @@ -5,7 +5,7 @@ .include "fpu/Makefile.inc" -SRCS+= __vdso_gettc.c +SRCS+= trivial-vdso_tc.c # Long double is quad precision GDTOASRCS+=strtorQ.c Copied: head/lib/libc/sys/trivial-vdso_tc.c (from r281003, head/lib/libc/sparc64/sys/__vdso_gettc.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/sys/trivial-vdso_tc.c Thu Apr 2 21:18:11 2015 (r281004, copy of r281003, head/lib/libc/sparc64/sys/__vdso_gettc.c) @@ -0,0 +1,48 @@ +/*- + * Copyright (c) 2013 Konstantin Belousov + * + * 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 + +#pragma weak __vdso_gettc +u_int +__vdso_gettc(const struct vdso_timehands *th) +{ + + return (0); +} + +#pragma weak __vdso_gettimekeep +int +__vdso_gettimekeep(struct vdso_timekeep **tk) +{ + + return (ENOSYS); +} From owner-svn-src-all@FreeBSD.ORG Thu Apr 2 21:20:08 2015 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 473B99B7; Thu, 2 Apr 2015 21:20:08 +0000 (UTC) Received: from cyrus.watson.org (cyrus.watson.org [198.74.231.69]) by mx1.freebsd.org (Postfix) with ESMTP id 01FB67E6; Thu, 2 Apr 2015 21:20:08 +0000 (UTC) Received: from [10.0.1.17] (host81-157-243-31.range81-157.btcentralplus.com [81.157.243.31]) by cyrus.watson.org (Postfix) with ESMTPSA id CDE9546BB1; Thu, 2 Apr 2015 17:20:06 -0400 (EDT) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: svn commit: r280971 - in head: contrib/ipfilter/tools share/man/man4 sys/contrib/ipfilter/netinet sys/netinet sys/netipsec sys/netpfil/pf From: "Robert N. M. Watson" In-Reply-To: <551DAC9E.9010303@selasky.org> Date: Thu, 2 Apr 2015 22:20:05 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <358EC58D-1F92-411E-ADEB-8072020E9EB3@FreeBSD.org> References: <201504012226.t31MQedN044443@svn.freebsd.org> <1427929676.82583.103.camel@freebsd.org> <20150402123522.GC64665@FreeBSD.org> <20150402133751.GA549@dft-labs.eu> <20150402134217.GG64665@FreeBSD.org> <20150402135157.GB549@dft-labs.eu> <1427983109.82583.115.camel@freebsd.org> <20150402142318.GC549@dft-labs.eu> <20150402143420.GI64665@FreeBSD.org> <20150402153805.GD549@dft-labs.eu> <551D8143.4060509@selasky.org> <551D8945.8050906@selasky.org> <8900318B-8155-4131-A0C3-3DE169782EFC@FreeBSD.org> <551D8C6C.9060504@selasky.org> <551DA5EA.1080908@selasky.org> <551DAC9E.9010303@selasky.org> To: Hans Petter Selasky X-Mailer: Apple Mail (2.2070.6) Cc: Mateusz Guzik , Ian Lepore , svn-src-all@freebsd.org, src-committers@freebsd.org, Gleb Smirnoff , svn-src-head@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 Apr 2015 21:20:08 -0000 On 2 Apr 2015, at 21:54, Hans Petter Selasky wrote: >>> Please go read about how IP fragmentation works. Having an = identical IP >>> ID in ip_fragment() is the point of the function! >>=20 >> rwatson: You're right, the more fragment flag gets set there, I >> overlooked that bit. Sorry. >>=20 >> glebius: Given that you admit there is a small chance of an IP ID >> collision in the previous e-mails exchanged in this thread, why don't = we >> have checks for that in ip_reass() when receiving fragmented IP = packets? >> For example when ip->ip_off =3D=3D 0 we know the TCP and/or UDP port = numbers >> for TCP and UDP payloads and can check if a new fragment is starting >> before the previous one is completed. Then we would know if a = collision >> has happened and could discard that packet. Not ideal, but better = than >> data corruption. >=20 > I see from the code that if two frags have the same IP offset, the = whole fragment list gets dropped, unless the IP payload is zero bytes = long. Maybe a "last" variable should be added? Are you solving an actual problem you've observed, or is this a = speculative proposal? RFC 791 requires that the minimum fragment size be = 8 octets, and ip_input() drops fragments below that size, so you = shouldn't (in principle) be able to get a fragment in the reassembly = code that has the properties you've described. If you are, it's a bug = elsewhere in the stack. If you are worried, you could add an assertion = at the top of the reassembly function that the size is >=3D 8 octets. I think you would benefit a great deal from reading Stevens Volume I = (second edition) before proceeding with further changes to the TCP/IP = code stack. A number of the proposals you have made are contradictory to = fundamental design choices in the protocol. Although there isn't a = second edition of Volume II, it might still be a good idea to skim = through the pertinent sections there as well -- it applies to a much = (much) earlier version of the stack, but includes a detailed exposition = of how the implementation tracks the protocol. Robert >> * only n will ever be stored. (n =3D maxfragsperpacket.) >> * >> */ >> next =3D 0; > last =3D -1; >> for (p =3D NULL, q =3D fp->ipq_frags; q; p =3D q, q =3D = q->m_nextpkt) { >> if (ntohs(GETIP(q)->ip_off) !=3D next || > + ntohs(GETIP(q)->ip_off) =3D=3D last >> ) { >> if (fp->ipq_nfrags > V_maxfragsperpacket) { >> IPSTAT_ADD(ips_fragdropped, = fp->ipq_nfrags); >> ip_freef(head, fp); >> } >> goto done; >> } > last =3D next; >> next +=3D ntohs(GETIP(q)->ip_len); >> } >=20 > --HPS >=20 From owner-svn-src-all@FreeBSD.ORG Thu Apr 2 21:35:38 2015 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 3AEA71C9; Thu, 2 Apr 2015 21:35: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 1BAA59DE; Thu, 2 Apr 2015 21:35: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 t32LZb1x008270; Thu, 2 Apr 2015 21:35:37 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t32LZbeX008268; Thu, 2 Apr 2015 21:35:37 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201504022135.t32LZbeX008268@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 2 Apr 2015 21:35:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281005 - head/libexec/rtld-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: Thu, 02 Apr 2015 21:35:38 -0000 Author: emaste Date: Thu Apr 2 21:35:36 2015 New Revision: 281005 URL: https://svnweb.freebsd.org/changeset/base/281005 Log: Make die available as rtld_die for use by MD relocation code Reviewed by: kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D2213 Modified: head/libexec/rtld-elf/rtld.c head/libexec/rtld-elf/rtld.h Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Thu Apr 2 21:18:11 2015 (r281004) +++ head/libexec/rtld-elf/rtld.c Thu Apr 2 21:35:36 2015 (r281005) @@ -78,7 +78,6 @@ typedef void * (*path_enum_proc) (const * Function declarations. */ static const char *basename(const char *); -static void die(void) __dead2; static void digest_dynamic1(Obj_Entry *, int, const Elf_Dyn **, const Elf_Dyn **, const Elf_Dyn **); static void digest_dynamic2(Obj_Entry *, const Elf_Dyn *, const Elf_Dyn *, @@ -430,7 +429,7 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_ unsetenv(LD_ "DEBUG") || unsetenv(LD_ "ELF_HINTS_PATH") || unsetenv(LD_ "LOADFLTR") || unsetenv(LD_ "LIBRARY_PATH_RPATH")) { _rtld_error("environment corrupt; aborting"); - die(); + rtld_die(); } } ld_debug = getenv(LD_ "DEBUG"); @@ -479,7 +478,7 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_ obj_main = map_object(fd, argv0, NULL); close(fd); if (obj_main == NULL) - die(); + rtld_die(); max_stack_flags = obj->stack_flags; } else { /* Main program already loaded. */ const Elf_Phdr *phdr; @@ -496,7 +495,7 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_ assert(aux_info[AT_ENTRY] != NULL); entry = (caddr_t) aux_info[AT_ENTRY]->a_un.a_ptr; if ((obj_main = digest_phdr(phdr, phnum, entry, argv0)) == NULL) - die(); + rtld_die(); } if (aux_info[AT_EXECPATH] != 0) { @@ -563,12 +562,12 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_ dbg("loading LD_PRELOAD libraries"); if (load_preload_objects() == -1) - die(); + rtld_die(); preload_tail = obj_tail; dbg("loading needed objects"); if (load_needed_objects(obj_main, 0) == -1) - die(); + rtld_die(); /* Make a list of all objects loaded at startup. */ last_interposer = obj_main; @@ -584,7 +583,7 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_ dbg("checking for required versions"); if (rtld_verify_versions(&list_main) == -1 && !ld_tracing) - die(); + rtld_die(); if (ld_tracing) { /* We're done */ trace_loaded_objects(obj_main); @@ -613,11 +612,11 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_ if (relocate_objects(obj_main, ld_bind_now != NULL && *ld_bind_now != '\0', &obj_rtld, SYMLOOK_EARLY, NULL) == -1) - die(); + rtld_die(); dbg("doing copy relocations"); if (do_copy_relocations(obj_main) == -1) - die(); + rtld_die(); if (getenv(LD_ "DUMP_REL_POST") != NULL) { dump_relocations(obj_main); @@ -649,7 +648,7 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_ if (resolve_objects_ifunc(obj_main, ld_bind_now != NULL && *ld_bind_now != '\0', SYMLOOK_EARLY, NULL) == -1) - die(); + rtld_die(); if (!obj_main->crt_no_init) { /* @@ -716,7 +715,7 @@ _rtld_bind(Obj_Entry *obj, Elf_Size relo def = find_symdef(ELF_R_SYM(rel->r_info), obj, &defobj, true, NULL, &lockstate); if (def == NULL) - die(); + rtld_die(); if (ELF_ST_TYPE(def->st_info) == STT_GNU_IFUNC) target = (Elf_Addr)rtld_resolve_ifunc(defobj, def); else @@ -865,8 +864,8 @@ origin_subst(char *real, const char *ori return (res4); } -static void -die(void) +void +rtld_die(void) { const char *msg = dlerror(); @@ -1216,7 +1215,7 @@ digest_dynamic2(Obj_Entry *obj, const El if (obj->z_origin && obj->origin_path == NULL) { obj->origin_path = xmalloc(PATH_MAX); if (rtld_dirname_abs(obj->path, obj->origin_path) == -1) - die(); + rtld_die(); } if (dyn_runpath != NULL) { @@ -1914,7 +1913,7 @@ init_pagesizes(Elf_Auxinfo **aux_info) } if (sysctl(mib, len, psa, &size, NULL, 0) == -1) { _rtld_error("sysctl for hw.pagesize(s) failed"); - die(); + rtld_die(); } psa_filled: pagesizes = psa; @@ -2851,7 +2850,7 @@ search_library_pathfds(const char *name, if (rtld_snprintf(found, len, "#%d/%s", dirfd, name) < 0) { _rtld_error("error generating '%d/%s'", dirfd, name); - die(); + rtld_die(); } dbg("open('%s') => %d", found, fd); break; @@ -4571,7 +4570,7 @@ allocate_module_tls(int index) } if (!obj) { _rtld_error("Can't find module with TLS index %d", index); - die(); + rtld_die(); } p = malloc_aligned(obj->tlssize, obj->tlsalign); @@ -4712,7 +4711,7 @@ locate_dependency(const Obj_Entry *obj, } _rtld_error("%s: Unexpected inconsistency: dependency %s not found", obj->path, name); - die(); + rtld_die(); } static int @@ -5049,7 +5048,7 @@ __stack_chk_fail(void) { _rtld_error("stack overflow detected; terminated"); - die(); + rtld_die(); } __weak_reference(__stack_chk_fail, __stack_chk_fail_local); @@ -5058,7 +5057,7 @@ __chk_fail(void) { _rtld_error("buffer overflow detected; terminated"); - die(); + rtld_die(); } const char * Modified: head/libexec/rtld-elf/rtld.h ============================================================================== --- head/libexec/rtld-elf/rtld.h Thu Apr 2 21:18:11 2015 (r281004) +++ head/libexec/rtld-elf/rtld.h Thu Apr 2 21:35:36 2015 (r281005) @@ -354,6 +354,7 @@ typedef struct Struct_SymLook { } SymLook; void _rtld_error(const char *, ...) __printflike(1, 2) __exported; +void rtld_die(void) __dead2; const char *rtld_strerror(int); Obj_Entry *map_object(int, const char *, const struct stat *); void *xcalloc(size_t, size_t); From owner-svn-src-all@FreeBSD.ORG Thu Apr 2 21:55:05 2015 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 09FFF694; Thu, 2 Apr 2015 21:55: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 E9697BFC; Thu, 2 Apr 2015 21:55:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t32Lt49n017454; Thu, 2 Apr 2015 21:55:04 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t32Lt4dY017453; Thu, 2 Apr 2015 21:55:04 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201504022155.t32Lt4dY017453@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Thu, 2 Apr 2015 21:55:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281006 - head/sys/dev/bxe 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 Apr 2015 21:55:05 -0000 Author: davidcs Date: Thu Apr 2 21:55:03 2015 New Revision: 281006 URL: https://svnweb.freebsd.org/changeset/base/281006 Log: When an mbuf allocation fails in the receive path, the mbuf containing the received packet is not sent to the host net work stack and is reused again on the receive ring. Remaining received packets in the ring are not processed in that invocation of bxe_rxeof() and defered to the task thread. MFC after: 5 days Modified: head/sys/dev/bxe/bxe.c Modified: head/sys/dev/bxe/bxe.c ============================================================================== --- head/sys/dev/bxe/bxe.c Thu Apr 2 21:35:36 2015 (r281005) +++ head/sys/dev/bxe/bxe.c Thu Apr 2 21:55:03 2015 (r281006) @@ -3246,7 +3246,7 @@ bxe_rxeof(struct bxe_softc *sc, uint16_t bd_cons, bd_prod, bd_prod_fw, comp_ring_cons; uint16_t hw_cq_cons, sw_cq_cons, sw_cq_prod; int rx_pkts = 0; - int rc; + int rc = 0; BXE_FP_RX_LOCK(fp); @@ -3388,6 +3388,10 @@ bxe_rxeof(struct bxe_softc *sc, (sc->max_rx_bufs != RX_BD_USABLE) ? bd_prod : bd_cons); if (rc != 0) { + + /* we simply reuse the received mbuf and don't post it to the stack */ + m = NULL; + BLOGE(sc, "mbuf alloc fail for fp[%02d] rx chain (%d)\n", fp->index, rc); fp->eth_q_stats.rx_soft_errors++; @@ -3476,6 +3480,9 @@ next_cqe: sw_cq_cons = RCQ_NEXT(sw_cq_cons); /* limit spinning on the queue */ + if (rc != 0) + break; + if (rx_pkts == sc->rx_budget) { fp->eth_q_stats.rx_budget_reached++; break; From owner-svn-src-all@FreeBSD.ORG Thu Apr 2 22:42:25 2015 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 27096FE; Thu, 2 Apr 2015 22:42: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 0870913B; Thu, 2 Apr 2015 22:42: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 t32MgOXf040345; Thu, 2 Apr 2015 22:42:24 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t32MgOib040343; Thu, 2 Apr 2015 22:42:24 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201504022242.t32MgOib040343@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Thu, 2 Apr 2015 22:42:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281007 - head/games/fortune/tools 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 Apr 2015 22:42:25 -0000 Author: eadler Date: Thu Apr 2 22:42:23 2015 New Revision: 281007 URL: https://svnweb.freebsd.org/changeset/base/281007 Log: fortune/tools/do_uniq.py slight imporvements to do_uniq.py: - use with open() - don't depend on sys.argv directly - fix style Modified: head/games/fortune/tools/do_uniq.py Modified: head/games/fortune/tools/do_uniq.py ============================================================================== --- head/games/fortune/tools/do_uniq.py Thu Apr 2 21:55:03 2015 (r281006) +++ head/games/fortune/tools/do_uniq.py Thu Apr 2 22:42:23 2015 (r281007) @@ -4,7 +4,8 @@ # # an aggressive little script for trimming duplicate cookies -import re, sys +import argparse +import re wordlist = [ 'hadnot', @@ -15,6 +16,7 @@ wordlist = [ 'a', 'd', 'i', 'm', 's', ] + def hash(fortune): f = fortune f = f.lower() @@ -27,37 +29,40 @@ def hash(fortune): # f = f[-30:] return f + def edit(datfile): dups = {} fortunes = [] fortune = "" - for line in file(datfile): - if line == "%\n": - key = hash(fortune) - if key not in dups: - dups[key] = [] - dups[key].append(fortune) - fortunes.append(fortune) - fortune = "" - else: - fortune += line + with open(datfile, "r") as datfiledf: + for line in datfiledf: + if line == "%\n": + key = hash(fortune) + if key not in dups: + dups[key] = [] + dups[key].append(fortune) + fortunes.append(fortune) + fortune = "" + else: + fortune += line for key in list(dups.keys()): if len(dups[key]) == 1: del dups[key] - o = file(datfile + '~', "w") - for fortune in fortunes: - key = hash(fortune) - if key in dups: - print('\n' * 50) - for f in dups[key]: - if f != fortune: - print(f, '%') - print(fortune, '%') - if input("Remove last fortune? ") == 'y': - del dups[key] - continue - o.write(fortune + "%\n") - o.close() + with open(datfile + "~", "w") as o: + for fortune in fortunes: + key = hash(fortune) + if key in dups: + print('\n' * 50) + for f in dups[key]: + if f != fortune: + print(f, '%') + print(fortune, '%') + if input("Remove last fortune? ") == 'y': + del dups[key] + continue + o.write(fortune + "%\n") -assert len(sys.argv) == 2 -edit(sys.argv[1]) +parser = argparse.ArgumentParser(description="trimming duplicate cookies") +parser.add_argument("filename", type=str, nargs=1) +args = parser.parse_args() +edit(args.filename[0]) From owner-svn-src-all@FreeBSD.ORG Thu Apr 2 22:59:12 2015 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 25EC142A; Thu, 2 Apr 2015 22:59:12 +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 CA8C7277; Thu, 2 Apr 2015 22:59:11 +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 9FC9125D3A82; Thu, 2 Apr 2015 22:59:09 +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 CB73BC770C2; Thu, 2 Apr 2015 22:59:08 +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 HB8Yjf1F2R3t; Thu, 2 Apr 2015 22:59:07 +0000 (UTC) Received: from [IPv6:fde9:577b:c1a9:4410:b117:a17f:a6e6:849b] (unknown [IPv6:fde9:577b:c1a9:4410:b117:a17f:a6e6:849b]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id E08C9C76FDC; Thu, 2 Apr 2015 22:59:06 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: svn commit: r281002 - in head/sys/boot: arm/uboot forth i386/loader mips/beri/loader pc98/loader powerpc/kboot powerpc/ofw powerpc/ps3 sparc64/loader From: "Bjoern A. Zeeb" In-Reply-To: <201504022007.t32K76bE064298@svn.freebsd.org> Date: Thu, 2 Apr 2015 22:59:00 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201504022007.t32K76bE064298@svn.freebsd.org> To: Jung-uk Kim X-Mailer: Apple Mail (2.2070.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: Thu, 02 Apr 2015 22:59:12 -0000 > On 02 Apr 2015, at 20:07 , Jung-uk Kim wrote: >=20 > Author: jkim > Date: Thu Apr 2 20:07:05 2015 > New Revision: 281002 > URL: https://svnweb.freebsd.org/changeset/base/281002 >=20 > Log: > Install newly added brand-*.4th and logo-*.4th files and reduce = duplication. >=20 > Reviewed by: dteske > Pointy hat to: dteske >=20 > Added: > head/sys/boot/forth/Makefile.inc (contents, props changed) > Modified: > head/sys/boot/arm/uboot/Makefile > head/sys/boot/i386/loader/Makefile > head/sys/boot/mips/beri/loader/Makefile > head/sys/boot/pc98/loader/Makefile > head/sys/boot/powerpc/kboot/Makefile > head/sys/boot/powerpc/ofw/Makefile > head/sys/boot/powerpc/ps3/Makefile > head/sys/boot/sparc64/loader/Makefile bmake: "/scratch/tmp/bz/head.svn/sys/boot/mips/beri/loader/Makefile" = line 124: Cannot open = /scratch/tmp/bz/head.svn/sys/boot/mips/beri/loader/../../forth/Makefile.in= c Seems there is an extra ../ missing? =E2=80=94=20 Bjoern A. Zeeb Charles Haddon Spurgeon: "Friendship is one of the sweetest joys of life. Many might have failed beneath the bitterness of their trial had they not found a friend." From owner-svn-src-all@FreeBSD.ORG Thu Apr 2 23:12:19 2015 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 A8A6E989; Thu, 2 Apr 2015 23: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 94E0E63E; Thu, 2 Apr 2015 23: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 t32NCJ5Y054425; Thu, 2 Apr 2015 23:12:19 GMT (envelope-from peter@FreeBSD.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t32NCJmM054423; Thu, 2 Apr 2015 23:12:19 GMT (envelope-from peter@FreeBSD.org) Message-Id: <201504022312.t32NCJmM054423@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: peter set sender to peter@FreeBSD.org using -f From: Peter Wemm Date: Thu, 2 Apr 2015 23:12:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281008 - head/sys/dev/ciss 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 Apr 2015 23:12:19 -0000 Author: peter Date: Thu Apr 2 23:12:18 2015 New Revision: 281008 URL: https://svnweb.freebsd.org/changeset/base/281008 Log: Remove redundant mtx_lock/unlock in ciss_name_device. This is a guaranteed insta-panic on device add/remove. This is only called from the notify thread which already holds the lock while calling this function. Modified: head/sys/dev/ciss/ciss.c Modified: head/sys/dev/ciss/ciss.c ============================================================================== --- head/sys/dev/ciss/ciss.c Thu Apr 2 22:42:23 2015 (r281007) +++ head/sys/dev/ciss/ciss.c Thu Apr 2 23:12:18 2015 (r281008) @@ -3438,11 +3438,9 @@ ciss_name_device(struct ciss_softc *sc, target, 0); if (status == CAM_REQ_CMP) { - mtx_lock(&sc->ciss_mtx); xpt_path_lock(path); periph = cam_periph_find(path, NULL); xpt_path_unlock(path); - mtx_unlock(&sc->ciss_mtx); xpt_free_path(path); if (periph != NULL) { sprintf(sc->ciss_logical[bus][target].cl_name, "%s%d", From owner-svn-src-all@FreeBSD.ORG Thu Apr 2 23:55:12 2015 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 D0B9F408; Thu, 2 Apr 2015 23:55:12 +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 33AF6AA8; Thu, 2 Apr 2015 23:55:11 +0000 (UTC) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail108.syd.optusnet.com.au (Postfix) with ESMTPS id 9B39E1A54D0; Fri, 3 Apr 2015 10:54:59 +1100 (AEDT) Date: Fri, 3 Apr 2015 10:54:58 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Ed Maste Subject: Re: svn commit: r281004 - in head/lib/libc: arm/sys mips/sys powerpc powerpc/sys powerpc64 powerpc64/sys sparc64 sparc64/sys sys In-Reply-To: <201504022118.t32LICdb098609@svn.freebsd.org> Message-ID: <20150403094132.E903@besplex.bde.org> References: <201504022118.t32LICdb098609@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=Za4kaKlA c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=rR9vwywfeCBX8dvHOBsA:9 a=X7MrSQ0McWDR2EUb:21 a=nwv7_wFztYOT1Z1T:21 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: Thu, 02 Apr 2015 23:55:12 -0000 On Thu, 2 Apr 2015, Ed Maste wrote: > Log: > libc: Eliminate duplicate copies of __vdso_gettc.c > ... > Modified: head/lib/libc/arm/sys/Makefile.inc > ============================================================================== > --- head/lib/libc/arm/sys/Makefile.inc Thu Apr 2 20:14:51 2015 (r281003) > +++ head/lib/libc/arm/sys/Makefile.inc Thu Apr 2 21:18:11 2015 (r281004) > @@ -1,6 +1,6 @@ > # $FreeBSD$ > > -SRCS+= __vdso_gettc.c > +SRCS+= trivial-vdso_tc.c The new file name is much worse than the old one. The old one was too long. It didn't even match the name of the single function that it implements, since it implements several functions. It has excessive leading underscores. Leading underscores are sometimes needed in function names to keep them out of the application namespace, or just to keep layers of them separate, but the equivalent is rarely needed for function names. libc previously had just 26 file names with 2 leading underscores. Almost 1/3 of them for __vdso*: X ./powerpc64/sys/__vdso_gettc.c X ./sys/__vdso_gettimeofday.c X ./sys/__error.c X ./i386/sys/__vdso_gettc.c X ./iconv/__iconv_free_list.c X ./iconv/__iconv.c X ./iconv/__iconv_get_list.3 X ./iconv/__iconv_get_list.c X ./arm/gen/__aeabi_read_tp.S X ./arm/sys/__vdso_gettc.c X ./sparc64/sys/__sparc_utrap_fp_disabled.S X ./sparc64/sys/__sparc_sigtramp_setup.c X ./sparc64/sys/__sparc_utrap_setup.c X ./sparc64/sys/__sparc_utrap_emul.c X ./sparc64/sys/__sparc_utrap_install.c X ./sparc64/sys/__vdso_gettc.c X ./sparc64/sys/__sparc_utrap_private.h X ./sparc64/sys/__sparc_utrap_align.c X ./sparc64/sys/__sparc_utrap.c X ./sparc64/sys/__sparc_utrap_gen.S X ./amd64/sys/__vdso_gettc.c X ./mips/sys/__vdso_gettc.c X ./gen/__pthread_mutex_init_calloc_cb_stub.c X ./gen/__xuname.c X ./gen/__getosreldate.c X ./powerpc/sys/__vdso_gettc.c Another 1/3 of these are probably externally-imposed (the sparc64 trap ones). The sparc64 names are disgustingly verbose, but not nearly as bad as the internal spam __pthread_mutex_init_calloc_cb_stub.c (37 characters). This file contains a single stub function with a not quite equally bad name. The file name doesn't even match the function name -- the function name only has 1 leading underscore. FreeBSD ls -C handles long names especially badly. It uses a tabbed format with all columns wide enough for the widest file name. 37 is barely less than 40, so it only reduces the number of columns to 2 on terminals of width 80-119. gnu ls aligns to non-tab boundaries and uses variable-width columns. 1 long file name only bloats the column that it is in. For more normal short file names (not longer than 15, with an average of less than 8 from good names like cp), FreeBSD ls -C always gives 5 columns of width 16 each on an 80-column terminal, while gnu ls -C usually gives 8-10. The densely packed names can be hard to read, but not as bad as ones that scroll off due to the low density. The new name removes the double underscores. Good, but now it doesn't match the name of even one of the functions in it. "trivial" in the new name doesn't describe what it does. It is not a trivial (simple) implementation of the functions in it, but a stub (non-functional) implementation of these functions. Though disgusting, the name __pthread_mutex_init_calloc_cb_stub.c at least says "stub" instead of "trivial". In BSD, words in file names are conventionally separated by underscores. The new name separates one pair of words with a hyphen instead. This is gnu-style. A case can be made for using underscores to echo function names that have them and hyphens for everything else, to keep these splittings separate. But function names shouldn't be echoed in file names anyway. Echoing is only possible when the file implements only a single function (unless you want to make the file name even more disgusting by making it the concatenation of all the function names, with exceptions only when the length of this exceeds {NAME_MAX}. Previously, only 44 names in libc had a hyphen (581 had an underscore): X ./stdio/printf-pos.c X ./powerpc64/softfloat/powerpc-gcc.h X ./iconv/iconv-internal.h X ./tests/Makefile.netbsd-tests X ./arm/softfloat/arm-gcc.h X ./db/mpool/mpool-compat.c X ./mips/softfloat/mips-gcc.h X ./gen/trivial-getcontextx.c X ./gen/fts-compat.h X ./gen/gen-private.h X ./gen/fts-compat.c X ./gen/unvis-compat.c X ./include/un-namespace.h X ./compat-43 X ./powerpc/softfloat/powerpc-gcc.h X ./softfloat/softfloat-for-gcc.h X ./softfloat/softfloat-specialize X ./softfloat/templates/softfloat-specialize X ./softfloat/softfloat-source.txt X ./softfloat/bits64/softfloat-macros X ./softfloat/bits32/softfloat-macros X ./softfloat/softfloat-history.txt X ./nls/mn_MN.UTF-8.msg X ./nls/pl_PL.ISO8859-2.msg X ./nls/ca_ES.ISO8859-1.msg X ./nls/ru_RU.KOI8-R.msg X ./nls/nl_NL.ISO8859-1.msg X ./nls/el_GR.ISO8859-7.msg X ./nls/it_IT.ISO8859-15.msg X ./nls/fr_FR.ISO8859-1.msg X ./nls/gl_ES.ISO8859-1.msg X ./nls/sk_SK.ISO8859-2.msg X ./nls/hu_HU.ISO8859-2.msg X ./nls/be_BY.UTF-8.msg X ./nls/sv_SE.ISO8859-1.msg X ./nls/fi_FI.ISO8859-1.msg X ./nls/pt_BR.ISO8859-1.msg X ./nls/no_NO.ISO8859-1.msg X ./nls/zh_CN.UTF-8.msg X ./nls/ko_KR.UTF-8.msg X ./nls/es_ES.ISO8859-1.msg X ./nls/de_DE.ISO8859-1.msg X ./nls/uk_UA.UTF-8.msg X ./nls/ja_JP.UTF-8.msg 1/4 of these are probably externally imposed (for softfloat). Half of them are for NLS names where they are correct because the locale name has a hyphen and this needs to be in the file name for related output files. This leaves just 11 names with a hyphen. 4.4BSD is responsible for compat-43, and I am responsible for un-namespace.h. In /sys, there are now 1357 broken names with hyphens :-(. Many externally-imposed. 6230 with underscores. 14939 total. In 4.4BSD-Lite2 /sys, there are 11 names with hyphens, 559 with underscores, 2337 total. Bruce From owner-svn-src-all@FreeBSD.ORG Fri Apr 3 01:38:08 2015 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 B4B93E4D; Fri, 3 Apr 2015 01:38:08 +0000 (UTC) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 616A183B; Fri, 3 Apr 2015 01:38:07 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id ED7A11FE022; Fri, 3 Apr 2015 03:38:03 +0200 (CEST) Message-ID: <551DEF26.4000403@selasky.org> Date: Fri, 03 Apr 2015 03:38:46 +0200 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: "Robert N. M. Watson" Subject: Re: svn commit: r280971 - in head: contrib/ipfilter/tools share/man/man4 sys/contrib/ipfilter/netinet sys/netinet sys/netipsec sys/netpfil/pf References: <201504012226.t31MQedN044443@svn.freebsd.org> <1427929676.82583.103.camel@freebsd.org> <20150402123522.GC64665@FreeBSD.org> <20150402133751.GA549@dft-labs.eu> <20150402134217.GG64665@FreeBSD.org> <20150402135157.GB549@dft-labs.eu> <1427983109.82583.115.camel@freebsd.org> <20150402142318.GC549@dft-labs.eu> <20150402143420.GI64665@FreeBSD.org> <20150402153805.GD549@dft-labs.eu> <551D8143.4060509@selasky.org> <551D8945.8050906@selasky.org> <8900318B-8155-4131-A0C3-3DE169782EFC@FreeBSD.org> <551D8C6C.9060504@selasky.org> <551DA5EA.1080908@selasky.org> <551DAC9E.9010303@selasky.org> <358EC58D-1F92-411E-ADEB-8072020E9EB3@FreeBSD.org> In-Reply-To: <358EC58D-1F92-411E-ADEB-8072020E9EB3@FreeBSD.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: Mateusz Guzik , Ian Lepore , svn-src-all@freebsd.org, src-committers@freebsd.org, Gleb Smirnoff , svn-src-head@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 Apr 2015 01:38:08 -0000 On 04/02/15 23:20, Robert N. M. Watson wrote: > On 2 Apr 2015, at 21:54, Hans Petter Selasky wrote: > >> I see from the code that if two frags have the same IP offset, the whole fragment list gets dropped, unless the IP payload is zero bytes long. Maybe a "last" variable should be added? Hi Robert, > Are you solving an actual problem you've observed, or is this a speculative proposal? Yes, I saw in the FreeBSD network code that fragments having IP payload < 8 are not allowed, after writing this e-mail. > > I think you would benefit a great deal from reading Stevens Volume I (second edition) before proceeding with further changes to the TCP/IP code stack. I will order and read this book eventually. I appreciate your tip. I would like have a comment on one final issue about the IP ID field. Given two [small] prime numbers: P and Q Assume you have a firewall that separate two networks, called A and B, that are not allowed to communicate. In network A an application pings the firewall and sees the IP ID field changing P steps. In network B an application pings the firewall and sees the IP ID field changing Q steps. If the application in network A always see that the IP ID field is changing P steps, it knows the application in network B did not send any packets. If the application in network B always see that the IP ID field is changing Q steps, it knows the application in network A did not send any packets. Detecting sending and not sending packets can be used as a way of reliable duplex binary communication. I think the current and past implementation of the IP ID field in FreeBSD can be used to leak information between networks, or am I totally wrong? As long as the IP ID counters are shared between two or more secured networks, there will be a problem. Something along the lines of D2211 might be a way to solve such an information leak without too much overhead! --HPS From owner-svn-src-all@FreeBSD.ORG Fri Apr 3 02:27:44 2015 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 BE41D566; Fri, 3 Apr 2015 02:27: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 A7F29EF4; Fri, 3 Apr 2015 02:27: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 t332Ri9s047969; Fri, 3 Apr 2015 02:27:44 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t332RfbB047958; Fri, 3 Apr 2015 02:27:41 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201504030227.t332RfbB047958@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Fri, 3 Apr 2015 02:27:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281009 - in head/sys/boot: arm/uboot forth i386/loader mips/beri/loader pc98/loader powerpc/kboot powerpc/ofw sparc64/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: Fri, 03 Apr 2015 02:27:44 -0000 Author: jkim Date: Fri Apr 3 02:27:40 2015 New Revision: 281009 URL: https://svnweb.freebsd.org/changeset/base/281009 Log: Revert .PATH changes to fix mips build. Reported by: bz Pointy hat to: jkim Modified: head/sys/boot/arm/uboot/Makefile head/sys/boot/forth/Makefile.inc head/sys/boot/i386/loader/Makefile head/sys/boot/mips/beri/loader/Makefile head/sys/boot/pc98/loader/Makefile head/sys/boot/powerpc/kboot/Makefile head/sys/boot/powerpc/ofw/Makefile head/sys/boot/sparc64/loader/Makefile Modified: head/sys/boot/arm/uboot/Makefile ============================================================================== --- head/sys/boot/arm/uboot/Makefile Thu Apr 2 23:12:18 2015 (r281008) +++ head/sys/boot/arm/uboot/Makefile Fri Apr 3 02:27:40 2015 (r281009) @@ -136,6 +136,7 @@ ldscript.generated:: fi .if !defined(LOADER_ONLY) +.PATH: ${.CURDIR}/../../forth .include "${.CURDIR}/../../forth/Makefile.inc" # Put sample loader.rc and menu.rc on disk but don't enable them Modified: head/sys/boot/forth/Makefile.inc ============================================================================== --- head/sys/boot/forth/Makefile.inc Thu Apr 2 23:12:18 2015 (r281008) +++ head/sys/boot/forth/Makefile.inc Fri Apr 3 02:27:40 2015 (r281009) @@ -1,6 +1,5 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../forth FILES+= beastie.4th FILES+= brand.4th FILES+= brand-fbsd.4th Modified: head/sys/boot/i386/loader/Makefile ============================================================================== --- head/sys/boot/i386/loader/Makefile Thu Apr 2 23:12:18 2015 (r281008) +++ head/sys/boot/i386/loader/Makefile Fri Apr 3 02:27:40 2015 (r281009) @@ -105,6 +105,7 @@ FILES= ${LOADER} FILESMODE_${LOADER}= ${BINMODE} -b .if !defined(LOADER_ONLY) +.PATH: ${.CURDIR}/../../forth .include "${.CURDIR}/../../forth/Makefile.inc" FILES+= pcibios.4th Modified: head/sys/boot/mips/beri/loader/Makefile ============================================================================== --- head/sys/boot/mips/beri/loader/Makefile Thu Apr 2 23:12:18 2015 (r281008) +++ head/sys/boot/mips/beri/loader/Makefile Fri Apr 3 02:27:40 2015 (r281009) @@ -121,6 +121,7 @@ loader.help: help.common help.mips cat ${.ALLSRC} | \ awk -f ${.CURDIR}/../../../common/merge_help.awk > ${.TARGET} +.PATH: ${.CURDIR}/../../../forth .include "${.CURDIR}/../../forth/Makefile.inc" .if !exists(${DESTDIR}/boot/loader.rc) Modified: head/sys/boot/pc98/loader/Makefile ============================================================================== --- head/sys/boot/pc98/loader/Makefile Thu Apr 2 23:12:18 2015 (r281008) +++ head/sys/boot/pc98/loader/Makefile Fri Apr 3 02:27:40 2015 (r281009) @@ -86,6 +86,7 @@ FILES= ${LOADER} # XXX INSTALLFLAGS_loader= -b FILESMODE_${LOADER}= ${BINMODE} -b +.PATH: ${.CURDIR}/../../forth .include "${.CURDIR}/../../forth/Makefile.inc" .if !exists(${DESTDIR}/boot/loader.rc) Modified: head/sys/boot/powerpc/kboot/Makefile ============================================================================== --- head/sys/boot/powerpc/kboot/Makefile Thu Apr 2 23:12:18 2015 (r281008) +++ head/sys/boot/powerpc/kboot/Makefile Fri Apr 3 02:27:40 2015 (r281009) @@ -113,6 +113,7 @@ loader.help: help.common help.kboot ${.C cat ${.ALLSRC} | \ awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET} +.PATH: ${.CURDIR}/../../forth .include "${.CURDIR}/../../forth/Makefile.inc" .if !exists(${DESTDIR}/boot/loader.rc) Modified: head/sys/boot/powerpc/ofw/Makefile ============================================================================== --- head/sys/boot/powerpc/ofw/Makefile Thu Apr 2 23:12:18 2015 (r281008) +++ head/sys/boot/powerpc/ofw/Makefile Fri Apr 3 02:27:40 2015 (r281009) @@ -108,6 +108,7 @@ loader.help: help.common help.ofw ${.CUR cat ${.ALLSRC} | \ awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET} +.PATH: ${.CURDIR}/../../forth .include "${.CURDIR}/../../forth/Makefile.inc" .if !exists(${DESTDIR}/boot/loader.rc) Modified: head/sys/boot/sparc64/loader/Makefile ============================================================================== --- head/sys/boot/sparc64/loader/Makefile Thu Apr 2 23:12:18 2015 (r281008) +++ head/sys/boot/sparc64/loader/Makefile Fri Apr 3 02:27:40 2015 (r281009) @@ -95,6 +95,7 @@ loader.help: help.common help.sparc64 cat ${.ALLSRC} | \ awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET} +.PATH: ${.CURDIR}/../../forth .include "${.CURDIR}/../../forth/Makefile.inc" .if !exists(${DESTDIR}/boot/loader.rc) From owner-svn-src-all@FreeBSD.ORG Fri Apr 3 02:32:00 2015 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 4F8D37D3; Fri, 3 Apr 2015 02:32: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 3AD28FB3; Fri, 3 Apr 2015 02:32: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 t332W04n052015; Fri, 3 Apr 2015 02:32:00 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t332W0d0052014; Fri, 3 Apr 2015 02:32:00 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201504030232.t332W0d0052014@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Fri, 3 Apr 2015 02:32:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281010 - head/sys/boot/mips/beri/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: Fri, 03 Apr 2015 02:32:00 -0000 Author: jkim Date: Fri Apr 3 02:31:59 2015 New Revision: 281010 URL: https://svnweb.freebsd.org/changeset/base/281010 Log: Fix mips build, really. :-( Modified: head/sys/boot/mips/beri/loader/Makefile Modified: head/sys/boot/mips/beri/loader/Makefile ============================================================================== --- head/sys/boot/mips/beri/loader/Makefile Fri Apr 3 02:27:40 2015 (r281009) +++ head/sys/boot/mips/beri/loader/Makefile Fri Apr 3 02:31:59 2015 (r281010) @@ -122,7 +122,7 @@ loader.help: help.common help.mips awk -f ${.CURDIR}/../../../common/merge_help.awk > ${.TARGET} .PATH: ${.CURDIR}/../../../forth -.include "${.CURDIR}/../../forth/Makefile.inc" +.include "${.CURDIR}/../../../forth/Makefile.inc" .if !exists(${DESTDIR}/boot/loader.rc) FILES+= loader.rc From owner-svn-src-all@FreeBSD.ORG Fri Apr 3 02:37:45 2015 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 15B6C952; Fri, 3 Apr 2015 02: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 013DFFD7; Fri, 3 Apr 2015 02:37: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 t332biLB052659; Fri, 3 Apr 2015 02:37:44 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t332binI052658; Fri, 3 Apr 2015 02:37:44 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201504030237.t332binI052658@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Fri, 3 Apr 2015 02:37:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281011 - head/sys/boot/powerpc/ps3 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 Apr 2015 02:37:45 -0000 Author: jkim Date: Fri Apr 3 02:37:43 2015 New Revision: 281011 URL: https://svnweb.freebsd.org/changeset/base/281011 Log: Fix powerpc/ps3 build, too. Modified: head/sys/boot/powerpc/ps3/Makefile Modified: head/sys/boot/powerpc/ps3/Makefile ============================================================================== --- head/sys/boot/powerpc/ps3/Makefile Fri Apr 3 02:31:59 2015 (r281010) +++ head/sys/boot/powerpc/ps3/Makefile Fri Apr 3 02:37:43 2015 (r281011) @@ -110,6 +110,7 @@ loader.help: help.common help.ps3 ${.CUR cat ${.ALLSRC} | \ awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET} +.PATH: ${.CURDIR}/../../forth .include "${.CURDIR}/../../forth/Makefile.inc" .if !exists(${DESTDIR}/boot/loader.rc) From owner-svn-src-all@FreeBSD.ORG Fri Apr 3 03:02:48 2015 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 C96DAF24; Fri, 3 Apr 2015 03:02:48 +0000 (UTC) Received: from mail-ie0-x234.google.com (mail-ie0-x234.google.com [IPv6:2607:f8b0:4001:c03::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8C7ED60F; Fri, 3 Apr 2015 03:02:48 +0000 (UTC) Received: by iedm5 with SMTP id m5so83590654ied.3; Thu, 02 Apr 2015 20:02:48 -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=eGW2l8+WS3d088Oql2Jj/TKA4rMXX6StVaat+GG0tT4=; b=TJ9GkYg/tA0pIHOMxYRgKlvSvobVaYjPHbbukzZUbyZlILTiVA7b7eEi0KUSA4xjFv 4AYz5GyKpBsiBhcXLDRaD+ZH8sdum4zBR50lF4vcsKC/xrZp7lXHmGVGrpxwCjdY+OON Ogr5AVlHSK6AN/V6udM2tuIpzF3qAZzu8YsE0zXlQHznetPdmoDrP5shW/B+F2rzs06d s/Ax4T3a45BwHSx+GYl9X3+ObNzAVPq9SgABm1MoMoUtuOTInBFMRt/s59U0fnUtcbiD YilVuOMbWSoe/3iJ+cz1FQSUSwhtGQAlcAW50anHnK/16l1iJajd6Nzgu7ACQcL0i7xV y/QA== X-Received: by 10.50.129.9 with SMTP id ns9mr1514025igb.24.1428030168014; Thu, 02 Apr 2015 20:02:48 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.158.19 with HTTP; Thu, 2 Apr 2015 20:02:27 -0700 (PDT) In-Reply-To: <20150403094132.E903@besplex.bde.org> References: <201504022118.t32LICdb098609@svn.freebsd.org> <20150403094132.E903@besplex.bde.org> From: Ed Maste Date: Thu, 2 Apr 2015 23:02:27 -0400 X-Google-Sender-Auth: cmwAgW6a78H7rAd0Gu9ZtUfoOZs Message-ID: Subject: Re: svn commit: r281004 - in head/lib/libc: arm/sys mips/sys powerpc powerpc/sys powerpc64 powerpc64/sys sparc64 sparc64/sys sys To: Bruce Evans 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: Fri, 03 Apr 2015 03:02:48 -0000 On 2 April 2015 at 19:54, Bruce Evans wrote: > On Thu, 2 Apr 2015, Ed Maste wrote: > >> Log: >> libc: Eliminate duplicate copies of __vdso_gettc.c >> ... >> Modified: head/lib/libc/arm/sys/Makefile.inc >> >> ============================================================================== >> --- head/lib/libc/arm/sys/Makefile.inc Thu Apr 2 20:14:51 2015 >> (r281003) >> +++ head/lib/libc/arm/sys/Makefile.inc Thu Apr 2 21:18:11 2015 >> (r281004) >> @@ -1,6 +1,6 @@ >> # $FreeBSD$ >> >> -SRCS+= __vdso_gettc.c >> +SRCS+= trivial-vdso_tc.c > > > The new file name is much worse than the old one. > [snip] I'm happy to rename it if you have a suggestion. From owner-svn-src-all@FreeBSD.ORG Fri Apr 3 06:16:21 2015 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 99CEE375; Fri, 3 Apr 2015 06:16: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 83E8A875; Fri, 3 Apr 2015 06:16: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 t336GLrK055191; Fri, 3 Apr 2015 06:16:21 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t336GLrN055190; Fri, 3 Apr 2015 06:16:21 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201504030616.t336GLrN055190@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 3 Apr 2015 06:16: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: r281012 - stable/10/sys/geom/mirror 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 Apr 2015 06:16:21 -0000 Author: mav Date: Fri Apr 3 06:16:20 2015 New Revision: 281012 URL: https://svnweb.freebsd.org/changeset/base/281012 Log: MFC r280756, r280758: Fix bug on memory allocation error in split method. While there, use bioq_takefirst() in place where it is convenient. Modified: stable/10/sys/geom/mirror/g_mirror.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/geom/mirror/g_mirror.c ============================================================================== --- stable/10/sys/geom/mirror/g_mirror.c Fri Apr 3 02:37:43 2015 (r281011) +++ stable/10/sys/geom/mirror/g_mirror.c Fri Apr 3 06:16:20 2015 (r281012) @@ -1588,7 +1588,7 @@ g_mirror_request_split(struct g_mirror_s cbp = g_clone_bio(bp); if (cbp == NULL) { while ((cbp = bioq_takefirst(&queue)) != NULL) - bioq_remove(&queue, cbp); + g_destroy_bio(cbp); if (bp->bio_error == 0) bp->bio_error = ENOMEM; g_io_deliver(bp, bp->bio_error); @@ -1871,7 +1871,7 @@ g_mirror_worker(void *arg) */ /* Get first request from the queue. */ mtx_lock(&sc->sc_queue_mtx); - bp = bioq_first(&sc->sc_queue); + bp = bioq_takefirst(&sc->sc_queue); if (bp == NULL) { if ((sc->sc_flags & G_MIRROR_DEVICE_FLAG_DESTROY) != 0) { @@ -1899,7 +1899,6 @@ g_mirror_worker(void *arg) G_MIRROR_DEBUG(5, "%s: I'm here 4.", __func__); continue; } - bioq_remove(&sc->sc_queue, bp); mtx_unlock(&sc->sc_queue_mtx); if (bp->bio_from->geom == sc->sc_sync.ds_geom && From owner-svn-src-all@FreeBSD.ORG Fri Apr 3 06:17:25 2015 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 A779D4B3; Fri, 3 Apr 2015 06:17: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 91ADA87F; Fri, 3 Apr 2015 06:17: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 t336HPKM055397; Fri, 3 Apr 2015 06:17:25 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t336HPJ7055396; Fri, 3 Apr 2015 06:17:25 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201504030617.t336HPJ7055396@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 3 Apr 2015 06:17:25 +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: r281013 - stable/9/sys/geom/mirror 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: Fri, 03 Apr 2015 06:17:25 -0000 Author: mav Date: Fri Apr 3 06:17:24 2015 New Revision: 281013 URL: https://svnweb.freebsd.org/changeset/base/281013 Log: MFC r280756, r280758: Fix bug on memory allocation error in split method. While there, use bioq_takefirst() in place where it is convenient. Modified: stable/9/sys/geom/mirror/g_mirror.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/geom/mirror/g_mirror.c ============================================================================== --- stable/9/sys/geom/mirror/g_mirror.c Fri Apr 3 06:16:20 2015 (r281012) +++ stable/9/sys/geom/mirror/g_mirror.c Fri Apr 3 06:17:24 2015 (r281013) @@ -1542,7 +1542,7 @@ g_mirror_request_split(struct g_mirror_s if (cbp == NULL) { for (cbp = bioq_first(&queue); cbp != NULL; cbp = bioq_first(&queue)) { - bioq_remove(&queue, cbp); + g_destroy_bio(cbp); g_destroy_bio(cbp); } if (bp->bio_error == 0) @@ -1829,7 +1829,7 @@ g_mirror_worker(void *arg) */ /* Get first request from the queue. */ mtx_lock(&sc->sc_queue_mtx); - bp = bioq_first(&sc->sc_queue); + bp = bioq_takefirst(&sc->sc_queue); if (bp == NULL) { if ((sc->sc_flags & G_MIRROR_DEVICE_FLAG_DESTROY) != 0) { @@ -1857,7 +1857,6 @@ g_mirror_worker(void *arg) G_MIRROR_DEBUG(5, "%s: I'm here 4.", __func__); continue; } - bioq_remove(&sc->sc_queue, bp); mtx_unlock(&sc->sc_queue_mtx); if (bp->bio_from->geom == sc->sc_sync.ds_geom && From owner-svn-src-all@FreeBSD.ORG Fri Apr 3 06:27:21 2015 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 5E45367B; Fri, 3 Apr 2015 06:27:21 +0000 (UTC) Received: from cyrus.watson.org (cyrus.watson.org [198.74.231.69]) by mx1.freebsd.org (Postfix) with ESMTP id 13BBA94D; Fri, 3 Apr 2015 06:27:21 +0000 (UTC) Received: from [10.0.1.17] (host81-157-243-31.range81-157.btcentralplus.com [81.157.243.31]) by cyrus.watson.org (Postfix) with ESMTPSA id C5DAA46B43; Fri, 3 Apr 2015 02:27:19 -0400 (EDT) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: svn commit: r280971 - in head: contrib/ipfilter/tools share/man/man4 sys/contrib/ipfilter/netinet sys/netinet sys/netipsec sys/netpfil/pf From: "Robert N. M. Watson" In-Reply-To: <551DEF26.4000403@selasky.org> Date: Fri, 3 Apr 2015 07:27:18 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <4B7DAA59-389F-41AE-99D8-034A7AA61C99@FreeBSD.org> References: <201504012226.t31MQedN044443@svn.freebsd.org> <1427929676.82583.103.camel@freebsd.org> <20150402123522.GC64665@FreeBSD.org> <20150402133751.GA549@dft-labs.eu> <20150402134217.GG64665@FreeBSD.org> <20150402135157.GB549@dft-labs.eu> <1427983109.82583.115.camel@freebsd.org> <20150402142318.GC549@dft-labs.eu> <20150402143420.GI64665@FreeBSD.org> <20150402153805.GD549@dft-labs.eu> <551D8143.4060509@selasky.org> <551D8945.8050906@selasky.org> <8900318B-8155-4131-A0C3-3DE169782EFC@FreeBSD.org> <551D8C6C.9060504@selasky.org> <551DA5EA.1080908@selasky.org> <551DAC9E.9010303@selasky.org> <358EC58D-1F92-411E-ADEB-8072020E9EB3@FreeBSD.org> <551DEF26.4000403@selasky.org> To: Hans Petter Selasky X-Mailer: Apple Mail (2.2070.6) Cc: Mateusz Guzik , Ian Lepore , svn-src-all@freebsd.org, src-committers@freebsd.org, Gleb Smirnoff , svn-src-head@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 Apr 2015 06:27:21 -0000 On 3 Apr 2015, at 02:38, Hans Petter Selasky wrote: > I would like have a comment on one final issue about the IP ID field. >=20 > Given two [small] prime numbers: P and Q >=20 > Assume you have a firewall that separate two networks, called A and B, = that are not allowed to communicate. >=20 > In network A an application pings the firewall and sees the IP ID = field changing P steps. >=20 > In network B an application pings the firewall and sees the IP ID = field changing Q steps. >=20 > If the application in network A always see that the IP ID field is = changing P steps, it knows the application in network B did not send any = packets. >=20 > If the application in network B always see that the IP ID field is = changing Q steps, it knows the application in network A did not send any = packets. >=20 > Detecting sending and not sending packets can be used as a way of = reliable duplex binary communication. >=20 > I think the current and past implementation of the IP ID field in = FreeBSD can be used to leak information between networks, or am I = totally wrong? >=20 > As long as the IP ID counters are shared between two or more secured = networks, there will be a problem. Something along the lines of D2211 = might be a way to solve such an information leak without too much = overhead! There are countless covert channels in TCP/IP; breaking the IP = implementation to close a covert channel is probably not a worthwhile = investment. As indicated in pretty much the original RFC on the topic, IP IDs need = to be at minimum unique to a 2-tuple pair, so cannot be unique only at = the granularity of TCP or UDP connections, GRE associations, etc. = However, our current implementation keeps them globally unique, which = means they wrap much faster than necessary. Shifting to unique IP ID = spaces for IP 2-tuples would provide for a much longer wrapping time at = the cost of maintaining (and looking up!) additional state. There are = various ways to improve things -- and not all require a full set of = per-IP-2-tuple IP ID counters; for example, you could have hash buckets = based on 2 tuples. It's harder to do this in a multiprocessor-scalable = way, however, as the uniqueness requirements are global, and the IP ID = space is very small -- a more fundamental problem. In general, the world = therefore tries quite hard not to fragment, using TCP PMTU and careful = MTU selection for UDP (etc). Also, the world has become quite a lot more = homogeneous with respect to link-layer MTU over time -- e.g., with = convergence on Ethernet, although VPNs have made things a bit less fun. Robert= From owner-svn-src-all@FreeBSD.ORG Fri Apr 3 08:40:07 2015 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 C123320D; Fri, 3 Apr 2015 08:40:07 +0000 (UTC) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 63FB07C6; Fri, 3 Apr 2015 08:40:07 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id B84B21FE022; Fri, 3 Apr 2015 10:40:04 +0200 (CEST) Message-ID: <551E520E.1040708@selasky.org> Date: Fri, 03 Apr 2015 10:40:46 +0200 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: "Robert N. M. Watson" Subject: Re: svn commit: r280971 - in head: contrib/ipfilter/tools share/man/man4 sys/contrib/ipfilter/netinet sys/netinet sys/netipsec sys/netpfil/pf References: <201504012226.t31MQedN044443@svn.freebsd.org> <1427929676.82583.103.camel@freebsd.org> <20150402123522.GC64665@FreeBSD.org> <20150402133751.GA549@dft-labs.eu> <20150402134217.GG64665@FreeBSD.org> <20150402135157.GB549@dft-labs.eu> <1427983109.82583.115.camel@freebsd.org> <20150402142318.GC549@dft-labs.eu> <20150402143420.GI64665@FreeBSD.org> <20150402153805.GD549@dft-labs.eu> <551D8143.4060509@selasky.org> <551D8945.8050906@selasky.org> <8900318B-8155-4131-A0C3-3DE169782EFC@FreeBSD.org> <551D8C6C.9060504@selasky.org> <551DA5EA.1080908@selasky.org> <551DAC9E.9010303@selasky.org> <358EC58D-1F92-411E-ADEB-8072020E9EB3@FreeBSD.org> <551DEF26.4000403@selasky.org> <4B7DAA59-389F-41AE-99D8-034A7AA61C99@FreeBSD.org> In-Reply-To: <4B7DAA59-389F-41AE-99D8-034A7AA61C99@FreeBSD.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Cc: Mateusz Guzik , Ian Lepore , svn-src-all@freebsd.org, src-committers@freebsd.org, Gleb Smirnoff , svn-src-head@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 Apr 2015 08:40:08 -0000 On 04/03/15 08:27, Robert N. M. Watson wrote: > On 3 Apr 2015, at 02:38, Hans Petter Selasky wrote: > >> I would like have a comment on one final issue about the IP ID field. >> >> Given two [small] prime numbers: P and Q >> >> Assume you have a firewall that separate two networks, called A and B, that are not allowed to communicate. >> >> In network A an application pings the firewall and sees the IP ID field changing P steps. >> >> In network B an application pings the firewall and sees the IP ID field changing Q steps. >> >> If the application in network A always see that the IP ID field is changing P steps, it knows the application in network B did not send any packets. >> >> If the application in network B always see that the IP ID field is changing Q steps, it knows the application in network A did not send any packets. >> >> Detecting sending and not sending packets can be used as a way of reliable duplex binary communication. >> >> I think the current and past implementation of the IP ID field in FreeBSD can be used to leak information between networks, or am I totally wrong? >> >> As long as the IP ID counters are shared between two or more secured networks, there will be a problem. Something along the lines of D2211 might be a way to solve such an information leak without too much overhead! > Hi, Robert: > > There are countless covert channels in TCP/IP; breaking the IP implementation to close a covert channel is probably not a worthwhile investment. The IP ID channel is a _broadcast_ channel to all devices connected to the same network stack, including all VPN connections and even localhost. It is high speed and it cannot be blocked by firewall rules, and works across large networks. The other covert channels can easily be reduced by firewall rules. This one can't. Now that Gleb put in a patch that the shared IP ID counter is not used that frequently, only for specific traffic like ping packets, I believe this is very likely to be abused. > As indicated in pretty much the original RFC on the topic, IP IDs > need to be at minimum unique to a 2-tuple pair, so cannot be > unique only at the granularity of TCP or UDP connections, GRE > associations, etc. However, our current implementation keeps them > globally unique, which means they wrap much faster than > necessary. Shifting to unique IP ID spaces for IP 2-tuples would > provide for a much longer wrapping time at the cost of > maintaining (and looking up!) additional state. There are various > ways to improve things -- and not all require a full set of > per-IP-2-tuple IP ID counters, for example, you could have hash > buckets based on 2 tuples. It's harder to do this in a > multiprocessor-scalable way, however, as the uniqueness > requirements are global, and the IP ID space is very small -- a > more fundamental problem. In general, the world therefore tries > quite hard not to fragment, using TCP PMTU and careful MTU > selection for UDP (etc). Also, the world has become quite a lot > more homogeneous with respect to link-layer MTU over time -- > e.g., with convergence on Ethernet, although VPNs have made > things a bit less fun. The IP ID field should have been 64-bit, containing a copy of the 16-bit source and destination TCP/UDP ports and a 32-bit sequence number. Now that's not possible, but how about saying that each unique IP can have at maximum 16 different connections passing to another unique IP. And then reduce the sequence number to 8-bits. So: IP ID = ((src port) & 0xF) | (((dst port) & 0xF) << 4) | ((inp->inp_sequence++) << 8); Whenever we see TCP PMTU activated we can release some more combinations to a common pool somewhere. Will also work with IP encapsulations, where some bits of the sequence number gets replaced, if the IP ID is encoded the same ... You might call me a freshman in the IP stack area and I'm very surprised about all the issues I've come across in this area the last couple of months. I start understanding why DragonFly forked and why there is something called infiniband. Robert and Gleb: > multiprocessor-scalable Won't r280971 exactly do what you told me was not a good idea and are giving me some critisism for? Namely, result in one IP ID counter per TCP/UDP connection. If you have two applications that run on each their core. One cause updates to the IP-ID value X times per time unit and the other one Y times per time unit. If "(X ⻠Y)" is odd (50% chance), then at some point the IP-ID *will* resemble exactly to the same value in a predictable fashion, even if the amount of traffic is considered "low". And I think the chance increases with more cores, looking at this from the pure perspective of mathematics. Why is then r280971 fine, when it is doing the same like D2211, only D2211 does it in a predictable fashion while r280971 is unpredictable. A clear IP ID number sequence on a TCP stream maybe wouldn't even need an explanation. Even a 12-year-old would understand, a-ha, that TCP stream is incrementing that fast and that stream is incrementing that fast, and in the end there is a collision. When a collision happens we will have a retransmit, and then maybe we can then randomize the next IP ID value a bit to avoid repeated collisions. --HPS From owner-svn-src-all@FreeBSD.ORG Fri Apr 3 08:52:05 2015 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 E1FAE4A7; Fri, 3 Apr 2015 08:52:05 +0000 (UTC) Received: from cyrus.watson.org (cyrus.watson.org [198.74.231.69]) by mx1.freebsd.org (Postfix) with ESMTP id 9474195D; Fri, 3 Apr 2015 08:52:05 +0000 (UTC) Received: from [10.0.1.17] (host81-157-243-31.range81-157.btcentralplus.com [81.157.243.31]) by cyrus.watson.org (Postfix) with ESMTPSA id C3B0446BB1; Fri, 3 Apr 2015 04:52:03 -0400 (EDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: svn commit: r280971 - in head: contrib/ipfilter/tools share/man/man4 sys/contrib/ipfilter/netinet sys/netinet sys/netipsec sys/netpfil/pf From: "Robert N. M. Watson" In-Reply-To: <551E520E.1040708@selasky.org> Date: Fri, 3 Apr 2015 09:52:01 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <6DF5FB51-8135-4144-BD3A-6E4127A23AA7@FreeBSD.org> References: <201504012226.t31MQedN044443@svn.freebsd.org> <1427929676.82583.103.camel@freebsd.org> <20150402123522.GC64665@FreeBSD.org> <20150402133751.GA549@dft-labs.eu> <20150402134217.GG64665@FreeBSD.org> <20150402135157.GB549@dft-labs.eu> <1427983109.82583.115.camel@freebsd.org> <20150402142318.GC549@dft-labs.eu> <20150402143420.GI64665@FreeBSD.org> <20150402153805.GD549@dft-labs.eu> <551D8143.4060509@selasky.org> <551D8945.8050906@selasky.org> <8900318B-8155-4131-A0C3-3DE169782EFC@FreeBSD.org> <551D8C6C.9060504@selasky.org> <551DA5EA.1080908@selasky.org> <551DAC9E.9010303@selasky.org> <358EC58D-1F92-411E-ADEB-8072020E9EB3@FreeBSD.org> <551DEF26.4000403@selasky.org> <4B7DAA59-389F-41AE-99D8-034A7AA61C99@FreeBSD.org> <551E520E.1040708@selasky.org> To: Hans Petter Selasky X-Mailer: Apple Mail (2.2070.6) Cc: Mateusz Guzik , Ian Lepore , svn-src-all@freebsd.org, src-committers@freebsd.org, Gleb Smirnoff , svn-src-head@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 Apr 2015 08:52:06 -0000 On 3 Apr 2015, at 09:40, Hans Petter Selasky wrote: >> There are countless covert channels in TCP/IP; breaking the IP = implementation to close a covert channel is probably not a worthwhile = investment. >=20 > The IP ID channel is a _broadcast_ channel to all devices connected to = the same network stack, including all VPN connections and even = localhost. It is high speed and it cannot be blocked by firewall rules, = and works across large networks. The other covert channels can easily be = reduced by firewall rules. This one can't. >=20 > Now that Gleb put in a patch that the shared IP ID counter is not used = that frequently, only for specific traffic like ping packets, I believe = this is very likely to be abused. Research into covert channels has been going on for 30+ years, and the = conclusion of that research has been that it is almost impossible to = eliminate covert channels from designs intended for high-performance = data sharing. This is just one covert channel of countless channels, and = given that the stack would need to be fundamentally redesigned to = eliminate many of them, covert-channel elimination should not be a = primary design concern for this code. As such, we might eliminate it as = a side effect of another change, but I don't think it's a good = motivation to make changes. >> As indicated in pretty much the original RFC on the topic, IP IDs >> need to be at minimum unique to a 2-tuple pair, so cannot be >> unique only at the granularity of TCP or UDP connections, GRE >> associations, etc. However, our current implementation keeps them >> globally unique, which means they wrap much faster than >> necessary. Shifting to unique IP ID spaces for IP 2-tuples would >> provide for a much longer wrapping time at the cost of >> maintaining (and looking up!) additional state. There are various >> ways to improve things -- and not all require a full set of >> per-IP-2-tuple IP ID counters, for example, you could have hash >> buckets based on 2 tuples. It's harder to do this in a >> multiprocessor-scalable way, however, as the uniqueness >> requirements are global, and the IP ID space is very small -- a >> more fundamental problem. In general, the world therefore tries >> quite hard not to fragment, using TCP PMTU and careful MTU >> selection for UDP (etc). Also, the world has become quite a lot >> more homogeneous with respect to link-layer MTU over time -- >> e.g., with convergence on Ethernet, although VPNs have made >> things a bit less fun. >=20 > The IP ID field should have been 64-bit, containing a copy of the = 16-bit source and destination TCP/UDP ports and a 32-bit sequence = number. Now that's not possible, but how about saying that each unique = IP can have at maximum 16 different connections passing to another = unique IP. And then reduce the sequence number to 8-bits. So: >=20 > IP ID =3D ((src port) & 0xF) | (((dst port) & 0xF) << 4) | = ((inp->inp_sequence++) << 8); >=20 > Whenever we see TCP PMTU activated we can release some more = combinations to a common pool somewhere. Will also work with IP = encapsulations, where some bits of the sequence number gets replaced, if = the IP ID is encoded the same ... >=20 > You might call me a freshman in the IP stack area and I'm very = surprised about all the issues I've come across in this area the last = couple of months. I start understanding why DragonFly forked and why = there is something called infiniband. Before engaging further in this conversation, and trying to modify the = behaviour of the TCP/IP stack, you need to educate yourself about the = design and history of the protocols involved. Otherwise, you're going to = repeatedly suggest ideas that are fundamentally broken, and we're going = to waste our time shooting them down when you could just have done a bit = of background reading and learned the basics of the protocol design and = implementation. Robert >=20 > Robert and Gleb: >=20 > > multiprocessor-scalable >=20 > Won't r280971 exactly do what you told me was not a good idea and are = giving me some critisism for? Namely, result in one IP ID counter per = TCP/UDP connection. If you have two applications that run on each their = core. One cause updates to the IP-ID value X times per time unit and the = other one Y times per time unit. If "(X =E2=81=BB Y)" is odd (50% = chance), then at some point the IP-ID *will* resemble exactly to the = same value in a predictable fashion, even if the amount of traffic is = considered "low". And I think the chance increases with more cores, = looking at this from the pure perspective of mathematics. >=20 > Why is then r280971 fine, when it is doing the same like D2211, only = D2211 does it in a predictable fashion while r280971 is unpredictable. A = clear IP ID number sequence on a TCP stream maybe wouldn't even need an = explanation. Even a 12-year-old would understand, a-ha, that TCP stream = is incrementing that fast and that stream is incrementing that fast, and = in the end there is a collision. When a collision happens we will have a = retransmit, and then maybe we can then randomize the next IP ID value a = bit to avoid repeated collisions. >=20 > --HPS From owner-svn-src-all@FreeBSD.ORG Fri Apr 3 09:23:30 2015 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 93524BC4; Fri, 3 Apr 2015 09:23:30 +0000 (UTC) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 35BF2C5C; Fri, 3 Apr 2015 09:23:29 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 3EEE91FE022; Fri, 3 Apr 2015 11:23:26 +0200 (CEST) Message-ID: <551E5C38.7070203@selasky.org> Date: Fri, 03 Apr 2015 11:24:08 +0200 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: "Robert N. M. Watson" Subject: Re: svn commit: r280971 - in head: contrib/ipfilter/tools share/man/man4 sys/contrib/ipfilter/netinet sys/netinet sys/netipsec sys/netpfil/pf References: <201504012226.t31MQedN044443@svn.freebsd.org> <1427929676.82583.103.camel@freebsd.org> <20150402123522.GC64665@FreeBSD.org> <20150402133751.GA549@dft-labs.eu> <20150402134217.GG64665@FreeBSD.org> <20150402135157.GB549@dft-labs.eu> <1427983109.82583.115.camel@freebsd.org> <20150402142318.GC549@dft-labs.eu> <20150402143420.GI64665@FreeBSD.org> <20150402153805.GD549@dft-labs.eu> <551D8143.4060509@selasky.org> <551D8945.8050906@selasky.org> <8900318B-8155-4131-A0C3-3DE169782EFC@FreeBSD.org> <551D8C6C.9060504@selasky.org> <551DA5EA.1080908@selasky.org> <551DAC9E.9010303@selasky.org> <358EC58D-1F92-411E-ADEB-8072020E9EB3@FreeBSD.org> <551DEF26.4000403@selasky.org> <4B7DAA59-389F-41AE-99D8-034A7AA61C99@FreeBSD.org> <551E520E.1040708@selasky.org> <6DF5FB51-8135-4144-BD3A-6E4127A23AA7@FreeBSD.org> In-Reply-To: <6DF5FB51-8135-4144-BD3A-6E4127A23AA7@FreeBSD.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Mateusz Guzik , Ian Lepore , svn-src-all@freebsd.org, src-committers@freebsd.org, Gleb Smirnoff , svn-src-head@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 Apr 2015 09:23:30 -0000 On 04/03/15 10:52, Robert N. M. Watson wrote: > On 3 Apr 2015, at 09:40, Hans Petter Selasky wrote: > >>> There are countless covert channels in TCP/IP; breaking the IP implementation to close a covert channel is probably not a worthwhile investment. >> >> The IP ID channel is a _broadcast_ channel to all devices connected to the same network stack, including all VPN connections and even localhost. It is high speed and it cannot be blocked by firewall rules, and works across large networks. The other covert channels can easily be reduced by firewall rules. This one can't. >> >> Now that Gleb put in a patch that the shared IP ID counter is not used that frequently, only for specific traffic like ping packets, I believe this is very likely to be abused. > > Research into covert channels has been going on for 30+ years, and the conclusion of that research has been that it is almost impossible to eliminate covert channels from designs intended for high-performance data sharing. This is just one covert channel of countless channels, and given that the stack would need to be fundamentally redesigned to eliminate many of them, covert-channel elimination should not be a primary design concern for this code. As such, we might eliminate it as a side effect of another change, but I don't think it's a good motivation to make changes. > >>> As indicated in pretty much the original RFC on the topic, IP IDs >>> need to be at minimum unique to a 2-tuple pair, so cannot be >>> unique only at the granularity of TCP or UDP connections, GRE >>> associations, etc. However, our current implementation keeps them >>> globally unique, which means they wrap much faster than >>> necessary. Shifting to unique IP ID spaces for IP 2-tuples would >>> provide for a much longer wrapping time at the cost of >>> maintaining (and looking up!) additional state. There are various >>> ways to improve things -- and not all require a full set of >>> per-IP-2-tuple IP ID counters, for example, you could have hash >>> buckets based on 2 tuples. It's harder to do this in a >>> multiprocessor-scalable way, however, as the uniqueness >>> requirements are global, and the IP ID space is very small -- a >>> more fundamental problem. In general, the world therefore tries >>> quite hard not to fragment, using TCP PMTU and careful MTU >>> selection for UDP (etc). Also, the world has become quite a lot >>> more homogeneous with respect to link-layer MTU over time -- >>> e.g., with convergence on Ethernet, although VPNs have made >>> things a bit less fun. >> >> The IP ID field should have been 64-bit, containing a copy of the 16-bit source and destination TCP/UDP ports and a 32-bit sequence number. Now that's not possible, but how about saying that each unique IP can have at maximum 16 different connections passing to another unique IP. And then reduce the sequence number to 8-bits. So: >> >> IP ID = ((src port) & 0xF) | (((dst port) & 0xF) << 4) | ((inp->inp_sequence++) << 8); >> >> Whenever we see TCP PMTU activated we can release some more combinations to a common pool somewhere. Will also work with IP encapsulations, where some bits of the sequence number gets replaced, if the IP ID is encoded the same ... >> >> You might call me a freshman in the IP stack area and I'm very surprised about all the issues I've come across in this area the last couple of months. I start understanding why DragonFly forked and why there is something called infiniband. > > Before engaging further in this conversation, and trying to modify the behaviour of the TCP/IP stack, you need to educate yourself about the design and history of the protocols involved. Otherwise, you're going to repeatedly suggest ideas that are fundamentally broken, and we're going to waste our time shooting them down when you could just have done a bit of background reading and learned the basics of the protocol design and implementation. > > Robert > Hi, I went to wikipedia and looked up covert channel and found this: https://www.sans.org/security-resources/idfaq/covert_chan.php What's described there is entirely about Peer2Peer communication. What I'm describing is broadcast for the whole system or firewall. Don't you understand that the IP ID counter is _linearly_ adding up and feeding back the sum to the source. It is like a radio channel for the whole firewall. Do you know how analog modems work? I have other things to do this easter and I don't want to spend more time with this either. I think the people responsible in the IP-stack area should make a fix. The IP ID must be randomized much more than it is today. --HPS From owner-svn-src-all@FreeBSD.ORG Fri Apr 3 09:31:17 2015 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 122ADDF2; Fri, 3 Apr 2015 09:31:17 +0000 (UTC) Received: from cyrus.watson.org (cyrus.watson.org [198.74.231.69]) by mx1.freebsd.org (Postfix) with ESMTP id B6436D3C; Fri, 3 Apr 2015 09:31:16 +0000 (UTC) Received: from [10.0.1.17] (host81-157-243-31.range81-157.btcentralplus.com [81.157.243.31]) by cyrus.watson.org (Postfix) with ESMTPSA id 5FC4446B5C; Fri, 3 Apr 2015 05:31:15 -0400 (EDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: svn commit: r280971 - in head: contrib/ipfilter/tools share/man/man4 sys/contrib/ipfilter/netinet sys/netinet sys/netipsec sys/netpfil/pf From: "Robert N. M. Watson" In-Reply-To: <551E5C38.7070203@selasky.org> Date: Fri, 3 Apr 2015 10:31:13 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <78DD67BD-621C-451D-8E30-EC9BF396716F@FreeBSD.org> References: <201504012226.t31MQedN044443@svn.freebsd.org> <1427929676.82583.103.camel@freebsd.org> <20150402123522.GC64665@FreeBSD.org> <20150402133751.GA549@dft-labs.eu> <20150402134217.GG64665@FreeBSD.org> <20150402135157.GB549@dft-labs.eu> <1427983109.82583.115.camel@freebsd.org> <20150402142318.GC549@dft-labs.eu> <20150402143420.GI64665@FreeBSD.org> <20150402153805.GD549@dft-labs.eu> <551D8143.4060509@selasky.org> <551D8945.8050906@selasky.org> <8900318B-8155-4131-A0C3-3DE169782EFC@FreeBSD.org> <551D8C6C.9060504@selasky.org> <551DA5EA.1080908@selasky.org> <551DAC9E.9010303@selasky.org> <358EC58D-1F92-411E-ADEB-8072020E9EB3@FreeBSD.org> <551DEF26.4000403@selasky.org> <4B7DAA59-389F-41AE-99D8-034A7AA61C99@FreeBSD.org> <551E520E.1040708@selasky.org> <6DF5FB51-8135-4144-BD3A-6E4127A23AA7@FreeBSD.org> <551E5C38.7070203@selasky.org> To: Hans Petter Selasky X-Mailer: Apple Mail (2.2070.6) Cc: Mateusz Guzik , Ian Lepore , svn-src-all@freebsd.org, src-committers@freebsd.org, Gleb Smirnoff , svn-src-head@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 Apr 2015 09:31:17 -0000 On 3 Apr 2015, at 10:24, Hans Petter Selasky wrote: >> Before engaging further in this conversation, and trying to modify = the behaviour of the TCP/IP stack, you need to educate yourself about = the design and history of the protocols involved. Otherwise, you're = going to repeatedly suggest ideas that are fundamentally broken, and = we're going to waste our time shooting them down when you could just = have done a bit of background reading and learned the basics of the = protocol design and implementation. >=20 > I went to wikipedia and looked up covert channel and found this: = https://www.sans.org/security-resources/idfaq/covert_chan.php >=20 > What's described there is entirely about Peer2Peer communication. What = I'm describing is broadcast for the whole system or firewall. Don't you = understand that the IP ID counter is _linearly_ adding up and feeding = back the sum to the source. It is like a radio channel for the whole = firewall. Do you know how analog modems work? I have other things to do = this easter and I don't want to spend more time with this either. I = think the people responsible in the IP-stack area should make a fix. The = IP ID must be randomized much more than it is today. What I understand is that you are uninterested in doing the basic = background reading required to have a sensible conversation about this = code, and instead you are hacking away at the code and proposing changes = without understanding the requirements. Once you've read Stevens Volume = I and the appropriate sections of the FreeBSD D+I code, we can start = talking about requirements for the IP ID code. If you want to talk about = covert channels, then you need to move beyond Wikipedia as your primary = information source, as there is an extensive literature in TCP/IP covert = and side channels. Please stop proposing changes to protocols and code = that you simply don't understand (i.e., to use different IP ID values = for different fragments of the same datagram!), and do the basic = background reading. There are real problems to solve here, and I'm = certainly open to proposals to solve them -- but it can't be done = without an awareness of the framing concerns about protocol design, = network-stack interoperability, etc. This is not an area suitable for = casual dabbling: if you want to do work in this area, you will need to = spend weeks or months coming up to speed. Robert= From owner-svn-src-all@FreeBSD.ORG Fri Apr 3 09:35:54 2015 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 1A202FB7; Fri, 3 Apr 2015 09:35: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 04CF9D70; Fri, 3 Apr 2015 09:35: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 t339ZrMR048072; Fri, 3 Apr 2015 09:35:53 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t339ZrXP048070; Fri, 3 Apr 2015 09:35:53 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504030935.t339ZrXP048070@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 3 Apr 2015 09:35:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281014 - head/libexec/rtld-elf/aarch64 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 Apr 2015 09:35:54 -0000 Author: andrew Date: Fri Apr 3 09:35:52 2015 New Revision: 281014 URL: https://svnweb.freebsd.org/changeset/base/281014 Log: Add support for thread local storage on arm64 to the runtime linker. The ABI specifies that, for R_AARCH64_TLSDESC relocations, we use the symbol value, addend, and object tls offset to calculate the offset from the tls base. We then cache this value for future reference. Differential Revision: https://reviews.freebsd.org/D2183 Reviewed by: kib Sponsored by: The FreeBSD Foundation Modified: head/libexec/rtld-elf/aarch64/reloc.c head/libexec/rtld-elf/aarch64/rtld_start.S Modified: head/libexec/rtld-elf/aarch64/reloc.c ============================================================================== --- head/libexec/rtld-elf/aarch64/reloc.c Fri Apr 3 06:17:24 2015 (r281013) +++ head/libexec/rtld-elf/aarch64/reloc.c Fri Apr 3 09:35:52 2015 (r281014) @@ -50,6 +50,8 @@ __FBSDID("$FreeBSD$"); * a function pointer to a simple asm function. */ void *_rtld_tlsdesc(void *); +void *_rtld_tlsdesc_dynamic(void *); + void _exit(int); void @@ -120,6 +122,68 @@ do_copy_relocations(Obj_Entry *dstobj) return (0); } +struct tls_data { + int64_t index; + Obj_Entry *obj; + const Elf_Rela *rela; +}; + +static struct tls_data * +reloc_tlsdesc_alloc(Obj_Entry *obj, const Elf_Rela *rela) +{ + struct tls_data *tlsdesc; + + tlsdesc = xmalloc(sizeof(struct tls_data)); + tlsdesc->index = -1; + tlsdesc->obj = obj; + tlsdesc->rela = rela; + + return (tlsdesc); +} + +/* + * Look up the symbol to find its tls index + */ +static int64_t +rtld_tlsdesc_handle_locked(struct tls_data *tlsdesc, int flags, + RtldLockState *lockstate) +{ + const Elf_Rela *rela; + const Elf_Sym *def; + const Obj_Entry *defobj; + Obj_Entry *obj; + + rela = tlsdesc->rela; + obj = tlsdesc->obj; + + def = find_symdef(ELF_R_SYM(rela->r_info), obj, &defobj, flags, NULL, + lockstate); + if (def == NULL) + rtld_die(); + + tlsdesc->index = defobj->tlsindex + def->st_value + rela->r_addend; + + return (tlsdesc->index); +} + +int64_t +rtld_tlsdesc_handle(struct tls_data *tlsdesc, int flags) +{ + RtldLockState lockstate; + + /* We have already found the index, return it */ + if (tlsdesc->index >= 0) + return (tlsdesc->index); + + wlock_acquire(rtld_bind_lock, &lockstate); + /* tlsdesc->index may have been set by another thread */ + if (tlsdesc->index == -1) + rtld_tlsdesc_handle_locked(tlsdesc, flags, &lockstate); + lock_release(rtld_bind_lock, &lockstate); + + return (tlsdesc->index); +} + /* * Process the PLT relocations. */ @@ -142,11 +206,11 @@ reloc_plt(Obj_Entry *obj) case R_AARCH64_TLSDESC: if (ELF_R_SYM(rela->r_info) == 0) { where[0] = (Elf_Addr)_rtld_tlsdesc; - where[1] = rela->r_addend; + where[1] = obj->tlsindex + rela->r_addend; } else { - _rtld_error("Unable to handle " - "R_AARCH64_TLSDESC with a symbol set"); - return (-1); + where[0] = (Elf_Addr)_rtld_tlsdesc_dynamic; + where[1] = (Elf_Addr)reloc_tlsdesc_alloc(obj, + rela); } break; default: @@ -169,14 +233,15 @@ reloc_jmpslots(Obj_Entry *obj, int flags const Elf_Rela *relalim; const Elf_Rela *rela; const Elf_Sym *def; + struct tls_data *tlsdesc; relalim = (const Elf_Rela *)((char *)obj->pltrela + obj->pltrelasize); for (rela = obj->pltrela; rela < relalim; rela++) { Elf_Addr *where; + where = (Elf_Addr *)(obj->relocbase + rela->r_offset); switch(ELF_R_TYPE(rela->r_info)) { case R_AARCH64_JUMP_SLOT: - where = (Elf_Addr *)(obj->relocbase + rela->r_offset); def = find_symdef(ELF_R_SYM(rela->r_info), obj, &defobj, SYMLOOK_IN_PLT | flags, NULL, lockstate); if (def == NULL) { @@ -187,6 +252,12 @@ reloc_jmpslots(Obj_Entry *obj, int flags *where = (Elf_Addr)(defobj->relocbase + def->st_value); break; case R_AARCH64_TLSDESC: + if (ELF_R_SYM(rela->r_info) != 0) { + tlsdesc = (struct tls_data *)where[1]; + if (tlsdesc->index == -1) + rtld_tlsdesc_handle_locked(tlsdesc, + SYMLOOK_IN_PLT | flags, lockstate); + } break; default: _rtld_error("Unknown relocation type %x in jmpslot", @@ -285,6 +356,32 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry return (-1); } break; + case R_AARCH64_TLS_TPREL64: + def = find_symdef(symnum, obj, &defobj, flags, cache, + lockstate); + if (def == NULL) + return (-1); + + /* + * We lazily allocate offsets for static TLS as we + * see the first relocation that references the + * TLS block. This allows us to support (small + * amounts of) static TLS in dynamically loaded + * modules. If we run out of space, we generate an + * error. + */ + if (!defobj->tls_done) { + if (!allocate_tls_offset((Obj_Entry*) defobj)) { + _rtld_error( + "%s: No space available for static " + "Thread Local Storage", obj->path); + return (-1); + } + } + + *where = def->st_value + rela->r_addend + + defobj->tlsoffset - TLS_TCB_SIZE; + break; case R_AARCH64_RELATIVE: *where = (Elf_Addr)(obj->relocbase + rela->r_addend); break; Modified: head/libexec/rtld-elf/aarch64/rtld_start.S ============================================================================== --- head/libexec/rtld-elf/aarch64/rtld_start.S Fri Apr 3 06:17:24 2015 (r281013) +++ head/libexec/rtld-elf/aarch64/rtld_start.S Fri Apr 3 09:35:52 2015 (r281014) @@ -109,5 +109,44 @@ END(_rtld_bind_start) */ ENTRY(_rtld_tlsdesc) ldr x0, [x0, #8] - RET + ret END(_rtld_tlsdesc) + +/* + * uint64_t _rtld_tlsdesc_dynamic(struct tlsdesc *); + * + * TODO: We could lookup the saved index here to skip saving the entire stack. + */ +ENTRY(_rtld_tlsdesc_dynamic) + /* Store any registers we may use in rtld_tlsdesc_handle */ + stp x29, x30, [sp, #-(10 * 16)]! + mov x29, sp + stp x1, x2, [sp, #(1 * 16)] + stp x3, x4, [sp, #(2 * 16)] + stp x5, x6, [sp, #(3 * 16)] + stp x7, x8, [sp, #(4 * 16)] + stp x9, x10, [sp, #(5 * 16)] + stp x11, x12, [sp, #(6 * 16)] + stp x13, x14, [sp, #(7 * 16)] + stp x15, x16, [sp, #(8 * 16)] + stp x17, x18, [sp, #(9 * 16)] + + /* Find the tls offset */ + ldr x0, [x0, #8] + mov x1, #1 + bl rtld_tlsdesc_handle + + /* Restore the registers */ + ldp x17, x18, [sp, #(9 * 16)] + ldp x15, x16, [sp, #(8 * 16)] + ldp x13, x14, [sp, #(7 * 16)] + ldp x11, x12, [sp, #(6 * 16)] + ldp x9, x10, [sp, #(5 * 16)] + ldp x7, x8, [sp, #(4 * 16)] + ldp x5, x6, [sp, #(3 * 16)] + ldp x3, x4, [sp, #(2 * 16)] + ldp x1, x2, [sp, #(1 * 16)] + ldp x29, x30, [sp], #(10 * 16) + + ret +END(_rtld_tlsdesc_dynamic) From owner-svn-src-all@FreeBSD.ORG Fri Apr 3 10:17:38 2015 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 0B5286CE; Fri, 3 Apr 2015 10:17: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 D10ED1DF; Fri, 3 Apr 2015 10:17: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 t33AHbVW066830; Fri, 3 Apr 2015 10:17:37 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t33AHbGU066829; Fri, 3 Apr 2015 10:17:37 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201504031017.t33AHbGU066829@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Fri, 3 Apr 2015 10:17:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281015 - head/contrib/ntp/ntpd 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 Apr 2015 10:17:38 -0000 Author: cy Date: Fri Apr 3 10:17:36 2015 New Revision: 281015 URL: https://svnweb.freebsd.org/changeset/base/281015 Log: Remove rednandt file. Submitted by: jkim Deleted: head/contrib/ntp/ntpd/ntp_parser.y From owner-svn-src-all@FreeBSD.ORG Fri Apr 3 10:21:00 2015 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 B8D2B896; Fri, 3 Apr 2015 10:21: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 8AE09209; Fri, 3 Apr 2015 10:21: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 t33AL0iw069768; Fri, 3 Apr 2015 10:21:00 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t33AL00o069766; Fri, 3 Apr 2015 10:21:00 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201504031021.t33AL00o069766@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Fri, 3 Apr 2015 10:21:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281016 - head/contrib/ntp/ntpd 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 Apr 2015 10:21:00 -0000 Author: cy Date: Fri Apr 3 10:20:59 2015 New Revision: 281016 URL: https://svnweb.freebsd.org/changeset/base/281016 Log: Fix merge error. Submitted by: jkim Modified: head/contrib/ntp/ntpd/ntp_crypto.c Modified: head/contrib/ntp/ntpd/ntp_crypto.c ============================================================================== --- head/contrib/ntp/ntpd/ntp_crypto.c Fri Apr 3 10:17:36 2015 (r281015) +++ head/contrib/ntp/ntpd/ntp_crypto.c Fri Apr 3 10:20:59 2015 (r281016) @@ -826,10 +826,10 @@ crypto_recv( * Decrypt the cookie, hunting all the time for * errors. */ - if (vallen == (u_int) EVP_PKEY_size(host_pkey)) { + if (vallen == (u_int)EVP_PKEY_size(host_pkey)) { u_int32 *cookiebuf = malloc( RSA_size(host_pkey->pkey.rsa)); - if (cookiebuf == NULL) { + if (!cookiebuf) { rval = XEVNT_CKY; break; } @@ -3817,7 +3817,7 @@ crypto_setup(void) randfile); exit (-1); } - get_systime(&seed); + arc4random_buf(&seed, sizeof(l_fp)); RAND_seed(&seed, sizeof(l_fp)); RAND_write_file(randfile); #ifdef DEBUG @@ -3850,36 +3850,6 @@ crypto_setup(void) pinfo = crypto_key(filename, passwd, NULL); if (pinfo == NULL) { msyslog(LOG_ERR, - "crypto_setup: random seed file not specified"); - exit (-1); - } - if ((bytes = RAND_load_file(rand_file, -1)) == 0) { - msyslog(LOG_ERR, - "crypto_setup: random seed file %s not found\n", - rand_file); - exit (-1); - } - arc4random_buf(&seed, sizeof(l_fp)); - RAND_seed(&seed, sizeof(l_fp)); - RAND_write_file(rand_file); - OpenSSL_add_all_algorithms(); -#ifdef DEBUG - if (debug) - printf( - "crypto_setup: OpenSSL version %lx random seed file %s bytes read %d\n", - SSLeay(), rand_file, bytes); -#endif - - /* - * Load required host key from file "ntpkey_host_". If - * no host key file is not found or has invalid password, life - * as we know it ends. The host key also becomes the default - * sign key. - */ - snprintf(filename, sizeof(filename), "ntpkey_host_%s", hostname); - pinfo = crypto_key(filename, passwd, NULL); - if (pinfo == NULL) { - msyslog(LOG_ERR, "crypto_setup: host key file %s not found or corrupt", filename); exit (-1); From owner-svn-src-all@FreeBSD.ORG Fri Apr 3 10:41:20 2015 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 DCAD3D0C; Fri, 3 Apr 2015 10:41:20 +0000 (UTC) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8B0E968F; Fri, 3 Apr 2015 10:41:19 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id D20C71FE022; Fri, 3 Apr 2015 12:41:11 +0200 (CEST) Message-ID: <551E6E72.8050208@selasky.org> Date: Fri, 03 Apr 2015 12:41:54 +0200 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: "Robert N. M. Watson" Subject: Re: svn commit: r280971 - in head: contrib/ipfilter/tools share/man/man4 sys/contrib/ipfilter/netinet sys/netinet sys/netipsec sys/netpfil/pf References: <201504012226.t31MQedN044443@svn.freebsd.org> <20150402123522.GC64665@FreeBSD.org> <20150402133751.GA549@dft-labs.eu> <20150402134217.GG64665@FreeBSD.org> <20150402135157.GB549@dft-labs.eu> <1427983109.82583.115.camel@freebsd.org> <20150402142318.GC549@dft-labs.eu> <20150402143420.GI64665@FreeBSD.org> <20150402153805.GD549@dft-labs.eu> <551D8143.4060509@selasky.org> <551D8945.8050906@selasky.org> <8900318B-8155-4131-A0C3-3DE169782EFC@FreeBSD.org> <551D8C6C.9060504@selasky.org> <551DA5EA.1080908@selasky.org> <551DAC9E.9010303@selasky.org> <358EC58D-1F92-411E-ADEB-8072020E9EB3@FreeBSD.org> <551DEF26.4000403@selasky.org> <4B7DAA59-389F-41AE-99D8-034A7AA61C99@FreeBSD.org> <551E520E.1040708@selasky.org> <6DF5FB51-8135-4144-BD3A-6E4127A23AA7@FreeBSD.org> <551E5C38.7070203@selasky.org> <78DD67BD-621C-451D-8E30-EC9BF396716F@FreeBSD.org> In-Reply-To: <78DD67BD-621C-451D-8E30-EC9BF396716F@FreeBSD.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: Mateusz Guzik , Ian Lepore , svn-src-all@freebsd.org, src-committers@freebsd.org, Gleb Smirnoff , svn-src-head@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 Apr 2015 10:41:21 -0000 On 04/03/15 11:31, Robert N. M. Watson wrote: > TCP/IP covert and side channels Hi, Can you provide a reference to a document in the area of "TCP/IP covert and side channels" which is considered state of the art? Or is this litterature not publically available? According to: [PS]Covert Messaging Through TCP Timestamps - MIT web.mit.edu/greenie/Public/CovertMessaginginTCP.ps However, covert channels are seldom used due to their complexity Further it gives an example about having to send 3 megabytes to transfer a single bit. What I'm pointing at is that sending a handful of ping packets for example (hundreds of bytes), in a very short time, is enough to broadcast a bit through an entire firewall or router, if all the network interfaces get the IP ID from the same linearly incremented source, which is the case in FreeBSD: > https://svnweb.freebsd.org/base/stable/10/sys/netinet/ip_var.h?annotate=263307#l307 "ip_do_randomid" is zero by default, and is not documented anywhere: grep -r ip_do_randomid share/ > #define ip_newid() ((V_ip_do_randomid != 0) ? ip_randomid() : \ > htons(V_ip_id++)) What is the best efficiency ratio of the "TCP/IP covert and side channels" you know about? Are you absolutely sure you are talking about the same I'm referring to? --HPS From owner-svn-src-all@FreeBSD.ORG Fri Apr 3 10:56:43 2015 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 35BF61F2; Fri, 3 Apr 2015 10:56: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 20C88816; Fri, 3 Apr 2015 10:56: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 t33Aug7Q085733; Fri, 3 Apr 2015 10:56:42 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t33AugHN085732; Fri, 3 Apr 2015 10:56:42 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504031056.t33AugHN085732@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 3 Apr 2015 10:56:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281017 - head/sys/arm64/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: Fri, 03 Apr 2015 10:56:43 -0000 Author: andrew Date: Fri Apr 3 10:56:42 2015 New Revision: 281017 URL: https://svnweb.freebsd.org/changeset/base/281017 Log: Add space for future expansion [1]. While here clean up a little, spsr is only 32-bits, and mark the holes in the struct with a pad member. Suggested by: kib [1] Sponsored by: The FreeBSD Foundation Modified: head/sys/arm64/include/ucontext.h Modified: head/sys/arm64/include/ucontext.h ============================================================================== --- head/sys/arm64/include/ucontext.h Fri Apr 3 10:20:59 2015 (r281016) +++ head/sys/arm64/include/ucontext.h Fri Apr 3 10:56:42 2015 (r281017) @@ -38,7 +38,8 @@ struct gpregs { unsigned long long gp_lr; unsigned long long gp_sp; unsigned long long gp_elr; - unsigned long long gp_spsr; + uint32_t gp_spsr; + u_int gp_pad; }; struct fpregs { @@ -46,13 +47,16 @@ struct fpregs { uint32_t fp_sr; uint32_t fp_cr; u_int fp_flags; + u_int fp_pad; }; struct __mcontext { struct gpregs mc_gpregs; struct fpregs mc_fpregs; u_int mc_flags; -#define _MC_FP_VALID 0x1 /* Set when mc_fpregs has valid data */ +#define _MC_FP_VALID 0x1 /* Set when mc_fpregs has valid data */ + u_int mc_pad; /* Padding */ + uint64_t mc_spare[8]; /* Space for expansion, set to zero */ }; typedef struct __mcontext mcontext_t; From owner-svn-src-all@FreeBSD.ORG Fri Apr 3 10:58:41 2015 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 4984538C; Fri, 3 Apr 2015 10:58:41 +0000 (UTC) Received: from cyrus.watson.org (cyrus.watson.org [198.74.231.69]) by mx1.freebsd.org (Postfix) with ESMTP id 107D8835; Fri, 3 Apr 2015 10:58:41 +0000 (UTC) Received: from [10.0.1.17] (host81-157-243-31.range81-157.btcentralplus.com [81.157.243.31]) by cyrus.watson.org (Postfix) with ESMTPSA id 6550C46B46; Fri, 3 Apr 2015 06:58:39 -0400 (EDT) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: svn commit: r280971 - in head: contrib/ipfilter/tools share/man/man4 sys/contrib/ipfilter/netinet sys/netinet sys/netipsec sys/netpfil/pf From: "Robert N. M. Watson" In-Reply-To: <551E6E72.8050208@selasky.org> Date: Fri, 3 Apr 2015 11:58:37 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201504012226.t31MQedN044443@svn.freebsd.org> <20150402123522.GC64665@FreeBSD.org> <20150402133751.GA549@dft-labs.eu> <20150402134217.GG64665@FreeBSD.org> <20150402135157.GB549@dft-labs.eu> <1427983109.82583.115.camel@freebsd.org> <20150402142318.GC549@dft-labs.eu> <20150402143420.GI64665@FreeBSD.org> <20150402153805.GD549@dft-labs.eu> <551D8143.4060509@selasky.org> <551D8945.8050906@selasky.org> <8900318B-8155-4131-A0C3-3DE169782EFC@FreeBSD.org> <551D8C6C.9060504@selasky.org> <551DA5EA.1080908@selasky.org> <551DAC9E.9010303@selasky.org> <358EC58D-1F92-411E-ADEB-8072020E9EB3@FreeBSD.org> <551DEF26.4000403@selasky.org> <4B7DAA59-389F-41AE-99D8-034A7AA61C99@FreeBSD.org> <551E520E.1040708@selasky.org> <6DF5FB51-8135-4144-BD3A-6E4127A23AA7@FreeBSD.org> <551E5C38.7070203@selasky.org> <78DD67BD-621C-451D-8E30-EC9BF396716F@FreeBSD.org> <551E6E72.8050208@selasky .org> To: Hans Petter Selasky X-Mailer: Apple Mail (2.2070.6) Cc: Mateusz Guzik , Ian Lepore , svn-src-all@freebsd.org, src-committers@freebsd.org, Gleb Smirnoff , svn-src-head@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 Apr 2015 10:58:41 -0000 On 3 Apr 2015, at 11:41, Hans Petter Selasky wrote: > On 04/03/15 11:31, Robert N. M. Watson wrote: >> TCP/IP covert and side channels >=20 > Hi, >=20 > Can you provide a reference to a document in the area of "TCP/IP = covert and side channels" which is considered state of the art? Or is = this litterature not publically available? I'm not sure there's a recent survey article on the topic, but a keyword = search of the ACM Digital Library returns 493 articles for "TCP covert = channel". The second is this article by my colleague Steven Murdoch: http://www.cl.cam.ac.uk/~sjm217/papers/ih05coverttcp.pdf It contains a nice introduction to the concepts and 2005 framing, but = there has been significant work in this area since that was published. Note that the goal of a stronger IP ID scheme is *not* randomness per = se: it is a blend of non-predictability with maximising the interval of = non-reuse of IP IDs. Simple use of a random number generator = accomplishes the former adequately -- but the latter not at all, as it = makes no guarantees about reuse interval -- and in fact can experience = pessimal reuse intervals in normal operation. Mike Silbersack did quite = a bit of work in this area in FreeBSD about a decade ago and is the = person you want to talk to to understand the IP ID issue better. However, the more fundamental issue, regardless of covert and side = channels, is that we share the IP ID space across many 2-tuples. = Addressing that issue would markedly improve the robustness of large UDP = datagram support -- while as a side effect reducing covert and side = channels far more effectively than randomisation. Robert= From owner-svn-src-all@FreeBSD.ORG Fri Apr 3 11:13:01 2015 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 B0380720; Fri, 3 Apr 2015 11:13: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 9AEF89CF; Fri, 3 Apr 2015 11:13: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 t33BD1PL094664; Fri, 3 Apr 2015 11:13:01 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t33BD0k6094659; Fri, 3 Apr 2015 11:13:00 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504031113.t33BD0k6094659@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 3 Apr 2015 11:13:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281018 - head/sys/arm/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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 Apr 2015 11:13:01 -0000 Author: andrew Date: Fri Apr 3 11:12:59 2015 New Revision: 281018 URL: https://svnweb.freebsd.org/changeset/base/281018 Log: Merge the common parts of the SOCKIT and SOCKIT-BERI kerenel, and mark the former as NO_UNIVERSE. Added: head/sys/arm/conf/SOCKIT.common - copied, changed from r280570, head/sys/arm/conf/SOCKIT Modified: head/sys/arm/conf/SOCKIT head/sys/arm/conf/SOCKIT-BERI Modified: head/sys/arm/conf/SOCKIT ============================================================================== --- head/sys/arm/conf/SOCKIT Fri Apr 3 10:56:42 2015 (r281017) +++ head/sys/arm/conf/SOCKIT Fri Apr 3 11:12:59 2015 (r281018) @@ -18,124 +18,13 @@ # # $FreeBSD$ -ident SOCKIT -include "../altera/socfpga/std.socfpga" - -makeoptions MODULES_OVERRIDE="" - -makeoptions WERROR="-Werror" - -options HZ=100 -options SCHED_ULE # ULE scheduler -options PREEMPTION # Enable kernel thread preemption -options INET # InterNETworking -options INET6 # IPv6 communications protocols -options SCTP # Stream Control Transmission Protocol -options FFS # Berkeley Fast Filesystem -options SOFTUPDATES # Enable FFS soft updates support -options UFS_ACL # Support for access control lists -options UFS_DIRHASH # Improve performance on big directories -options UFS_GJOURNAL # Enable gjournal-based UFS journaling -options QUOTA # Enable disk quotas for UFS -options NFSCL # Network Filesystem Client -options NFSLOCKD # Network Lock Manager -options NFS_ROOT # NFS usable as /, requires NFSCL -options MSDOSFS # MSDOS Filesystem -options CD9660 # ISO 9660 Filesystem -options PROCFS # Process filesystem (requires PSEUDOFS) -options PSEUDOFS # Pseudo-filesystem framework -options TMPFS # Efficient memory filesystem -options GEOM_PART_GPT # GUID Partition Tables -options GEOM_PART_BSD # BSD partition scheme -options GEOM_PART_MBR # MBR partition scheme -options COMPAT_43 # Compatible with BSD 4.3 [KEEP THIS!] -options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI -options KTRACE # ktrace(1) support -options SYSVSHM # SYSV-style shared memory -options SYSVMSG # SYSV-style message queues -options SYSVSEM # SYSV-style semaphores -options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions -options KBD_INSTALL_CDEV # install a CDEV entry in /dev -options FREEBSD_BOOT_LOADER # Process metadata passed from loader(8) -options VFP # Enable floating point hardware support -options SMP # Enable multiple cores +#NO_UNIVERSE -# Debugging for use in -current -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -options BREAK_TO_DEBUGGER -#options VERBOSE_SYSINIT # Enable verbose sysinit messages -options KDB # Enable kernel debugger support -# For minimum debugger support (stable branch) use: -#options KDB_TRACE # Print a stack trace for a panic -# For full debugger support use this instead: -options DDB # Enable the kernel debugger -options INVARIANTS # Enable calls of extra sanity checking -options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -#options WITNESS # Enable checks to detect deadlocks and cycles -#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed -#options DIAGNOSTIC - -# NFS root from boopt/dhcp -#options BOOTP -#options BOOTP_NFSROOT -#options BOOTP_COMPAT -#options BOOTP_NFSV3 -#options BOOTP_WIRED_TO=ue0 +ident SOCKIT +include "SOCKIT.common" options ROOTDEVNAME=\"ufs:/dev/da0\" -# MMC/SD/SDIO Card slot support -device mmc # mmc/sd bus -device mmcsd # mmc/sd flash cards -device dwmmc - -# Pseudo devices - -device loop -device random -device pty -device md -device gpio - -# USB support -options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. -device usb -options USB_DEBUG -#options USB_REQ_DEBUG -#options USB_VERBOSE -#device musb -device dwcotg - -device umass -device scbus # SCSI bus (required for ATA/SCSI) -device da # Direct Access (disks) -device pass - -# Serial ports -device uart -device uart_ns8250 - -# I2C (TWSI) -device iic -device iicbus - -# SPI -device spibus - -# Ethernet -device ether -device mii -device smsc -device smscphy -device dwc -device micphy - -# USB ethernet support, requires miibus -device miibus -device axe # ASIX Electronics USB Ethernet -device bpf # Berkeley packet filter - # Flattened Device Tree -options FDT # Configure using FDT/DTB data options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=socfpga-sockit.dts Modified: head/sys/arm/conf/SOCKIT-BERI ============================================================================== --- head/sys/arm/conf/SOCKIT-BERI Fri Apr 3 10:56:42 2015 (r281017) +++ head/sys/arm/conf/SOCKIT-BERI Fri Apr 3 11:12:59 2015 (r281018) @@ -19,109 +19,10 @@ # $FreeBSD$ ident SOCKIT-BERI -include "../altera/socfpga/std.socfpga" - -makeoptions MODULES_OVERRIDE="" - -makeoptions WERROR="-Werror" - -options HZ=100 -options SCHED_ULE # ULE scheduler -options PREEMPTION # Enable kernel thread preemption -options INET # InterNETworking -options INET6 # IPv6 communications protocols -options SCTP # Stream Control Transmission Protocol -options FFS # Berkeley Fast Filesystem -options SOFTUPDATES # Enable FFS soft updates support -options UFS_ACL # Support for access control lists -options UFS_DIRHASH # Improve performance on big directories -options UFS_GJOURNAL # Enable gjournal-based UFS journaling -options QUOTA # Enable disk quotas for UFS -options NFSCL # Network Filesystem Client -options NFSLOCKD # Network Lock Manager -options NFS_ROOT # NFS usable as /, requires NFSCL -options MSDOSFS # MSDOS Filesystem -options CD9660 # ISO 9660 Filesystem -options PROCFS # Process filesystem (requires PSEUDOFS) -options PSEUDOFS # Pseudo-filesystem framework -options TMPFS # Efficient memory filesystem -options GEOM_PART_GPT # GUID Partition Tables -options GEOM_PART_BSD # BSD partition scheme -options GEOM_PART_MBR # MBR partition scheme -options COMPAT_43 # Compatible with BSD 4.3 [KEEP THIS!] -options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI -options KTRACE # ktrace(1) support -options SYSVSHM # SYSV-style shared memory -options SYSVMSG # SYSV-style message queues -options SYSVSEM # SYSV-style semaphores -options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions -options KBD_INSTALL_CDEV # install a CDEV entry in /dev -options FREEBSD_BOOT_LOADER # Process metadata passed from loader(8) -options VFP # Enable floating point hardware support -options SMP # Enable multiple cores - -# Debugging for use in -current -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -options BREAK_TO_DEBUGGER -#options VERBOSE_SYSINIT # Enable verbose sysinit messages -options KDB # Enable kernel debugger support -# For minimum debugger support (stable branch) use: -#options KDB_TRACE # Print a stack trace for a panic -# For full debugger support use this instead: -options DDB # Enable the kernel debugger -options INVARIANTS # Enable calls of extra sanity checking -options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -#options WITNESS # Enable checks to detect deadlocks and cycles -#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed -#options DIAGNOSTIC - -# NFS root from boopt/dhcp -#options BOOTP -#options BOOTP_NFSROOT -#options BOOTP_COMPAT -#options BOOTP_NFSV3 -#options BOOTP_WIRED_TO=ue0 +include "SOCKIT.common" options ROOTDEVNAME=\"ufs:/dev/mmcsd0s4\" -# MMC/SD/SDIO Card slot support -device mmc # mmc/sd bus -device mmcsd # mmc/sd flash cards -device dwmmc - -# Pseudo devices - -device loop -device random -device pty -device md -device gpio - -# USB support -options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. -device usb -options USB_DEBUG -#options USB_REQ_DEBUG -#options USB_VERBOSE -#device musb -device dwcotg - -device umass -device scbus # SCSI bus (required for ATA/SCSI) -device da # Direct Access (disks) -device pass - -# Serial ports -device uart -device uart_ns8250 - -# I2C (TWSI) -device iic -device iicbus - -# SPI -device spibus - # BERI specific device beri_ring device beri_mem @@ -129,20 +30,6 @@ device beri_vtblk device vtbe device altera_pio -# Ethernet -device ether -device mii -device smsc -device smscphy -device dwc -device micphy - -# USB ethernet support, requires miibus -device miibus -device axe # ASIX Electronics USB Ethernet -device bpf # Berkeley packet filter - # Flattened Device Tree -options FDT # Configure using FDT/DTB data options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=socfpga-sockit-beri.dts Copied and modified: head/sys/arm/conf/SOCKIT.common (from r280570, head/sys/arm/conf/SOCKIT) ============================================================================== --- head/sys/arm/conf/SOCKIT Wed Mar 25 11:14:17 2015 (r280570, copy source) +++ head/sys/arm/conf/SOCKIT.common Fri Apr 3 11:12:59 2015 (r281018) @@ -18,7 +18,6 @@ # # $FreeBSD$ -ident SOCKIT include "../altera/socfpga/std.socfpga" makeoptions MODULES_OVERRIDE="" @@ -82,8 +81,6 @@ options INVARIANT_SUPPORT # Extra sanit #options BOOTP_NFSV3 #options BOOTP_WIRED_TO=ue0 -options ROOTDEVNAME=\"ufs:/dev/da0\" - # MMC/SD/SDIO Card slot support device mmc # mmc/sd bus device mmcsd # mmc/sd flash cards @@ -137,5 +134,3 @@ device bpf # Berkeley packet filter # Flattened Device Tree options FDT # Configure using FDT/DTB data -options FDT_DTB_STATIC -makeoptions FDT_DTS_FILE=socfpga-sockit.dts From owner-svn-src-all@FreeBSD.ORG Fri Apr 3 11:27:33 2015 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 D894CB96; Fri, 3 Apr 2015 11:27:33 +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 58F7AB70; Fri, 3 Apr 2015 11:27:32 +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 t33BRUcV072507 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 3 Apr 2015 14:27:30 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t33BRU9o072506; Fri, 3 Apr 2015 14:27:30 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 3 Apr 2015 14:27:30 +0300 From: Gleb Smirnoff To: Hans Petter Selasky Subject: Re: svn commit: r280971 - in head: contrib/ipfilter/tools share/man/man4 sys/contrib/ipfilter/netinet sys/netinet sys/netipsec sys/netpfil/pf Message-ID: <20150403112730.GP64665@FreeBSD.org> References: <551D8C6C.9060504@selasky.org> <551DA5EA.1080908@selasky.org> <551DAC9E.9010303@selasky.org> <358EC58D-1F92-411E-ADEB-8072020E9EB3@FreeBSD.org> <551DEF26.4000403@selasky.org> <4B7DAA59-389F-41AE-99D8-034A7AA61C99@FreeBSD.org> <551E520E.1040708@selasky.org> <6DF5FB51-8135-4144-BD3A-6E4127A23AA7@FreeBSD.org> <551E5C38.7070203@selasky.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <551E5C38.7070203@selasky.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: Mateusz Guzik , Ian Lepore , svn-src-all@freebsd.org, src-committers@freebsd.org, "Robert N. M. Watson" , svn-src-head@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 Apr 2015 11:27:34 -0000 On Fri, Apr 03, 2015 at 11:24:08AM +0200, Hans Petter Selasky wrote: H> What's described there is entirely about Peer2Peer communication. What H> I'm describing is broadcast for the whole system or firewall. Don't you H> understand that the IP ID counter is _linearly_ adding up and feeding H> back the sum to the source. It is like a radio channel for the whole H> firewall. Do you know how analog modems work? I have other things to do H> this easter and I don't want to spend more time with this either. I H> think the people responsible in the IP-stack area should make a fix. The H> IP ID must be randomized much more than it is today. Please put net.inet.ip.random_id=1 into your /etc/sysctl.conf, don't worry and be happy. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Fri Apr 3 11:29:30 2015 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 40BE4CED; Fri, 3 Apr 2015 11:29: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 B3874B7F; Fri, 3 Apr 2015 11:29:29 +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 t33BTR6S072535 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 3 Apr 2015 14:29:27 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t33BTRQo072534; Fri, 3 Apr 2015 14:29:27 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 3 Apr 2015 14:29:27 +0300 From: Gleb Smirnoff To: Hans Petter Selasky Subject: Re: svn commit: r280971 - in head: contrib/ipfilter/tools share/man/man4 sys/contrib/ipfilter/netinet sys/netinet sys/netipsec sys/netpfil/pf Message-ID: <20150403112927.GQ64665@FreeBSD.org> References: <551DA5EA.1080908@selasky.org> <551DAC9E.9010303@selasky.org> <358EC58D-1F92-411E-ADEB-8072020E9EB3@FreeBSD.org> <551DEF26.4000403@selasky.org> <4B7DAA59-389F-41AE-99D8-034A7AA61C99@FreeBSD.org> <551E520E.1040708@selasky.org> <6DF5FB51-8135-4144-BD3A-6E4127A23AA7@FreeBSD.org> <551E5C38.7070203@selasky.org> <78DD67BD-621C-451D-8E30-EC9BF396716F@FreeBSD.org> <551E6E72.8050208@selasky.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <551E6E72.8050208@selasky.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: Mateusz Guzik , Ian Lepore , svn-src-all@freebsd.org, src-committers@freebsd.org, "Robert N. M. Watson" , svn-src-head@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 Apr 2015 11:29:30 -0000 On Fri, Apr 03, 2015 at 12:41:54PM +0200, Hans Petter Selasky wrote: H> "ip_do_randomid" is zero by default, and is not documented anywhere: H> H> grep -r ip_do_randomid share/ It is documented in inet(4). The actual sysctl knob doesn't match the kernel symbol name, which is allowed in sysctl(9). -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Fri Apr 3 11:37:24 2015 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 3E7F0FA4; Fri, 3 Apr 2015 11:37: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 29DC1C53; Fri, 3 Apr 2015 11:37: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 t33BbOOO007347; Fri, 3 Apr 2015 11:37:24 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t33BbOFY007346; Fri, 3 Apr 2015 11:37:24 GMT (envelope-from br@FreeBSD.org) Message-Id: <201504031137.t33BbOFY007346@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Fri, 3 Apr 2015 11:37:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281019 - head/sys/dev/dwc 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 Apr 2015 11:37:24 -0000 Author: br Date: Fri Apr 3 11:37:23 2015 New Revision: 281019 URL: https://svnweb.freebsd.org/changeset/base/281019 Log: o Remove superfluous includes o Avoid NULL pointer access o Fix 'set but not used' warning Submitted by: Sebastian Huber Modified: head/sys/dev/dwc/if_dwc.c Modified: head/sys/dev/dwc/if_dwc.c ============================================================================== --- head/sys/dev/dwc/if_dwc.c Fri Apr 3 11:12:59 2015 (r281018) +++ head/sys/dev/dwc/if_dwc.c Fri Apr 3 11:37:23 2015 (r281019) @@ -46,8 +46,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include -#include #include #include #include @@ -72,8 +70,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include #include #include @@ -550,7 +546,8 @@ dwc_alloc_mbufcl(struct dwc_softc *sc) struct mbuf *m; m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); - m->m_pkthdr.len = m->m_len = m->m_ext.ext_size; + if (m != NULL) + m->m_pkthdr.len = m->m_len = m->m_ext.ext_size; return (m); } @@ -744,12 +741,9 @@ dwc_txfinish_locked(struct dwc_softc *sc { struct dwc_bufmap *bmap; struct dwc_hwdesc *desc; - struct ifnet *ifp; DWC_ASSERT_LOCKED(sc); - ifp = sc->ifp; - while (sc->tx_idx_tail != sc->tx_idx_head) { desc = &sc->txdesc_ring[sc->tx_idx_tail]; if ((desc->tdes0 & DDESC_TDES0_OWN) != 0) From owner-svn-src-all@FreeBSD.ORG Fri Apr 3 12:08:09 2015 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 76EAC6F9; Fri, 3 Apr 2015 12:08: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 61ECAF6F; Fri, 3 Apr 2015 12:08: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 t33C88UZ021536; Fri, 3 Apr 2015 12:08:08 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t33C88aP021535; Fri, 3 Apr 2015 12:08:08 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504031208.t33C88aP021535@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 3 Apr 2015 12:08:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281020 - head/sys/boot/efi/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: Fri, 03 Apr 2015 12:08:09 -0000 Author: andrew Date: Fri Apr 3 12:08:08 2015 New Revision: 281020 URL: https://svnweb.freebsd.org/changeset/base/281020 Log: Only enable comconsole and nullconsole on x86. Modified: head/sys/boot/efi/loader/conf.c Modified: head/sys/boot/efi/loader/conf.c ============================================================================== --- head/sys/boot/efi/loader/conf.c Fri Apr 3 11:37:23 2015 (r281019) +++ head/sys/boot/efi/loader/conf.c Fri Apr 3 12:08:08 2015 (r281020) @@ -54,12 +54,16 @@ struct netif_driver *netif_drivers[] = { }; extern struct console efi_console; +#if defined(__amd64__) || defined(__i386__) extern struct console comconsole; extern struct console nullconsole; +#endif struct console *consoles[] = { &efi_console, +#if defined(__amd64__) || defined(__i386__) &comconsole, &nullconsole, +#endif NULL }; From owner-svn-src-all@FreeBSD.ORG Fri Apr 3 12:19:22 2015 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 C9554A10; Fri, 3 Apr 2015 12:19:22 +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 50E31A6; Fri, 3 Apr 2015 12:19:21 +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 t33CJ706072804 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 3 Apr 2015 15:19:07 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t33CJ7U5072803; Fri, 3 Apr 2015 15:19:07 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 3 Apr 2015 15:19:07 +0300 From: Gleb Smirnoff To: Ruslan Bukin Subject: Re: svn commit: r281019 - head/sys/dev/dwc Message-ID: <20150403121907.GU64665@FreeBSD.org> References: <201504031137.t33BbOFY007346@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201504031137.t33BbOFY007346@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, Sebastian Huber , 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 Apr 2015 12:19:22 -0000 Ruslan and Sebastian, On Fri, Apr 03, 2015 at 11:37:24AM +0000, Ruslan Bukin wrote: R> Author: br R> Date: Fri Apr 3 11:37:23 2015 R> New Revision: 281019 R> URL: https://svnweb.freebsd.org/changeset/base/281019 R> R> Log: R> o Remove superfluous includes R> o Avoid NULL pointer access R> o Fix 'set but not used' warning R> R> Submitted by: Sebastian Huber R> R> Modified: R> head/sys/dev/dwc/if_dwc.c Since you are hacking the interface driver, can you also pay attention to this project? https://wiki.freebsd.org/projects/ifnet Any input is welcome. Help with converting if_dwc would be very much appreciated. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Fri Apr 3 12:30:19 2015 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 A893FD96; Fri, 3 Apr 2015 12:30: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 93942198; Fri, 3 Apr 2015 12:30: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 t33CUJ7e031681; Fri, 3 Apr 2015 12:30:19 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t33CUJrt031680; Fri, 3 Apr 2015 12:30:19 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504031230.t33CUJrt031680@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 3 Apr 2015 12:30:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281021 - head/sys/boot/efi/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: Fri, 03 Apr 2015 12:30:19 -0000 Author: andrew Date: Fri Apr 3 12:30:18 2015 New Revision: 281021 URL: https://svnweb.freebsd.org/changeset/base/281021 Log: Only include machine/specialreg.h on x86 Modified: head/sys/boot/efi/loader/bootinfo.c Modified: head/sys/boot/efi/loader/bootinfo.c ============================================================================== --- head/sys/boot/efi/loader/bootinfo.c Fri Apr 3 12:08:08 2015 (r281020) +++ head/sys/boot/efi/loader/bootinfo.c Fri Apr 3 12:30:18 2015 (r281021) @@ -39,7 +39,10 @@ __FBSDID("$FreeBSD$"); #include #include #include + +#if defined(__amd64__) || defined(__i386__) #include +#endif #include #include From owner-svn-src-all@FreeBSD.ORG Fri Apr 3 12:41:19 2015 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 8A2539F; Fri, 3 Apr 2015 12:41:19 +0000 (UTC) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3C390330; Fri, 3 Apr 2015 12:41:19 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id A09371FE022; Fri, 3 Apr 2015 14:41:16 +0200 (CEST) Message-ID: <551E8A96.6030806@selasky.org> Date: Fri, 03 Apr 2015 14:41:58 +0200 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Gleb Smirnoff Subject: Re: svn commit: r280971 - in head: contrib/ipfilter/tools share/man/man4 sys/contrib/ipfilter/netinet sys/netinet sys/netipsec sys/netpfil/pf References: <551DA5EA.1080908@selasky.org> <551DAC9E.9010303@selasky.org> <358EC58D-1F92-411E-ADEB-8072020E9EB3@FreeBSD.org> <551DEF26.4000403@selasky.org> <4B7DAA59-389F-41AE-99D8-034A7AA61C99@FreeBSD.org> <551E520E.1040708@selasky.org> <6DF5FB51-8135-4144-BD3A-6E4127A23AA7@FreeBSD.org> <551E5C38.7070203@selasky.org> <78DD67BD-621C-451D-8E30-EC9BF396716F@FreeBSD.org> <551E6E72.8050208@selasky.org> <20150403112927.GQ64665@FreeBSD.org> In-Reply-To: <20150403112927.GQ64665@FreeBSD.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: Mateusz Guzik , Ian Lepore , svn-src-all@freebsd.org, src-committers@freebsd.org, "Robert N. M. Watson" , svn-src-head@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 Apr 2015 12:41:19 -0000 On 04/03/15 13:29, Gleb Smirnoff wrote: > On Fri, Apr 03, 2015 at 12:41:54PM +0200, Hans Petter Selasky wrote: > H> "ip_do_randomid" is zero by default, and is not documented anywhere: > H> > H> grep -r ip_do_randomid share/ > > It is documented in inet(4). > > The actual sysctl knob doesn't match the kernel symbol name, which is > allowed in sysctl(9). > Hi, Will you mind if I rephrase that paragraph in the "inet.4" manual page from: "This closes a minor information leak which allows remote observers to determine the rate of packet generation on the machine by watching the counter." Into: "This prevents high-speed information exchange between internal and external observers using packet frequency modulation. An outside observer can ping the outside facing port at a fixed rate watching the counter. An inside observer can ping the inside facing port watching the same counter. Even though packets don't flow between the two ports, data can be exchanged by watching changes in the packet rate. It is believed that data can be exchanged in Kb/s range this way. Setting this sysctl also prevents remote and internal observers to determine the rate of packet generation on the machine by watching the counter." --HPS From owner-svn-src-all@FreeBSD.ORG Fri Apr 3 12:54:39 2015 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 EA159582; Fri, 3 Apr 2015 12: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 D4D7163F; Fri, 3 Apr 2015 12: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 t33CsdUC045550; Fri, 3 Apr 2015 12:54:39 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t33CsdGd045549; Fri, 3 Apr 2015 12:54:39 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504031254.t33CsdGd045549@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 3 Apr 2015 12:54:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281022 - head/sys/boot/efi/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: Fri, 03 Apr 2015 12:54:40 -0000 Author: andrew Date: Fri Apr 3 12:54:38 2015 New Revision: 281022 URL: https://svnweb.freebsd.org/changeset/base/281022 Log: Only enable the efi framebuffer on x86 for now Modified: head/sys/boot/efi/loader/bootinfo.c Modified: head/sys/boot/efi/loader/bootinfo.c ============================================================================== --- head/sys/boot/efi/loader/bootinfo.c Fri Apr 3 12:30:18 2015 (r281021) +++ head/sys/boot/efi/loader/bootinfo.c Fri Apr 3 12:54:38 2015 (r281022) @@ -40,17 +40,17 @@ __FBSDID("$FreeBSD$"); #include #include -#if defined(__amd64__) || defined(__i386__) -#include -#endif - #include #include #include "bootstrap.h" -#include "framebuffer.h" #include "loader_efi.h" +#if defined(__amd64__) || defined(__i386__) +#include +#include "framebuffer.h" +#endif + UINTN efi_mapkey; static const char howto_switches[] = "aCdrgDmphsv"; @@ -236,6 +236,8 @@ bi_load_efi_data(struct preloaded_file * UINTN mmsz, pages, sz; UINT32 mmver; struct efi_map_header *efihdr; + +#if defined(__amd64__) || defined(__i386__) struct efi_fb efifb; if (efi_find_framebuffer(&efifb) == 0) { @@ -251,6 +253,7 @@ bi_load_efi_data(struct preloaded_file * file_addmetadata(kfp, MODINFOMD_EFI_FB, sizeof(efifb), &efifb); } +#endif efisz = (sizeof(struct efi_map_header) + 0xf) & ~0xf; From owner-svn-src-all@FreeBSD.ORG Fri Apr 3 13:06:12 2015 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 9405A93C; Fri, 3 Apr 2015 13:06:12 +0000 (UTC) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B2727AB; Fri, 3 Apr 2015 13:06:12 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 7829E1FE022; Fri, 3 Apr 2015 15:06:09 +0200 (CEST) Message-ID: <551E906B.3010900@selasky.org> Date: Fri, 03 Apr 2015 15:06:51 +0200 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Gleb Smirnoff Subject: Re: svn commit: r280971 - in head: contrib/ipfilter/tools share/man/man4 sys/contrib/ipfilter/netinet sys/netinet sys/netipsec sys/netpfil/pf References: <551DA5EA.1080908@selasky.org> <551DAC9E.9010303@selasky.org> <358EC58D-1F92-411E-ADEB-8072020E9EB3@FreeBSD.org> <551DEF26.4000403@selasky.org> <4B7DAA59-389F-41AE-99D8-034A7AA61C99@FreeBSD.org> <551E520E.1040708@selasky.org> <6DF5FB51-8135-4144-BD3A-6E4127A23AA7@FreeBSD.org> <551E5C38.7070203@selasky.org> <78DD67BD-621C-451D-8E30-EC9BF396716F@FreeBSD.org> <551E6E72.8050208@selasky.org> <20150403112927.GQ64665@FreeBSD.org> <551E8A96.6030806@selasky.org> In-Reply-To: <551E8A96.6030806@selasky.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: Mateusz Guzik , Ian Lepore , svn-src-all@freebsd.org, src-committers@freebsd.org, "Robert N. M. Watson" , svn-src-head@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 Apr 2015 13:06:12 -0000 On 04/03/15 14:41, Hans Petter Selasky wrote: > On 04/03/15 13:29, Gleb Smirnoff wrote: >> On Fri, Apr 03, 2015 at 12:41:54PM +0200, Hans Petter Selasky wrote: >> H> "ip_do_randomid" is zero by default, and is not documented anywhere: >> H> >> H> grep -r ip_do_randomid share/ >> >> It is documented in inet(4). >> >> The actual sysctl knob doesn't match the kernel symbol name, which is >> allowed in sysctl(9). >> > > Hi, > > Will you mind if I rephrase that paragraph in the "inet.4" manual page > from: > > "This closes a minor information leak which allows remote observers to > determine the rate of packet generation on the machine by watching the > counter." > > Into: > > "This prevents high-speed information exchange between internal and > external observers using packet frequency modulation. An outside > observer can ping the outside facing port at a fixed rate watching the > counter. An inside observer can ping the inside facing port watching the > same counter. Even though packets don't flow between the two ports, data > can be exchanged by watching changes in the packet rate. It is believed > that data can be exchanged in Kb/s range this way. Setting this sysctl > also prevents remote and internal observers to determine the rate of > packet generation on the machine by watching the counter." > Hi, Maybe there will be some new applications after this discovery. No need for uPnP any more. Could be nice to send text messages through firewalls. Depends how many implement the IP ID counting the same way like FreeBSD does ;-) --HPS From owner-svn-src-all@FreeBSD.ORG Fri Apr 3 13:38:47 2015 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 C453698A; Fri, 3 Apr 2015 13:38:47 +0000 (UTC) Received: from work.netasq.com (gwlille.netasq.com [91.212.116.1]) by mx1.freebsd.org (Postfix) with ESMTP id 5A120ADE; Fri, 3 Apr 2015 13:38:46 +0000 (UTC) Received: from work.netasq.com (localhost.localdomain [127.0.0.1]) by work.netasq.com (Postfix) with ESMTP id 30F0527050C6; Fri, 3 Apr 2015 15:38:40 +0200 (CEST) Received: from localhost (localhost.localdomain [127.0.0.1]) by work.netasq.com (Postfix) with ESMTP id 00FCB27050E1; Fri, 3 Apr 2015 15:38:39 +0200 (CEST) Received: from work.netasq.com ([127.0.0.1]) by localhost (work.netasq.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id S4LRY6l2aD5o; Fri, 3 Apr 2015 15:38:39 +0200 (CEST) Received: from work.netasq.com (localhost.localdomain [127.0.0.1]) by work.netasq.com (Postfix) with ESMTP id BC21E27050C6; Fri, 3 Apr 2015 15:38:39 +0200 (CEST) Date: Fri, 3 Apr 2015 15:38:38 +0200 (CEST) From: Emeric POUPON To: Hans Petter Selasky Message-ID: <206317407.27296349.1428068318117.JavaMail.zimbra@stormshield.eu> In-Reply-To: <551E906B.3010900@selasky.org> References: <551DA5EA.1080908@selasky.org> <6DF5FB51-8135-4144-BD3A-6E4127A23AA7@FreeBSD.org> <551E5C38.7070203@selasky.org> <78DD67BD-621C-451D-8E30-EC9BF396716F@FreeBSD.org> <551E6E72.8050208@selasky.org> <20150403112927.GQ64665@FreeBSD.org> <551E8A96.6030806@selasky.org> <551E906B.3010900@selasky.org> Subject: Re: svn commit: r280971 - in head: contrib/ipfilter/tools share/man/man4 sys/contrib/ipfilter/netinet sys/netinet sys/netipsec sys/netpfil/pf MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Thread-Topic: svn commit: r280971 - in head: contrib/ipfilter/tools share/man/man4 sys/contrib/ipfilter/netinet sys/netinet sys/netipsec sys/netpfil/pf Thread-Index: yLvj9F+IZZpoYy6ruZ4N41f1Si7/cA== Cc: Mateusz Guzik , src-committers@freebsd.org, Ian Lepore , svn-src-all@freebsd.org, Gleb Smirnoff , "Robert N. M. Watson" , svn-src-head@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 Apr 2015 13:38:48 -0000 A good ip id random would be certainly better. But the current implementation is far from being optimized: a lock is being= held inside arc4rand, and another one for protecting the ip_id internals. We already have contention problems with the IV generated for ESP packets. = The randomized ip id, using this implementation, is my opinion not an accep= table solution. Regards, Emeric ----- Mail original ----- De: "Hans Petter Selasky" =C3=80: "Gleb Smirnoff" Cc: "Mateusz Guzik" , "Ian Lepore" , sv= n-src-all@freebsd.org, src-committers@freebsd.org, "Robert N. M. Watson" , svn-src-head@freebsd.org Envoy=C3=A9: Vendredi 3 Avril 2015 15:06:51 Objet: Re: svn commit: r280971 - in head: contrib/ipfilter/tools share/man/= man4 sys/contrib/ipfilter/netinet sys/netinet sys/netipsec sys/netpfil/pf On 04/03/15 14:41, Hans Petter Selasky wrote: > On 04/03/15 13:29, Gleb Smirnoff wrote: >> On Fri, Apr 03, 2015 at 12:41:54PM +0200, Hans Petter Selasky wrote: >> H> "ip_do_randomid" is zero by default, and is not documented anywhere: >> H> >> H> grep -r ip_do_randomid share/ >> >> It is documented in inet(4). >> >> The actual sysctl knob doesn't match the kernel symbol name, which is >> allowed in sysctl(9). >> > > Hi, > > Will you mind if I rephrase that paragraph in the "inet.4" manual page > from: > > "This closes a minor information leak which allows remote observers to > determine the rate of packet generation on the machine by watching the > counter." > > Into: > > "This prevents high-speed information exchange between internal and > external observers using packet frequency modulation. An outside > observer can ping the outside facing port at a fixed rate watching the > counter. An inside observer can ping the inside facing port watching the > same counter. Even though packets don't flow between the two ports, data > can be exchanged by watching changes in the packet rate. It is believed > that data can be exchanged in Kb/s range this way. Setting this sysctl > also prevents remote and internal observers to determine the rate of > packet generation on the machine by watching the counter." > Hi, Maybe there will be some new applications after this discovery. No need=20 for uPnP any more. Could be nice to send text messages through=20 firewalls. Depends how many implement the IP ID counting the same way=20 like FreeBSD does ;-) --HPS _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-svn-src-all@FreeBSD.ORG Fri Apr 3 14:00:10 2015 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 3224F43B; Fri, 3 Apr 2015 14:00: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 049F3D21; Fri, 3 Apr 2015 14:00: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 t33E095w076235; Fri, 3 Apr 2015 14:00:09 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t33E094r076234; Fri, 3 Apr 2015 14:00:09 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201504031400.t33E094r076234@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 Apr 2015 14:00:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281024 - 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 Apr 2015 14:00:10 -0000 Author: hselasky Date: Fri Apr 3 14:00:08 2015 New Revision: 281024 URL: https://svnweb.freebsd.org/changeset/base/281024 Log: Add more documentation about the "net.inet.ip.random_id" sysctl knob and how it can affect information flow between observers. MFC after: 1 week Modified: head/share/man/man4/inet.4 Modified: head/share/man/man4/inet.4 ============================================================================== --- head/share/man/man4/inet.4 Fri Apr 3 13:57:14 2015 (r281023) +++ head/share/man/man4/inet.4 Fri Apr 3 14:00:08 2015 (r281024) @@ -28,7 +28,7 @@ .\" From: @(#)inet.4 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd April 2, 2015 +.Dd April 3, 2015 .Dt INET 4 .Os .Sh NAME @@ -244,10 +244,22 @@ IP datagrams (or all IP datagrams, if .Va ip.rfc6864 is disabled) to be randomized instead of incremented by 1 with each packet generated. -This closes a minor information leak which allows remote observers to +This prevents information exchange between any combination of two or +more inside and/or outside observers using packet frequency +modulation, PFM. +An outside observer can ping the outside facing port at a fixed rate +sampling the returned counter. +An inside observer can ping the inside facing port sampling the same +counter. +Even though packets don't flow directly between any of the observers +any single observer can influence the data rate the other observer(s) +is or are sampling. +This is done by sending more or less ping packets towards the gateway +per measured interval. +Setting this sysctl also prevents the remote and internal observers to determine the rate of packet generation on the machine by watching the counter. -In the same time, on high-speed links, it can decrease the ID reuse +At the same time, on high-speed links, it can decrease the ID reuse cycle greatly. Default is 0 (sequential IP IDs). IPv6 flow IDs and fragment IDs are always random. From owner-svn-src-all@FreeBSD.ORG Fri Apr 3 14:00:35 2015 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 2035657F; Fri, 3 Apr 2015 14:00:35 +0000 (UTC) Received: from vps.hungerhost.com (vps.hungerhost.com [216.38.53.176]) (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 DE134D29; Fri, 3 Apr 2015 14:00:34 +0000 (UTC) Received: from ool-45785af5.dyn.optonline.net ([69.120.90.245]:58336 helo=[192.168.254.26]) by vps.hungerhost.com with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.82) (envelope-from ) id 1Ye29A-0005oz-On; Fri, 03 Apr 2015 10:00:32 -0400 From: "George Neville-Neil" To: "Emeric POUPON" Subject: Re: svn commit: r280971 - in head: contrib/ipfilter/tools share/man/man4 sys/contrib/ipfilter/netinet sys/netinet sys/netipsec sys/netpfil/pf Date: Fri, 03 Apr 2015 10:00:22 -0400 Message-ID: <195BF758-2AF8-4758-9CA9-681337EE4FBF@neville-neil.com> In-Reply-To: <206317407.27296349.1428068318117.JavaMail.zimbra@stormshield.eu> References: <551DA5EA.1080908@selasky.org> <6DF5FB51-8135-4144-BD3A-6E4127A23AA7@FreeBSD.org> <551E5C38.7070203@selasky.org> <78DD67BD-621C-451D-8E30-EC9BF396716F@FreeBSD.org> <551E6E72.8050208@selasky.org> <20150403112927.GQ64665@FreeBSD.org> <551E8A96.6030806@selasky.org> <551E906B.3010900@selasky.org> <206317407.27296349.1428068318117.JavaMail.zimbra@stormshield.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Mailer: MailMate (1.9.1r5084) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vps.hungerhost.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - neville-neil.com X-Get-Message-Sender-Via: vps.hungerhost.com: authenticated_id: gnn@neville-neil.com Cc: Hans Petter Selasky , Mateusz Guzik , src-committers@freebsd.org, Ian Lepore , svn-src-all@freebsd.org, Gleb Smirnoff , "Robert N. M. Watson" , svn-src-head@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 Apr 2015 14:00:35 -0000 OK, top post. This is a general discussion. Move to net@ and get this out of our commit mails please. Best, George On 3 Apr 2015, at 9:38, Emeric POUPON wrote: > A good ip id random would be certainly better. > But the current implementation is far from being optimized: a lock is > being held inside arc4rand, and another one for protecting the ip_id > internals. > We already have contention problems with the IV generated for ESP > packets. The randomized ip id, using this implementation, is my > opinion not an acceptable solution. > > Regards, > > Emeric > > > ----- Mail original ----- > De: "Hans Petter Selasky" > À: "Gleb Smirnoff" > Cc: "Mateusz Guzik" , "Ian Lepore" > , svn-src-all@freebsd.org, > src-committers@freebsd.org, "Robert N. M. Watson" > , svn-src-head@freebsd.org > Envoyé: Vendredi 3 Avril 2015 15:06:51 > Objet: Re: svn commit: r280971 - in head: contrib/ipfilter/tools > share/man/man4 sys/contrib/ipfilter/netinet sys/netinet sys/netipsec > sys/netpfil/pf > > On 04/03/15 14:41, Hans Petter Selasky wrote: >> On 04/03/15 13:29, Gleb Smirnoff wrote: >>> On Fri, Apr 03, 2015 at 12:41:54PM +0200, Hans Petter Selasky wrote: >>> H> "ip_do_randomid" is zero by default, and is not documented >>> anywhere: >>> H> >>> H> grep -r ip_do_randomid share/ >>> >>> It is documented in inet(4). >>> >>> The actual sysctl knob doesn't match the kernel symbol name, which >>> is >>> allowed in sysctl(9). >>> >> >> Hi, >> >> Will you mind if I rephrase that paragraph in the "inet.4" manual >> page >> from: >> >> "This closes a minor information leak which allows remote observers >> to >> determine the rate of packet generation on the machine by watching >> the >> counter." >> >> Into: >> >> "This prevents high-speed information exchange between internal and >> external observers using packet frequency modulation. An outside >> observer can ping the outside facing port at a fixed rate watching >> the >> counter. An inside observer can ping the inside facing port watching >> the >> same counter. Even though packets don't flow between the two ports, >> data >> can be exchanged by watching changes in the packet rate. It is >> believed >> that data can be exchanged in Kb/s range this way. Setting this >> sysctl >> also prevents remote and internal observers to determine the rate of >> packet generation on the machine by watching the counter." >> > > Hi, > > Maybe there will be some new applications after this discovery. No > need > for uPnP any more. Could be nice to send text messages through > firewalls. Depends how many implement the IP ID counting the same way > like FreeBSD does ;-) > > --HPS > > _______________________________________________ > svn-src-all@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-svn-src-all@FreeBSD.ORG Fri Apr 3 14:45:50 2015 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 647A85BF; Fri, 3 Apr 2015 14:45: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 4F0B2239; Fri, 3 Apr 2015 14:45: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 t33EjowV099452; Fri, 3 Apr 2015 14:45:50 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t33EjnJx099446; Fri, 3 Apr 2015 14:45:49 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201504031445.t33EjnJx099446@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 3 Apr 2015 14:45:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281026 - in head/sys: cddl/contrib/opensolaris/uts/common/fs/zfs 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: Fri, 03 Apr 2015 14:45:50 -0000 Author: mav Date: Fri Apr 3 14:45:48 2015 New Revision: 281026 URL: https://svnweb.freebsd.org/changeset/base/281026 Log: Make ZFS ARC track both KVA usage and fragmentation. Even on Illumos, with its much larger KVA, ZFS ARC steps back if KVA usage reaches certain threshold (3/4 on i386 or 16/17 otherwise). FreeBSD has even less KVA, but had no such limit on archs with direct map as amd64. As result, on machines with a lot of RAM, during load with very small user- space memory pressure, such as `zfs send`, it was possible to reach state, when there is enough both physical RAM and KVA (I've seen up to 25-30%), but no continuous KVA range to allocate even single 128KB I/O request. Address this situation from two sides: - restore KVA usage limitations in a way the most close to Illumos; - introduce new requirement for KVA fragmentation, specifying that we should have at least one sequential KVA range of zfs_max_recordsize bytes. Experiments show that first limitation done alone is not sufficient. On machine with 64GB of RAM it is sometimes needed to drop up to half of ARC size to get at leats one 1MB KVA chunk. Statically limiting ARC to half of KVA/RAM is too strict, so second limitation makes it to work in cycles: accumulate trash up to certain critical mass, do massive spring-cleaning, and then start littering again. :) MFC after: 1 month Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c head/sys/kern/subr_vmem.c head/sys/sys/vmem.h Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Fri Apr 3 14:39:16 2015 (r281025) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Fri Apr 3 14:45:48 2015 (r281026) @@ -2648,8 +2648,11 @@ arc_reclaim_needed(void) (vmem_size(heap_arena, VMEM_FREE | VMEM_ALLOC)) >> 2); return (1); } +#define zio_arena NULL +#else +#define zio_arena heap_arena #endif -#ifdef illumos + /* * 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 @@ -2663,7 +2666,14 @@ arc_reclaim_needed(void) vmem_size(zio_arena, VMEM_FREE) < (vmem_size(zio_arena, VMEM_ALLOC) >> 4)) return (1); -#endif /* illumos */ + + /* + * Above limits know nothing about real level of KVA fragmentation. + * Start aggressive reclamation if too little sequential KVA left. + */ + if (vmem_size(heap_arena, VMEM_MAXFREE) < zfs_max_recordsize) + return (1); + #else /* _KERNEL */ if (spa_get_random(100) == 0) return (1); Modified: head/sys/kern/subr_vmem.c ============================================================================== --- head/sys/kern/subr_vmem.c Fri Apr 3 14:39:16 2015 (r281025) +++ head/sys/kern/subr_vmem.c Fri Apr 3 14:45:48 2015 (r281026) @@ -1320,6 +1320,7 @@ vmem_add(vmem_t *vm, vmem_addr_t addr, v vmem_size_t vmem_size(vmem_t *vm, int typemask) { + int i; switch (typemask) { case VMEM_ALLOC: @@ -1328,6 +1329,14 @@ vmem_size(vmem_t *vm, int typemask) return vm->vm_size - vm->vm_inuse; case VMEM_FREE|VMEM_ALLOC: return vm->vm_size; + case VMEM_MAXFREE: + for (i = VMEM_MAXORDER - 1; i >= 0; i--) { + if (LIST_EMPTY(&vm->vm_freelist[i])) + continue; + return ((vmem_size_t)ORDER2SIZE(i) << + vm->vm_quantum_shift); + } + return (0); default: panic("vmem_size"); } Modified: head/sys/sys/vmem.h ============================================================================== --- head/sys/sys/vmem.h Fri Apr 3 14:39:16 2015 (r281025) +++ head/sys/sys/vmem.h Fri Apr 3 14:45:48 2015 (r281026) @@ -129,6 +129,7 @@ void vmem_startup(void); /* vmem_size typemask */ #define VMEM_ALLOC 0x01 #define VMEM_FREE 0x02 +#define VMEM_MAXFREE 0x10 #endif /* _KERNEL */ From owner-svn-src-all@FreeBSD.ORG Fri Apr 3 15:14:49 2015 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 8E9E6E20; Fri, 3 Apr 2015 15:14:49 +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 10E3F769; Fri, 3 Apr 2015 15:14:48 +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 t33FEiVM073650 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 3 Apr 2015 18:14:44 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t33FEi47073649; Fri, 3 Apr 2015 18:14:44 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 3 Apr 2015 18:14:44 +0300 From: Gleb Smirnoff To: Hans Petter Selasky Subject: Re: svn commit: r281024 - head/share/man/man4 Message-ID: <20150403151444.GC64665@FreeBSD.org> References: <201504031400.t33E094r076234@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201504031400.t33E094r076234@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: Fri, 03 Apr 2015 15:14:49 -0000 Hans, On Fri, Apr 03, 2015 at 02:00:09PM +0000, Hans Petter Selasky wrote: H> Author: hselasky H> Date: Fri Apr 3 14:00:08 2015 H> New Revision: 281024 H> URL: https://svnweb.freebsd.org/changeset/base/281024 H> H> Log: H> Add more documentation about the "net.inet.ip.random_id" sysctl knob H> and how it can affect information flow between observers. What the hell? At Fri, 3 Apr 2015 15:41:21 +0300 (MSK) you ask: > Will you mind if I rephrase that paragraph in the "inet.4" ... And at Fri, 3 Apr 2015 17:00:14 +0300 (MSK) you commit. You gave 1 hour and 19 minutes for review! Is this acceptable at all? H> MFC after: 1 week Now this sounds like a threat. Please back out this very questionable change, and then it will be discussed. H> Modified: H> head/share/man/man4/inet.4 H> H> Modified: head/share/man/man4/inet.4 H> ============================================================================== H> --- head/share/man/man4/inet.4 Fri Apr 3 13:57:14 2015 (r281023) H> +++ head/share/man/man4/inet.4 Fri Apr 3 14:00:08 2015 (r281024) H> @@ -28,7 +28,7 @@ H> .\" From: @(#)inet.4 8.1 (Berkeley) 6/5/93 H> .\" $FreeBSD$ H> .\" H> -.Dd April 2, 2015 H> +.Dd April 3, 2015 H> .Dt INET 4 H> .Os H> .Sh NAME H> @@ -244,10 +244,22 @@ IP datagrams (or all IP datagrams, if H> .Va ip.rfc6864 H> is disabled) to be randomized instead of incremented by 1 with each packet H> generated. H> -This closes a minor information leak which allows remote observers to H> +This prevents information exchange between any combination of two or H> +more inside and/or outside observers using packet frequency H> +modulation, PFM. H> +An outside observer can ping the outside facing port at a fixed rate H> +sampling the returned counter. H> +An inside observer can ping the inside facing port sampling the same H> +counter. H> +Even though packets don't flow directly between any of the observers H> +any single observer can influence the data rate the other observer(s) H> +is or are sampling. H> +This is done by sending more or less ping packets towards the gateway H> +per measured interval. H> +Setting this sysctl also prevents the remote and internal observers to H> determine the rate of packet generation on the machine by watching the H> counter. H> -In the same time, on high-speed links, it can decrease the ID reuse H> +At the same time, on high-speed links, it can decrease the ID reuse H> cycle greatly. H> Default is 0 (sequential IP IDs). H> IPv6 flow IDs and fragment IDs are always random. H> -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Fri Apr 3 15:26:01 2015 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 3BF924F9; Fri, 3 Apr 2015 15:26: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 0EDBB893; Fri, 3 Apr 2015 15:26: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 t33FQ0uO019252; Fri, 3 Apr 2015 15:26:00 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t33FQ0cx019249; Fri, 3 Apr 2015 15:26:00 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504031526.t33FQ0cx019249@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 3 Apr 2015 15:26:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281027 - in head/sys/boot/efi: . boot1 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 Apr 2015 15:26:01 -0000 Author: andrew Date: Fri Apr 3 15:25:59 2015 New Revision: 281027 URL: https://svnweb.freebsd.org/changeset/base/281027 Log: Clean up more x86 only options in the efi code. Modified: head/sys/boot/efi/Makefile.inc head/sys/boot/efi/boot1/Makefile Modified: head/sys/boot/efi/Makefile.inc ============================================================================== --- head/sys/boot/efi/Makefile.inc Fri Apr 3 14:45:48 2015 (r281026) +++ head/sys/boot/efi/Makefile.inc Fri Apr 3 15:25:59 2015 (r281027) @@ -8,9 +8,14 @@ CFLAGS+= -march=i386 # Options used when building app-specific efi components # See conf/kern.mk for the correct set of these -CFLAGS+= -ffreestanding -fshort-wchar -Wformat -CFLAGS+= -mno-red-zone -CFLAGS+= -mno-mmx -mno-sse -mno-aes -mno-avx -msoft-float +CFLAGS+= -ffreestanding -Wformat -msoft-float LDFLAGS+= -nostdlib +.if ${MACHINE_CPUARCH} == "amd64" +CFLAGS+= -fshort-wchar +CFLAGS+= -mno-red-zone +CFLAGS+= -mno-mmx -mno-sse -mno-aes -mno-avx +.endif + + .include "../Makefile.inc" Modified: head/sys/boot/efi/boot1/Makefile ============================================================================== --- head/sys/boot/efi/boot1/Makefile Fri Apr 3 14:45:48 2015 (r281026) +++ head/sys/boot/efi/boot1/Makefile Fri Apr 3 15:25:59 2015 (r281027) @@ -23,14 +23,18 @@ CFLAGS+= -I${.CURDIR}/../../../contrib/d CFLAGS+= -I${.CURDIR}/../../.. # Always add MI sources and REGULAR efi loader bits -.PATH: ${.CURDIR}/../loader/arch/amd64 ${.CURDIR}/../../common +.PATH: ${.CURDIR}/../loader/arch/${MACHINE_CPUARCH} ${.CURDIR}/../../common CFLAGS+= -I${.CURDIR}/../../common FILES= boot1.efi boot1.efifat FILESMODE_boot1.efi= ${BINMODE} LDSCRIPT= ${.CURDIR}/../loader/arch/${MACHINE_CPUARCH}/ldscript.${MACHINE_CPUARCH} -LDFLAGS= -Wl,-T${LDSCRIPT} -Wl,-Bsymbolic -shared -Wl,-znocombreloc +LDFLAGS= -Wl,-T${LDSCRIPT} -Wl,-Bsymbolic -shared + +.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" +LDFLAGS+= -Wl,-znocombreloc +.endif ${PROG}: ${LDSCRIPT} @@ -73,6 +77,7 @@ CLEANFILES= boot1.efifat .include +.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" beforedepend ${OBJS}: machine x86 CLEANFILES+= machine x86 boot1.efi @@ -82,3 +87,4 @@ machine: x86: ln -sf ${.CURDIR}/../../../x86/include x86 +.endif From owner-svn-src-all@FreeBSD.ORG Fri Apr 3 15:47:50 2015 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 2D3BCCF5; Fri, 3 Apr 2015 15:47: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 17A8BADA; Fri, 3 Apr 2015 15:47: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 t33Flnc1029496; Fri, 3 Apr 2015 15:47:49 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t33FlnwN029491; Fri, 3 Apr 2015 15:47:49 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504031547.t33FlnwN029491@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 3 Apr 2015 15:47:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281028 - head/sys/boot/efi/fdt 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 Apr 2015 15:47:50 -0000 Author: andrew Date: Fri Apr 3 15:47:48 2015 New Revision: 281028 URL: https://svnweb.freebsd.org/changeset/base/281028 Log: Add the start of the efi fdt bindings. These will be used on arm and arm64. Sponsored by: The FreeBSD Foundation Added: head/sys/boot/efi/fdt/ head/sys/boot/efi/fdt/Makefile (contents, props changed) head/sys/boot/efi/fdt/efi_fdt.c (contents, props changed) Added: head/sys/boot/efi/fdt/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/efi/fdt/Makefile Fri Apr 3 15:47:48 2015 (r281028) @@ -0,0 +1,36 @@ +# $FreeBSD$ + +.include + +.PATH: ${.CURDIR}/../../common + +LIB= efi_fdt +INTERNALLIB= + +SRCS= efi_fdt.c + +CFLAGS+= -ffreestanding -msoft-float +.if ${MACHINE_CPUARCH} == "arm64" +CFLAGS+= -mgeneral-regs-only +.endif + +CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/ + +# EFI library headers +CFLAGS+= -I${.CURDIR}/../include +CFLAGS+= -I${.CURDIR}/../include/${MACHINE_CPUARCH} + +# libfdt headers +CFLAGS+= -I${.CURDIR}/../../fdt + +# Pick up the bootstrap header for some interface items +CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../../.. -I. + +machine: + ln -sf ${.CURDIR}/../../../${MACHINE_CPUARCH}/include machine + +CLEANFILES+= machine + +.include + +beforedepend ${OBJS}: machine Added: head/sys/boot/efi/fdt/efi_fdt.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/efi/fdt/efi_fdt.c Fri Apr 3 15:47:48 2015 (r281028) @@ -0,0 +1,63 @@ +/*- + * Copyright (c) 2014 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Andrew Turner under + * sponsorship from the FreeBSD Foundation. + * + * 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 "bootstrap.h" + +static EFI_GUID fdtdtb = FDT_TABLE_GUID; + +int +fdt_platform_load_dtb(void) +{ + struct fdt_header *hdr; + int err; + + hdr = efi_get_table(&fdtdtb); + if (hdr != NULL) { + if (fdt_load_dtb_addr(hdr) == 0) { + printf("Using DTB provided by EFI at %p.\n", hdr); + return (0); + } + } + + return (err); +} + +void +fdt_platform_fixups(void) +{ +} From owner-svn-src-all@FreeBSD.ORG Fri Apr 3 16:28:31 2015 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 D502EAE7; Fri, 3 Apr 2015 16:28:31 +0000 (UTC) Received: from cyrus.watson.org (cyrus.watson.org [198.74.231.69]) by mx1.freebsd.org (Postfix) with ESMTP id A3028F6D; Fri, 3 Apr 2015 16:28:31 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [198.74.231.63]) by cyrus.watson.org (Postfix) with ESMTPS id 0CF6946BA7; Fri, 3 Apr 2015 12:28:31 -0400 (EDT) Date: Fri, 3 Apr 2015 17:28:30 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Hans Petter Selasky Subject: Re: svn commit: r280971 - in head: contrib/ipfilter/tools share/man/man4 sys/contrib/ipfilter/netinet sys/netinet sys/netipsec sys/netpfil/pf In-Reply-To: <551E8A96.6030806@selasky.org> Message-ID: References: <551DA5EA.1080908@selasky.org> <551DAC9E.9010303@selasky.org> <358EC58D-1F92-411E-ADEB-8072020E9EB3@FreeBSD.org> <551DEF26.4000403@selasky.org> <4B7DAA59-389F-41AE-99D8-034A7AA61C99@FreeBSD.org> <551E520E.1040708@selasky.org> <6DF5FB51-8135-4144-BD3A-6E4127A23AA7@FreeBSD.org> <551E5C38.7070203@selasky.org> <78DD67BD-621C-451D-8E30-EC9BF396716F@FreeBSD.org> <551E6E72.8050208@selasky.org> <20150403112927.GQ64665@FreeBSD.org> <551E8A96.6030806@selasky.org> User-Agent: Alpine 2.11 (BSF 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Mateusz Guzik , src-committers@freebsd.org, Ian Lepore , svn-src-all@freebsd.org, Gleb Smirnoff , svn-src-head@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 Apr 2015 16:28:32 -0000 On Fri, 3 Apr 2015, Hans Petter Selasky wrote: > Will you mind if I rephrase that paragraph in the "inet.4" manual page from: > > "This closes a minor information leak which allows remote observers to > determine the rate of packet generation on the machine by watching the > counter." > > Into: > > "This prevents high-speed information exchange between internal and external > observers using packet frequency modulation. An outside observer can ping > the outside facing port at a fixed rate watching the counter. An inside > observer can ping the inside facing port watching the same counter. Even > though packets don't flow between the two ports, data can be exchanged by > watching changes in the packet rate. It is believed that data can be > exchanged in Kb/s range this way. Setting this sysctl also prevents remote > and internal observers to determine the rate of packet generation on the > machine by watching the counter." Yes, I think this is overly alarmist, and it suggests that other covert channels might not exist to be exploited if the knob is set -- which isn't true. We don't promise that there are no covert channels in FreeBSD, and we would be foolish if we did promise that. Robert From owner-svn-src-all@FreeBSD.ORG Fri Apr 3 16:31:37 2015 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 C5F8DE6E; Fri, 3 Apr 2015 16:31:37 +0000 (UTC) Received: from cyrus.watson.org (cyrus.watson.org [198.74.231.69]) by mx1.freebsd.org (Postfix) with ESMTP id 793E4F9F; Fri, 3 Apr 2015 16:31:37 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [198.74.231.63]) by cyrus.watson.org (Postfix) with ESMTPS id 23D0646BA9; Fri, 3 Apr 2015 12:31:37 -0400 (EDT) Date: Fri, 3 Apr 2015 17:31:37 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Emeric POUPON Subject: Re: svn commit: r280971 - in head: contrib/ipfilter/tools share/man/man4 sys/contrib/ipfilter/netinet sys/netinet sys/netipsec sys/netpfil/pf In-Reply-To: <206317407.27296349.1428068318117.JavaMail.zimbra@stormshield.eu> Message-ID: References: <551DA5EA.1080908@selasky.org> <6DF5FB51-8135-4144-BD3A-6E4127A23AA7@FreeBSD.org> <551E5C38.7070203@selasky.org> <78DD67BD-621C-451D-8E30-EC9BF396716F@FreeBSD.org> <551E6E72.8050208@selasky.org> <20150403112927.GQ64665@FreeBSD.org> <551E8A96.6030806@selasky.org> <551E906B.3010900@selasky.org> <206317407.27296349.1428068318117.JavaMail.zimbra@stormshield.eu> User-Agent: Alpine 2.11 (BSF 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=utf-8; format=flowed Content-Transfer-Encoding: 8BIT X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: Hans Petter Selasky , Mateusz Guzik , src-committers@freebsd.org, Ian Lepore , svn-src-all@freebsd.org, Gleb Smirnoff , svn-src-head@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 Apr 2015 16:31:38 -0000 On Fri, 3 Apr 2015, Emeric POUPON wrote: > A good ip id random would be certainly better. But the current > implementation is far from being optimized: a lock is being held inside > arc4rand, and another one for protecting the ip_id internals. We already > have contention problems with the IV generated for ESP packets. The > randomized ip id, using this implementation, is my opinion not an acceptable > solution. Presumably, arc4random() should draw from per-CPU PRNGs to avoid contention, which would have positive scalability effects elsewhere in the stack as well. It is, of course, important that they be seeded independently in order to provide different pseudo-random number sequences! However, the point made earlier in the thread holds: I'm not convinced that our IP ID randomisation is suitable for use given conflation of the IP ID spaces. There's just too much chance of a collision if you are actually seeing a lot of fragmentation with multiple 2-tuple pairs. Robert > > Regards, > > Emeric > > > ----- Mail original ----- > De: "Hans Petter Selasky" > À: "Gleb Smirnoff" > Cc: "Mateusz Guzik" , "Ian Lepore" , svn-src-all@freebsd.org, src-committers@freebsd.org, "Robert N. M. Watson" , svn-src-head@freebsd.org > Envoyé: Vendredi 3 Avril 2015 15:06:51 > Objet: Re: svn commit: r280971 - in head: contrib/ipfilter/tools share/man/man4 sys/contrib/ipfilter/netinet sys/netinet sys/netipsec sys/netpfil/pf > > On 04/03/15 14:41, Hans Petter Selasky wrote: >> On 04/03/15 13:29, Gleb Smirnoff wrote: >>> On Fri, Apr 03, 2015 at 12:41:54PM +0200, Hans Petter Selasky wrote: >>> H> "ip_do_randomid" is zero by default, and is not documented anywhere: >>> H> >>> H> grep -r ip_do_randomid share/ >>> >>> It is documented in inet(4). >>> >>> The actual sysctl knob doesn't match the kernel symbol name, which is >>> allowed in sysctl(9). >>> >> >> Hi, >> >> Will you mind if I rephrase that paragraph in the "inet.4" manual page >> from: >> >> "This closes a minor information leak which allows remote observers to >> determine the rate of packet generation on the machine by watching the >> counter." >> >> Into: >> >> "This prevents high-speed information exchange between internal and >> external observers using packet frequency modulation. An outside >> observer can ping the outside facing port at a fixed rate watching the >> counter. An inside observer can ping the inside facing port watching the >> same counter. Even though packets don't flow between the two ports, data >> can be exchanged by watching changes in the packet rate. It is believed >> that data can be exchanged in Kb/s range this way. Setting this sysctl >> also prevents remote and internal observers to determine the rate of >> packet generation on the machine by watching the counter." >> > > Hi, > > Maybe there will be some new applications after this discovery. No need > for uPnP any more. Could be nice to send text messages through > firewalls. Depends how many implement the IP ID counting the same way > like FreeBSD does ;-) > > --HPS > > _______________________________________________ > svn-src-all@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" > > From owner-svn-src-all@FreeBSD.ORG Fri Apr 3 16:37:53 2015 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 C90F842D; Fri, 3 Apr 2015 16:37:53 +0000 (UTC) Received: from woozle.rinet.ru (woozle.rinet.ru [195.54.192.68]) (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 C73D3F8; Fri, 3 Apr 2015 16:37:52 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by woozle.rinet.ru (8.14.5/8.14.5) with ESMTP id t33GbEjx082093; Fri, 3 Apr 2015 19:37:14 +0300 (MSK) (envelope-from marck@rinet.ru) Date: Fri, 3 Apr 2015 19:37:14 +0300 (MSK) From: Dmitry Morozovsky To: Alexander Motin Subject: Re: svn commit: r281026 - in head/sys: cddl/contrib/opensolaris/uts/common/fs/zfs kern sys In-Reply-To: <201504031445.t33EjnJx099446@svn.freebsd.org> Message-ID: References: <201504031445.t33EjnJx099446@svn.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-NCC-RegID: ru.rinet X-OpenPGP-Key-ID: 6B691B03 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (woozle.rinet.ru [0.0.0.0]); Fri, 03 Apr 2015 19:37:14 +0300 (MSK) 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 Apr 2015 16:37:53 -0000 Alexander, On Fri, 3 Apr 2015, Alexander Motin wrote: > Author: mav > Date: Fri Apr 3 14:45:48 2015 > New Revision: 281026 > URL: https://svnweb.freebsd.org/changeset/base/281026 > > Log: > Make ZFS ARC track both KVA usage and fragmentation. > > Even on Illumos, with its much larger KVA, ZFS ARC steps back if KVA usage > reaches certain threshold (3/4 on i386 or 16/17 otherwise). FreeBSD has > even less KVA, but had no such limit on archs with direct map as amd64. > As result, on machines with a lot of RAM, during load with very small user- > space memory pressure, such as `zfs send`, it was possible to reach state, > when there is enough both physical RAM and KVA (I've seen up to 25-30%), > but no continuous KVA range to allocate even single 128KB I/O request. > > Address this situation from two sides: > - restore KVA usage limitations in a way the most close to Illumos; > - introduce new requirement for KVA fragmentation, specifying that we > should have at least one sequential KVA range of zfs_max_recordsize bytes. > > Experiments show that first limitation done alone is not sufficient. On > machine with 64GB of RAM it is sometimes needed to drop up to half of ARC > size to get at leats one 1MB KVA chunk. Statically limiting ARC to half > of KVA/RAM is too strict, so second limitation makes it to work in cycles: > accumulate trash up to certain critical mass, do massive spring-cleaning, > and then start littering again. :) > > MFC after: 1 month Wow. Excellent dig, thank you. -- Sincerely, D.Marck [DM5020, MCK-RIPE, DM3-RIPN] [ FreeBSD committer: marck@FreeBSD.org ] ------------------------------------------------------------------------ *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru *** ------------------------------------------------------------------------ From owner-svn-src-all@FreeBSD.ORG Fri Apr 3 16:40:40 2015 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 A3D6159B; Fri, 3 Apr 2015 16:40: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 8C5A1109; Fri, 3 Apr 2015 16: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 t33Geea4056525; Fri, 3 Apr 2015 16:40:40 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t33GeeKX056498; Fri, 3 Apr 2015 16:40:40 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201504031640.t33GeeKX056498@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Fri, 3 Apr 2015 16:40:40 +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: r281029 - 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: Fri, 03 Apr 2015 16:40:40 -0000 Author: alc Date: Fri Apr 3 16:40:39 2015 New Revision: 281029 URL: https://svnweb.freebsd.org/changeset/base/281029 Log: MFC r279720 Correct a typo in vm_object_backing_scan() that originated in r254141. Specifically, change a lock acquire into a lock release. Modified: stable/10/sys/vm/vm_object.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/vm_object.c ============================================================================== --- stable/10/sys/vm/vm_object.c Fri Apr 3 15:47:48 2015 (r281028) +++ stable/10/sys/vm/vm_object.c Fri Apr 3 16:40:39 2015 (r281029) @@ -1628,7 +1628,7 @@ vm_object_backing_scan(vm_object_t objec p = next; continue; } - VM_OBJECT_WLOCK(backing_object); + VM_OBJECT_WUNLOCK(backing_object); VM_OBJECT_WUNLOCK(object); VM_WAIT; VM_OBJECT_WLOCK(object); From owner-svn-src-all@FreeBSD.ORG Fri Apr 3 17:12:25 2015 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 C5E3E70A; Fri, 3 Apr 2015 17:12: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 B00BB78F; Fri, 3 Apr 2015 17:12: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 t33HCPRl073564; Fri, 3 Apr 2015 17:12:25 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t33HCPnX073563; Fri, 3 Apr 2015 17:12:25 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201504031712.t33HCPnX073563@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 3 Apr 2015 17:12:25 +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: r281030 - stable/10/lib/libc/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 Apr 2015 17:12:25 -0000 Author: bdrewery Date: Fri Apr 3 17:12:24 2015 New Revision: 281030 URL: https://svnweb.freebsd.org/changeset/base/281030 Log: MFC r272291: Document [EPERM] for UNIX sockets. Modified: stable/10/lib/libc/sys/connect.2 Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/sys/connect.2 ============================================================================== --- stable/10/lib/libc/sys/connect.2 Fri Apr 3 16:40:39 2015 (r281029) +++ stable/10/lib/libc/sys/connect.2 Fri Apr 3 17:12:24 2015 (r281030) @@ -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 Fri Apr 3 17:13:21 2015 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 4210C842; Fri, 3 Apr 2015 17:13: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 2A412796; Fri, 3 Apr 2015 17:13: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 t33HDLUk073723; Fri, 3 Apr 2015 17:13:21 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t33HDLX1073722; Fri, 3 Apr 2015 17:13:21 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201504031713.t33HDLX1073722@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 3 Apr 2015 17:13:21 +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: r281031 - stable/9/lib/libc/sys 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: Fri, 03 Apr 2015 17:13:21 -0000 Author: bdrewery Date: Fri Apr 3 17:13:20 2015 New Revision: 281031 URL: https://svnweb.freebsd.org/changeset/base/281031 Log: MFC r272291: Document [EPERM] for UNIX sockets. Modified: stable/9/lib/libc/sys/connect.2 Directory Properties: stable/9/lib/libc/ (props changed) stable/9/lib/libc/sys/ (props changed) Modified: stable/9/lib/libc/sys/connect.2 ============================================================================== --- stable/9/lib/libc/sys/connect.2 Fri Apr 3 17:12:24 2015 (r281030) +++ stable/9/lib/libc/sys/connect.2 Fri Apr 3 17:13:20 2015 (r281031) @@ -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 Fri Apr 3 17:14:20 2015 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 BC1A6A56; Fri, 3 Apr 2015 17: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 A60757A7; Fri, 3 Apr 2015 17: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 t33HEKdB073945; Fri, 3 Apr 2015 17:14:20 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t33HEKDv073944; Fri, 3 Apr 2015 17:14:20 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201504031714.t33HEKDv073944@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 3 Apr 2015 17:14:20 +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: r281032 - stable/8/lib/libc/sys 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: Fri, 03 Apr 2015 17:14:20 -0000 Author: bdrewery Date: Fri Apr 3 17:14:19 2015 New Revision: 281032 URL: https://svnweb.freebsd.org/changeset/base/281032 Log: MFC r272291: Document [EPERM] for UNIX sockets. Modified: stable/8/lib/libc/sys/connect.2 Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/sys/ (props changed) Modified: stable/8/lib/libc/sys/connect.2 ============================================================================== --- stable/8/lib/libc/sys/connect.2 Fri Apr 3 17:13:20 2015 (r281031) +++ stable/8/lib/libc/sys/connect.2 Fri Apr 3 17:14:19 2015 (r281032) @@ -28,7 +28,7 @@ .\" @(#)connect.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd September 5, 2010 +.Dd September 29, 2014 .Dt CONNECT 2 .Os .Sh NAME @@ -156,6 +156,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 Fri Apr 3 17:16:07 2015 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 0D25ABB7; Fri, 3 Apr 2015 17:16: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 EB83F7C1; Fri, 3 Apr 2015 17:16: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 t33HG6UB074263; Fri, 3 Apr 2015 17:16:06 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t33HG6fD074262; Fri, 3 Apr 2015 17:16:06 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201504031716.t33HG6fD074262@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 3 Apr 2015 17:16:06 +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: r281033 - stable/10/lib/libc/nls 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 Apr 2015 17:16:07 -0000 Author: bdrewery Date: Fri Apr 3 17:16:05 2015 New Revision: 281033 URL: https://svnweb.freebsd.org/changeset/base/281033 Log: MFC r278530: When catopen(3) returns an error, it caches the result of that error from r202992. The refcount on the cache entry is not initialized, so any attempt to clean the cache will skip over this item since it likely has a >0 value. This change is currently a NOP. Modified: stable/10/lib/libc/nls/msgcat.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/nls/msgcat.c ============================================================================== --- stable/10/lib/libc/nls/msgcat.c Fri Apr 3 17:14:19 2015 (r281032) +++ stable/10/lib/libc/nls/msgcat.c Fri Apr 3 17:16:05 2015 (r281033) @@ -83,6 +83,7 @@ __FBSDID("$FreeBSD$"); np->name = strdup(n); \ np->path = NULL; \ np->catd = NLERR; \ + np->refcount = 0; \ np->lang = (l == NULL) ? NULL : \ strdup(l); \ np->caterrno = e; \ From owner-svn-src-all@FreeBSD.ORG Fri Apr 3 17:17:18 2015 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 3DF0DCF8; Fri, 3 Apr 2015 17:17: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 286327CE; Fri, 3 Apr 2015 17:17: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 t33HHI7l074464; Fri, 3 Apr 2015 17:17:18 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t33HHISD074463; Fri, 3 Apr 2015 17:17:18 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201504031717.t33HHISD074463@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 3 Apr 2015 17:17: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: r281034 - stable/9/lib/libc/nls 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: Fri, 03 Apr 2015 17:17:18 -0000 Author: bdrewery Date: Fri Apr 3 17:17:17 2015 New Revision: 281034 URL: https://svnweb.freebsd.org/changeset/base/281034 Log: MFC r278530: When catopen(3) returns an error, it caches the result of that error from r202992. The refcount on the cache entry is not initialized, so any attempt to clean the cache will skip over this item since it likely has a >0 value. This change is currently a NOP. Modified: stable/9/lib/libc/nls/msgcat.c Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/nls/msgcat.c ============================================================================== --- stable/9/lib/libc/nls/msgcat.c Fri Apr 3 17:16:05 2015 (r281033) +++ stable/9/lib/libc/nls/msgcat.c Fri Apr 3 17:17:17 2015 (r281034) @@ -82,6 +82,7 @@ __FBSDID("$FreeBSD$"); if (np != NULL) { \ np->name = strdup(n); \ np->path = NULL; \ + np->refcount = 0; \ np->lang = (l == NULL) ? NULL : \ strdup(l); \ np->caterrno = e; \ From owner-svn-src-all@FreeBSD.ORG Fri Apr 3 17:18:06 2015 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 E5A36E36; Fri, 3 Apr 2015 17:18: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 CFD587D9; Fri, 3 Apr 2015 17:18: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 t33HI6sK074622; Fri, 3 Apr 2015 17:18:06 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t33HI6Tx074621; Fri, 3 Apr 2015 17:18:06 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201504031718.t33HI6Tx074621@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 3 Apr 2015 17:18:06 +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: r281035 - stable/8/lib/libc/nls 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: Fri, 03 Apr 2015 17:18:07 -0000 Author: bdrewery Date: Fri Apr 3 17:18:05 2015 New Revision: 281035 URL: https://svnweb.freebsd.org/changeset/base/281035 Log: MFC r278530: When catopen(3) returns an error, it caches the result of that error from r202992. The refcount on the cache entry is not initialized, so any attempt to clean the cache will skip over this item since it likely has a >0 value. This change is currently a NOP. Modified: stable/8/lib/libc/nls/msgcat.c Directory Properties: stable/8/lib/libc/ (props changed) Modified: stable/8/lib/libc/nls/msgcat.c ============================================================================== --- stable/8/lib/libc/nls/msgcat.c Fri Apr 3 17:17:17 2015 (r281034) +++ stable/8/lib/libc/nls/msgcat.c Fri Apr 3 17:18:05 2015 (r281035) @@ -82,6 +82,7 @@ __FBSDID("$FreeBSD$"); if (np != NULL) { \ np->name = strdup(n); \ np->path = NULL; \ + np->refcount = 0; \ np->lang = (l == NULL) ? NULL : \ strdup(l); \ np->caterrno = e; \ From owner-svn-src-all@FreeBSD.ORG Fri Apr 3 17:19:30 2015 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 8EF4CF7A; Fri, 3 Apr 2015 17:19: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 7952D7E9; Fri, 3 Apr 2015 17:19: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 t33HJUs4074842; Fri, 3 Apr 2015 17:19:30 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t33HJUBB074840; Fri, 3 Apr 2015 17:19:30 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201504031719.t33HJUBB074840@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 3 Apr 2015 17:19: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: r281036 - stable/10/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: Fri, 03 Apr 2015 17:19:30 -0000 Author: bdrewery Date: Fri Apr 3 17:19:29 2015 New Revision: 281036 URL: https://svnweb.freebsd.org/changeset/base/281036 Log: MFC r278600: Correct and clarify comment for __SMBF. Modified: stable/10/include/stdio.h Directory Properties: stable/10/ (props changed) Modified: stable/10/include/stdio.h ============================================================================== --- stable/10/include/stdio.h Fri Apr 3 17:18:05 2015 (r281035) +++ stable/10/include/stdio.h Fri Apr 3 17:19:29 2015 (r281036) @@ -166,7 +166,7 @@ __END_DECLS #define __SRW 0x0010 /* open for reading & writing */ #define __SEOF 0x0020 /* found EOF */ #define __SERR 0x0040 /* found error */ -#define __SMBF 0x0080 /* _buf is from malloc */ +#define __SMBF 0x0080 /* _bf._base is from malloc */ #define __SAPP 0x0100 /* fdopen()ed in append mode */ #define __SSTR 0x0200 /* this is an sprintf/snprintf string */ #define __SOPT 0x0400 /* do fseek() optimization */ From owner-svn-src-all@FreeBSD.ORG Fri Apr 3 17:21:31 2015 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 5521D147; Fri, 3 Apr 2015 17:21: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 3F843892; Fri, 3 Apr 2015 17:21: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 t33HLVA1076741; Fri, 3 Apr 2015 17:21:31 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t33HLVpu076740; Fri, 3 Apr 2015 17:21:31 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201504031721.t33HLVpu076740@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 3 Apr 2015 17:21:31 +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: r281037 - stable/10/share/mk 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 Apr 2015 17:21:31 -0000 Author: bdrewery Date: Fri Apr 3 17:21:30 2015 New Revision: 281037 URL: https://svnweb.freebsd.org/changeset/base/281037 Log: MFC r280177: Remove unneeded handling of undefined NM. Modified: stable/10/share/mk/bsd.lib.mk Directory Properties: stable/10/ (props changed) Modified: stable/10/share/mk/bsd.lib.mk ============================================================================== --- stable/10/share/mk/bsd.lib.mk Fri Apr 3 17:19:29 2015 (r281036) +++ stable/10/share/mk/bsd.lib.mk Fri Apr 3 17:21:30 2015 (r281037) @@ -168,11 +168,7 @@ _LIBS= lib${LIB}.a lib${LIB}.a: ${OBJS} ${STATICOBJS} @${ECHO} building static ${LIB} library @rm -f ${.TARGET} -.if !defined(NM) - @${AR} ${ARFLAGS} ${.TARGET} `lorder ${OBJS} ${STATICOBJS} | tsort -q` ${ARADD} -.else @${AR} ${ARFLAGS} ${.TARGET} `NM='${NM}' lorder ${OBJS} ${STATICOBJS} | tsort -q` ${ARADD} -.endif ${RANLIB} ${RANLIBFLAGS} ${.TARGET} .endif @@ -185,11 +181,7 @@ POBJS+= ${OBJS:.o=.po} ${STATICOBJS:.o= lib${LIB}_p.a: ${POBJS} @${ECHO} building profiled ${LIB} library @rm -f ${.TARGET} -.if !defined(NM) - @${AR} ${ARFLAGS} ${.TARGET} `lorder ${POBJS} | tsort -q` ${ARADD} -.else @${AR} ${ARFLAGS} ${.TARGET} `NM='${NM}' lorder ${POBJS} | tsort -q` ${ARADD} -.endif ${RANLIB} ${RANLIBFLAGS} ${.TARGET} .endif @@ -216,15 +208,9 @@ ${SHLIB_NAME_FULL}: ${SOBJS} .if defined(SHLIB_LINK) @${INSTALL_SYMLINK} ${SHLIB_NAME} ${SHLIB_LINK} .endif -.if !defined(NM) - @${CC} ${LDFLAGS} ${SSP_CFLAGS} ${SOLINKOPTS} \ - -o ${.TARGET} -Wl,-soname,${SONAME} \ - `lorder ${SOBJS} | tsort -q` ${LDADD} -.else @${CC} ${LDFLAGS} ${SSP_CFLAGS} ${SOLINKOPTS} \ -o ${.TARGET} -Wl,-soname,${SONAME} \ `NM='${NM}' lorder ${SOBJS} | tsort -q` ${LDADD} -.endif .if ${MK_CTF} != "no" ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SOBJS} .endif From owner-svn-src-all@FreeBSD.ORG Fri Apr 3 17:25:42 2015 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 948F3553; Fri, 3 Apr 2015 17:25: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 7EA148E1; Fri, 3 Apr 2015 17:25: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 t33HPgWM079340; Fri, 3 Apr 2015 17:25:42 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t33HPgim079339; Fri, 3 Apr 2015 17:25:42 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201504031725.t33HPgim079339@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 3 Apr 2015 17:25:42 +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: r281038 - stable/9/share/mk 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: Fri, 03 Apr 2015 17:25:42 -0000 Author: bdrewery Date: Fri Apr 3 17:25:41 2015 New Revision: 281038 URL: https://svnweb.freebsd.org/changeset/base/281038 Log: MFC r280177: Remove unneeded handling of undefined NM. Modified: stable/9/share/mk/bsd.lib.mk Directory Properties: stable/9/share/mk/ (props changed) Modified: stable/9/share/mk/bsd.lib.mk ============================================================================== --- stable/9/share/mk/bsd.lib.mk Fri Apr 3 17:21:30 2015 (r281037) +++ stable/9/share/mk/bsd.lib.mk Fri Apr 3 17:25:41 2015 (r281038) @@ -167,11 +167,7 @@ _LIBS= lib${LIB}.a lib${LIB}.a: ${OBJS} ${STATICOBJS} @${ECHO} building static ${LIB} library @rm -f ${.TARGET} -.if !defined(NM) - @${AR} cq ${.TARGET} `lorder ${OBJS} ${STATICOBJS} | tsort -q` ${ARADD} -.else @${AR} cq ${.TARGET} `NM='${NM}' lorder ${OBJS} ${STATICOBJS} | tsort -q` ${ARADD} -.endif ${RANLIB} ${.TARGET} .endif @@ -184,11 +180,7 @@ POBJS+= ${OBJS:.o=.po} ${STATICOBJS:.o= lib${LIB}_p.a: ${POBJS} @${ECHO} building profiled ${LIB} library @rm -f ${.TARGET} -.if !defined(NM) - @${AR} cq ${.TARGET} `lorder ${POBJS} | tsort -q` ${ARADD} -.else @${AR} cq ${.TARGET} `NM='${NM}' lorder ${POBJS} | tsort -q` ${ARADD} -.endif ${RANLIB} ${.TARGET} .endif @@ -215,15 +207,9 @@ ${SHLIB_NAME_FULL}: ${SOBJS} .if defined(SHLIB_LINK) @${INSTALL_SYMLINK} ${SHLIB_NAME} ${SHLIB_LINK} .endif -.if !defined(NM) - @${CC} ${LDFLAGS} ${SSP_CFLAGS} ${SOLINKOPTS} \ - -o ${.TARGET} -Wl,-soname,${SONAME} \ - `lorder ${SOBJS} | tsort -q` ${LDADD} -.else @${CC} ${LDFLAGS} ${SSP_CFLAGS} ${SOLINKOPTS} \ -o ${.TARGET} -Wl,-soname,${SONAME} \ `NM='${NM}' lorder ${SOBJS} | tsort -q` ${LDADD} -.endif .if ${MK_CTF} != "no" ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SOBJS} .endif From owner-svn-src-all@FreeBSD.ORG Fri Apr 3 17:35:31 2015 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 67FBBE4B; Fri, 3 Apr 2015 17:35: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 5295C9EF; Fri, 3 Apr 2015 17:35: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 t33HZVkN085052; Fri, 3 Apr 2015 17:35:31 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t33HZVpL085050; Fri, 3 Apr 2015 17:35:31 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201504031735.t33HZVpL085050@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 3 Apr 2015 17:35:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281039 - head/usr.sbin/pkg 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 Apr 2015 17:35:31 -0000 Author: bapt Date: Fri Apr 3 17:35:30 2015 New Revision: 281039 URL: https://svnweb.freebsd.org/changeset/base/281039 Log: Allow fetching pkg(8) even if servers/proxies are not passing Content-length Modified: head/usr.sbin/pkg/pkg.c Modified: head/usr.sbin/pkg/pkg.c ============================================================================== --- head/usr.sbin/pkg/pkg.c Fri Apr 3 17:25:41 2015 (r281038) +++ head/usr.sbin/pkg/pkg.c Fri Apr 3 17:35:30 2015 (r281039) @@ -47,7 +47,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include @@ -177,14 +176,11 @@ fetch_to_fd(const char *url, char *path) /* To store _https._tcp. + hostname + \0 */ int fd; int retry, max_retry; - off_t done, r; - time_t now, last; + ssize_t r; char buf[10240]; char zone[MAXHOSTNAMELEN + 13]; static const char *mirror_type = NULL; - done = 0; - last = 0; max_retry = 3; current = mirrors = NULL; remote = NULL; @@ -238,19 +234,16 @@ fetch_to_fd(const char *url, char *path) } } - while (done < st.size) { - if ((r = fread(buf, 1, sizeof(buf), remote)) < 1) - break; - + while ((r = fread(buf, 1, sizeof(buf), remote)) > 0) { if (write(fd, buf, r) != r) { warn("write()"); goto fetchfail; } + } - done += r; - now = time(NULL); - if (now > last || done == st.size) - last = now; + if (r != 0) { + warn("An error occurred while fetching pkg(8)"); + goto fetchfail; } if (ferror(remote)) From owner-svn-src-all@FreeBSD.ORG Fri Apr 3 17:49:16 2015 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 88418208; Fri, 3 Apr 2015 17:49: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 724F4B60; Fri, 3 Apr 2015 17:49: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 t33HnGoR090424; Fri, 3 Apr 2015 17:49:16 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t33HnGAo090423; Fri, 3 Apr 2015 17:49:16 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201504031749.t33HnGAo090423@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 3 Apr 2015 17:49:16 +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: r281040 - stable/8/share/mk 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: Fri, 03 Apr 2015 17:49:16 -0000 Author: bdrewery Date: Fri Apr 3 17:49:15 2015 New Revision: 281040 URL: https://svnweb.freebsd.org/changeset/base/281040 Log: MFC r280177: Remove unneeded handling of undefined NM. Modified: stable/8/share/mk/bsd.lib.mk Directory Properties: stable/8/share/mk/ (props changed) Modified: stable/8/share/mk/bsd.lib.mk ============================================================================== --- stable/8/share/mk/bsd.lib.mk Fri Apr 3 17:35:30 2015 (r281039) +++ stable/8/share/mk/bsd.lib.mk Fri Apr 3 17:49:15 2015 (r281040) @@ -138,11 +138,7 @@ _LIBS= lib${LIB}.a lib${LIB}.a: ${OBJS} ${STATICOBJS} @${ECHO} building static ${LIB} library @rm -f ${.TARGET} -.if !defined(NM) - @${AR} cq ${.TARGET} `lorder ${OBJS} ${STATICOBJS} | tsort -q` ${ARADD} -.else @${AR} cq ${.TARGET} `NM='${NM}' lorder ${OBJS} ${STATICOBJS} | tsort -q` ${ARADD} -.endif ${RANLIB} ${.TARGET} .endif @@ -155,11 +151,7 @@ POBJS+= ${OBJS:.o=.po} ${STATICOBJS:.o= lib${LIB}_p.a: ${POBJS} @${ECHO} building profiled ${LIB} library @rm -f ${.TARGET} -.if !defined(NM) - @${AR} cq ${.TARGET} `lorder ${POBJS} | tsort -q` ${ARADD} -.else @${AR} cq ${.TARGET} `NM='${NM}' lorder ${POBJS} | tsort -q` ${ARADD} -.endif ${RANLIB} ${.TARGET} .endif @@ -181,15 +173,9 @@ ${SHLIB_NAME}: ${SOBJS} .if defined(SHLIB_LINK) @ln -fs ${.TARGET} ${SHLIB_LINK} .endif -.if !defined(NM) - @${CC} ${LDFLAGS} ${SSP_CFLAGS} -shared -Wl,-x \ - -o ${.TARGET} -Wl,-soname,${SONAME} \ - `lorder ${SOBJS} | tsort -q` ${LDADD} -.else @${CC} ${LDFLAGS} ${SSP_CFLAGS} -shared -Wl,-x \ -o ${.TARGET} -Wl,-soname,${SONAME} \ `NM='${NM}' lorder ${SOBJS} | tsort -q` ${LDADD} -.endif .if ${MK_CTF} != "no" ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SOBJS} .endif From owner-svn-src-all@FreeBSD.ORG Fri Apr 3 17:51:38 2015 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 4BCDA359; Fri, 3 Apr 2015 17:51: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 35DEAC08; Fri, 3 Apr 2015 17:51: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 t33Hpc8J093717; Fri, 3 Apr 2015 17:51:38 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t33Hpc4r093716; Fri, 3 Apr 2015 17:51:38 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201504031751.t33Hpc4r093716@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 3 Apr 2015 17:51:38 +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: r281041 - stable/10/share/mk 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 Apr 2015 17:51:38 -0000 Author: bdrewery Date: Fri Apr 3 17:51:37 2015 New Revision: 281041 URL: https://svnweb.freebsd.org/changeset/base/281041 Log: MFC r280178: Unhide linker line for libraries. Modified: stable/10/share/mk/bsd.lib.mk Directory Properties: stable/10/ (props changed) Modified: stable/10/share/mk/bsd.lib.mk ============================================================================== --- stable/10/share/mk/bsd.lib.mk Fri Apr 3 17:49:15 2015 (r281040) +++ stable/10/share/mk/bsd.lib.mk Fri Apr 3 17:51:37 2015 (r281041) @@ -208,7 +208,7 @@ ${SHLIB_NAME_FULL}: ${SOBJS} .if defined(SHLIB_LINK) @${INSTALL_SYMLINK} ${SHLIB_NAME} ${SHLIB_LINK} .endif - @${CC} ${LDFLAGS} ${SSP_CFLAGS} ${SOLINKOPTS} \ + ${CC} ${LDFLAGS} ${SSP_CFLAGS} ${SOLINKOPTS} \ -o ${.TARGET} -Wl,-soname,${SONAME} \ `NM='${NM}' lorder ${SOBJS} | tsort -q` ${LDADD} .if ${MK_CTF} != "no" From owner-svn-src-all@FreeBSD.ORG Fri Apr 3 17:52:58 2015 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 7E12F49B; Fri, 3 Apr 2015 17:52: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 6884DC1A; Fri, 3 Apr 2015 17:52: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 t33HqwVg094382; Fri, 3 Apr 2015 17:52:58 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t33Hqwst094381; Fri, 3 Apr 2015 17:52:58 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201504031752.t33Hqwst094381@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 3 Apr 2015 17:52:58 +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: r281042 - stable/9/share/mk 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: Fri, 03 Apr 2015 17:52:58 -0000 Author: bdrewery Date: Fri Apr 3 17:52:57 2015 New Revision: 281042 URL: https://svnweb.freebsd.org/changeset/base/281042 Log: MFC r280178: Unhide linker line for libraries. Modified: stable/9/share/mk/bsd.lib.mk Directory Properties: stable/9/share/mk/ (props changed) Modified: stable/9/share/mk/bsd.lib.mk ============================================================================== --- stable/9/share/mk/bsd.lib.mk Fri Apr 3 17:51:37 2015 (r281041) +++ stable/9/share/mk/bsd.lib.mk Fri Apr 3 17:52:57 2015 (r281042) @@ -207,7 +207,7 @@ ${SHLIB_NAME_FULL}: ${SOBJS} .if defined(SHLIB_LINK) @${INSTALL_SYMLINK} ${SHLIB_NAME} ${SHLIB_LINK} .endif - @${CC} ${LDFLAGS} ${SSP_CFLAGS} ${SOLINKOPTS} \ + ${CC} ${LDFLAGS} ${SSP_CFLAGS} ${SOLINKOPTS} \ -o ${.TARGET} -Wl,-soname,${SONAME} \ `NM='${NM}' lorder ${SOBJS} | tsort -q` ${LDADD} .if ${MK_CTF} != "no" From owner-svn-src-all@FreeBSD.ORG Fri Apr 3 17:54:49 2015 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 98B5F5F4; Fri, 3 Apr 2015 17:54: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 829F3C34; Fri, 3 Apr 2015 17:54: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 t33HsndL094657; Fri, 3 Apr 2015 17:54:49 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t33HsnLr094656; Fri, 3 Apr 2015 17:54:49 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201504031754.t33HsnLr094656@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 3 Apr 2015 17:54:49 +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: r281043 - stable/8/share/mk 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: Fri, 03 Apr 2015 17:54:49 -0000 Author: bdrewery Date: Fri Apr 3 17:54:48 2015 New Revision: 281043 URL: https://svnweb.freebsd.org/changeset/base/281043 Log: MFC r280178: Unhide linker line for libraries. Modified: stable/8/share/mk/bsd.lib.mk Directory Properties: stable/8/share/mk/ (props changed) Modified: stable/8/share/mk/bsd.lib.mk ============================================================================== --- stable/8/share/mk/bsd.lib.mk Fri Apr 3 17:52:57 2015 (r281042) +++ stable/8/share/mk/bsd.lib.mk Fri Apr 3 17:54:48 2015 (r281043) @@ -173,7 +173,7 @@ ${SHLIB_NAME}: ${SOBJS} .if defined(SHLIB_LINK) @ln -fs ${.TARGET} ${SHLIB_LINK} .endif - @${CC} ${LDFLAGS} ${SSP_CFLAGS} -shared -Wl,-x \ + ${CC} ${LDFLAGS} ${SSP_CFLAGS} -shared -Wl,-x \ -o ${.TARGET} -Wl,-soname,${SONAME} \ `NM='${NM}' lorder ${SOBJS} | tsort -q` ${LDADD} .if ${MK_CTF} != "no" From owner-svn-src-all@FreeBSD.ORG Fri Apr 3 18:01:52 2015 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 DC7CC946; Fri, 3 Apr 2015 18:01: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 C62A0D33; Fri, 3 Apr 2015 18:01: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 t33I1qbs098814; Fri, 3 Apr 2015 18:01:52 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t33I1qtm098813; Fri, 3 Apr 2015 18:01:52 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201504031801.t33I1qtm098813@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 3 Apr 2015 18:01:52 +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: r281044 - stable/10/contrib/libarchive/libarchive 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 Apr 2015 18:01:53 -0000 Author: bdrewery Date: Fri Apr 3 18:01:51 2015 New Revision: 281044 URL: https://svnweb.freebsd.org/changeset/base/281044 Log: MFC r280870: Fix --one-file-system to include the directory encountered rather than excluding it. This was broken in 3.0.4 (r238856). Relnotes: yes Modified: stable/10/contrib/libarchive/libarchive/archive_read_disk_posix.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/libarchive/libarchive/archive_read_disk_posix.c ============================================================================== --- stable/10/contrib/libarchive/libarchive/archive_read_disk_posix.c Fri Apr 3 17:54:48 2015 (r281043) +++ stable/10/contrib/libarchive/libarchive/archive_read_disk_posix.c Fri Apr 3 18:01:51 2015 (r281044) @@ -974,7 +974,7 @@ next_entry(struct archive_read_disk *a, t->initial_filesystem_id = t->current_filesystem_id; if (!a->traverse_mount_points) { if (t->initial_filesystem_id != t->current_filesystem_id) - return (ARCHIVE_RETRY); + descend = 0; } t->descend = descend; From owner-svn-src-all@FreeBSD.ORG Fri Apr 3 18:38:38 2015 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 CDA6811A; Fri, 3 Apr 2015 18:38: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 B7C8F92; Fri, 3 Apr 2015 18:38: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 t33IccTO014449; Fri, 3 Apr 2015 18:38:38 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t33IcccA014448; Fri, 3 Apr 2015 18:38:38 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201504031838.t33IcccA014448@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 3 Apr 2015 18:38:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281046 - head/contrib/llvm/tools/clang/lib/Sema 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 Apr 2015 18:38:38 -0000 Author: dim Date: Fri Apr 3 18:38:37 2015 New Revision: 281046 URL: https://svnweb.freebsd.org/changeset/base/281046 Log: Pull in r227115 from upstream clang trunk (by Ben Langmuir): Fix assert instantiating string init of static variable ... when the variable's type is a typedef of a ConstantArrayType. Just look through the typedef (and any other sugar). We only use the constant array type here to get the element count. This fixes an assertion failure when building the games/redeclipse port. Reported by: amdmi3 Modified: head/contrib/llvm/tools/clang/lib/Sema/SemaInit.cpp Modified: head/contrib/llvm/tools/clang/lib/Sema/SemaInit.cpp ============================================================================== --- head/contrib/llvm/tools/clang/lib/Sema/SemaInit.cpp Fri Apr 3 18:12:11 2015 (r281045) +++ head/contrib/llvm/tools/clang/lib/Sema/SemaInit.cpp Fri Apr 3 18:38:37 2015 (r281046) @@ -149,9 +149,9 @@ static void updateStringLiteralType(Expr static void CheckStringInit(Expr *Str, QualType &DeclT, const ArrayType *AT, Sema &S) { // Get the length of the string as parsed. - uint64_t StrLength = - cast(Str->getType())->getSize().getZExtValue(); - + auto *ConstantArrayTy = + cast(Str->getType()->getUnqualifiedDesugaredType()); + uint64_t StrLength = ConstantArrayTy->getSize().getZExtValue(); if (const IncompleteArrayType *IAT = dyn_cast(AT)) { // C99 6.7.8p14. We have an array of character type with unknown size From owner-svn-src-all@FreeBSD.ORG Fri Apr 3 18:42:39 2015 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 CE02C394; Fri, 3 Apr 2015 18:42: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 9E93815B; Fri, 3 Apr 2015 18:42: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 t33Igdgn018406; Fri, 3 Apr 2015 18:42:39 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t33IgdYf018405; Fri, 3 Apr 2015 18:42:39 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201504031842.t33IgdYf018405@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 3 Apr 2015 18:42:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281047 - head/contrib/llvm/patches 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 Apr 2015 18:42:39 -0000 Author: dim Date: Fri Apr 3 18:42:38 2015 New Revision: 281047 URL: https://svnweb.freebsd.org/changeset/base/281047 Log: Add clang patch corresponding to r281046. Added: head/contrib/llvm/patches/patch-12-clang-r227115-constantarraytype.diff Added: head/contrib/llvm/patches/patch-12-clang-r227115-constantarraytype.diff ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/llvm/patches/patch-12-clang-r227115-constantarraytype.diff Fri Apr 3 18:42:38 2015 (r281047) @@ -0,0 +1,50 @@ +Pull in r227115 from upstream clang trunk (by Ben Langmuir): + + Fix assert instantiating string init of static variable + + ... when the variable's type is a typedef of a ConstantArrayType. Just + look through the typedef (and any other sugar). We only use the + constant array type here to get the element count. + +This fixes an assertion failure when building the games/redeclipse port. + +Introduced here: http://svnweb.freebsd.org/changeset/base/281046 + +Index: tools/clang/lib/Sema/SemaInit.cpp +=================================================================== +--- tools/clang/lib/Sema/SemaInit.cpp ++++ tools/clang/lib/Sema/SemaInit.cpp +@@ -149,10 +149,10 @@ static void updateStringLiteralType(Expr *E, QualT + static void CheckStringInit(Expr *Str, QualType &DeclT, const ArrayType *AT, + Sema &S) { + // Get the length of the string as parsed. +- uint64_t StrLength = +- cast(Str->getType())->getSize().getZExtValue(); ++ auto *ConstantArrayTy = ++ cast(Str->getType()->getUnqualifiedDesugaredType()); ++ uint64_t StrLength = ConstantArrayTy->getSize().getZExtValue(); + +- + if (const IncompleteArrayType *IAT = dyn_cast(AT)) { + // C99 6.7.8p14. We have an array of character type with unknown size + // being initialized to a string literal. +Index: tools/clang/test/SemaTemplate/instantiate-static-var.cpp +=================================================================== +--- tools/clang/test/SemaTemplate/instantiate-static-var.cpp ++++ tools/clang/test/SemaTemplate/instantiate-static-var.cpp +@@ -114,3 +114,15 @@ namespace PR6449 { + template class X1; + + } ++ ++typedef char MyString[100]; ++template ++struct StaticVarWithTypedefString { ++ static MyString str; ++}; ++template ++MyString StaticVarWithTypedefString::str = ""; ++ ++void testStaticVarWithTypedefString() { ++ (void)StaticVarWithTypedefString::str; ++} From owner-svn-src-all@FreeBSD.ORG Fri Apr 3 18:55:38 2015 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 9718EA62; Fri, 3 Apr 2015 18:55: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 6D7402CC; Fri, 3 Apr 2015 18:55:38 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 31E3AB986; Fri, 3 Apr 2015 14:55:37 -0400 (EDT) From: John Baldwin To: Konstantin Belousov Subject: Re: svn commit: r280866 - in head/sys: amd64/amd64 i386/i386 Date: Fri, 03 Apr 2015 13:20:20 -0400 Message-ID: <3872682.8P88THCPIf@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: <20150331183856.GT2379@kib.kiev.ua> References: <201503302013.t2UKDNCo093442@svn.freebsd.org> <3149031.gmIvmB3vKt@ralph.baldwin.cx> <20150331183856.GT2379@kib.kiev.ua> 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); Fri, 03 Apr 2015 14:55:37 -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: Fri, 03 Apr 2015 18:55:38 -0000 On Tuesday, March 31, 2015 09:38:56 PM Konstantin Belousov wrote: > On Tue, Mar 31, 2015 at 12:51:04PM -0400, John Baldwin wrote: > > I don't really know if we need to increase the delays or not. I have no idea > > what Intel's source for those numbers in the two documents are. I don't think > > I've ever seen a rationale for why they were chosen. > It might beia time to run BIST + some sloppiness for the actual initialization > code. Intel claims > > 9.1.2 Processor Built-In Self-Test (BIST) > > The overhead for performing a BIST varies between processor families. > For example, the BIST takes approximately 30 million processor clock > periods to execute on the Pentium 4 processor. This clock count is > model-specific; Intel reserves the right to change the number of periods > for any Intel 64 or IA-32 processor, without notification. Interesting. > > > > BTW, Linux seems to use the equivalent of 100 milliseconds for the > > lapic_ipi_wait() stage before doing the other delays (see > > native_safe_apic_wait_icr_idle() for the non-X2APIC case). > > My main observation is that we allow almost twice as much time for AP > to start in the xAPIC mode vs. x2APIC. But increasing the delays did > not helped the machines where it fails. I don't know that it's really twice. For INIT x2APIC waits 10000 us while the xAPIC case has gone from 10020 us to 10100 us. For the STARTUP it is a bit closer in that x2APIC is 200 us while xAPIC has gone from 220 us to 300 us. Granted, the xAPIC wait is actually variable and can be as small as the x2APIC wait of the pending bit clears immediately. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Fri Apr 3 18:55:39 2015 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 4146AA64; Fri, 3 Apr 2015 18:55:39 +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 1532B2D1; Fri, 3 Apr 2015 18:55:39 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 1B1F0B98C; Fri, 3 Apr 2015 14:55:38 -0400 (EDT) From: John Baldwin To: Adrian Chadd Subject: Re: svn commit: r280799 - head/sys/dev/ath Date: Fri, 03 Apr 2015 13:15:01 -0400 Message-ID: <1754332.VQBJusLPhT@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: References: <201503282341.t2SNfOZc032386@svn.freebsd.org> <2308891.2rLa0R7ktj@ralph.baldwin.cx> 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); Fri, 03 Apr 2015 14:55:38 -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: Fri, 03 Apr 2015 18:55:39 -0000 On Monday, March 30, 2015 01:54:30 PM Adrian Chadd wrote: > On 30 March 2015 at 13:32, John Baldwin wrote: > > On Monday, March 30, 2015 10:10:43 AM Adrian Chadd wrote: > >> Yes, because it's before the dynamic hint stuff starts up. (kern.hintmode.) > >> > >> Hints don't show up in kenv on the mips boards until I set the sysctl > >> to the "import them now!" setting. > > > > Everything in if_ath.c happens well after SYSINITs are going. Are you > > explicitly forcing hintmode to 1 in your kernel config? At least on > > x86 it always is zero and always pulls from kenv. > > > > If this is magic that config does when you have static hints, then why > > not have init_dynamic_kenv() call into subr_hints.c to pull all the > > static hints into the kenv right away? SI_SUB_KMEM is way, way before > > any device drivers start doing anything. > > This is on MIPS and not on x86. And yes, I checked - both arge and ath > probe/attach get called with no hints in kenv (ie, static hints) and I > don't recall the hintmode being explicitly set in a config file. > > I'd love to make it work via hints calls; it'd significantly simplify things. Note that all the hints processing is MI, so MIPS vs x86 shouldn't matter in theory. I think hintmode gets set to 1 "magically" by config if your kernel config includes static hints. (Looks like this is true, config will add 'hintmode = 1' in the hints.c it generates.) I think what we should do is change the kenv code to basically do the equivalent of forcing hintsmode to 2 once the dynamic kenv is ready (it has a SYSINIT for this). If you do that, I think it means you can remove the sysctl as it's more or less useless then. It will increase RAM usage a bit as you will have the duplicate copy of hints in kenv, but hints aren't very large to begin with. You could also at that point replace hintsmode with a simple boolean "use_static_hints" that gets cleared by the SYSINIT that fires to convert static hints to kenv once dynamic kenv is ready. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Fri Apr 3 19:14:29 2015 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 734EFFE9; Fri, 3 Apr 2015 19:14:29 +0000 (UTC) Received: from mail-ie0-x231.google.com (mail-ie0-x231.google.com [IPv6:2607:f8b0:4001:c03::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 360386A8; Fri, 3 Apr 2015 19:14:29 +0000 (UTC) Received: by ierf6 with SMTP id f6so96557153ier.2; Fri, 03 Apr 2015 12:14:28 -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=HA2R9z7m8hfTtypi0hQc1n/aC3JboC9TFMjhJJBEMd4=; b=EnahVdma8Cq/Nx9reKUmd93TUTULUQGs6Yxpu5H99mYzqBAaOzIiuxRIio2oHF7Uy8 G1qTP37sgr+1IXfPkoXaaZ3dcLJTuPqEI+OM8IMNdBIUFeBnisBHtyAV7915qxnpwlJJ upGOVZ1bT4OxrrmQThhMIuFITYXjdPqODZ8/F3Qq916339Uka76/To/7FQKHaYa/HaWr 3iSnY4Tvje2WaoRfVVOri2JmA7WotyXCJ8Pnc2/zi7MC8itktHDSXyh/YcFCjh1XX6IM rRbcH1YvThH5CI3chkDneb7LoPUWXKv7iLQ+0HXvCu8bBgJk9C7UI/8yhgIWR5bt2l93 KyaQ== MIME-Version: 1.0 X-Received: by 10.50.107.7 with SMTP id gy7mr6762008igb.49.1428088468710; Fri, 03 Apr 2015 12:14:28 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.36.17.194 with HTTP; Fri, 3 Apr 2015 12:14:28 -0700 (PDT) In-Reply-To: <1754332.VQBJusLPhT@ralph.baldwin.cx> References: <201503282341.t2SNfOZc032386@svn.freebsd.org> <2308891.2rLa0R7ktj@ralph.baldwin.cx> <1754332.VQBJusLPhT@ralph.baldwin.cx> Date: Fri, 3 Apr 2015 12:14:28 -0700 X-Google-Sender-Auth: 65e7mh5AmHQ-jxQFv6CWlMb206k Message-ID: Subject: Re: svn commit: r280799 - head/sys/dev/ath From: Adrian Chadd To: John Baldwin 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: Fri, 03 Apr 2015 19:14:29 -0000 Ok, I'll take a look at doing this in the atheros mips startup stuff at some point and then I'll "revert" to using the hints API. Thanks! -a From owner-svn-src-all@FreeBSD.ORG Fri Apr 3 19:33:29 2015 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 EC53F58F; Fri, 3 Apr 2015 19:33: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 CE2698CE; Fri, 3 Apr 2015 19:33: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 t33JXSk4043093; Fri, 3 Apr 2015 19:33:28 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t33JXRFI043090; Fri, 3 Apr 2015 19:33:27 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504031933.t33JXRFI043090@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 3 Apr 2015 19:33:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281048 - 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: Fri, 03 Apr 2015 19:33:29 -0000 Author: andrew Date: Fri Apr 3 19:33:26 2015 New Revision: 281048 URL: https://svnweb.freebsd.org/changeset/base/281048 Log: More ARM EABI object attributes in binutils. This adds support to binutils to include the Unaligned Access and Floating-point Half-precision attributes. the former marks ELF objects that may access ARMv6 style unaligned data, the latter that the binary uses the VFPv3/Advanced SIMD half-precision extension. These may be emmitted by clang so it's best to print a warning when the linker hits one of them. Differential Revision: http://reviews.freebsd.org/D2194 Submitted by: Michal Meloun MFC after: 1 week Modified: head/contrib/binutils/bfd/elf-bfd.h head/contrib/binutils/bfd/elf32-arm.c head/contrib/binutils/include/elf/arm.h Modified: head/contrib/binutils/bfd/elf-bfd.h ============================================================================== --- head/contrib/binutils/bfd/elf-bfd.h Fri Apr 3 18:42:38 2015 (r281047) +++ head/contrib/binutils/bfd/elf-bfd.h Fri Apr 3 19:33:26 2015 (r281048) @@ -1286,7 +1286,7 @@ struct elf_find_verdep_info }; /* The maximum number of known object attributes for any target. */ -#define NUM_KNOWN_OBJ_ATTRIBUTES 32 +#define NUM_KNOWN_OBJ_ATTRIBUTES 71 /* The value of an object attribute. type & 1 indicates whether there is an integer value; type & 2 indicates whether there is a string Modified: head/contrib/binutils/bfd/elf32-arm.c ============================================================================== --- head/contrib/binutils/bfd/elf32-arm.c Fri Apr 3 18:42:38 2015 (r281047) +++ head/contrib/binutils/bfd/elf32-arm.c Fri Apr 3 19:33:26 2015 (r281048) @@ -6835,6 +6835,8 @@ elf32_arm_merge_eabi_attributes (bfd *ib case Tag_ABI_FP_number_model: case Tag_ABI_align8_preserved: case Tag_ABI_HardFP_use: + case Tag_CPU_unaligned_access: + case Tag_FP_HP_extension: /* Use the largest value specified. */ if (in_attr[i].i > out_attr[i].i) out_attr[i].i = in_attr[i].i; @@ -6951,7 +6953,9 @@ elf32_arm_merge_eabi_attributes (bfd *ib } break; default: /* All known attributes should be explicitly covered. */ - abort (); + /* XXX Not now */ + /* abort (); */ + break; } } Modified: head/contrib/binutils/include/elf/arm.h ============================================================================== --- head/contrib/binutils/include/elf/arm.h Fri Apr 3 18:42:38 2015 (r281047) +++ head/contrib/binutils/include/elf/arm.h Fri Apr 3 19:33:26 2015 (r281048) @@ -271,7 +271,11 @@ enum Tag_ABI_optimization_goals, Tag_ABI_FP_optimization_goals, /* 32 is generic. */ - + Tag_CPU_unaligned_access = 34, + Tag_FP_HP_extension = 36, + Tag_ABI_FP_16bit_format = 38, + Tag_MPextension_use = 42, + Tag_DIV_use = 44, Tag_Virtualization_use = 68, }; From owner-svn-src-all@FreeBSD.ORG Fri Apr 3 19:43:41 2015 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 B2AC898D; Fri, 3 Apr 2015 19:43: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 949209D9; Fri, 3 Apr 2015 19:43: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 t33JhfX9048009; Fri, 3 Apr 2015 19:43:41 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t33JhdWn048002; Fri, 3 Apr 2015 19:43:39 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201504031943.t33JhdWn048002@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 3 Apr 2015 19:43:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281049 - in head: contrib/llvm/tools/llvm-cov contrib/llvm/tools/llvm-profdata usr.bin/clang usr.bin/clang/llvm-cov usr.bin/clang/llvm-profdata 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 Apr 2015 19:43:41 -0000 Author: dim Date: Fri Apr 3 19:43:39 2015 New Revision: 281049 URL: https://svnweb.freebsd.org/changeset/base/281049 Log: Add the llvm-cov and llvm-profdata tools, when WITH_CLANG_EXTRAS is defined. These help with processing coverage and profile data. Added: head/contrib/llvm/tools/llvm-cov/ - copied from r280968, vendor/llvm/dist/tools/llvm-cov/ head/contrib/llvm/tools/llvm-profdata/ - copied from r280968, vendor/llvm/dist/tools/llvm-profdata/ head/usr.bin/clang/llvm-cov/ head/usr.bin/clang/llvm-cov/Makefile (contents, props changed) head/usr.bin/clang/llvm-cov/llvm-cov.1 (contents, props changed) head/usr.bin/clang/llvm-profdata/ head/usr.bin/clang/llvm-profdata/Makefile (contents, props changed) head/usr.bin/clang/llvm-profdata/llvm-profdata.1 (contents, props changed) Deleted: head/contrib/llvm/tools/llvm-cov/CMakeLists.txt head/contrib/llvm/tools/llvm-cov/LLVMBuild.txt head/contrib/llvm/tools/llvm-cov/Makefile head/contrib/llvm/tools/llvm-profdata/CMakeLists.txt head/contrib/llvm/tools/llvm-profdata/LLVMBuild.txt head/contrib/llvm/tools/llvm-profdata/Makefile Modified: head/usr.bin/clang/Makefile Modified: head/usr.bin/clang/Makefile ============================================================================== --- head/usr.bin/clang/Makefile Fri Apr 3 19:33:26 2015 (r281048) +++ head/usr.bin/clang/Makefile Fri Apr 3 19:43:39 2015 (r281049) @@ -13,12 +13,14 @@ SUBDIR+=bugpoint \ llvm-as \ llvm-bcanalyzer \ llvm-diff \ + llvm-cov \ llvm-dis \ llvm-extract \ llvm-link \ llvm-mc \ llvm-nm \ llvm-objdump \ + llvm-profdata \ llvm-rtdyld \ llvm-symbolizer \ macho-dump \ Added: head/usr.bin/clang/llvm-cov/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/clang/llvm-cov/Makefile Fri Apr 3 19:43:39 2015 (r281049) @@ -0,0 +1,26 @@ +# $FreeBSD$ + +.include + +PROG_CXX=llvm-cov + +SRCDIR= tools/llvm-cov +SRCS= CodeCoverage.cpp \ + CoverageFilters.cpp \ + CoverageReport.cpp \ + CoverageSummary.cpp \ + CoverageSummaryInfo.cpp \ + SourceCoverageView.cpp \ + TestingSupport.cpp \ + gcov.cpp \ + llvm-cov.cpp + +LIBDEPS=llvmprofiledata \ + llvmobject \ + llvmmcparser \ + llvmmc \ + llvmbitreader \ + llvmcore \ + llvmsupport + +.include "../clang.prog.mk" Added: head/usr.bin/clang/llvm-cov/llvm-cov.1 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/clang/llvm-cov/llvm-cov.1 Fri Apr 3 19:43:39 2015 (r281049) @@ -0,0 +1,165 @@ +.\" $FreeBSD$ +.\" Man page generated from reStructuredText. +. +.TH "LLVM-COV" "1" "2015-04-01" "3.6" "LLVM" +.SH NAME +llvm-cov \- emit coverage information +. +.nr rst2man-indent-level 0 +. +.de1 rstReportMargin +\\$1 \\n[an-margin] +level \\n[rst2man-indent-level] +level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] +- +\\n[rst2man-indent0] +\\n[rst2man-indent1] +\\n[rst2man-indent2] +.. +.de1 INDENT +.\" .rstReportMargin pre: +. RS \\$1 +. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] +. nr rst2man-indent-level +1 +.\" .rstReportMargin post: +.. +.de UNINDENT +. RE +.\" indent \\n[an-margin] +.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] +.nr rst2man-indent-level -1 +.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] +.in \\n[rst2man-indent\\n[rst2man-indent-level]]u +.. +.SH SYNOPSIS +.sp +\fBllvm\-cov\fP [options] SOURCEFILE +.SH DESCRIPTION +.sp +The \fBllvm\-cov\fP tool reads code coverage data files and displays the +coverage information for a specified source file. It is compatible with the +\fBgcov\fP tool from version 4.2 of \fBGCC\fP and may also be compatible with +some later versions of \fBgcov\fP\&. +.sp +To use llvm\-cov, you must first build an instrumented version of your +application that collects coverage data as it runs. Compile with the +\fB\-fprofile\-arcs\fP and \fB\-ftest\-coverage\fP options to add the +instrumentation. (Alternatively, you can use the \fB\-\-coverage\fP option, which +includes both of those other options.) You should compile with debugging +information (\fB\-g\fP) and without optimization (\fB\-O0\fP); otherwise, the +coverage data cannot be accurately mapped back to the source code. +.sp +At the time you compile the instrumented code, a \fB\&.gcno\fP data file will be +generated for each object file. These \fB\&.gcno\fP files contain half of the +coverage data. The other half of the data comes from \fB\&.gcda\fP files that are +generated when you run the instrumented program, with a separate \fB\&.gcda\fP +file for each object file. Each time you run the program, the execution counts +are summed into any existing \fB\&.gcda\fP files, so be sure to remove any old +files if you do not want their contents to be included. +.sp +By default, the \fB\&.gcda\fP files are written into the same directory as the +object files, but you can override that by setting the \fBGCOV_PREFIX\fP and +\fBGCOV_PREFIX_STRIP\fP environment variables. The \fBGCOV_PREFIX_STRIP\fP +variable specifies a number of directory components to be removed from the +start of the absolute path to the object file directory. After stripping those +directories, the prefix from the \fBGCOV_PREFIX\fP variable is added. These +environment variables allow you to run the instrumented program on a machine +where the original object file directories are not accessible, but you will +then need to copy the \fB\&.gcda\fP files back to the object file directories +where llvm\-cov expects to find them. +.sp +Once you have generated the coverage data files, run llvm\-cov for each main +source file where you want to examine the coverage results. This should be run +from the same directory where you previously ran the compiler. The results for +the specified source file are written to a file named by appending a \fB\&.gcov\fP +suffix. A separate output file is also created for each file included by the +main source file, also with a \fB\&.gcov\fP suffix added. +.sp +The basic content of an llvm\-cov output file is a copy of the source file with +an execution count and line number prepended to every line. The execution +count is shown as \fB\-\fP if a line does not contain any executable code. If +a line contains code but that code was never executed, the count is displayed +as \fB#####\fP\&. +.SH OPTIONS +.INDENT 0.0 +.TP +.B \-a, \-\-all\-blocks +Display all basic blocks. If there are multiple blocks for a single line of +source code, this option causes llvm\-cov to show the count for each block +instead of just one count for the entire line. +.UNINDENT +.INDENT 0.0 +.TP +.B \-b, \-\-branch\-probabilities +Display conditional branch probabilities and a summary of branch information. +.UNINDENT +.INDENT 0.0 +.TP +.B \-c, \-\-branch\-counts +Display branch counts instead of probabilities (requires \-b). +.UNINDENT +.INDENT 0.0 +.TP +.B \-f, \-\-function\-summaries +Show a summary of coverage for each function instead of just one summary for +an entire source file. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-help +Display available options (\-\-help\-hidden for more). +.UNINDENT +.INDENT 0.0 +.TP +.B \-l, \-\-long\-file\-names +For coverage output of files included from the main source file, add the +main file name followed by \fB##\fP as a prefix to the output file names. This +can be combined with the \-\-preserve\-paths option to use complete paths for +both the main file and the included file. +.UNINDENT +.INDENT 0.0 +.TP +.B \-n, \-\-no\-output +Do not output any \fB\&.gcov\fP files. Summary information is still +displayed. +.UNINDENT +.INDENT 0.0 +.TP +.B \-o=, \-\-object\-directory=, \-\-object\-file= +Find objects in DIR or based on FILE\(aqs path. If you specify a particular +object file, the coverage data files are expected to have the same base name +with \fB\&.gcno\fP and \fB\&.gcda\fP extensions. If you specify a directory, the +files are expected in that directory with the same base name as the source +file. +.UNINDENT +.INDENT 0.0 +.TP +.B \-p, \-\-preserve\-paths +Preserve path components when naming the coverage output files. In addition +to the source file name, include the directories from the path to that +file. The directories are separate by \fB#\fP characters, with \fB\&.\fP directories +removed and \fB\&..\fP directories replaced by \fB^\fP characters. When used with +the \-\-long\-file\-names option, this applies to both the main file name and the +included file name. +.UNINDENT +.INDENT 0.0 +.TP +.B \-u, \-\-unconditional\-branches +Include unconditional branches in the output for the \-\-branch\-probabilities +option. +.UNINDENT +.INDENT 0.0 +.TP +.B \-version +Display the version of llvm\-cov. +.UNINDENT +.SH EXIT STATUS +.sp +\fBllvm\-cov\fP returns 1 if it cannot read input files. Otherwise, it +exits with zero. +.SH AUTHOR +Maintained by The LLVM Team (http://llvm.org/). +.SH COPYRIGHT +2003-2014, LLVM Project +.\" Generated by docutils manpage writer. +. Added: head/usr.bin/clang/llvm-profdata/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/clang/llvm-profdata/Makefile Fri Apr 3 19:43:39 2015 (r281049) @@ -0,0 +1,18 @@ +# $FreeBSD$ + +.include + +PROG_CXX=llvm-profdata + +SRCDIR= tools/llvm-profdata +SRCS= llvm-profdata.cpp + +LIBDEPS=llvmprofiledata \ + llvmobject \ + llvmmcparser \ + llvmmc \ + llvmbitreader \ + llvmcore \ + llvmsupport + +.include "../clang.prog.mk" Added: head/usr.bin/clang/llvm-profdata/llvm-profdata.1 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/clang/llvm-profdata/llvm-profdata.1 Fri Apr 3 19:43:39 2015 (r281049) @@ -0,0 +1,117 @@ +.\" $FreeBSD$ +.\" Man page generated from reStructuredText. +. +.TH "LLVM-PROFDATA" "1" "2015-04-01" "3.6" "LLVM" +.SH NAME +llvm-profdata \- Profile data tool +. +.nr rst2man-indent-level 0 +. +.de1 rstReportMargin +\\$1 \\n[an-margin] +level \\n[rst2man-indent-level] +level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] +- +\\n[rst2man-indent0] +\\n[rst2man-indent1] +\\n[rst2man-indent2] +.. +.de1 INDENT +.\" .rstReportMargin pre: +. RS \\$1 +. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] +. nr rst2man-indent-level +1 +.\" .rstReportMargin post: +.. +.de UNINDENT +. RE +.\" indent \\n[an-margin] +.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] +.nr rst2man-indent-level -1 +.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] +.in \\n[rst2man-indent\\n[rst2man-indent-level]]u +.. +.SH SYNOPSIS +.sp +\fBllvm\-profdata\fP \fIcommand\fP [\fIargs...\fP] +.SH DESCRIPTION +.sp +The \fBllvm\-profdata\fP tool is a small utility for working with profile +data files. +.SH COMMANDS +.INDENT 0.0 +.IP \(bu 2 +\fI\%merge\fP +.IP \(bu 2 +\fI\%show\fP +.UNINDENT +.SH MERGE +.SS SYNOPSIS +.sp +\fBllvm\-profdata merge\fP [\fIoptions\fP] [\fIfilenames...\fP] +.SS DESCRIPTION +.sp +\fBllvm\-profdata merge\fP takes several profile data files +generated by PGO instrumentation and merges them together into a single +indexed profile data file. +.SS OPTIONS +.INDENT 0.0 +.TP +.B \-help +Print a summary of command line options. +.UNINDENT +.INDENT 0.0 +.TP +.B \-output=output, \-o=output +Specify the output file name. \fIOutput\fP cannot be \fB\-\fP as the resulting +indexed profile data can\(aqt be written to standard output. +.UNINDENT +.SH SHOW +.SS SYNOPSIS +.sp +\fBllvm\-profdata show\fP [\fIoptions\fP] [\fIfilename\fP] +.SS DESCRIPTION +.sp +\fBllvm\-profdata show\fP takes a profile data file and displays the +information about the profile counters for this file and +for any of the specified function(s). +.sp +If \fIfilename\fP is omitted or is \fB\-\fP, then \fBllvm\-profdata show\fP reads its +input from standard input. +.SS OPTIONS +.INDENT 0.0 +.TP +.B \-all\-functions +Print details for every function. +.UNINDENT +.INDENT 0.0 +.TP +.B \-counts +Print the counter values for the displayed functions. +.UNINDENT +.INDENT 0.0 +.TP +.B \-function=string +Print details for a function if the function\(aqs name contains the given string. +.UNINDENT +.INDENT 0.0 +.TP +.B \-help +Print a summary of command line options. +.UNINDENT +.INDENT 0.0 +.TP +.B \-output=output, \-o=output +Specify the output file name. If \fIoutput\fP is \fB\-\fP or it isn\(aqt specified, +then the output is sent to standard output. +.UNINDENT +.SH EXIT STATUS +.sp +\fBllvm\-profdata\fP returns 1 if the command is omitted or is invalid, +if it cannot read input files, or if there is a mismatch between their data. +.SH AUTHOR +Maintained by The LLVM Team (http://llvm.org/). +.SH COPYRIGHT +2003-2014, LLVM Project +.\" Generated by docutils manpage writer. +. From owner-svn-src-all@FreeBSD.ORG Fri Apr 3 19:48:09 2015 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 70FD6C0D; Fri, 3 Apr 2015 19:48:09 +0000 (UTC) Received: from kif.fubar.geek.nz (kif.fubar.geek.nz [178.62.119.249]) by mx1.freebsd.org (Postfix) with ESMTP id 3AEA5A25; Fri, 3 Apr 2015 19:48:09 +0000 (UTC) Received: from bender.Home (97e64d4c.skybroadband.com [151.230.77.76]) by kif.fubar.geek.nz (Postfix) with ESMTPSA id 14C56D79FE; Fri, 3 Apr 2015 19:48:02 +0000 (UTC) Date: Fri, 3 Apr 2015 20:48:01 +0100 From: Andrew Turner Subject: Re: svn commit: r281048 - in head/contrib/binutils: bfd include/elf Message-ID: <20150403204801.2a0055cb@bender.Home> In-Reply-To: <201504031933.t33JXRFI043090@svn.freebsd.org> References: <201504031933.t33JXRFI043090@svn.freebsd.org> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.27; amd64-portbld-freebsd10.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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 Apr 2015 19:48:09 -0000 On Fri, 3 Apr 2015 19:33:27 +0000 (UTC) Andrew Turner wrote: > Author: andrew > Date: Fri Apr 3 19:33:26 2015 > New Revision: 281048 > URL: https://svnweb.freebsd.org/changeset/base/281048 > > Log: > More ARM EABI object attributes in binutils. This adds support to This should say "Add more ARM EABI object attributes in binutils." Andrew From owner-svn-src-all@FreeBSD.ORG Fri Apr 3 19:49:40 2015 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 7403ED69; Fri, 3 Apr 2015 19:49: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 5F10AA38; Fri, 3 Apr 2015 19:49: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 t33JneBH048879; Fri, 3 Apr 2015 19:49:40 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t33JneZq048878; Fri, 3 Apr 2015 19:49:40 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201504031949.t33JneZq048878@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 3 Apr 2015 19:49:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281050 - head/contrib/llvm 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 Apr 2015 19:49:40 -0000 Author: dim Date: Fri Apr 3 19:49:39 2015 New Revision: 281050 URL: https://svnweb.freebsd.org/changeset/base/281050 Log: Update FREEBSD-Xlist for llvm. Modified: head/contrib/llvm/FREEBSD-Xlist Modified: head/contrib/llvm/FREEBSD-Xlist ============================================================================== --- head/contrib/llvm/FREEBSD-Xlist Fri Apr 3 19:43:39 2015 (r281049) +++ head/contrib/llvm/FREEBSD-Xlist Fri Apr 3 19:49:39 2015 (r281050) @@ -397,7 +397,9 @@ tools/llvm-bcanalyzer/LLVMBuild.txt tools/llvm-bcanalyzer/Makefile tools/llvm-c-test/ tools/llvm-config/ -tools/llvm-cov/ +tools/llvm-cov/CMakeLists.txt +tools/llvm-cov/LLVMBuild.txt +tools/llvm-cov/Makefile tools/llvm-diff/CMakeLists.txt tools/llvm-diff/LLVMBuild.txt tools/llvm-diff/Makefile @@ -424,7 +426,9 @@ tools/llvm-nm/Makefile tools/llvm-objdump/CMakeLists.txt tools/llvm-objdump/LLVMBuild.txt tools/llvm-objdump/Makefile -tools/llvm-profdata/ +tools/llvm-profdata/CMakeLists.txt +tools/llvm-profdata/LLVMBuild.txt +tools/llvm-profdata/Makefile tools/llvm-readobj/CMakeLists.txt tools/llvm-readobj/LLVMBuild.txt tools/llvm-readobj/Makefile From owner-svn-src-all@FreeBSD.ORG Fri Apr 3 23:55:05 2015 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 5B55E57D; Fri, 3 Apr 2015 23:55: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 4661136D; Fri, 3 Apr 2015 23:55: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 t33Nt51q067332; Fri, 3 Apr 2015 23:55:05 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t33Nt564067331; Fri, 3 Apr 2015 23:55:05 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201504032355.t33Nt564067331@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 3 Apr 2015 23:55:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281053 - head/tools/build/options X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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 Apr 2015 23:55:05 -0000 Author: bdrewery Date: Fri Apr 3 23:55:04 2015 New Revision: 281053 URL: https://svnweb.freebsd.org/changeset/base/281053 Log: Remove specific reference to g++(1) for WITH_CXX as it may be clang. MFC after: 1 week Modified: head/tools/build/options/WITHOUT_CXX Modified: head/tools/build/options/WITHOUT_CXX ============================================================================== --- head/tools/build/options/WITHOUT_CXX Fri Apr 3 23:28:56 2015 (r281052) +++ head/tools/build/options/WITHOUT_CXX Fri Apr 3 23:55:04 2015 (r281053) @@ -1,6 +1,6 @@ .\" $FreeBSD$ Set to not build -.Xr g++ 1 +.Xr c++ 1 and related libraries. It will also prevent building of .Xr gperf 1 From owner-svn-src-all@FreeBSD.ORG Fri Apr 3 23:58:41 2015 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 68CA66EE; Fri, 3 Apr 2015 23:58: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 53BD8394; Fri, 3 Apr 2015 23:58: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 t33NwfGe067780; Fri, 3 Apr 2015 23:58:41 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t33NwfqD067779; Fri, 3 Apr 2015 23:58:41 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201504032358.t33NwfqD067779@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 3 Apr 2015 23:58:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281054 - head/share/man/man5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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 Apr 2015 23:58:41 -0000 Author: bdrewery Date: Fri Apr 3 23:58:40 2015 New Revision: 281054 URL: https://svnweb.freebsd.org/changeset/base/281054 Log: Regen for r281053 Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Fri Apr 3 23:55:04 2015 (r281053) +++ head/share/man/man5/src.conf.5 Fri Apr 3 23:58:40 2015 (r281054) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 255964 2013-10-01 07:22:04Z des .\" $FreeBSD$ -.Dd February 4, 2015 +.Dd April 3, 2015 .Dt SRC.CONF 5 .Os .Sh NAME @@ -359,9 +359,9 @@ and related utilities. .\" from FreeBSD: head/tools/build/options/WITHOUT_CUSE 270171 2014-08-19 15:40:26Z hselasky Set to not build CUSE-related programs and libraries. .It Va WITHOUT_CXX -.\" from FreeBSD: head/tools/build/options/WITHOUT_CXX 220402 2011-04-06 20:19:07Z uqs +.\" from FreeBSD: head/tools/build/options/WITHOUT_CXX 281053 2015-04-03 23:55:04Z bdrewery Set to not build -.Xr g++ 1 +.Xr c++ 1 and related libraries. It will also prevent building of .Xr gperf 1 From owner-svn-src-all@FreeBSD.ORG Sat Apr 4 00:31:41 2015 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 28AE2DF2; Sat, 4 Apr 2015 00:31: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 135B78D1; Sat, 4 Apr 2015 00:31: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 t340VeDA086146; Sat, 4 Apr 2015 00:31:40 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t340VedI086145; Sat, 4 Apr 2015 00:31:40 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201504040031.t340VedI086145@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 4 Apr 2015 00:31:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281055 - 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: Sat, 04 Apr 2015 00:31:41 -0000 Author: bapt Date: Sat Apr 4 00:31:40 2015 New Revision: 281055 URL: https://svnweb.freebsd.org/changeset/base/281055 Log: Do not install scripts multiple time when using bsd.progs.mk Modified: head/share/mk/bsd.progs.mk Modified: head/share/mk/bsd.progs.mk ============================================================================== --- head/share/mk/bsd.progs.mk Fri Apr 3 23:58:40 2015 (r281054) +++ head/share/mk/bsd.progs.mk Sat Apr 4 00:31:40 2015 (r281055) @@ -96,14 +96,14 @@ x.$p= PROG_CXX=$p $p ${p}_p: .PHONY .MAKE (cd ${.CURDIR} && ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS= \ - SUBDIR= PROG=$p \ + SUBDIR= SCRIPTS= PROG=$p \ DEPENDFILE=.depend.$p .MAKE.DEPENDFILE=.depend.$p \ ${x.$p}) .for t in ${PROGS_TARGETS:O:u} $p.$t: .PHONY .MAKE (cd ${.CURDIR} && ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS= \ - SUBDIR= PROG=$p \ + SUBDIR= SCRIPTS= PROG=$p \ DEPENDFILE=.depend.$p .MAKE.DEPENDFILE=.depend.$p \ ${x.$p} ${@:E}) .endfor From owner-svn-src-all@FreeBSD.ORG Sat Apr 4 00:36:24 2015 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 6C09EF83; Sat, 4 Apr 2015 00:36:24 +0000 (UTC) Received: from mail-pd0-x232.google.com (mail-pd0-x232.google.com [IPv6:2607:f8b0:400e:c02::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3197697E; Sat, 4 Apr 2015 00:36:24 +0000 (UTC) Received: by pdbnk13 with SMTP id nk13so56706211pdb.0; Fri, 03 Apr 2015 17:36:23 -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=vRBWbmGvWh6A5JXYGCY8QUwSbF/Gym+MpovNh1UjrQM=; b=kjn9j51RKm6CPbzR4Jy8T/eNdwNDusDWQa4fyT1BCwEXK6A/IuEyMi1JeTuZtXXfd7 1QPzJzITyUOhZnttEfY2CGh5fD6hLRd4Gdrvy0ejRnQpVb2/UVWYcNwJiNHIDa5yVTNB bG6JKt8RAXVPw2xfK8xC7JnTAj3JTt8eoeDYUcRtzgPFsQ0a5PJtet3rSTMODeMNR1NP s6NW2pNxqc5atStVFSI8fceUCT9JV9v0yygLP3K0UxP37ivbFAn/yRoFftphQRBGdons kiHAghGmbrcrvJOBDpuvvU907Raqdgq6fsvYSwrV1T+nxasT9/ygX6A6MsXO42paB4GX ef5A== X-Received: by 10.70.55.65 with SMTP id q1mr8258459pdp.35.1428107783766; Fri, 03 Apr 2015 17:36:23 -0700 (PDT) Received: from ?IPv6:2601:8:ab80:7d6:c0f7:599f:1bc7:96bd? ([2601:8:ab80:7d6:c0f7:599f:1bc7:96bd]) by mx.google.com with ESMTPSA id nm1sm9188765pbc.50.2015.04.03.17.36.22 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 03 Apr 2015 17:36:23 -0700 (PDT) Content-Type: multipart/signed; boundary="Apple-Mail=_1CE00A28-20EA-4352-A68B-2D0EF4B65DDF"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r281055 - head/share/mk From: Garrett Cooper In-Reply-To: <201504040031.t340VedI086145@svn.freebsd.org> Date: Fri, 3 Apr 2015 17:36:21 -0700 Message-Id: References: <201504040031.t340VedI086145@svn.freebsd.org> To: Baptiste Daroussin 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 Apr 2015 00:36:24 -0000 --Apple-Mail=_1CE00A28-20EA-4352-A68B-2D0EF4B65DDF Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On Apr 3, 2015, at 17:31, Baptiste Daroussin wrote: > Author: bapt > Date: Sat Apr 4 00:31:40 2015 > New Revision: 281055 > URL: https://svnweb.freebsd.org/changeset/base/281055 >=20 > Log: > Do not install scripts multiple time when using bsd.progs.mk >=20 > Modified: > head/share/mk/bsd.progs.mk I=92m sorry I=92ve been lax with this, but unfortunately this doesn=92t = solve the underlying issue 100%. 1. You forgot FILES/FILESGROUPS 2. This doesn=92t help cases were targets are manually overridden. 3. Etc. The project I was working on has reached steady state. We should be done = with the big hurdle soon-ish (another month or two). I=92ll try to = resolve it sometime between now and then by putting all of the PROGS = logic down into bsd.prog.mk (where it should have been in the first = place=85), because bsd.progs.mk being included recursively is a layering = violation bug that parallel installs expose. Thanks! --Apple-Mail=_1CE00A28-20EA-4352-A68B-2D0EF4B65DDF 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 iQEcBAEBCgAGBQJVHzIFAAoJEMZr5QU6S73eMukIAKnrPt7MfgcjMsbwFUfQKv83 Z+o2AIMNuk7+ciQwO+3MTVyXgih850r3m4TJAVtzVMPAXtq9zGevMgnAhsEFo8gq XejnYlqkZ7lI5PzsoOlCKYCcQsKJM27b/iDZbYdkdXiL77r0joVmn4mG3Nmxt1i0 CjjKIEc57ac5AhQb8eN1yIuAAUgjK0PoR1GqEqMqVhsrdA6vS1asZk9v6nZMApZj sZmSIfC0KolMaSXnjmWjc44agNlfKWaHn56qMuJBXC5R5EIq9mmoa018W3h2dJtz Frz1nHPVtF7niPzucJouExpU2SQz6ZiNADBV3dWeayrub53/fNXwtb6/h8rLbO8= =ijjr -----END PGP SIGNATURE----- --Apple-Mail=_1CE00A28-20EA-4352-A68B-2D0EF4B65DDF-- From owner-svn-src-all@FreeBSD.ORG Sat Apr 4 00:42:12 2015 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 0EF5617E; Sat, 4 Apr 2015 00: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 ECEE6A2E; Sat, 4 Apr 2015 00:42: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 t340gBAi091986; Sat, 4 Apr 2015 00:42:11 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t340gAkd091981; Sat, 4 Apr 2015 00:42:10 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201504040042.t340gAkd091981@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sat, 4 Apr 2015 00:42: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: r281056 - in stable/10: . lib/atf/libatf-c++ share/mk 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 Apr 2015 00:42:12 -0000 Author: bdrewery Date: Sat Apr 4 00:42:09 2015 New Revision: 281056 URL: https://svnweb.freebsd.org/changeset/base/281056 Log: MFC r280179,r280180: r280179: Add LIB_CXX so that C++ libraries will use CXX to link. This adds some extra dependencies directly to Makefile.inc1 as atf is still a prebuild library in stable/10. If r273449 is MFCd these can come out. r280180: Document LIB and LIB_CXX. Modified: stable/10/Makefile.inc1 stable/10/lib/atf/libatf-c++/Makefile stable/10/share/mk/bsd.README stable/10/share/mk/bsd.lib.mk Directory Properties: stable/10/ (props changed) Modified: stable/10/Makefile.inc1 ============================================================================== --- stable/10/Makefile.inc1 Sat Apr 4 00:31:40 2015 (r281055) +++ stable/10/Makefile.inc1 Sat Apr 4 00:42:09 2015 (r281056) @@ -1574,6 +1574,10 @@ _prebuild_libs+= gnu/lib/libstdc++ gnu/l gnu/lib/libstdc++__L: lib/msun__L .endif +.if ${MK_LIBCPLUSPLUS} != "no" +_prebuild_libs+= lib/libc++ +.endif + lib/libgeom__L: lib/libexpat__L .if defined(WITH_ATF) || ${MK_TESTS} != "no" @@ -1583,6 +1587,12 @@ lib/libgeom__L: lib/libexpat__L MAKE+= -DWITH_ATF .endif _lib_atf= lib/atf +.if ${MK_GNUCXX} != no +lib/atf__L: gnu/lib/libstdc++__L +.endif +.if ${MK_LIBCPLUSPLUS} != "no" +lib/atf__L: lib/libc++__L lib/msun__L +.endif .endif .if ${MK_LIBTHR} != "no" Modified: stable/10/lib/atf/libatf-c++/Makefile ============================================================================== --- stable/10/lib/atf/libatf-c++/Makefile Sat Apr 4 00:31:40 2015 (r281055) +++ stable/10/lib/atf/libatf-c++/Makefile Sat Apr 4 00:42:09 2015 (r281056) @@ -27,7 +27,7 @@ .include -LIB= atf-c++ +LIB_CXX= atf-c++ PRIVATELIB= true SHLIB_MAJOR= 2 Modified: stable/10/share/mk/bsd.README ============================================================================== --- stable/10/share/mk/bsd.README Sat Apr 4 00:31:40 2015 (r281055) +++ stable/10/share/mk/bsd.README Sat Apr 4 00:42:09 2015 (r281056) @@ -334,6 +334,13 @@ with the current needs of the BSD tree. It sets/uses the following variables: +LIB The name of the library to build. + +LIB_CXX The name of the library to build. It also causes + to link the library with the + standard C++ library. LIB_CXX overrides the value + of LIB if LIB is also set. + LIBDIR Target directory for libraries. LINTLIBDIR Target directory for lint libraries. Modified: stable/10/share/mk/bsd.lib.mk ============================================================================== --- stable/10/share/mk/bsd.lib.mk Sat Apr 4 00:31:40 2015 (r281055) +++ stable/10/share/mk/bsd.lib.mk Sat Apr 4 00:42:09 2015 (r281056) @@ -4,6 +4,13 @@ .include +.if defined(LIB_CXX) +LIB= ${LIB_CXX} +_LD= ${CXX} +.else +_LD= ${CC} +.endif + # Set up the variables controlling shared libraries. After this section, # SHLIB_NAME will be defined only if we are to create a shared library. # SHLIB_LINK will be defined only if we are to create a link to it. @@ -208,7 +215,7 @@ ${SHLIB_NAME_FULL}: ${SOBJS} .if defined(SHLIB_LINK) @${INSTALL_SYMLINK} ${SHLIB_NAME} ${SHLIB_LINK} .endif - ${CC} ${LDFLAGS} ${SSP_CFLAGS} ${SOLINKOPTS} \ + ${_LD} ${LDFLAGS} ${SSP_CFLAGS} ${SOLINKOPTS} \ -o ${.TARGET} -Wl,-soname,${SONAME} \ `NM='${NM}' lorder ${SOBJS} | tsort -q` ${LDADD} .if ${MK_CTF} != "no" From owner-svn-src-all@FreeBSD.ORG Sat Apr 4 02:34:41 2015 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 C807EF7C; Sat, 4 Apr 2015 02:34: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 B221C3B7; Sat, 4 Apr 2015 02:34: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 t342YfLC043330; Sat, 4 Apr 2015 02:34:41 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t342YepL043329; Sat, 4 Apr 2015 02:34:40 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201504040234.t342YepL043329@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sat, 4 Apr 2015 02:34:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281057 - head/sys/powerpc/mpc85xx 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 Apr 2015 02:34:41 -0000 Author: jhibbits Date: Sat Apr 4 02:34:40 2015 New Revision: 281057 URL: https://svnweb.freebsd.org/changeset/base/281057 Log: Add a GPIO driver for the mpc85xx. This has only been tested on the RB800, using the RB800's FDT, and pulls the GPOUT and GPIN registers from the FDT. Added: head/sys/powerpc/mpc85xx/mpc85xx_gpio.c (contents, props changed) Added: head/sys/powerpc/mpc85xx/mpc85xx_gpio.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/powerpc/mpc85xx/mpc85xx_gpio.c Sat Apr 4 02:34:40 2015 (r281057) @@ -0,0 +1,307 @@ +/*- + * Copyright (c) 2015 Justin Hibbits + * Copyright (c) 2013 Thomas Skibo + * 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$ + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include + +#include "gpio_if.h" + +#define MAXPIN (7) + +#define VALID_PIN(u) ((u) >= 0 && (u) <= MAXPIN) + +#define GPIO_LOCK(sc) mtx_lock(&(sc)->sc_mtx) +#define GPIO_UNLOCK(sc) mtx_unlock(&(sc)->sc_mtx) +#define GPIO_LOCK_INIT(sc) \ + mtx_init(&(sc)->sc_mtx, device_get_nameunit((sc)->dev), \ + "gpio", MTX_DEF) +#define GPIO_LOCK_DESTROY(_sc) mtx_destroy(&_sc->sc_mtx); + +struct mpc85xx_gpio_softc { + device_t dev; + device_t busdev; + struct mtx sc_mtx; + struct resource *out_res; /* Memory resource */ + struct resource *in_res; +}; + +static device_t +mpc85xx_gpio_get_bus(device_t dev) +{ + struct mpc85xx_gpio_softc *sc; + + sc = device_get_softc(dev); + + return (sc->busdev); +} + +static int +mpc85xx_gpio_pin_max(device_t dev, int *maxpin) +{ + + *maxpin = MAXPIN; + return (0); +} + +/* Get a specific pin's capabilities. */ +static int +mpc85xx_gpio_pin_getcaps(device_t dev, uint32_t pin, uint32_t *caps) +{ + + if (!VALID_PIN(pin)) + return (EINVAL); + + *caps = (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT); + + return (0); +} + +/* Get a specific pin's name. */ +static int +mpc85xx_gpio_pin_getname(device_t dev, uint32_t pin, char *name) +{ + + if (!VALID_PIN(pin)) + return (EINVAL); + + snprintf(name, GPIOMAXNAME, "GPIO%d", pin); + name[GPIOMAXNAME-1] = '\0'; + + return (0); +} + +/* Set a specific output pin's value. */ +static int +mpc85xx_gpio_pin_set(device_t dev, uint32_t pin, unsigned int value) +{ + struct mpc85xx_gpio_softc *sc = device_get_softc(dev); + uint32_t outvals; + uint8_t pinbit; + + if (!VALID_PIN(pin) || value > 1) + return (EINVAL); + + GPIO_LOCK(sc); + pinbit = 31 - pin; + + outvals = bus_read_4(sc->out_res, 0); + outvals &= ~(1 << pinbit); + outvals |= (value << pinbit); + bus_write_4(sc->out_res, 0, outvals); + + GPIO_UNLOCK(sc); + + return (0); +} + +/* Get a specific pin's input value. */ +static int +mpc85xx_gpio_pin_get(device_t dev, uint32_t pin, unsigned int *value) +{ + struct mpc85xx_gpio_softc *sc = device_get_softc(dev); + + if (!VALID_PIN(pin)) + return (EINVAL); + + *value = (bus_read_4(sc->in_res, 0) >> (31 - pin)) & 1; + + return (0); +} + +/* Toggle a pin's output value. */ +static int +mpc85xx_gpio_pin_toggle(device_t dev, uint32_t pin) +{ + struct mpc85xx_gpio_softc *sc = device_get_softc(dev); + uint32_t val; + + if (!VALID_PIN(pin)) + return (EINVAL); + + GPIO_LOCK(sc); + + val = bus_read_4(sc->out_res, 0); + val ^= (1 << (31 - pin)); + bus_write_4(sc->out_res, 0, val); + + GPIO_UNLOCK(sc); + + return (0); +} + +static int +mpc85xx_gpio_probe(device_t dev) +{ + uint16_t vers; + uint32_t svr; + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (!ofw_bus_is_compatible(dev, "gpio")) + return (ENXIO); + + vers = mfpvr() >> 16; + switch (vers) { + case FSL_E500v1: + case FSL_E500v2: + case FSL_E500mc: + break; + default: + return (ENXIO); + } + + svr = mfspr(SPR_SVR); + switch (SVR_VER(svr)) { + case SVR_MPC8533: + case SVR_MPC8533E: + break; + default: + return (ENXIO); + } + + device_set_desc(dev, "MPC85xx GPIO driver"); + return (0); +} + +static int mpc85xx_gpio_detach(device_t dev); + +static int +mpc85xx_gpio_attach(device_t dev) +{ + struct mpc85xx_gpio_softc *sc = device_get_softc(dev); + int rid; + + sc->dev = dev; + + GPIO_LOCK_INIT(sc); + + /* Allocate memory. */ + rid = 0; + sc->out_res = bus_alloc_resource_any(dev, + SYS_RES_MEMORY, &rid, RF_ACTIVE); + if (sc->out_res == NULL) { + device_printf(dev, "Can't allocate memory for device output port"); + mpc85xx_gpio_detach(dev); + return (ENOMEM); + } + + rid = 1; + sc->in_res = bus_alloc_resource_any(dev, + SYS_RES_MEMORY, &rid, RF_ACTIVE); + if (sc->in_res == NULL) { + device_printf(dev, "Can't allocate memory for device input port"); + mpc85xx_gpio_detach(dev); + return (ENOMEM); + } + + sc->busdev = gpiobus_attach_bus(dev); + if (sc->busdev == NULL) { + mpc85xx_gpio_detach(dev); + return (ENOMEM); + } + + OF_device_register_xref(OF_xref_from_node(ofw_bus_get_node(dev)), dev); + + return (0); +} + +static int +mpc85xx_gpio_detach(device_t dev) +{ + struct mpc85xx_gpio_softc *sc = device_get_softc(dev); + + gpiobus_detach_bus(dev); + + if (sc->out_res != NULL) { + /* Release output port resource. */ + bus_release_resource(dev, SYS_RES_MEMORY, + rman_get_rid(sc->out_res), sc->out_res); + } + + if (sc->in_res != NULL) { + /* Release input port resource. */ + bus_release_resource(dev, SYS_RES_MEMORY, + rman_get_rid(sc->in_res), sc->in_res); + } + + GPIO_LOCK_DESTROY(sc); + + return (0); +} + +static device_method_t mpc85xx_gpio_methods[] = { + /* device_if */ + DEVMETHOD(device_probe, mpc85xx_gpio_probe), + DEVMETHOD(device_attach, mpc85xx_gpio_attach), + DEVMETHOD(device_detach, mpc85xx_gpio_detach), + + /* GPIO protocol */ + DEVMETHOD(gpio_get_bus, mpc85xx_gpio_get_bus), + DEVMETHOD(gpio_pin_max, mpc85xx_gpio_pin_max), + DEVMETHOD(gpio_pin_getname, mpc85xx_gpio_pin_getname), + DEVMETHOD(gpio_pin_getcaps, mpc85xx_gpio_pin_getcaps), + DEVMETHOD(gpio_pin_get, mpc85xx_gpio_pin_get), + DEVMETHOD(gpio_pin_set, mpc85xx_gpio_pin_set), + DEVMETHOD(gpio_pin_toggle, mpc85xx_gpio_pin_toggle), + + DEVMETHOD_END +}; + +static driver_t mpc85xx_gpio_driver = { + "gpio", + mpc85xx_gpio_methods, + sizeof(struct mpc85xx_gpio_softc), +}; +static devclass_t mpc85xx_gpio_devclass; + +EARLY_DRIVER_MODULE(mpc85xx_gpio, simplebus, mpc85xx_gpio_driver, + mpc85xx_gpio_devclass, NULL, NULL, + BUS_PASS_RESOURCE + BUS_PASS_ORDER_MIDDLE); From owner-svn-src-all@FreeBSD.ORG Sat Apr 4 04:18:53 2015 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 CA9B2E44; Sat, 4 Apr 2015 04:18: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 ABD8AB; Sat, 4 Apr 2015 04:18: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 t344IrF0090959; Sat, 4 Apr 2015 04:18:53 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t344IrZp090958; Sat, 4 Apr 2015 04:18:53 GMT (envelope-from rpaulo@FreeBSD.org) Message-Id: <201504040418.t344IrZp090958@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rpaulo set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo Date: Sat, 4 Apr 2015 04:18:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281058 - head/sys/boot/efi/boot1 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 Apr 2015 04:18:54 -0000 Author: rpaulo Date: Sat Apr 4 04:18:52 2015 New Revision: 281058 URL: https://svnweb.freebsd.org/changeset/base/281058 Log: Remove whitespace. Modified: head/sys/boot/efi/boot1/boot1.c Modified: head/sys/boot/efi/boot1/boot1.c ============================================================================== --- head/sys/boot/efi/boot1/boot1.c Sat Apr 4 02:34:40 2015 (r281057) +++ head/sys/boot/efi/boot1/boot1.c Sat Apr 4 04:18:52 2015 (r281058) @@ -30,7 +30,7 @@ __FBSDID("$FreeBSD$"); #define _PATH_LOADER "/boot/loader.efi" #define _PATH_KERNEL "/boot/kernel/kernel" - + #define BSIZEMAX 16384 typedef int putc_func_t(char c, void *arg); @@ -40,7 +40,7 @@ struct sp_data { u_int sp_len; u_int sp_size; }; - + static const char digits[] = "0123456789abcdef"; static void panic(const char *fmt, ...) __dead2; @@ -62,7 +62,7 @@ static void load(const char *fname); EFI_SYSTEM_TABLE *systab; EFI_HANDLE *image; -static void +static void bcopy(const void *src, void *dst, size_t len) { const char *s = src; @@ -71,12 +71,12 @@ bcopy(const void *src, void *dst, size_t while (len-- != 0) *d++ = *s++; } - + static void memcpy(void *dst, const void *src, size_t len) { bcopy(src, dst, len); -} +} static void bzero(void *b, size_t len) @@ -86,7 +86,7 @@ bzero(void *b, size_t len) while (len-- != 0) *p++ = 0; } - + static int strcmp(const char *s1, const char *s2) { @@ -134,7 +134,7 @@ EFI_STATUS efi_main(EFI_HANDLE Ximage, E for (i = 0; i < nparts; i++) { status = systab->BootServices->HandleProtocol(handles[i], - &DevicePathGUID, (void **)&devpath); + &DevicePathGUID, (void **)&devpath); if (EFI_ERROR(status)) continue; @@ -142,7 +142,7 @@ EFI_STATUS efi_main(EFI_HANDLE Ximage, E devpath = NextDevicePathNode(devpath); status = systab->BootServices->HandleProtocol(handles[i], - &BlockIoProtocolGUID, (void **)&blkio); + &BlockIoProtocolGUID, (void **)&blkio); if (EFI_ERROR(status)) continue; @@ -158,7 +158,7 @@ EFI_STATUS efi_main(EFI_HANDLE Ximage, E bootdevhandle = handles[i]; load(path); - + panic("Load failed"); return EFI_SUCCESS; @@ -266,7 +266,7 @@ fsstat(ufs_ino_t inode) } static struct dmadat __dmadat; - + static int domount(EFI_DEVICE_PATH *device, EFI_BLOCK_IO *blkio, int quiet) { @@ -278,7 +278,7 @@ domount(EFI_DEVICE_PATH *device, EFI_BLO if (!quiet) printf("domount: can't read superblock\n"); return (-1); - } + } if (!quiet) printf("Succesfully mounted UFS filesystem\n"); return (0); @@ -303,7 +303,7 @@ load(const char *fname) status = systab->BootServices->AllocatePool(EfiLoaderData, bufsize, &buffer); fsread(ino, buffer, bufsize); - + /* XXX: For secure boot, we need our own loader here */ status = systab->BootServices->LoadImage(TRUE, image, bootdevpath, buffer, bufsize, &loaderhandle); @@ -549,4 +549,3 @@ __ultoa(char *buf, u_long ul, int base) while ((ul /= base) != 0); return (p); } - From owner-svn-src-all@FreeBSD.ORG Sat Apr 4 04:27:55 2015 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 CE30DA8; Sat, 4 Apr 2015 04:27: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 9F99E13F; Sat, 4 Apr 2015 04:27: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 t344RtHl095523; Sat, 4 Apr 2015 04:27:55 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t344RtGZ095522; Sat, 4 Apr 2015 04:27:55 GMT (envelope-from rpaulo@FreeBSD.org) Message-Id: <201504040427.t344RtGZ095522@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rpaulo set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo Date: Sat, 4 Apr 2015 04:27:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281059 - head/sys/boot/efi/boot1 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 Apr 2015 04:27:55 -0000 Author: rpaulo Date: Sat Apr 4 04:27:54 2015 New Revision: 281059 URL: https://svnweb.freebsd.org/changeset/base/281059 Log: boot1 EFI: reset the screen and select the best mode. It's necessary to reset the screen to make sure any vendor pixels are gone when we start boot1. In the Lenovo X1 (3rd gen), this is the only way to clear the screen. Previously, the Lenovo logo would only disappear after the kernel started scrolling the display. After resetting the screen, EFI could put us in the worst LCD mode (oversized characters), so we now find the largest mode we can use and hope it's the most appropriate one (it's not trivial to tell what's the correct LCD resolution at this point). It's worth noting that the final stage loader has a 'mode' command that can be used to switch text modes. While there, enable the software cursor, just like in the legacy boot mode. MFC after: 1 week Modified: head/sys/boot/efi/boot1/boot1.c Modified: head/sys/boot/efi/boot1/boot1.c ============================================================================== --- head/sys/boot/efi/boot1/boot1.c Sat Apr 4 04:18:52 2015 (r281058) +++ head/sys/boot/efi/boot1/boot1.c Sat Apr 4 04:27:54 2015 (r281059) @@ -108,11 +108,12 @@ EFI_STATUS efi_main(EFI_HANDLE Ximage, E { EFI_HANDLE handles[128]; EFI_BLOCK_IO *blkio; - UINTN i, nparts = sizeof(handles); + UINTN i, nparts = sizeof(handles), cols, rows, max_dim, best_mode; EFI_STATUS status; EFI_DEVICE_PATH *devpath; EFI_BOOT_SERVICES *BS; EFI_CONSOLE_CONTROL_PROTOCOL *ConsoleControl = NULL; + SIMPLE_TEXT_OUTPUT_INTERFACE *conout = NULL; char *path = _PATH_LOADER; systab = Xsystab; @@ -124,6 +125,26 @@ EFI_STATUS efi_main(EFI_HANDLE Ximage, E if (status == EFI_SUCCESS) (void)ConsoleControl->SetMode(ConsoleControl, EfiConsoleControlScreenText); + /* + * Reset the console and find the best text mode. + */ + conout = systab->ConOut; + conout->Reset(conout, TRUE); + max_dim = best_mode = 0; + for (i = 0; ; i++) { + status = conout->QueryMode(conout, i, + &cols, &rows); + if (EFI_ERROR(status)) + break; + if (cols * rows > max_dim) { + max_dim = cols * rows; + best_mode = i; + } + } + if (max_dim > 0) + conout->SetMode(conout, best_mode); + conout->EnableCursor(conout, TRUE); + conout->ClearScreen(conout); printf(" \n>> FreeBSD EFI boot block\n"); printf(" Loader path: %s\n", path); From owner-svn-src-all@FreeBSD.ORG Sat Apr 4 04:29:32 2015 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 D39C81F5; Sat, 4 Apr 2015 04:29: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 BECDA147; Sat, 4 Apr 2015 04:29: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 t344TWQN095765; Sat, 4 Apr 2015 04:29:32 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t344TWBk095760; Sat, 4 Apr 2015 04:29:32 GMT (envelope-from rpaulo@FreeBSD.org) Message-Id: <201504040429.t344TWBk095760@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rpaulo set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo Date: Sat, 4 Apr 2015 04:29:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281060 - head/sys/boot/efi/boot1 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 Apr 2015 04:29:32 -0000 Author: rpaulo Date: Sat Apr 4 04:29:31 2015 New Revision: 281060 URL: https://svnweb.freebsd.org/changeset/base/281060 Log: Remove an unnecessary space in a printf call. Modified: head/sys/boot/efi/boot1/boot1.c Modified: head/sys/boot/efi/boot1/boot1.c ============================================================================== --- head/sys/boot/efi/boot1/boot1.c Sat Apr 4 04:27:54 2015 (r281059) +++ head/sys/boot/efi/boot1/boot1.c Sat Apr 4 04:29:31 2015 (r281060) @@ -146,7 +146,8 @@ EFI_STATUS efi_main(EFI_HANDLE Ximage, E conout->EnableCursor(conout, TRUE); conout->ClearScreen(conout); - printf(" \n>> FreeBSD EFI boot block\n"); + printf("\n" + ">> FreeBSD EFI boot block\n"); printf(" Loader path: %s\n", path); status = systab->BootServices->LocateHandle(ByProtocol, From owner-svn-src-all@FreeBSD.ORG Sat Apr 4 04:30:39 2015 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 14FEB340; Sat, 4 Apr 2015 04:30: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 002061E4; Sat, 4 Apr 2015 04:30: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 t344UcZ8096633; Sat, 4 Apr 2015 04:30:38 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t344UcGZ096632; Sat, 4 Apr 2015 04:30:38 GMT (envelope-from rpaulo@FreeBSD.org) Message-Id: <201504040430.t344UcGZ096632@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rpaulo set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo Date: Sat, 4 Apr 2015 04:30:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281061 - head/sys/boot/efi/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: Sat, 04 Apr 2015 04:30:39 -0000 Author: rpaulo Date: Sat Apr 4 04:30:37 2015 New Revision: 281061 URL: https://svnweb.freebsd.org/changeset/base/281061 Log: loader/EFI: improve the help of the 'mode' command. Modified: head/sys/boot/efi/loader/main.c Modified: head/sys/boot/efi/loader/main.c ============================================================================== --- head/sys/boot/efi/loader/main.c Sat Apr 4 04:29:31 2015 (r281060) +++ head/sys/boot/efi/loader/main.c Sat Apr 4 04:30:37 2015 (r281061) @@ -285,7 +285,7 @@ command_configuration(int argc, char *ar } -COMMAND_SET(mode, "mode", "change or display text modes", command_mode); +COMMAND_SET(mode, "mode", "change or display EFI text modes", command_mode); static int command_mode(int argc, char *argv[]) @@ -331,7 +331,7 @@ command_mode(int argc, char *argv[]) } if (i != 0) - printf("Choose the mode with \"col \"\n"); + printf("Select a mode with the command \"mode \"\n"); return (CMD_OK); } From owner-svn-src-all@FreeBSD.ORG Sat Apr 4 06:22:15 2015 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 41DAF321; Sat, 4 Apr 2015 06:22: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 2CEB4D16; Sat, 4 Apr 2015 06:22: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 t346MEQL051295; Sat, 4 Apr 2015 06:22:14 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t346MEp3051294; Sat, 4 Apr 2015 06:22:14 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201504040622.t346MEp3051294@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sat, 4 Apr 2015 06:22:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281062 - 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 Apr 2015 06:22:15 -0000 Author: jhibbits Date: Sat Apr 4 06:22:14 2015 New Revision: 281062 URL: https://svnweb.freebsd.org/changeset/base/281062 Log: Add mpc85xx_gpio to the build conf. Missed this in the previous commit. Modified: head/sys/conf/files.powerpc Modified: head/sys/conf/files.powerpc ============================================================================== --- head/sys/conf/files.powerpc Sat Apr 4 04:30:37 2015 (r281061) +++ head/sys/conf/files.powerpc Sat Apr 4 06:22:14 2015 (r281062) @@ -136,6 +136,7 @@ powerpc/mpc85xx/i2c.c optional iicbus f powerpc/mpc85xx/isa.c optional mpc85xx isa powerpc/mpc85xx/lbc.c optional mpc85xx powerpc/mpc85xx/mpc85xx.c optional mpc85xx +powerpc/mpc85xx/mpc85xx_gpio.c optional mpc85xx gpio powerpc/mpc85xx/platform_mpc85xx.c optional mpc85xx powerpc/mpc85xx/pci_mpc85xx.c optional pci mpc85xx powerpc/ofw/ofw_machdep.c standard From owner-svn-src-all@FreeBSD.ORG Sat Apr 4 06:24:04 2015 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 15541478; Sat, 4 Apr 2015 06:24:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 00715D20; Sat, 4 Apr 2015 06:24:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t346O3qx051553; Sat, 4 Apr 2015 06:24:03 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t346O3Ol051551; Sat, 4 Apr 2015 06:24:03 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201504040624.t346O3Ol051551@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sat, 4 Apr 2015 06:24:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281063 - 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 Apr 2015 06:24:04 -0000 Author: jhibbits Date: Sat Apr 4 06:24:03 2015 New Revision: 281063 URL: https://svnweb.freebsd.org/changeset/base/281063 Log: Fix whitespace. Modified: head/sys/conf/files.powerpc Modified: head/sys/conf/files.powerpc ============================================================================== --- head/sys/conf/files.powerpc Sat Apr 4 06:22:14 2015 (r281062) +++ head/sys/conf/files.powerpc Sat Apr 4 06:24:03 2015 (r281063) @@ -35,7 +35,7 @@ dev/hwpmc/hwpmc_powerpc.c optional hwpmc dev/hwpmc/hwpmc_mpc7xxx.c optional hwpmc dev/hwpmc/hwpmc_ppc970.c optional hwpmc dev/iicbus/ad7417.c optional ad7417 powermac -dev/iicbus/adm1030.c optional powermac windtunnel | adm1030 powermac +dev/iicbus/adm1030.c optional powermac windtunnel | adm1030 powermac dev/iicbus/adt746x.c optional adt746x powermac dev/iicbus/ds1631.c optional ds1631 powermac dev/iicbus/ds1775.c optional ds1775 powermac From owner-svn-src-all@FreeBSD.ORG Sat Apr 4 07:27:23 2015 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 58A32B00; Sat, 4 Apr 2015 07:27:23 +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 1B6A8219; Sat, 4 Apr 2015 07:27:22 +0000 (UTC) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail109.syd.optusnet.com.au (Postfix) with ESMTPS id 078DCD62918; Sat, 4 Apr 2015 18:27:11 +1100 (AEDT) Date: Sat, 4 Apr 2015 18:27:11 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Rui Paulo Subject: Re: svn commit: r281059 - head/sys/boot/efi/boot1 In-Reply-To: <201504040427.t344RtGZ095522@svn.freebsd.org> Message-ID: <20150404175620.V1951@besplex.bde.org> References: <201504040427.t344RtGZ095522@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=A5NVYcmG c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=R36WSaORWdIywQFW2VkA: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: Sat, 04 Apr 2015 07:27:23 -0000 On Sat, 4 Apr 2015, Rui Paulo wrote: > Log: > boot1 EFI: reset the screen and select the best mode. > > It's necessary to reset the screen to make sure any vendor pixels are > gone when we start boot1. In the Lenovo X1 (3rd gen), this is the > only way to clear the screen. Previously, the Lenovo logo would only > disappear after the kernel started scrolling the display. > > After resetting the screen, EFI could put us in the worst LCD mode > (oversized characters), so we now find the largest mode we can use and > hope it's the most appropriate one (it's not trivial to tell what's > the correct LCD resolution at this point). It's worth noting that the > final stage loader has a 'mode' command that can be used to switch > text modes. :-(. I just complained about the bug that vt (on non-EFI) clears the screen where sc carefully preserves the screen in its history buffer. For graphics mode, determining the resolution is the trivial part :-). You also need OCR or something to translate the pixels into the format of your history buffer. Don't forget to fetch Lenevo's history buffer and translate it into your format :-). I don't have problems with boot logos except when the battery dies, since I turn them off until the CMOS forgets, but lose boot messages in another way from newer monitors blanking the screen after mode switches for much longer than older monitors. I expected newer systems to "fix" this by using the same graphics mode for the whole boot. Resetting the screen is even worse than clearing. Whole boots should take a second or 2. I don't get close to that. More like 20. But with the monitor blanking the screen for 5+ seconds afer every mode switch, even a 20-second boot gives almost no time for reading its messages. Saving the messages in history buffers or booting with -p becomes more important. Bruce From owner-svn-src-all@FreeBSD.ORG Sat Apr 4 07:52:14 2015 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 00882E5D; Sat, 4 Apr 2015 07:52: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 DF2F065D; Sat, 4 Apr 2015 07:52: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 t347qDQA093146; Sat, 4 Apr 2015 07:52:13 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t347qDbI093145; Sat, 4 Apr 2015 07:52:13 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201504040752.t347qDbI093145@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 4 Apr 2015 07:52: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: r281064 - 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 Apr 2015 07:52:14 -0000 Author: kib Date: Sat Apr 4 07:52:12 2015 New Revision: 281064 URL: https://svnweb.freebsd.org/changeset/base/281064 Log: MFC r258056 (by alc): Eliminate the gratuitous use of mmap(2) flags from the implementation of kern_shmat(). Use a simpler approach to determine whether to pass VMFS_NO_SPACE or VMFS_OPTIMAL_SPACE to vm_map_find(). Modified: stable/10/sys/kern/sysv_shm.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/sysv_shm.c ============================================================================== --- stable/10/sys/kern/sysv_shm.c Sat Apr 4 06:24:03 2015 (r281063) +++ stable/10/sys/kern/sysv_shm.c Sat Apr 4 07:52:12 2015 (r281064) @@ -342,7 +342,7 @@ kern_shmat(td, shmid, shmaddr, shmflg) int shmflg; { struct proc *p = td->td_proc; - int i, flags; + int i; struct shmid_kernel *shmseg; struct shmmap_state *shmmap_s = NULL; vm_offset_t attach_va; @@ -402,9 +402,7 @@ kern_shmat(td, shmid, shmaddr, shmflg) prot = VM_PROT_READ; if ((shmflg & SHM_RDONLY) == 0) prot |= VM_PROT_WRITE; - flags = MAP_ANON | MAP_SHARED; if (shmaddr) { - flags |= MAP_FIXED; if (shmflg & SHM_RND) { attach_va = (vm_offset_t)shmaddr & ~(SHMLBA-1); } else if (((vm_offset_t)shmaddr & (SHMLBA-1)) == 0) { @@ -426,7 +424,7 @@ kern_shmat(td, shmid, shmaddr, shmflg) vm_object_reference(shmseg->object); rv = vm_map_find(&p->p_vmspace->vm_map, shmseg->object, - 0, &attach_va, size, 0, (flags & MAP_FIXED) ? VMFS_NO_SPACE : + 0, &attach_va, size, 0, shmaddr != NULL ? VMFS_NO_SPACE : VMFS_OPTIMAL_SPACE, prot, prot, MAP_INHERIT_SHARE); if (rv != KERN_SUCCESS) { vm_object_deallocate(shmseg->object); From owner-svn-src-all@FreeBSD.ORG Sat Apr 4 07:56:06 2015 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 0CAC4FBC; Sat, 4 Apr 2015 07:56: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 EBACC671; Sat, 4 Apr 2015 07:56: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 t347u561093696; Sat, 4 Apr 2015 07:56:05 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t347u5vS093695; Sat, 4 Apr 2015 07:56:05 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201504040756.t347u5vS093695@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 4 Apr 2015 07:56: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: r281065 - 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 Apr 2015 07:56:06 -0000 Author: kib Date: Sat Apr 4 07:56:04 2015 New Revision: 281065 URL: https://svnweb.freebsd.org/changeset/base/281065 Log: MFC r278697 (by alc): Preset the object's color, or alignment, to maximize superpage usage. Modified: stable/10/sys/kern/sysv_shm.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/sysv_shm.c ============================================================================== --- stable/10/sys/kern/sysv_shm.c Sat Apr 4 07:52:12 2015 (r281064) +++ stable/10/sys/kern/sysv_shm.c Sat Apr 4 07:56:04 2015 (r281065) @@ -719,9 +719,10 @@ shmget_allocate_segment(td, uap, mode) #endif return (ENOMEM); } + shm_object->pg_color = 0; VM_OBJECT_WLOCK(shm_object); vm_object_clear_flag(shm_object, OBJ_ONEMAPPING); - vm_object_set_flag(shm_object, OBJ_NOSPLIT); + vm_object_set_flag(shm_object, OBJ_COLORED | OBJ_NOSPLIT); VM_OBJECT_WUNLOCK(shm_object); shmseg->object = shm_object; From owner-svn-src-all@FreeBSD.ORG Sat Apr 4 07:59:08 2015 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 9642F196; Sat, 4 Apr 2015 07:59: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 8020F684; Sat, 4 Apr 2015 07:59: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 t347x81a094092; Sat, 4 Apr 2015 07:59:08 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t347x8IO094091; Sat, 4 Apr 2015 07:59:08 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201504040759.t347x8IO094091@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 4 Apr 2015 07:59:08 +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: r281066 - 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 Apr 2015 07:59:08 -0000 Author: kib Date: Sat Apr 4 07:59:07 2015 New Revision: 281066 URL: https://svnweb.freebsd.org/changeset/base/281066 Log: MFC r280323: Somewhat modernize the SysV shm code. MFC r280325 (by cognet): Fix warning for !MAC case. Modified: stable/10/sys/kern/sysv_shm.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/sysv_shm.c ============================================================================== --- stable/10/sys/kern/sysv_shm.c Sat Apr 4 07:56:04 2015 (r281065) +++ stable/10/sys/kern/sysv_shm.c Sat Apr 4 07:59:07 2015 (r281066) @@ -109,7 +109,6 @@ static int shmget_existing(struct thread #define SHMSEG_FREE 0x0200 #define SHMSEG_REMOVED 0x0400 #define SHMSEG_ALLOCATED 0x0800 -#define SHMSEG_WANTED 0x1000 static int shm_last_free, shm_nused, shmalloced; vm_size_t shm_committed; @@ -122,8 +121,7 @@ struct shmmap_state { static void shm_deallocate_segment(struct shmid_kernel *); static int shm_find_segment_by_key(key_t); -static struct shmid_kernel *shm_find_segment_by_shmid(int); -static struct shmid_kernel *shm_find_segment_by_shmidx(int); +static struct shmid_kernel *shm_find_segment(int, bool); static int shm_delete_mapping(struct vmspace *vm, struct shmmap_state *); static void shmrealloc(void); static int shminit(void); @@ -181,13 +179,17 @@ SYSCTL_INT(_kern_ipc, OID_AUTO, shm_use_ SYSCTL_INT(_kern_ipc, OID_AUTO, shm_allow_removed, CTLFLAG_RW, &shm_allow_removed, 0, "Enable/Disable attachment to attached segments marked for removal"); -SYSCTL_PROC(_kern_ipc, OID_AUTO, shmsegs, CTLTYPE_OPAQUE | CTLFLAG_RD, - NULL, 0, sysctl_shmsegs, "", +SYSCTL_PROC(_kern_ipc, OID_AUTO, shmsegs, CTLTYPE_OPAQUE | CTLFLAG_RD | + CTLFLAG_MPSAFE, NULL, 0, sysctl_shmsegs, "", "Current number of shared memory segments allocated"); +static struct sx sysvshmsx; +#define SYSVSHM_LOCK() sx_xlock(&sysvshmsx) +#define SYSVSHM_UNLOCK() sx_xunlock(&sysvshmsx) +#define SYSVSHM_ASSERT_LOCKED() sx_assert(&sysvshmsx, SA_XLOCKED) + static int -shm_find_segment_by_key(key) - key_t key; +shm_find_segment_by_key(key_t key) { int i; @@ -198,46 +200,34 @@ shm_find_segment_by_key(key) return (-1); } +/* + * Finds segment either by shmid if is_shmid is true, or by segnum if + * is_shmid is false. + */ static struct shmid_kernel * -shm_find_segment_by_shmid(int shmid) +shm_find_segment(int arg, bool is_shmid) { - int segnum; struct shmid_kernel *shmseg; + int segnum; - segnum = IPCID_TO_IX(shmid); + segnum = is_shmid ? IPCID_TO_IX(arg) : arg; if (segnum < 0 || segnum >= shmalloced) return (NULL); shmseg = &shmsegs[segnum]; if ((shmseg->u.shm_perm.mode & SHMSEG_ALLOCATED) == 0 || (!shm_allow_removed && (shmseg->u.shm_perm.mode & SHMSEG_REMOVED) != 0) || - shmseg->u.shm_perm.seq != IPCID_TO_SEQ(shmid)) - return (NULL); - return (shmseg); -} - -static struct shmid_kernel * -shm_find_segment_by_shmidx(int segnum) -{ - struct shmid_kernel *shmseg; - - if (segnum < 0 || segnum >= shmalloced) - return (NULL); - shmseg = &shmsegs[segnum]; - if ((shmseg->u.shm_perm.mode & SHMSEG_ALLOCATED) == 0 || - (!shm_allow_removed && - (shmseg->u.shm_perm.mode & SHMSEG_REMOVED) != 0)) + (is_shmid && shmseg->u.shm_perm.seq != IPCID_TO_SEQ(arg))) return (NULL); return (shmseg); } static void -shm_deallocate_segment(shmseg) - struct shmid_kernel *shmseg; +shm_deallocate_segment(struct shmid_kernel *shmseg) { vm_size_t size; - GIANT_REQUIRED; + SYSVSHM_ASSERT_LOCKED(); vm_object_deallocate(shmseg->object); shmseg->object = NULL; @@ -261,9 +251,11 @@ shm_delete_mapping(struct vmspace *vm, s int segnum, result; vm_size_t size; - GIANT_REQUIRED; - + SYSVSHM_ASSERT_LOCKED(); segnum = IPCID_TO_IX(shmmap_s->shmid); + KASSERT(segnum >= 0 && segnum < shmalloced, + ("segnum %d shmalloced %d", segnum, shmalloced)); + shmseg = &shmsegs[segnum]; size = round_page(shmseg->u.shm_segsz); result = vm_map_remove(&vm->vm_map, shmmap_s->va, shmmap_s->va + size); @@ -279,138 +271,110 @@ shm_delete_mapping(struct vmspace *vm, s return (0); } -#ifndef _SYS_SYSPROTO_H_ -struct shmdt_args { - const void *shmaddr; -}; -#endif -int -sys_shmdt(td, uap) - struct thread *td; - struct shmdt_args *uap; +static int +kern_shmdt_locked(struct thread *td, const void *shmaddr) { struct proc *p = td->td_proc; struct shmmap_state *shmmap_s; #ifdef MAC struct shmid_kernel *shmsegptr; #endif - int i; - int error = 0; + int error, i; + SYSVSHM_ASSERT_LOCKED(); if (!prison_allow(td->td_ucred, PR_ALLOW_SYSVIPC)) return (ENOSYS); - mtx_lock(&Giant); shmmap_s = p->p_vmspace->vm_shm; - if (shmmap_s == NULL) { - error = EINVAL; - goto done2; - } + if (shmmap_s == NULL) + return (EINVAL); for (i = 0; i < shminfo.shmseg; i++, shmmap_s++) { if (shmmap_s->shmid != -1 && - shmmap_s->va == (vm_offset_t)uap->shmaddr) { + shmmap_s->va == (vm_offset_t)shmaddr) { break; } } - if (i == shminfo.shmseg) { - error = EINVAL; - goto done2; - } + if (i == shminfo.shmseg) + return (EINVAL); #ifdef MAC shmsegptr = &shmsegs[IPCID_TO_IX(shmmap_s->shmid)]; error = mac_sysvshm_check_shmdt(td->td_ucred, shmsegptr); if (error != 0) - goto done2; + return (error); #endif error = shm_delete_mapping(p->p_vmspace, shmmap_s); -done2: - mtx_unlock(&Giant); return (error); } #ifndef _SYS_SYSPROTO_H_ -struct shmat_args { - int shmid; +struct shmdt_args { const void *shmaddr; - int shmflg; }; #endif int -kern_shmat(td, shmid, shmaddr, shmflg) - struct thread *td; - int shmid; - const void *shmaddr; - int shmflg; +sys_shmdt(struct thread *td, struct shmdt_args *uap) +{ + int error; + + SYSVSHM_LOCK(); + error = kern_shmdt_locked(td, uap->shmaddr); + SYSVSHM_UNLOCK(); + return (error); +} + +static int +kern_shmat_locked(struct thread *td, int shmid, const void *shmaddr, + int shmflg) { struct proc *p = td->td_proc; - int i; struct shmid_kernel *shmseg; struct shmmap_state *shmmap_s = NULL; vm_offset_t attach_va; vm_prot_t prot; vm_size_t size; - int rv; - int error = 0; + int error, i, rv; + SYSVSHM_ASSERT_LOCKED(); if (!prison_allow(td->td_ucred, PR_ALLOW_SYSVIPC)) return (ENOSYS); - mtx_lock(&Giant); shmmap_s = p->p_vmspace->vm_shm; if (shmmap_s == NULL) { shmmap_s = malloc(shminfo.shmseg * sizeof(struct shmmap_state), M_SHM, M_WAITOK); - - /* - * If malloc() above sleeps, the Giant lock is - * temporarily dropped, which allows another thread to - * allocate shmmap_state and set vm_shm. Recheck - * vm_shm and free the new shmmap_state if another one - * is already allocated. - */ - if (p->p_vmspace->vm_shm != NULL) { - free(shmmap_s, M_SHM); - shmmap_s = p->p_vmspace->vm_shm; - } else { - for (i = 0; i < shminfo.shmseg; i++) - shmmap_s[i].shmid = -1; - p->p_vmspace->vm_shm = shmmap_s; - } - } - shmseg = shm_find_segment_by_shmid(shmid); - if (shmseg == NULL) { - error = EINVAL; - goto done2; + for (i = 0; i < shminfo.shmseg; i++) + shmmap_s[i].shmid = -1; + KASSERT(p->p_vmspace->vm_shm == NULL, ("raced")); + p->p_vmspace->vm_shm = shmmap_s; } + shmseg = shm_find_segment(shmid, true); + if (shmseg == NULL) + return (EINVAL); error = ipcperm(td, &shmseg->u.shm_perm, (shmflg & SHM_RDONLY) ? IPC_R : IPC_R|IPC_W); - if (error) - goto done2; + if (error != 0) + return (error); #ifdef MAC error = mac_sysvshm_check_shmat(td->td_ucred, shmseg, shmflg); if (error != 0) - goto done2; + return (error); #endif for (i = 0; i < shminfo.shmseg; i++) { if (shmmap_s->shmid == -1) break; shmmap_s++; } - if (i >= shminfo.shmseg) { - error = EMFILE; - goto done2; - } + if (i >= shminfo.shmseg) + return (EMFILE); size = round_page(shmseg->u.shm_segsz); prot = VM_PROT_READ; if ((shmflg & SHM_RDONLY) == 0) prot |= VM_PROT_WRITE; - if (shmaddr) { - if (shmflg & SHM_RND) { + if (shmaddr != NULL) { + if ((shmflg & SHM_RND) != 0) attach_va = (vm_offset_t)shmaddr & ~(SHMLBA-1); - } else if (((vm_offset_t)shmaddr & (SHMLBA-1)) == 0) { + else if (((vm_offset_t)shmaddr & (SHMLBA-1)) == 0) attach_va = (vm_offset_t)shmaddr; - } else { - error = EINVAL; - goto done2; - } + else + return (EINVAL); } else { /* * This is just a hint to vm_map_find() about where to @@ -428,8 +392,7 @@ kern_shmat(td, shmid, shmaddr, shmflg) VMFS_OPTIMAL_SPACE, prot, prot, MAP_INHERIT_SHARE); if (rv != KERN_SUCCESS) { vm_object_deallocate(shmseg->object); - error = ENOMEM; - goto done2; + return (ENOMEM); } shmmap_s->va = attach_va; @@ -438,34 +401,49 @@ kern_shmat(td, shmid, shmaddr, shmflg) shmseg->u.shm_atime = time_second; shmseg->u.shm_nattch++; td->td_retval[0] = attach_va; -done2: - mtx_unlock(&Giant); return (error); } int -sys_shmat(td, uap) - struct thread *td; - struct shmat_args *uap; +kern_shmat(struct thread *td, int shmid, const void *shmaddr, int shmflg) { - return kern_shmat(td, uap->shmid, uap->shmaddr, uap->shmflg); + int error; + + SYSVSHM_LOCK(); + error = kern_shmat_locked(td, shmid, shmaddr, shmflg); + SYSVSHM_UNLOCK(); + return (error); } -int -kern_shmctl(td, shmid, cmd, buf, bufsz) - struct thread *td; +#ifndef _SYS_SYSPROTO_H_ +struct shmat_args { int shmid; - int cmd; - void *buf; - size_t *bufsz; + const void *shmaddr; + int shmflg; +}; +#endif +int +sys_shmat(struct thread *td, struct shmat_args *uap) +{ + + return (kern_shmat(td, uap->shmid, uap->shmaddr, uap->shmflg)); +} + +static int +kern_shmctl_locked(struct thread *td, int shmid, int cmd, void *buf, + size_t *bufsz) { - int error = 0; struct shmid_kernel *shmseg; + struct shmid_ds *shmidp; + struct shm_info shm_info; + int error; + + SYSVSHM_ASSERT_LOCKED(); if (!prison_allow(td->td_ucred, PR_ALLOW_SYSVIPC)) return (ENOSYS); - mtx_lock(&Giant); + error = 0; switch (cmd) { /* * It is possible that kern_shmctl is being called from the Linux ABI @@ -481,9 +459,8 @@ kern_shmctl(td, shmid, cmd, buf, bufsz) if (bufsz) *bufsz = sizeof(shminfo); td->td_retval[0] = shmalloced; - goto done2; + return (0); case SHM_INFO: { - struct shm_info shm_info; shm_info.used_ids = shm_nused; shm_info.shm_rss = 0; /*XXX where to get from ? */ shm_info.shm_tot = 0; /*XXX where to get from ? */ @@ -491,56 +468,50 @@ kern_shmctl(td, shmid, cmd, buf, bufsz) shm_info.swap_attempts = 0; /*XXX where to get from ? */ shm_info.swap_successes = 0; /*XXX where to get from ? */ memcpy(buf, &shm_info, sizeof(shm_info)); - if (bufsz) + if (bufsz != NULL) *bufsz = sizeof(shm_info); td->td_retval[0] = shmalloced; - goto done2; + return (0); } } - if (cmd == SHM_STAT) - shmseg = shm_find_segment_by_shmidx(shmid); - else - shmseg = shm_find_segment_by_shmid(shmid); - if (shmseg == NULL) { - error = EINVAL; - goto done2; - } + shmseg = shm_find_segment(shmid, cmd != SHM_STAT); + if (shmseg == NULL) + return (EINVAL); #ifdef MAC error = mac_sysvshm_check_shmctl(td->td_ucred, shmseg, cmd); if (error != 0) - goto done2; + return (error); #endif switch (cmd) { case SHM_STAT: case IPC_STAT: error = ipcperm(td, &shmseg->u.shm_perm, IPC_R); - if (error) - goto done2; + if (error != 0) + return (error); memcpy(buf, &shmseg->u, sizeof(struct shmid_ds)); - if (bufsz) + if (bufsz != NULL) *bufsz = sizeof(struct shmid_ds); - if (cmd == SHM_STAT) - td->td_retval[0] = IXSEQ_TO_IPCID(shmid, shmseg->u.shm_perm); + if (cmd == SHM_STAT) { + td->td_retval[0] = IXSEQ_TO_IPCID(shmid, + shmseg->u.shm_perm); + } break; - case IPC_SET: { - struct shmid_ds *shmid; - - shmid = (struct shmid_ds *)buf; + case IPC_SET: + shmidp = (struct shmid_ds *)buf; error = ipcperm(td, &shmseg->u.shm_perm, IPC_M); - if (error) - goto done2; - shmseg->u.shm_perm.uid = shmid->shm_perm.uid; - shmseg->u.shm_perm.gid = shmid->shm_perm.gid; + if (error != 0) + return (error); + shmseg->u.shm_perm.uid = shmidp->shm_perm.uid; + shmseg->u.shm_perm.gid = shmidp->shm_perm.gid; shmseg->u.shm_perm.mode = (shmseg->u.shm_perm.mode & ~ACCESSPERMS) | - (shmid->shm_perm.mode & ACCESSPERMS); + (shmidp->shm_perm.mode & ACCESSPERMS); shmseg->u.shm_ctime = time_second; break; - } case IPC_RMID: error = ipcperm(td, &shmseg->u.shm_perm, IPC_M); - if (error) - goto done2; + if (error != 0) + return (error); shmseg->u.shm_perm.key = IPC_PRIVATE; shmseg->u.shm_perm.mode |= SHMSEG_REMOVED; if (shmseg->u.shm_nattch <= 0) { @@ -556,11 +527,21 @@ kern_shmctl(td, shmid, cmd, buf, bufsz) error = EINVAL; break; } -done2: - mtx_unlock(&Giant); return (error); } +int +kern_shmctl(struct thread *td, int shmid, int cmd, void *buf, size_t *bufsz) +{ + int error; + + SYSVSHM_LOCK(); + error = kern_shmctl_locked(td, shmid, cmd, buf, bufsz); + SYSVSHM_UNLOCK(); + return (error); +} + + #ifndef _SYS_SYSPROTO_H_ struct shmctl_args { int shmid; @@ -569,9 +550,7 @@ struct shmctl_args { }; #endif int -sys_shmctl(td, uap) - struct thread *td; - struct shmctl_args *uap; +sys_shmctl(struct thread *td, struct shmctl_args *uap) { int error = 0; struct shmid_ds buf; @@ -613,28 +592,18 @@ done: static int -shmget_existing(td, uap, mode, segnum) - struct thread *td; - struct shmget_args *uap; - int mode; - int segnum; +shmget_existing(struct thread *td, struct shmget_args *uap, int mode, + int segnum) { struct shmid_kernel *shmseg; +#ifdef MAC int error; +#endif + SYSVSHM_ASSERT_LOCKED(); + KASSERT(segnum >= 0 && segnum < shmalloced, + ("segnum %d shmalloced %d", segnum, shmalloced)); shmseg = &shmsegs[segnum]; - if (shmseg->u.shm_perm.mode & SHMSEG_REMOVED) { - /* - * This segment is in the process of being allocated. Wait - * until it's done, and look the key up again (in case the - * allocation failed or it was freed). - */ - shmseg->u.shm_perm.mode |= SHMSEG_WANTED; - error = tsleep(shmseg, PLOCK | PCATCH, "shmget", 0); - if (error) - return (error); - return (EAGAIN); - } if ((uap->shmflg & (IPC_CREAT | IPC_EXCL)) == (IPC_CREAT | IPC_EXCL)) return (EEXIST); #ifdef MAC @@ -649,18 +618,15 @@ shmget_existing(td, uap, mode, segnum) } static int -shmget_allocate_segment(td, uap, mode) - struct thread *td; - struct shmget_args *uap; - int mode; +shmget_allocate_segment(struct thread *td, struct shmget_args *uap, int mode) { - int i, segnum, shmid; - size_t size; struct ucred *cred = td->td_ucred; struct shmid_kernel *shmseg; vm_object_t shm_object; + int i, segnum; + size_t size; - GIANT_REQUIRED; + SYSVSHM_ASSERT_LOCKED(); if (uap->size < shminfo.shmmin || uap->size > shminfo.shmmax) return (EINVAL); @@ -681,6 +647,8 @@ shmget_allocate_segment(td, uap, mode) segnum = shm_last_free; shm_last_free = -1; } + KASSERT(segnum >= 0 && segnum < shmalloced, + ("segnum %d shmalloced %d", segnum, shmalloced)); shmseg = &shmsegs[segnum]; #ifdef RACCT PROC_LOCK(td->td_proc); @@ -695,15 +663,7 @@ shmget_allocate_segment(td, uap, mode) } PROC_UNLOCK(td->td_proc); #endif - /* - * In case we sleep in malloc(), mark the segment present but deleted - * so that noone else tries to create the same key. - */ - shmseg->u.shm_perm.mode = SHMSEG_ALLOCATED | SHMSEG_REMOVED; - shmseg->u.shm_perm.key = uap->key; - shmseg->u.shm_perm.seq = (shmseg->u.shm_perm.seq + 1) & 0x7fff; - shmid = IXSEQ_TO_IPCID(segnum, shmseg->u.shm_perm); - + /* * We make sure that we have allocated a pager before we need * to. @@ -728,8 +688,9 @@ shmget_allocate_segment(td, uap, mode) shmseg->object = shm_object; shmseg->u.shm_perm.cuid = shmseg->u.shm_perm.uid = cred->cr_uid; shmseg->u.shm_perm.cgid = shmseg->u.shm_perm.gid = cred->cr_gid; - shmseg->u.shm_perm.mode = (shmseg->u.shm_perm.mode & SHMSEG_WANTED) | - (mode & ACCESSPERMS) | SHMSEG_ALLOCATED; + shmseg->u.shm_perm.mode = (mode & ACCESSPERMS) | SHMSEG_ALLOCATED; + shmseg->u.shm_perm.key = uap->key; + shmseg->u.shm_perm.seq = (shmseg->u.shm_perm.seq + 1) & 0x7fff; shmseg->cred = crhold(cred); shmseg->u.shm_segsz = uap->size; shmseg->u.shm_cpid = td->td_proc->p_pid; @@ -741,15 +702,8 @@ shmget_allocate_segment(td, uap, mode) shmseg->u.shm_ctime = time_second; shm_committed += btoc(size); shm_nused++; - if (shmseg->u.shm_perm.mode & SHMSEG_WANTED) { - /* - * Somebody else wanted this key while we were asleep. Wake - * them up now. - */ - shmseg->u.shm_perm.mode &= ~SHMSEG_WANTED; - wakeup(shmseg); - } - td->td_retval[0] = shmid; + td->td_retval[0] = IXSEQ_TO_IPCID(segnum, shmseg->u.shm_perm); + return (0); } @@ -761,54 +715,52 @@ struct shmget_args { }; #endif int -sys_shmget(td, uap) - struct thread *td; - struct shmget_args *uap; +sys_shmget(struct thread *td, struct shmget_args *uap) { int segnum, mode; int error; if (!prison_allow(td->td_ucred, PR_ALLOW_SYSVIPC)) return (ENOSYS); - mtx_lock(&Giant); mode = uap->shmflg & ACCESSPERMS; - if (uap->key != IPC_PRIVATE) { - again: + SYSVSHM_LOCK(); + if (uap->key == IPC_PRIVATE) { + error = shmget_allocate_segment(td, uap, mode); + } else { segnum = shm_find_segment_by_key(uap->key); - if (segnum >= 0) { + if (segnum >= 0) error = shmget_existing(td, uap, mode, segnum); - if (error == EAGAIN) - goto again; - goto done2; - } - if ((uap->shmflg & IPC_CREAT) == 0) { + else if ((uap->shmflg & IPC_CREAT) == 0) error = ENOENT; - goto done2; - } + else + error = shmget_allocate_segment(td, uap, mode); } - error = shmget_allocate_segment(td, uap, mode); -done2: - mtx_unlock(&Giant); + SYSVSHM_UNLOCK(); return (error); } static void -shmfork_myhook(p1, p2) - struct proc *p1, *p2; +shmfork_myhook(struct proc *p1, struct proc *p2) { struct shmmap_state *shmmap_s; size_t size; int i; - mtx_lock(&Giant); + SYSVSHM_LOCK(); size = shminfo.shmseg * sizeof(struct shmmap_state); shmmap_s = malloc(size, M_SHM, M_WAITOK); bcopy(p1->p_vmspace->vm_shm, shmmap_s, size); p2->p_vmspace->vm_shm = shmmap_s; - for (i = 0; i < shminfo.shmseg; i++, shmmap_s++) - if (shmmap_s->shmid != -1) + for (i = 0; i < shminfo.shmseg; i++, shmmap_s++) { + if (shmmap_s->shmid != -1) { + KASSERT(IPCID_TO_IX(shmmap_s->shmid) >= 0 && + IPCID_TO_IX(shmmap_s->shmid) < shmalloced, + ("segnum %d shmalloced %d", + IPCID_TO_IX(shmmap_s->shmid), shmalloced)); shmsegs[IPCID_TO_IX(shmmap_s->shmid)].u.shm_nattch++; - mtx_unlock(&Giant); + } + } + SYSVSHM_UNLOCK(); } static void @@ -817,14 +769,15 @@ shmexit_myhook(struct vmspace *vm) struct shmmap_state *base, *shm; int i; - if ((base = vm->vm_shm) != NULL) { + base = vm->vm_shm; + if (base != NULL) { vm->vm_shm = NULL; - mtx_lock(&Giant); + SYSVSHM_LOCK(); for (i = 0, shm = base; i < shminfo.shmseg; i++, shm++) { if (shm->shmid != -1) shm_delete_mapping(vm, shm); } - mtx_unlock(&Giant); + SYSVSHM_UNLOCK(); free(base, M_SHM); } } @@ -832,8 +785,10 @@ shmexit_myhook(struct vmspace *vm) static void shmrealloc(void) { - int i; struct shmid_kernel *newsegs; + int i; + + SYSVSHM_ASSERT_LOCKED(); if (shmalloced >= shminfo.shmmni) return; @@ -891,7 +846,7 @@ static struct syscall_helper_data shm32_ #endif static int -shminit() +shminit(void) { int i, error; @@ -925,6 +880,7 @@ shminit() shm_last_free = 0; shm_nused = 0; shm_committed = 0; + sx_init(&sysvshmsx, "sysvshmsx"); shmexit_hook = &shmexit_myhook; shmfork_hook = &shmfork_myhook; @@ -940,7 +896,7 @@ shminit() } static int -shmunload() +shmunload(void) { int i; @@ -967,14 +923,19 @@ shmunload() free(shmsegs, M_SHM); shmexit_hook = NULL; shmfork_hook = NULL; + sx_destroy(&sysvshmsx); return (0); } static int sysctl_shmsegs(SYSCTL_HANDLER_ARGS) { + int error; - return (SYSCTL_OUT(req, shmsegs, shmalloced * sizeof(shmsegs[0]))); + SYSVSHM_LOCK(); + error = SYSCTL_OUT(req, shmsegs, shmalloced * sizeof(shmsegs[0])); + SYSVSHM_UNLOCK(); + return (error); } #if defined(__i386__) && (defined(COMPAT_FREEBSD4) || defined(COMPAT_43)) @@ -1006,21 +967,22 @@ oshmctl(struct thread *td, struct oshmct if (!prison_allow(td->td_ucred, PR_ALLOW_SYSVIPC)) return (ENOSYS); - mtx_lock(&Giant); - shmseg = shm_find_segment_by_shmid(uap->shmid); + SYSVSHM_LOCK(); + shmseg = shm_find_segment(uap->shmid, true); if (shmseg == NULL) { - error = EINVAL; - goto done2; + SYSVSHM_UNLOCK(); + return (error); } switch (uap->cmd) { case IPC_STAT: error = ipcperm(td, &shmseg->u.shm_perm, IPC_R); - if (error) - goto done2; + if (error != 0) + break; #ifdef MAC - error = mac_sysvshm_check_shmctl(td->td_ucred, shmseg, uap->cmd); + error = mac_sysvshm_check_shmctl(td->td_ucred, shmseg, + uap->cmd); if (error != 0) - goto done2; + break; #endif ipcperm_new2old(&shmseg->u.shm_perm, &outbuf.shm_perm); outbuf.shm_segsz = shmseg->u.shm_segsz; @@ -1032,15 +994,12 @@ oshmctl(struct thread *td, struct oshmct outbuf.shm_ctime = shmseg->u.shm_ctime; outbuf.shm_handle = shmseg->object; error = copyout(&outbuf, uap->ubuf, sizeof(outbuf)); - if (error) - goto done2; break; default: error = freebsd7_shmctl(td, (struct freebsd7_shmctl_args *)uap); break; } -done2: - mtx_unlock(&Giant); + SYSVSHM_UNLOCK(); return (error); #else return (EINVAL); @@ -1054,27 +1013,27 @@ static sy_call_t *shmcalls[] = { (sy_call_t *)freebsd7_shmctl }; +#ifndef _SYS_SYSPROTO_H_ +/* XXX actually varargs. */ +struct shmsys_args { + int which; + int a2; + int a3; + int a4; +}; +#endif int -sys_shmsys(td, uap) - struct thread *td; - /* XXX actually varargs. */ - struct shmsys_args /* { - int which; - int a2; - int a3; - int a4; - } */ *uap; +sys_shmsys(struct thread *td, struct shmsys_args *uap) { int error; if (!prison_allow(td->td_ucred, PR_ALLOW_SYSVIPC)) return (ENOSYS); - if (uap->which < 0 || - uap->which >= sizeof(shmcalls)/sizeof(shmcalls[0])) + if (uap->which < 0 || uap->which >= nitems(shmcalls)) return (EINVAL); - mtx_lock(&Giant); + SYSVSHM_LOCK(); error = (*shmcalls[uap->which])(td, &uap->a2); - mtx_unlock(&Giant); + SYSVSHM_UNLOCK(); return (error); } @@ -1315,9 +1274,7 @@ struct freebsd7_shmctl_args { }; #endif int -freebsd7_shmctl(td, uap) - struct thread *td; - struct freebsd7_shmctl_args *uap; +freebsd7_shmctl(struct thread *td, struct freebsd7_shmctl_args *uap) { int error = 0; struct shmid_ds_old old; From owner-svn-src-all@FreeBSD.ORG Sat Apr 4 08:06:14 2015 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 8957055A; Sat, 4 Apr 2015 08:06: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 741A57C2; Sat, 4 Apr 2015 08:06: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 t3486ES3098554; Sat, 4 Apr 2015 08:06:14 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3486ESO098553; Sat, 4 Apr 2015 08:06:14 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201504040806.t3486ESO098553@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 4 Apr 2015 08:06: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: r281067 - 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 Apr 2015 08:06:14 -0000 Author: kib Date: Sat Apr 4 08:06:13 2015 New Revision: 281067 URL: https://svnweb.freebsd.org/changeset/base/281067 Log: MFC r280797: Make debug.vmem_check a tunable. It is useful to set it early. Modified: stable/10/sys/kern/subr_vmem.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/subr_vmem.c ============================================================================== --- stable/10/sys/kern/subr_vmem.c Sat Apr 4 07:59:07 2015 (r281066) +++ stable/10/sys/kern/subr_vmem.c Sat Apr 4 08:06:13 2015 (r281067) @@ -172,7 +172,7 @@ struct vmem_btag { #if defined(DIAGNOSTIC) static int enable_vmem_check = 1; -SYSCTL_INT(_debug, OID_AUTO, vmem_check, CTLFLAG_RW, +SYSCTL_INT(_debug, OID_AUTO, vmem_check, CTLFLAG_RWTUN, &enable_vmem_check, 0, "Enable vmem check"); static void vmem_check(vmem_t *); #endif From owner-svn-src-all@FreeBSD.ORG Sat Apr 4 08:11:11 2015 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 829D1735; Sat, 4 Apr 2015 08:11: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 6D11C87C; Sat, 4 Apr 2015 08:11: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 t348BBMf000274; Sat, 4 Apr 2015 08:11:11 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t348BBnr000273; Sat, 4 Apr 2015 08:11:11 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201504040811.t348BBnr000273@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 4 Apr 2015 08:11:11 +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: r281068 - stable/9/sys/amd64/amd64 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 Apr 2015 08:11:11 -0000 Author: kib Date: Sat Apr 4 08:11:10 2015 New Revision: 281068 URL: https://svnweb.freebsd.org/changeset/base/281068 Log: MFC r280781: Make it possible for the signal handler to act on #ss. Modified: stable/9/sys/amd64/amd64/machdep.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/amd64/machdep.c ============================================================================== --- stable/9/sys/amd64/amd64/machdep.c Sat Apr 4 08:06:13 2015 (r281067) +++ stable/9/sys/amd64/amd64/machdep.c Sat Apr 4 08:11:10 2015 (r281068) @@ -430,6 +430,7 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, regs->tf_rflags &= ~(PSL_T | PSL_D); regs->tf_cs = _ucodesel; regs->tf_ds = _udatasel; + regs->tf_ss = _udatasel; regs->tf_es = _udatasel; regs->tf_fs = _ufssel; regs->tf_gs = _ugssel; From owner-svn-src-all@FreeBSD.ORG Sat Apr 4 08:36:03 2015 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 C89E7CA4; Sat, 4 Apr 2015 08:36: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 B1049A35; Sat, 4 Apr 2015 08:36: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 t348a3sj012899; Sat, 4 Apr 2015 08:36:03 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t348a3KH012898; Sat, 4 Apr 2015 08:36:03 GMT (envelope-from rpaulo@FreeBSD.org) Message-Id: <201504040836.t348a3KH012898@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rpaulo set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo Date: Sat, 4 Apr 2015 08:36:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281069 - head/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: Sat, 04 Apr 2015 08:36:04 -0000 Author: rpaulo Date: Sat Apr 4 08:36:02 2015 New Revision: 281069 URL: https://svnweb.freebsd.org/changeset/base/281069 Log: Remove whitespace. Modified: head/sys/dev/usb/wlan/if_urtwn.c Modified: head/sys/dev/usb/wlan/if_urtwn.c ============================================================================== --- head/sys/dev/usb/wlan/if_urtwn.c Sat Apr 4 08:11:10 2015 (r281068) +++ head/sys/dev/usb/wlan/if_urtwn.c Sat Apr 4 08:36:02 2015 (r281069) @@ -176,12 +176,12 @@ static struct ieee80211vap *urtwn_vap_cr const uint8_t [IEEE80211_ADDR_LEN], const uint8_t [IEEE80211_ADDR_LEN]); static void urtwn_vap_delete(struct ieee80211vap *); -static struct mbuf * urtwn_rx_frame(struct urtwn_softc *, uint8_t *, int, +static struct mbuf * urtwn_rx_frame(struct urtwn_softc *, uint8_t *, int, int *); -static struct mbuf * urtwn_rxeof(struct usb_xfer *, struct urtwn_data *, +static struct mbuf * urtwn_rxeof(struct usb_xfer *, struct urtwn_data *, int *, int8_t *); static void urtwn_txeof(struct usb_xfer *, struct urtwn_data *); -static int urtwn_alloc_list(struct urtwn_softc *, +static int urtwn_alloc_list(struct urtwn_softc *, struct urtwn_data[], int, int); static int urtwn_alloc_rx_list(struct urtwn_softc *); static int urtwn_alloc_tx_list(struct urtwn_softc *); @@ -191,24 +191,24 @@ static void urtwn_free_list(struct urtw struct urtwn_data data[], int); static struct urtwn_data * _urtwn_getbuf(struct urtwn_softc *); static struct urtwn_data * urtwn_getbuf(struct urtwn_softc *); -static int urtwn_write_region_1(struct urtwn_softc *, uint16_t, +static int urtwn_write_region_1(struct urtwn_softc *, uint16_t, uint8_t *, int); static void urtwn_write_1(struct urtwn_softc *, uint16_t, uint8_t); static void urtwn_write_2(struct urtwn_softc *, uint16_t, uint16_t); static void urtwn_write_4(struct urtwn_softc *, uint16_t, uint32_t); -static int urtwn_read_region_1(struct urtwn_softc *, uint16_t, +static int urtwn_read_region_1(struct urtwn_softc *, uint16_t, uint8_t *, int); static uint8_t urtwn_read_1(struct urtwn_softc *, uint16_t); static uint16_t urtwn_read_2(struct urtwn_softc *, uint16_t); static uint32_t urtwn_read_4(struct urtwn_softc *, uint16_t); -static int urtwn_fw_cmd(struct urtwn_softc *, uint8_t, +static int urtwn_fw_cmd(struct urtwn_softc *, uint8_t, const void *, int); static void urtwn_r92c_rf_write(struct urtwn_softc *, int, uint8_t, uint32_t); -static void urtwn_r88e_rf_write(struct urtwn_softc *, int, +static void urtwn_r88e_rf_write(struct urtwn_softc *, int, uint8_t, uint32_t); static uint32_t urtwn_rf_read(struct urtwn_softc *, int, uint8_t); -static int urtwn_llt_write(struct urtwn_softc *, uint32_t, +static int urtwn_llt_write(struct urtwn_softc *, uint32_t, uint32_t); static uint8_t urtwn_efuse_read_1(struct urtwn_softc *, uint16_t); static void urtwn_efuse_read(struct urtwn_softc *); @@ -219,7 +219,7 @@ static void urtwn_r88e_read_rom(struct static int urtwn_ra_init(struct urtwn_softc *); static void urtwn_tsf_sync_enable(struct urtwn_softc *); static void urtwn_set_led(struct urtwn_softc *, int, int); -static int urtwn_newstate(struct ieee80211vap *, +static int urtwn_newstate(struct ieee80211vap *, enum ieee80211_state, int); static void urtwn_watchdog(void *); static void urtwn_update_avgrssi(struct urtwn_softc *, int, int8_t); @@ -237,7 +237,7 @@ static int urtwn_r88e_power_on(struct u static int urtwn_llt_init(struct urtwn_softc *); static void urtwn_fw_reset(struct urtwn_softc *); static void urtwn_r88e_fw_reset(struct urtwn_softc *); -static int urtwn_fw_loadpage(struct urtwn_softc *, int, +static int urtwn_fw_loadpage(struct urtwn_softc *, int, const uint8_t *, int); static int urtwn_load_firmware(struct urtwn_softc *); static int urtwn_r92c_dma_init(struct urtwn_softc *); @@ -249,22 +249,22 @@ static void urtwn_cam_init(struct urtwn static void urtwn_pa_bias_init(struct urtwn_softc *); static void urtwn_rxfilter_init(struct urtwn_softc *); static void urtwn_edca_init(struct urtwn_softc *); -static void urtwn_write_txpower(struct urtwn_softc *, int, +static void urtwn_write_txpower(struct urtwn_softc *, int, uint16_t[]); static void urtwn_get_txpower(struct urtwn_softc *, int, - struct ieee80211_channel *, + struct ieee80211_channel *, struct ieee80211_channel *, uint16_t[]); static void urtwn_r88e_get_txpower(struct urtwn_softc *, int, - struct ieee80211_channel *, + struct ieee80211_channel *, struct ieee80211_channel *, uint16_t[]); static void urtwn_set_txpower(struct urtwn_softc *, - struct ieee80211_channel *, + struct ieee80211_channel *, struct ieee80211_channel *); static void urtwn_scan_start(struct ieee80211com *); static void urtwn_scan_end(struct ieee80211com *); static void urtwn_set_channel(struct ieee80211com *); static void urtwn_set_chan(struct urtwn_softc *, - struct ieee80211_channel *, + struct ieee80211_channel *, struct ieee80211_channel *); static void urtwn_update_mcast(struct ifnet *); static void urtwn_iq_calib(struct urtwn_softc *); @@ -470,7 +470,7 @@ urtwn_attach(device_t self) ic->ic_vap_delete = urtwn_vap_delete; ic->ic_update_mcast = urtwn_update_mcast; - ieee80211_radiotap_attach(ic, &sc->sc_txtap.wt_ihdr, + ieee80211_radiotap_attach(ic, &sc->sc_txtap.wt_ihdr, sizeof(sc->sc_txtap), URTWN_TX_RADIOTAP_PRESENT, &sc->sc_rxtap.wr_ihdr, sizeof(sc->sc_rxtap), URTWN_RX_RADIOTAP_PRESENT); @@ -492,7 +492,7 @@ urtwn_detach(device_t self) struct ifnet *ifp = sc->sc_ifp; struct ieee80211com *ic = ifp->if_l2com; unsigned int x; - + /* Prevent further ioctls. */ URTWN_LOCK(sc); sc->sc_flags |= URTWN_DETACHED; @@ -604,7 +604,7 @@ urtwn_vap_create(struct ieee80211com *ic vap = &uvp->vap; /* enable s/w bmiss handling for sta mode */ - if (ieee80211_vap_setup(ic, vap, name, unit, opmode, + if (ieee80211_vap_setup(ic, vap, name, unit, opmode, flags | IEEE80211_CLONE_NOBEACONS, bssid, mac) != 0) { /* out of memory */ free(uvp, M_80211_VAP); @@ -673,7 +673,7 @@ urtwn_rx_frame(struct urtwn_softc *sc, u /* Get RSSI from PHY status descriptor if present. */ if (infosz != 0 && (rxdw0 & R92C_RXDW0_PHYST)) { - if (sc->chip & URTWN_CHIP_88E) + if (sc->chip & URTWN_CHIP_88E) rssi = urtwn_r88e_get_rssi(sc, rate, &stat[1]); else rssi = urtwn_get_rssi(sc, rate, &stat[1]); @@ -1184,7 +1184,7 @@ urtwn_efuse_read_1(struct urtwn_softc *s return (MS(reg, R92C_EFUSE_CTRL_DATA)); urtwn_ms_delay(sc); } - device_printf(sc->sc_dev, + device_printf(sc->sc_dev, "could not read efuse byte at address 0x%x\n", addr); return (0xff); } @@ -1477,7 +1477,7 @@ static void urtwn_set_led(struct urtwn_softc *sc, int led, int on) { uint8_t reg; - + if (led == URTWN_LED_LINK) { if (sc->chip & URTWN_CHIP_88E) { reg = urtwn_read_1(sc, R92C_LEDCFG2) & 0xf0; @@ -1643,7 +1643,7 @@ urtwn_newstate(struct ieee80211vap *vap, if (sc->chip & URTWN_CHIP_88E) ni->ni_txrate = ni->ni_rates.rs_rates[ni->ni_rates.rs_nrates-1]; - else + else urtwn_ra_init(sc); /* Turn link LED on. */ urtwn_set_led(sc, URTWN_LED_LINK, 1); @@ -1754,7 +1754,7 @@ urtwn_r88e_get_rssi(struct urtwn_softc * cck = (struct r88e_rx_cck *)physt; cck_agc_rpt = cck->agc_rpt; lna_idx = (cck_agc_rpt & 0xe0) >> 5; - vga_idx = cck_agc_rpt & 0x1f; + vga_idx = cck_agc_rpt & 0x1f; switch (lna_idx) { case 7: if (vga_idx <= 27) @@ -1794,7 +1794,7 @@ urtwn_r88e_get_rssi(struct urtwn_softc * static int -urtwn_tx_start(struct urtwn_softc *sc, struct ieee80211_node *ni, +urtwn_tx_start(struct urtwn_softc *sc, struct ieee80211_node *ni, struct mbuf *m0, struct urtwn_data *data) { struct ifnet *ifp = sc->sc_ifp; @@ -1835,7 +1835,7 @@ urtwn_tx_start(struct urtwn_softc *sc, s /* in case packet header moved, reset pointer */ wh = mtod(m0, struct ieee80211_frame *); } - + switch (type) { case IEEE80211_FC0_TYPE_CTL: case IEEE80211_FC0_TYPE_MGT: @@ -1847,7 +1847,7 @@ urtwn_tx_start(struct urtwn_softc *sc, s xfer = urtwn_pipes[M_WME_GETAC(m0)]; break; } - + hasqos = 0; /* Fill Tx descriptor. */ @@ -2320,7 +2320,7 @@ urtwn_fw_loadpage(struct urtwn_softc *sc else mlen = 1; /* XXX fix this deconst */ - error = urtwn_write_region_1(sc, off, + error = urtwn_write_region_1(sc, off, __DECONST(uint8_t *, buf), mlen); if (error != 0) break; @@ -2455,7 +2455,7 @@ fail: static __inline int urtwn_dma_init(struct urtwn_softc *sc) { - + return sc->sc_dma_init(sc); } @@ -3219,10 +3219,10 @@ urtwn_set_chan(struct urtwn_softc *sc, s urtwn_bb_read(sc, R92C_FPGA0_ANAPARAM2) | R92C_FPGA0_ANAPARAM2_CBW20); } - + /* Select 20MHz bandwidth. */ urtwn_rf_write(sc, 0, R92C_RF_CHNLBW, - (sc->rf_chnlbw[0] & ~0xfff) | chan | + (sc->rf_chnlbw[0] & ~0xfff) | chan | ((sc->chip & URTWN_CHIP_88E) ? R88E_RF_CHNLBW_BW20 : R92C_RF_CHNLBW_BW20)); } @@ -3297,7 +3297,7 @@ urtwn_init_locked(void *arg) error = urtwn_alloc_rx_list(sc); if (error != 0) goto fail; - + error = urtwn_alloc_tx_list(sc); if (error != 0) goto fail; From owner-svn-src-all@FreeBSD.ORG Sat Apr 4 08:41:03 2015 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 DD67CE9E; Sat, 4 Apr 2015 08:41: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 C82C6ADF; Sat, 4 Apr 2015 08:41: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 t348f3YH014964; Sat, 4 Apr 2015 08:41:03 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t348f3Fl014948; Sat, 4 Apr 2015 08:41:03 GMT (envelope-from rpaulo@FreeBSD.org) Message-Id: <201504040841.t348f3Fl014948@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rpaulo set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo Date: Sat, 4 Apr 2015 08:41:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281070 - head/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: Sat, 04 Apr 2015 08:41:04 -0000 Author: rpaulo Date: Sat Apr 4 08:41:02 2015 New Revision: 281070 URL: https://svnweb.freebsd.org/changeset/base/281070 Log: urtwn: blink the LED when scanning. Previously, the driver was trying to blink the LED in the newstate function, but that only gets called once (unlike OpenBSD's net80211 stack). Move the LED blinking to set_channel(). While there, don't try to set the channel when we switch to the SCAN state. This is already accomplished by the set_channel() function. MFC after: 1 week Modified: head/sys/dev/usb/wlan/if_urtwn.c Modified: head/sys/dev/usb/wlan/if_urtwn.c ============================================================================== --- head/sys/dev/usb/wlan/if_urtwn.c Sat Apr 4 08:36:02 2015 (r281069) +++ head/sys/dev/usb/wlan/if_urtwn.c Sat Apr 4 08:41:02 2015 (r281070) @@ -1568,14 +1568,9 @@ urtwn_newstate(struct ieee80211vap *vap, urtwn_bb_write(sc, R92C_OFDM0_AGCCORE1(1), reg); } } - /* Make link LED blink during scan. */ - urtwn_set_led(sc, URTWN_LED_LINK, !sc->ledlink); - /* Pause AC Tx queues. */ urtwn_write_1(sc, R92C_TXPAUSE, urtwn_read_1(sc, R92C_TXPAUSE) | 0x0f); - - urtwn_set_chan(sc, ic->ic_curchan, NULL); break; case IEEE80211_S_AUTH: /* Set initial gain under link. */ @@ -3131,8 +3126,13 @@ static void urtwn_set_channel(struct ieee80211com *ic) { struct urtwn_softc *sc = ic->ic_ifp->if_softc; + struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); URTWN_LOCK(sc); + if (vap->iv_state == IEEE80211_S_SCAN) { + /* Make link LED blink during scan. */ + urtwn_set_led(sc, URTWN_LED_LINK, !sc->ledlink); + } urtwn_set_chan(sc, ic->ic_curchan, NULL); URTWN_UNLOCK(sc); } From owner-svn-src-all@FreeBSD.ORG Sat Apr 4 08:44:21 2015 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 B0FA818D; Sat, 4 Apr 2015 08:44: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 9C37FB3F; Sat, 4 Apr 2015 08:44: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 t348iL30017380; Sat, 4 Apr 2015 08:44:21 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t348iLhE017379; Sat, 4 Apr 2015 08:44:21 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201504040844.t348iLhE017379@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 4 Apr 2015 08:44:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281071 - 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 Apr 2015 08:44:21 -0000 Author: kib Date: Sat Apr 4 08:44:20 2015 New Revision: 281071 URL: https://svnweb.freebsd.org/changeset/base/281071 Log: Remove useless initialization. Sponsored by: The FreeBSD Foundation MFC after: 3 days Modified: head/sys/kern/sysv_shm.c Modified: head/sys/kern/sysv_shm.c ============================================================================== --- head/sys/kern/sysv_shm.c Sat Apr 4 08:41:02 2015 (r281070) +++ head/sys/kern/sysv_shm.c Sat Apr 4 08:44:20 2015 (r281071) @@ -327,7 +327,7 @@ kern_shmat_locked(struct thread *td, int { struct proc *p = td->td_proc; struct shmid_kernel *shmseg; - struct shmmap_state *shmmap_s = NULL; + struct shmmap_state *shmmap_s; vm_offset_t attach_va; vm_prot_t prot; vm_size_t size; From owner-svn-src-all@FreeBSD.ORG Sat Apr 4 08:47:44 2015 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 79B4E31F; Sat, 4 Apr 2015 08:47:44 +0000 (UTC) Received: from st11p02mm-asmtp002.mac.com (st11p02mm-asmtp002.mac.com [17.172.220.237]) (using TLSv1.2 with cipher DHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B517B6A; Sat, 4 Apr 2015 08:47:44 +0000 (UTC) Received: from fukuyama.hsd1.ca.comcast.net (c-73-162-13-215.hsd1.ca.comcast.net [73.162.13.215]) by st11p02mm-asmtp002.mac.com (Oracle Communications Messaging Server 7.0.5.35.0 64bit (built Dec 4 2014)) with ESMTPSA id <0NM90001JXR9Y040@st11p02mm-asmtp002.mac.com>; Sat, 04 Apr 2015 08:47:36 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.13.68,1.0.33,0.0.0000 definitions=2015-04-04_01:2015-04-03,2015-04-04,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1412110000 definitions=main-1504040083 Content-type: text/plain; charset=us-ascii MIME-version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: svn commit: r281059 - head/sys/boot/efi/boot1 From: Rui Paulo In-reply-to: <20150404175620.V1951@besplex.bde.org> Date: Sat, 04 Apr 2015 01:47:33 -0700 Content-transfer-encoding: quoted-printable Message-id: <6AF43C66-5436-4F8F-BDEC-B7C75A4D58DA@me.com> References: <201504040427.t344RtGZ095522@svn.freebsd.org> <20150404175620.V1951@besplex.bde.org> To: Bruce Evans X-Mailer: Apple Mail (2.2070.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Rui Paulo X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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 Apr 2015 08:47:44 -0000 On Apr 4, 2015, at 00:27, Bruce Evans wrote: >=20 > On Sat, 4 Apr 2015, Rui Paulo wrote: >=20 >> Log: >> boot1 EFI: reset the screen and select the best mode. >>=20 >> It's necessary to reset the screen to make sure any vendor pixels are >> gone when we start boot1. In the Lenovo X1 (3rd gen), this is the >> only way to clear the screen. Previously, the Lenovo logo would only >> disappear after the kernel started scrolling the display. >>=20 >> After resetting the screen, EFI could put us in the worst LCD mode >> (oversized characters), so we now find the largest mode we can use = and >> hope it's the most appropriate one (it's not trivial to tell what's >> the correct LCD resolution at this point). It's worth noting that = the >> final stage loader has a 'mode' command that can be used to switch >> text modes. >=20 > :-(. >=20 > I just complained about the bug that vt (on non-EFI) clears the screen > where sc carefully preserves the screen in its history buffer. In my case, the "buffer" was a Lenovo logo. In other cases it might = include POST messages, but like you said vt already clears it. > For graphics mode, determining the resolution is the trivial part :-). > You also need OCR or something to translate the pixels into the format > of your history buffer. Don't forget to fetch Lenevo's history buffer > and translate it into your format :-). >=20 > I don't have problems with boot logos except when the battery dies, > since I turn them off until the CMOS forgets, but lose boot messages > in another way from newer monitors blanking the screen after mode > switches for much longer than older monitors. I expected newer = systems > to "fix" this by using the same graphics mode for the whole boot. This is very specific to EFI. FreeBSD has always strived to give you = text messages during boot and, while it would be easy to have the = FreeBSD logo all the way to Xorg like Ubuntu does, I don't see that = happening any time soon. Speaking of mode switching, they are pretty fast on this system. > Resetting the screen is even worse than clearing. Whole boots should > take a second or 2. I don't get close to that. More like 20. But = with > the monitor blanking the screen for 5+ seconds afer every mode switch, > even a 20-second boot gives almost no time for reading its messages. > Saving the messages in history buffers or booting with -p becomes more > important. In my system, these EFI calls (reset + clear) don't take long. I can't = tell any difference between the old boot time and the new boot time. -- Rui Paulo From owner-svn-src-all@FreeBSD.ORG Sat Apr 4 09:07:33 2015 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 3AF0F7B5; Sat, 4 Apr 2015 09:07: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 25D33CEC; Sat, 4 Apr 2015 09:07: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 t3497WYY027148; Sat, 4 Apr 2015 09:07:32 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3497WgZ027147; Sat, 4 Apr 2015 09:07:32 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504040907.t3497WgZ027147@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 4 Apr 2015 09:07:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281072 - 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: Sat, 04 Apr 2015 09:07:33 -0000 Author: andrew Date: Sat Apr 4 09:07:31 2015 New Revision: 281072 URL: https://svnweb.freebsd.org/changeset/base/281072 Log: Add support for arm64 to the existing arm generic timer driver: - Add macros to handle the differences in accessing these registers on arm and arm64. - Use the fdt data to detect if we are on an ARMv7 or ARMv8. - Use the virtual timer by default on arm64, we may not have access to the physical timer. Differential Revision: https://reviews.freebsd.org/D2208 Reviewed by: emaste Sponsored by: The FreeBSD Foundation Modified: head/sys/arm/arm/generic_timer.c Modified: head/sys/arm/arm/generic_timer.c ============================================================================== --- head/sys/arm/arm/generic_timer.c Sat Apr 4 08:44:20 2015 (r281071) +++ head/sys/arm/arm/generic_timer.c Sat Apr 4 09:07:31 2015 (r281072) @@ -101,10 +101,22 @@ static struct timecounter arm_tmr_timeco .tc_quality = 1000, }; +#ifdef __arm__ +#define get_el0(x) cp15_## x ##_get() +#define get_el1(x) cp15_## x ##_get() +#define set_el0(x, val) cp15_## x ##_set(val) +#define set_el1(x, val) cp15_## x ##_set(val) +#else /* __aarch64__ */ +#define get_el0(x) READ_SPECIALREG(x ##_el0) +#define get_el1(x) READ_SPECIALREG(x ##_el1) +#define set_el0(x, val) WRITE_SPECIALREG(x ##_el0, val) +#define set_el1(x, val) WRITE_SPECIALREG(x ##_el1, val) +#endif + static int get_freq(void) { - return (cp15_cntfrq_get()); + return (get_el0(cntfrq)); } static long @@ -114,9 +126,9 @@ get_cntxct(bool physical) isb(); if (physical) - val = cp15_cntpct_get(); + val = get_el0(cntpct); else - val = cp15_cntvct_get(); + val = get_el0(cntvct); return (val); } @@ -126,9 +138,9 @@ set_ctrl(uint32_t val, bool physical) { if (physical) - cp15_cntp_ctl_set(val); + set_el0(cntp_ctl, val); else - cp15_cntv_ctl_set(val); + set_el0(cntv_ctl, val); isb(); return (0); @@ -139,9 +151,9 @@ set_tval(uint32_t val, bool physical) { if (physical) - cp15_cntp_tval_set(val); + set_el0(cntp_tval, val); else - cp15_cntv_tval_set(val); + set_el0(cntv_tval, val); isb(); return (0); @@ -153,9 +165,9 @@ get_ctrl(bool physical) uint32_t val; if (physical) - val = cp15_cntp_ctl_get(); + val = get_el0(cntp_ctl); else - val = cp15_cntv_ctl_get(); + val = get_el0(cntv_ctl); return (val); } @@ -165,10 +177,10 @@ disable_user_access(void) { uint32_t cntkctl; - cntkctl = cp15_cntkctl_get(); + cntkctl = get_el1(cntkctl); cntkctl &= ~(GT_CNTKCTL_PL0PTEN | GT_CNTKCTL_PL0VTEN | GT_CNTKCTL_EVNTEN | GT_CNTKCTL_PL0VCTEN | GT_CNTKCTL_PL0PCTEN); - cp15_cntkctl_set(cntkctl); + set_el1(cntkctl, cntkctl); isb(); } @@ -242,11 +254,15 @@ arm_tmr_probe(device_t dev) if (!ofw_bus_status_okay(dev)) return (ENXIO); - if (!ofw_bus_is_compatible(dev, "arm,armv7-timer")) - return (ENXIO); + if (ofw_bus_is_compatible(dev, "arm,armv7-timer")) { + device_set_desc(dev, "ARMv7 Generic Timer"); + return (BUS_PROBE_DEFAULT); + } else if (ofw_bus_is_compatible(dev, "arm,armv8-timer")) { + device_set_desc(dev, "ARMv8 Generic Timer"); + return (BUS_PROBE_DEFAULT); + } - device_set_desc(dev, "ARMv7 Generic Timer"); - return (BUS_PROBE_DEFAULT); + return (ENXIO); } @@ -285,7 +301,11 @@ arm_tmr_attach(device_t dev) return (ENXIO); } +#ifdef __arm__ sc->physical = true; +#else /* __aarch64__ */ + sc->physical = false; +#endif arm_tmr_sc = sc; From owner-svn-src-all@FreeBSD.ORG Sat Apr 4 09:16:31 2015 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 3821B976; Sat, 4 Apr 2015 09:16:31 +0000 (UTC) Received: from mail-ig0-x22d.google.com (mail-ig0-x22d.google.com [IPv6:2607:f8b0:4001:c05::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F252FDAA; Sat, 4 Apr 2015 09:16:30 +0000 (UTC) Received: by igcau2 with SMTP id au2so76216717igc.1; Sat, 04 Apr 2015 02:16:30 -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=RRrvXmaTF0Z/Sz9US2UYXNadbhowYIC0l5aFd8BC+Cs=; b=eAj93gsAU3TByhh7v7+3Lr6CA91n9oEztwAZ5Sx1APkEf0AVvCN5Xh6XZ1B4aI0acq xlRFBXjQZq4y0O693KtG0J4VdhcLC56tZa8gvh3Ycz7mieN8toK0C9uW54N1O37Y/fVw knbjzAOaJdRqB4/2R8hGBGIknlqeiILL9Vmyy6BrgT7UoS2j0BNhWBdwvaM9lXnL1/Je 2ahnKVGULeq5ep8gbAEAoHcUCY+BgtIiUVqbsAJ+RoEd2hYeg4zyim/PdkcXXbVGBDae Jjwg8+twjYSa6+GUnhw4FgByIYJCNRTWtFIi/aQj+J5Vr9fNrv7o/xbY5P0Ztw6iueVf qynQ== MIME-Version: 1.0 X-Received: by 10.107.130.145 with SMTP id m17mr8808061ioi.89.1428138990391; Sat, 04 Apr 2015 02:16:30 -0700 (PDT) Sender: edschouten@gmail.com Received: by 10.107.130.163 with HTTP; Sat, 4 Apr 2015 02:16:30 -0700 (PDT) In-Reply-To: <201503110949.t2B9n7Yk000610@svn.freebsd.org> References: <201503110949.t2B9n7Yk000610@svn.freebsd.org> Date: Sat, 4 Apr 2015 11:16:30 +0200 X-Google-Sender-Auth: x200zObPe15Tzo8yGgqzBVu5w1s Message-ID: Subject: Re: svn commit: r279877 - stable/10/sys/boot/fdt From: Ed Schouten To: Alexander Motin 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 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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 Apr 2015 09:16:31 -0000 Hi Alexander, Quick question: 2015-03-11 10:49 GMT+01:00 Alexander Motin : > buf = (char *)malloc(sizeof(char) * sz); > - bzero(buf, sizeof(char) * sz); > - > if (buf == NULL) { > sprintf(command_errbuf, "could not allocate space " > "for string"); > return (1); > } > + bzero(buf, sizeof(char) * sz); > > idx = 0; > for (i = start, idx = 0; i < argc; i++) { > Couldn't this use calloc() instead? Thanks, -- Ed Schouten From owner-svn-src-all@FreeBSD.ORG Sat Apr 4 09:17:58 2015 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 192DBAB3; Sat, 4 Apr 2015 09:17:58 +0000 (UTC) Received: from mail-ig0-x235.google.com (mail-ig0-x235.google.com [IPv6:2607:f8b0:4001:c05::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D1B48DB3; Sat, 4 Apr 2015 09:17:57 +0000 (UTC) Received: by igcau2 with SMTP id au2so113530336igc.0; Sat, 04 Apr 2015 02:17:57 -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=DfA43mvWkvaq8nvym2ShYHcMLaisfSv2kPqANbgu6ZQ=; b=Hr8QaiOBC5gQ1/i+N6yp9JfkQz/lFYgxc20vnUB26SN2ydFcJYch0I7hKSlLumS1Wa 7g9iqBHvDS2SjjEO5GHn7Sp1RAqcNWIdHr9bUorZfKMwqjD9CCjrJtaz3WPhejQn8v1B e1zBQcbsDEY+a3+sQsQprW00joU94eJJ+EsMsApE/gI1VU5ekQEYeoWOOacrqc6NhcVA bV/NMA+c/Ds2a4PNoDLaYswdbjFw3SIpOUlxSLEk3pKnY46ySMKfCwu0+bn9S3ZuMhAL 2D07pS4a35/g5zEMZQMdbZEnVobNyv/0fEHTXL7icwVVLKh5ChUNO5wnJnS+O5nFtaFf ohLA== MIME-Version: 1.0 X-Received: by 10.50.60.72 with SMTP id f8mr33959527igr.31.1428139077193; Sat, 04 Apr 2015 02:17:57 -0700 (PDT) Sender: edschouten@gmail.com Received: by 10.107.130.163 with HTTP; Sat, 4 Apr 2015 02:17:57 -0700 (PDT) In-Reply-To: References: <201503110949.t2B9n7Yk000610@svn.freebsd.org> Date: Sat, 4 Apr 2015 11:17:57 +0200 X-Google-Sender-Auth: 6RRXzQRgfD0GZbJUnyp2Y0nZ-qs Message-ID: Subject: Re: svn commit: r279877 - stable/10/sys/boot/fdt From: Ed Schouten To: Alexander Motin 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 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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 Apr 2015 09:17:58 -0000 2015-04-04 11:16 GMT+02:00 Ed Schouten : > Couldn't this use calloc() instead? Oh, wait. This is the boot loader. The boot loader wouldn't necessarily have a calloc() function. -- Ed Schouten From owner-svn-src-all@FreeBSD.ORG Sat Apr 4 09:21:58 2015 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 7299EC18; Sat, 4 Apr 2015 09:21: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 5DA72E55; Sat, 4 Apr 2015 09:21: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 t349Lv5G035722; Sat, 4 Apr 2015 09:21:57 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t349LvBG035719; Sat, 4 Apr 2015 09:21:57 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504040921.t349LvBG035719@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 4 Apr 2015 09:21:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281073 - 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: Sat, 04 Apr 2015 09:21:58 -0000 Author: andrew Date: Sat Apr 4 09:21:56 2015 New Revision: 281073 URL: https://svnweb.freebsd.org/changeset/base/281073 Log: Use OF_getencprop over OF_getprop and fdt32_to_cpu. The latter may give us the wrong data in the failure case if shift was not zero. Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/uart/uart_bus_fdt.c head/sys/dev/uart/uart_cpu_fdt.c Modified: head/sys/dev/uart/uart_bus_fdt.c ============================================================================== --- head/sys/dev/uart/uart_bus_fdt.c Sat Apr 4 09:07:31 2015 (r281072) +++ head/sys/dev/uart/uart_bus_fdt.c Sat Apr 4 09:21:56 2015 (r281073) @@ -89,11 +89,9 @@ uart_fdt_get_clock(phandle_t node, pcell static int uart_fdt_get_shift(phandle_t node, pcell_t *cell) { - pcell_t shift; - if ((OF_getprop(node, "reg-shift", &shift, sizeof(shift))) <= 0) - shift = 0; - *cell = fdt32_to_cpu(shift); + if ((OF_getencprop(node, "reg-shift", cell, sizeof(*cell))) <= 0) + *cell = 0; return (0); } Modified: head/sys/dev/uart/uart_cpu_fdt.c ============================================================================== --- head/sys/dev/uart/uart_cpu_fdt.c Sat Apr 4 09:07:31 2015 (r281072) +++ head/sys/dev/uart/uart_cpu_fdt.c Sat Apr 4 09:21:56 2015 (r281073) @@ -82,11 +82,9 @@ uart_fdt_get_clock(phandle_t node, pcell static int uart_fdt_get_shift(phandle_t node, pcell_t *cell) { - pcell_t shift; - if ((OF_getprop(node, "reg-shift", &shift, sizeof(shift))) <= 0) - shift = 0; - *cell = fdt32_to_cpu(shift); + if ((OF_getencprop(node, "reg-shift", cell, sizeof(*cell))) <= 0) + *cell = 0; return (0); } From owner-svn-src-all@FreeBSD.ORG Sat Apr 4 09:57:54 2015 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 1D12E2BE; Sat, 4 Apr 2015 09:57: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 F2BFC176; Sat, 4 Apr 2015 09:57: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 t349vrtk050348; Sat, 4 Apr 2015 09:57:53 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t349vrSl050344; Sat, 4 Apr 2015 09:57:53 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504040957.t349vrSl050344@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 4 Apr 2015 09:57:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281074 - 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: Sat, 04 Apr 2015 09:57:54 -0000 Author: andrew Date: Sat Apr 4 09:57:52 2015 New Revision: 281074 URL: https://svnweb.freebsd.org/changeset/base/281074 Log: Remove the extra copy of uart_fdt_get_clock and uart_fdt_get_shift. While here also use OF_getencprop in uart_fdt_get_clock. Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/uart/uart_bus_fdt.c head/sys/dev/uart/uart_cpu_fdt.c head/sys/dev/uart/uart_cpu_fdt.h Modified: head/sys/dev/uart/uart_bus_fdt.c ============================================================================== --- head/sys/dev/uart/uart_bus_fdt.c Sat Apr 4 09:21:56 2015 (r281073) +++ head/sys/dev/uart/uart_bus_fdt.c Sat Apr 4 09:57:52 2015 (r281074) @@ -63,38 +63,6 @@ static driver_t uart_fdt_driver = { sizeof(struct uart_softc), }; -static int -uart_fdt_get_clock(phandle_t node, pcell_t *cell) -{ - pcell_t clock; - - /* - * clock-frequency is a FreeBSD-specific hack. Make its presence optional. - */ - if ((OF_getprop(node, "clock-frequency", &clock, - sizeof(clock))) <= 0) - clock = 0; - - if (clock == 0) - /* Try to retrieve parent 'bus-frequency' */ - /* XXX this should go to simple-bus fixup or so */ - if ((OF_getprop(OF_parent(node), "bus-frequency", &clock, - sizeof(clock))) <= 0) - clock = 0; - - *cell = fdt32_to_cpu(clock); - return (0); -} - -static int -uart_fdt_get_shift(phandle_t node, pcell_t *cell) -{ - - if ((OF_getencprop(node, "reg-shift", cell, sizeof(*cell))) <= 0) - *cell = 0; - return (0); -} - static uintptr_t uart_fdt_find_device(device_t dev) { Modified: head/sys/dev/uart/uart_cpu_fdt.c ============================================================================== --- head/sys/dev/uart/uart_cpu_fdt.c Sat Apr 4 09:21:56 2015 (r281073) +++ head/sys/dev/uart/uart_cpu_fdt.c Sat Apr 4 09:57:52 2015 (r281074) @@ -58,28 +58,27 @@ __FBSDID("$FreeBSD$"); bus_space_tag_t uart_bus_space_io; bus_space_tag_t uart_bus_space_mem; -static int +int uart_fdt_get_clock(phandle_t node, pcell_t *cell) { pcell_t clock; /* clock-frequency is a FreeBSD-only extention. */ - if ((OF_getprop(node, "clock-frequency", &clock, + if ((OF_getencprop(node, "clock-frequency", &clock, sizeof(clock))) <= 0) clock = 0; if (clock == 0) /* Try to retrieve parent 'bus-frequency' */ /* XXX this should go to simple-bus fixup or so */ - if ((OF_getprop(OF_parent(node), "bus-frequency", &clock, + if ((OF_getencprop(OF_parent(node), "bus-frequency", &clock, sizeof(clock))) <= 0) clock = 0; - *cell = fdt32_to_cpu(clock); return (0); } -static int +int uart_fdt_get_shift(phandle_t node, pcell_t *cell) { Modified: head/sys/dev/uart/uart_cpu_fdt.h ============================================================================== --- head/sys/dev/uart/uart_cpu_fdt.h Sat Apr 4 09:21:56 2015 (r281073) +++ head/sys/dev/uart/uart_cpu_fdt.h Sat Apr 4 09:57:52 2015 (r281074) @@ -50,5 +50,7 @@ SET_DECLARE(uart_fdt_class_set, struct o #define UART_FDT_CLASS(data) \ DATA_SET(uart_fdt_class_set, data) +int uart_fdt_get_clock(phandle_t node, pcell_t *cell); +int uart_fdt_get_shift(phandle_t node, pcell_t *cell); #endif /* _DEV_UART_CPU_FDT_H_ */ From owner-svn-src-all@FreeBSD.ORG Sat Apr 4 10:17:54 2015 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 B22E864C; Sat, 4 Apr 2015 10:17: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 9848C353; Sat, 4 Apr 2015 10:17: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 t34AHs9O059721; Sat, 4 Apr 2015 10:17:54 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t34AHr5R059717; Sat, 4 Apr 2015 10:17:53 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201504041017.t34AHr5R059717@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 4 Apr 2015 10:17:53 +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: r281075 - in stable/10: 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/c... 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 Apr 2015 10:17:54 -0000 Author: dim Date: Sat Apr 4 10:17:51 2015 New Revision: 281075 URL: https://svnweb.freebsd.org/changeset/base/281075 Log: MFC r272444 (by jkim): Merge ACPICA 20140926. MFC r278970 (by jkim): Merge ACPICA 20141107 and 20150204. Approved by: jkim Relnotes: yes Added: stable/10/sys/contrib/dev/acpica/common/acgetline.c - copied, changed from r272444, head/sys/contrib/dev/acpica/common/acgetline.c stable/10/sys/contrib/dev/acpica/common/ahids.c - copied, changed from r272444, head/sys/contrib/dev/acpica/common/ahids.c stable/10/sys/contrib/dev/acpica/common/ahuuids.c - copied, changed from r272444, head/sys/contrib/dev/acpica/common/ahuuids.c stable/10/sys/contrib/dev/acpica/common/cmfsize.c - copied, changed from r272444, head/sys/contrib/dev/acpica/common/cmfsize.c stable/10/sys/contrib/dev/acpica/compiler/aslascii.c - copied, changed from r272444, head/sys/contrib/dev/acpica/compiler/aslascii.c stable/10/sys/contrib/dev/acpica/compiler/aslmapenter.c - copied, changed from r272444, head/sys/contrib/dev/acpica/compiler/aslmapenter.c stable/10/sys/contrib/dev/acpica/compiler/aslmapoutput.c - copied, changed from r272444, head/sys/contrib/dev/acpica/compiler/aslmapoutput.c stable/10/sys/contrib/dev/acpica/compiler/aslmaputils.c - copied, changed from r272444, head/sys/contrib/dev/acpica/compiler/aslmaputils.c stable/10/sys/contrib/dev/acpica/compiler/aslmessages.c - copied, changed from r272444, head/sys/contrib/dev/acpica/compiler/aslmessages.c stable/10/sys/contrib/dev/acpica/compiler/aslparser.y - copied, changed from r272444, head/sys/contrib/dev/acpica/compiler/aslparser.y stable/10/sys/contrib/dev/acpica/compiler/aslprintf.c - copied unchanged from r278970, head/sys/contrib/dev/acpica/compiler/aslprintf.c stable/10/sys/contrib/dev/acpica/compiler/aslprune.c - copied unchanged from r278970, head/sys/contrib/dev/acpica/compiler/aslprune.c stable/10/sys/contrib/dev/acpica/compiler/aslrules.y - copied, changed from r272444, head/sys/contrib/dev/acpica/compiler/aslrules.y stable/10/sys/contrib/dev/acpica/compiler/aslsupport.y - copied, changed from r272444, head/sys/contrib/dev/acpica/compiler/aslsupport.y stable/10/sys/contrib/dev/acpica/compiler/asltokens.y - copied, changed from r272444, head/sys/contrib/dev/acpica/compiler/asltokens.y stable/10/sys/contrib/dev/acpica/compiler/asltypes.y - copied, changed from r272444, head/sys/contrib/dev/acpica/compiler/asltypes.y stable/10/sys/contrib/dev/acpica/components/debugger/dbtest.c - copied, changed from r272444, head/sys/contrib/dev/acpica/components/debugger/dbtest.c stable/10/sys/contrib/dev/acpica/components/disassembler/dmcstyle.c - copied unchanged from r278970, head/sys/contrib/dev/acpica/components/disassembler/dmcstyle.c stable/10/sys/contrib/dev/acpica/components/tables/tbdata.c - copied, changed from r272444, head/sys/contrib/dev/acpica/components/tables/tbdata.c stable/10/sys/contrib/dev/acpica/components/utilities/utfileio.c - copied, changed from r272444, head/sys/contrib/dev/acpica/components/utilities/utfileio.c stable/10/sys/contrib/dev/acpica/components/utilities/uthex.c - copied, changed from r272444, head/sys/contrib/dev/acpica/components/utilities/uthex.c stable/10/sys/contrib/dev/acpica/components/utilities/utprint.c - copied, changed from r272444, head/sys/contrib/dev/acpica/components/utilities/utprint.c stable/10/sys/contrib/dev/acpica/components/utilities/utuuid.c - copied, changed from r272444, head/sys/contrib/dev/acpica/components/utilities/utuuid.c stable/10/sys/contrib/dev/acpica/include/platform/acenvex.h - copied, changed from r272444, head/sys/contrib/dev/acpica/include/platform/acenvex.h stable/10/sys/contrib/dev/acpica/os_specific/service_layers/oslibcfs.c - copied, changed from r272444, head/sys/contrib/dev/acpica/os_specific/service_layers/oslibcfs.c Deleted: stable/10/sys/contrib/dev/acpica/compiler/aslcompiler.y Modified: stable/10/sys/conf/files stable/10/sys/contrib/dev/acpica/acpica_prep.sh stable/10/sys/contrib/dev/acpica/changes.txt stable/10/sys/contrib/dev/acpica/common/adfile.c stable/10/sys/contrib/dev/acpica/common/adisasm.c stable/10/sys/contrib/dev/acpica/common/adwalk.c stable/10/sys/contrib/dev/acpica/common/ahpredef.c stable/10/sys/contrib/dev/acpica/common/dmextern.c stable/10/sys/contrib/dev/acpica/common/dmrestag.c stable/10/sys/contrib/dev/acpica/common/dmtable.c stable/10/sys/contrib/dev/acpica/common/dmtbdump.c stable/10/sys/contrib/dev/acpica/common/dmtbinfo.c stable/10/sys/contrib/dev/acpica/common/getopt.c stable/10/sys/contrib/dev/acpica/compiler/aslanalyze.c stable/10/sys/contrib/dev/acpica/compiler/aslbtypes.c stable/10/sys/contrib/dev/acpica/compiler/aslcodegen.c stable/10/sys/contrib/dev/acpica/compiler/aslcompile.c stable/10/sys/contrib/dev/acpica/compiler/aslcompiler.h stable/10/sys/contrib/dev/acpica/compiler/aslcompiler.l stable/10/sys/contrib/dev/acpica/compiler/asldefine.h stable/10/sys/contrib/dev/acpica/compiler/aslerror.c stable/10/sys/contrib/dev/acpica/compiler/aslfileio.c stable/10/sys/contrib/dev/acpica/compiler/aslfiles.c stable/10/sys/contrib/dev/acpica/compiler/aslfold.c stable/10/sys/contrib/dev/acpica/compiler/aslglobal.h stable/10/sys/contrib/dev/acpica/compiler/aslhex.c stable/10/sys/contrib/dev/acpica/compiler/asllength.c stable/10/sys/contrib/dev/acpica/compiler/asllisting.c stable/10/sys/contrib/dev/acpica/compiler/asllistsup.c stable/10/sys/contrib/dev/acpica/compiler/aslload.c stable/10/sys/contrib/dev/acpica/compiler/asllookup.c stable/10/sys/contrib/dev/acpica/compiler/aslmain.c stable/10/sys/contrib/dev/acpica/compiler/aslmap.c stable/10/sys/contrib/dev/acpica/compiler/aslmessages.h stable/10/sys/contrib/dev/acpica/compiler/aslmethod.c stable/10/sys/contrib/dev/acpica/compiler/aslnamesp.c stable/10/sys/contrib/dev/acpica/compiler/asloffset.c stable/10/sys/contrib/dev/acpica/compiler/aslopcodes.c stable/10/sys/contrib/dev/acpica/compiler/asloperands.c stable/10/sys/contrib/dev/acpica/compiler/aslopt.c stable/10/sys/contrib/dev/acpica/compiler/asloptions.c stable/10/sys/contrib/dev/acpica/compiler/aslpredef.c stable/10/sys/contrib/dev/acpica/compiler/aslprepkg.c stable/10/sys/contrib/dev/acpica/compiler/aslresource.c stable/10/sys/contrib/dev/acpica/compiler/aslrestype1.c stable/10/sys/contrib/dev/acpica/compiler/aslrestype1i.c stable/10/sys/contrib/dev/acpica/compiler/aslrestype2.c stable/10/sys/contrib/dev/acpica/compiler/aslrestype2d.c stable/10/sys/contrib/dev/acpica/compiler/aslrestype2e.c stable/10/sys/contrib/dev/acpica/compiler/aslrestype2q.c stable/10/sys/contrib/dev/acpica/compiler/aslrestype2s.c stable/10/sys/contrib/dev/acpica/compiler/aslrestype2w.c stable/10/sys/contrib/dev/acpica/compiler/aslstartup.c stable/10/sys/contrib/dev/acpica/compiler/aslstubs.c stable/10/sys/contrib/dev/acpica/compiler/aslsupport.l stable/10/sys/contrib/dev/acpica/compiler/asltransform.c stable/10/sys/contrib/dev/acpica/compiler/asltree.c stable/10/sys/contrib/dev/acpica/compiler/asltypes.h stable/10/sys/contrib/dev/acpica/compiler/aslutils.c stable/10/sys/contrib/dev/acpica/compiler/asluuid.c stable/10/sys/contrib/dev/acpica/compiler/aslwalks.c stable/10/sys/contrib/dev/acpica/compiler/aslxref.c stable/10/sys/contrib/dev/acpica/compiler/dtcompile.c stable/10/sys/contrib/dev/acpica/compiler/dtcompiler.h stable/10/sys/contrib/dev/acpica/compiler/dtexpress.c stable/10/sys/contrib/dev/acpica/compiler/dtfield.c stable/10/sys/contrib/dev/acpica/compiler/dtio.c stable/10/sys/contrib/dev/acpica/compiler/dtparser.l stable/10/sys/contrib/dev/acpica/compiler/dtparser.y stable/10/sys/contrib/dev/acpica/compiler/dtsubtable.c stable/10/sys/contrib/dev/acpica/compiler/dttable.c stable/10/sys/contrib/dev/acpica/compiler/dttemplate.c stable/10/sys/contrib/dev/acpica/compiler/dttemplate.h stable/10/sys/contrib/dev/acpica/compiler/dtutils.c stable/10/sys/contrib/dev/acpica/compiler/preprocess.h stable/10/sys/contrib/dev/acpica/compiler/prexpress.c stable/10/sys/contrib/dev/acpica/compiler/prmacros.c stable/10/sys/contrib/dev/acpica/compiler/prparser.l stable/10/sys/contrib/dev/acpica/compiler/prparser.y stable/10/sys/contrib/dev/acpica/compiler/prscan.c stable/10/sys/contrib/dev/acpica/compiler/prutils.c stable/10/sys/contrib/dev/acpica/components/debugger/dbcmds.c stable/10/sys/contrib/dev/acpica/components/debugger/dbconvert.c stable/10/sys/contrib/dev/acpica/components/debugger/dbdisply.c stable/10/sys/contrib/dev/acpica/components/debugger/dbexec.c stable/10/sys/contrib/dev/acpica/components/debugger/dbfileio.c stable/10/sys/contrib/dev/acpica/components/debugger/dbhistry.c stable/10/sys/contrib/dev/acpica/components/debugger/dbinput.c stable/10/sys/contrib/dev/acpica/components/debugger/dbmethod.c stable/10/sys/contrib/dev/acpica/components/debugger/dbnames.c stable/10/sys/contrib/dev/acpica/components/debugger/dbstats.c stable/10/sys/contrib/dev/acpica/components/debugger/dbutils.c stable/10/sys/contrib/dev/acpica/components/debugger/dbxface.c stable/10/sys/contrib/dev/acpica/components/disassembler/dmbuffer.c stable/10/sys/contrib/dev/acpica/components/disassembler/dmdeferred.c stable/10/sys/contrib/dev/acpica/components/disassembler/dmnames.c stable/10/sys/contrib/dev/acpica/components/disassembler/dmobject.c stable/10/sys/contrib/dev/acpica/components/disassembler/dmopcode.c stable/10/sys/contrib/dev/acpica/components/disassembler/dmresrc.c stable/10/sys/contrib/dev/acpica/components/disassembler/dmresrcl.c stable/10/sys/contrib/dev/acpica/components/disassembler/dmresrcl2.c stable/10/sys/contrib/dev/acpica/components/disassembler/dmresrcs.c stable/10/sys/contrib/dev/acpica/components/disassembler/dmutils.c stable/10/sys/contrib/dev/acpica/components/disassembler/dmwalk.c stable/10/sys/contrib/dev/acpica/components/dispatcher/dsargs.c stable/10/sys/contrib/dev/acpica/components/dispatcher/dscontrol.c stable/10/sys/contrib/dev/acpica/components/dispatcher/dsfield.c stable/10/sys/contrib/dev/acpica/components/dispatcher/dsinit.c stable/10/sys/contrib/dev/acpica/components/dispatcher/dsmethod.c stable/10/sys/contrib/dev/acpica/components/dispatcher/dsmthdat.c stable/10/sys/contrib/dev/acpica/components/dispatcher/dsobject.c stable/10/sys/contrib/dev/acpica/components/dispatcher/dsopcode.c stable/10/sys/contrib/dev/acpica/components/dispatcher/dsutils.c stable/10/sys/contrib/dev/acpica/components/dispatcher/dswexec.c stable/10/sys/contrib/dev/acpica/components/dispatcher/dswload.c stable/10/sys/contrib/dev/acpica/components/dispatcher/dswload2.c stable/10/sys/contrib/dev/acpica/components/dispatcher/dswscope.c stable/10/sys/contrib/dev/acpica/components/dispatcher/dswstate.c stable/10/sys/contrib/dev/acpica/components/events/evevent.c stable/10/sys/contrib/dev/acpica/components/events/evglock.c stable/10/sys/contrib/dev/acpica/components/events/evgpe.c stable/10/sys/contrib/dev/acpica/components/events/evgpeblk.c stable/10/sys/contrib/dev/acpica/components/events/evgpeinit.c stable/10/sys/contrib/dev/acpica/components/events/evgpeutil.c stable/10/sys/contrib/dev/acpica/components/events/evhandler.c stable/10/sys/contrib/dev/acpica/components/events/evmisc.c stable/10/sys/contrib/dev/acpica/components/events/evregion.c stable/10/sys/contrib/dev/acpica/components/events/evrgnini.c stable/10/sys/contrib/dev/acpica/components/events/evsci.c stable/10/sys/contrib/dev/acpica/components/events/evxface.c stable/10/sys/contrib/dev/acpica/components/events/evxfevnt.c stable/10/sys/contrib/dev/acpica/components/events/evxfgpe.c stable/10/sys/contrib/dev/acpica/components/events/evxfregn.c stable/10/sys/contrib/dev/acpica/components/executer/exconfig.c stable/10/sys/contrib/dev/acpica/components/executer/exconvrt.c stable/10/sys/contrib/dev/acpica/components/executer/excreate.c stable/10/sys/contrib/dev/acpica/components/executer/exdebug.c stable/10/sys/contrib/dev/acpica/components/executer/exdump.c stable/10/sys/contrib/dev/acpica/components/executer/exfield.c stable/10/sys/contrib/dev/acpica/components/executer/exfldio.c stable/10/sys/contrib/dev/acpica/components/executer/exmisc.c stable/10/sys/contrib/dev/acpica/components/executer/exmutex.c stable/10/sys/contrib/dev/acpica/components/executer/exnames.c stable/10/sys/contrib/dev/acpica/components/executer/exoparg1.c stable/10/sys/contrib/dev/acpica/components/executer/exoparg2.c stable/10/sys/contrib/dev/acpica/components/executer/exoparg3.c stable/10/sys/contrib/dev/acpica/components/executer/exoparg6.c stable/10/sys/contrib/dev/acpica/components/executer/exprep.c stable/10/sys/contrib/dev/acpica/components/executer/exregion.c stable/10/sys/contrib/dev/acpica/components/executer/exresnte.c stable/10/sys/contrib/dev/acpica/components/executer/exresolv.c stable/10/sys/contrib/dev/acpica/components/executer/exresop.c stable/10/sys/contrib/dev/acpica/components/executer/exstore.c stable/10/sys/contrib/dev/acpica/components/executer/exstoren.c stable/10/sys/contrib/dev/acpica/components/executer/exstorob.c stable/10/sys/contrib/dev/acpica/components/executer/exsystem.c stable/10/sys/contrib/dev/acpica/components/executer/exutils.c stable/10/sys/contrib/dev/acpica/components/hardware/hwacpi.c stable/10/sys/contrib/dev/acpica/components/hardware/hwesleep.c stable/10/sys/contrib/dev/acpica/components/hardware/hwgpe.c stable/10/sys/contrib/dev/acpica/components/hardware/hwpci.c stable/10/sys/contrib/dev/acpica/components/hardware/hwregs.c stable/10/sys/contrib/dev/acpica/components/hardware/hwsleep.c stable/10/sys/contrib/dev/acpica/components/hardware/hwtimer.c stable/10/sys/contrib/dev/acpica/components/hardware/hwvalid.c stable/10/sys/contrib/dev/acpica/components/hardware/hwxface.c stable/10/sys/contrib/dev/acpica/components/hardware/hwxfsleep.c stable/10/sys/contrib/dev/acpica/components/namespace/nsaccess.c stable/10/sys/contrib/dev/acpica/components/namespace/nsalloc.c stable/10/sys/contrib/dev/acpica/components/namespace/nsarguments.c stable/10/sys/contrib/dev/acpica/components/namespace/nsconvert.c stable/10/sys/contrib/dev/acpica/components/namespace/nsdump.c stable/10/sys/contrib/dev/acpica/components/namespace/nsdumpdv.c stable/10/sys/contrib/dev/acpica/components/namespace/nseval.c stable/10/sys/contrib/dev/acpica/components/namespace/nsinit.c stable/10/sys/contrib/dev/acpica/components/namespace/nsload.c stable/10/sys/contrib/dev/acpica/components/namespace/nsnames.c stable/10/sys/contrib/dev/acpica/components/namespace/nsobject.c stable/10/sys/contrib/dev/acpica/components/namespace/nsparse.c stable/10/sys/contrib/dev/acpica/components/namespace/nspredef.c stable/10/sys/contrib/dev/acpica/components/namespace/nsprepkg.c stable/10/sys/contrib/dev/acpica/components/namespace/nsrepair.c stable/10/sys/contrib/dev/acpica/components/namespace/nsrepair2.c stable/10/sys/contrib/dev/acpica/components/namespace/nssearch.c stable/10/sys/contrib/dev/acpica/components/namespace/nsutils.c stable/10/sys/contrib/dev/acpica/components/namespace/nswalk.c stable/10/sys/contrib/dev/acpica/components/namespace/nsxfeval.c stable/10/sys/contrib/dev/acpica/components/namespace/nsxfname.c stable/10/sys/contrib/dev/acpica/components/namespace/nsxfobj.c stable/10/sys/contrib/dev/acpica/components/parser/psargs.c stable/10/sys/contrib/dev/acpica/components/parser/psloop.c stable/10/sys/contrib/dev/acpica/components/parser/psobject.c stable/10/sys/contrib/dev/acpica/components/parser/psopcode.c stable/10/sys/contrib/dev/acpica/components/parser/psopinfo.c stable/10/sys/contrib/dev/acpica/components/parser/psparse.c stable/10/sys/contrib/dev/acpica/components/parser/psscope.c stable/10/sys/contrib/dev/acpica/components/parser/pstree.c stable/10/sys/contrib/dev/acpica/components/parser/psutils.c stable/10/sys/contrib/dev/acpica/components/parser/pswalk.c stable/10/sys/contrib/dev/acpica/components/parser/psxface.c stable/10/sys/contrib/dev/acpica/components/resources/rsaddr.c stable/10/sys/contrib/dev/acpica/components/resources/rscalc.c stable/10/sys/contrib/dev/acpica/components/resources/rscreate.c stable/10/sys/contrib/dev/acpica/components/resources/rsdump.c stable/10/sys/contrib/dev/acpica/components/resources/rsdumpinfo.c stable/10/sys/contrib/dev/acpica/components/resources/rsinfo.c stable/10/sys/contrib/dev/acpica/components/resources/rsio.c stable/10/sys/contrib/dev/acpica/components/resources/rsirq.c stable/10/sys/contrib/dev/acpica/components/resources/rslist.c stable/10/sys/contrib/dev/acpica/components/resources/rsmemory.c stable/10/sys/contrib/dev/acpica/components/resources/rsmisc.c stable/10/sys/contrib/dev/acpica/components/resources/rsserial.c stable/10/sys/contrib/dev/acpica/components/resources/rsutils.c stable/10/sys/contrib/dev/acpica/components/resources/rsxface.c stable/10/sys/contrib/dev/acpica/components/tables/tbfadt.c stable/10/sys/contrib/dev/acpica/components/tables/tbfind.c stable/10/sys/contrib/dev/acpica/components/tables/tbinstal.c stable/10/sys/contrib/dev/acpica/components/tables/tbprint.c stable/10/sys/contrib/dev/acpica/components/tables/tbutils.c stable/10/sys/contrib/dev/acpica/components/tables/tbxface.c stable/10/sys/contrib/dev/acpica/components/tables/tbxfload.c stable/10/sys/contrib/dev/acpica/components/tables/tbxfroot.c stable/10/sys/contrib/dev/acpica/components/utilities/utaddress.c stable/10/sys/contrib/dev/acpica/components/utilities/utalloc.c stable/10/sys/contrib/dev/acpica/components/utilities/utbuffer.c stable/10/sys/contrib/dev/acpica/components/utilities/utcache.c stable/10/sys/contrib/dev/acpica/components/utilities/utcopy.c stable/10/sys/contrib/dev/acpica/components/utilities/utdebug.c stable/10/sys/contrib/dev/acpica/components/utilities/utdecode.c stable/10/sys/contrib/dev/acpica/components/utilities/utdelete.c stable/10/sys/contrib/dev/acpica/components/utilities/uterror.c stable/10/sys/contrib/dev/acpica/components/utilities/uteval.c stable/10/sys/contrib/dev/acpica/components/utilities/utexcep.c stable/10/sys/contrib/dev/acpica/components/utilities/utglobal.c stable/10/sys/contrib/dev/acpica/components/utilities/utids.c stable/10/sys/contrib/dev/acpica/components/utilities/utinit.c stable/10/sys/contrib/dev/acpica/components/utilities/utlock.c stable/10/sys/contrib/dev/acpica/components/utilities/utmath.c stable/10/sys/contrib/dev/acpica/components/utilities/utmisc.c stable/10/sys/contrib/dev/acpica/components/utilities/utmutex.c stable/10/sys/contrib/dev/acpica/components/utilities/utobject.c stable/10/sys/contrib/dev/acpica/components/utilities/utosi.c stable/10/sys/contrib/dev/acpica/components/utilities/utownerid.c stable/10/sys/contrib/dev/acpica/components/utilities/utpredef.c stable/10/sys/contrib/dev/acpica/components/utilities/utresrc.c stable/10/sys/contrib/dev/acpica/components/utilities/utstate.c stable/10/sys/contrib/dev/acpica/components/utilities/utstring.c stable/10/sys/contrib/dev/acpica/components/utilities/uttrack.c stable/10/sys/contrib/dev/acpica/components/utilities/utxface.c stable/10/sys/contrib/dev/acpica/components/utilities/utxferror.c stable/10/sys/contrib/dev/acpica/components/utilities/utxfinit.c stable/10/sys/contrib/dev/acpica/components/utilities/utxfmutex.c stable/10/sys/contrib/dev/acpica/include/acapps.h stable/10/sys/contrib/dev/acpica/include/acbuffer.h stable/10/sys/contrib/dev/acpica/include/accommon.h stable/10/sys/contrib/dev/acpica/include/acconfig.h stable/10/sys/contrib/dev/acpica/include/acdebug.h stable/10/sys/contrib/dev/acpica/include/acdisasm.h stable/10/sys/contrib/dev/acpica/include/acdispat.h stable/10/sys/contrib/dev/acpica/include/acevents.h stable/10/sys/contrib/dev/acpica/include/acexcep.h stable/10/sys/contrib/dev/acpica/include/acglobal.h stable/10/sys/contrib/dev/acpica/include/achware.h stable/10/sys/contrib/dev/acpica/include/acinterp.h stable/10/sys/contrib/dev/acpica/include/aclocal.h stable/10/sys/contrib/dev/acpica/include/acmacros.h stable/10/sys/contrib/dev/acpica/include/acnames.h stable/10/sys/contrib/dev/acpica/include/acnamesp.h stable/10/sys/contrib/dev/acpica/include/acobject.h stable/10/sys/contrib/dev/acpica/include/acopcode.h stable/10/sys/contrib/dev/acpica/include/acoutput.h stable/10/sys/contrib/dev/acpica/include/acparser.h stable/10/sys/contrib/dev/acpica/include/acpi.h stable/10/sys/contrib/dev/acpica/include/acpiosxf.h stable/10/sys/contrib/dev/acpica/include/acpixf.h stable/10/sys/contrib/dev/acpica/include/acpredef.h stable/10/sys/contrib/dev/acpica/include/acresrc.h stable/10/sys/contrib/dev/acpica/include/acrestyp.h stable/10/sys/contrib/dev/acpica/include/acstruct.h stable/10/sys/contrib/dev/acpica/include/actables.h stable/10/sys/contrib/dev/acpica/include/actbl.h stable/10/sys/contrib/dev/acpica/include/actbl1.h stable/10/sys/contrib/dev/acpica/include/actbl2.h stable/10/sys/contrib/dev/acpica/include/actbl3.h stable/10/sys/contrib/dev/acpica/include/actypes.h stable/10/sys/contrib/dev/acpica/include/acutils.h stable/10/sys/contrib/dev/acpica/include/amlcode.h stable/10/sys/contrib/dev/acpica/include/amlresrc.h stable/10/sys/contrib/dev/acpica/include/platform/acenv.h stable/10/sys/contrib/dev/acpica/include/platform/acfreebsd.h stable/10/sys/contrib/dev/acpica/include/platform/acgcc.h stable/10/sys/contrib/dev/acpica/os_specific/service_layers/osunixxf.c stable/10/sys/dev/acpica/Osd/OsdTable.c stable/10/sys/dev/acpica/acpi.c stable/10/usr.sbin/acpi/acpiconf/Makefile stable/10/usr.sbin/acpi/acpidb/Makefile stable/10/usr.sbin/acpi/acpidb/acpidb.c stable/10/usr.sbin/acpi/acpidump/Makefile stable/10/usr.sbin/acpi/acpidump/acpi.c stable/10/usr.sbin/acpi/iasl/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Sat Apr 4 09:57:52 2015 (r281074) +++ stable/10/sys/conf/files Sat Apr 4 10:17:51 2015 (r281075) @@ -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,9 +267,11 @@ 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 +contrib/dev/acpica/components/disassembler/dmcstyle.c optional acpi acpi_debug contrib/dev/acpica/components/disassembler/dmdeferred.c optional acpi acpi_debug contrib/dev/acpica/components/disassembler/dmnames.c optional acpi acpi_debug contrib/dev/acpica/components/disassembler/dmopcode.c optional acpi acpi_debug @@ -387,6 +391,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 +412,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 +426,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: stable/10/sys/contrib/dev/acpica/acpica_prep.sh ============================================================================== --- stable/10/sys/contrib/dev/acpica/acpica_prep.sh Sat Apr 4 09:57:52 2015 (r281074) +++ stable/10/sys/contrib/dev/acpica/acpica_prep.sh Sat Apr 4 10:17:51 2015 (r281075) @@ -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: stable/10/sys/contrib/dev/acpica/changes.txt ============================================================================== --- stable/10/sys/contrib/dev/acpica/changes.txt Sat Apr 4 09:57:52 2015 (r281074) +++ stable/10/sys/contrib/dev/acpica/changes.txt Sat Apr 4 10:17:51 2015 (r281075) @@ -1,4 +1,1140 @@ ---------------------------------------- +04 February 2015. Summary of changes for version 20150204: + +This release is available at https://acpica.org/downloads + +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. + +Events: Introduce ACPI_GPE_DISPATCH_RAW_HANDLER to fix GPE storm issues. +A raw gpe handling mechanism was created to allow better handling of GPE +storms that aren't easily managed by the normal handler. The raw handler +allows disabling/renabling of the the GPE so that interrupt storms can be +avoided in cases where events cannot be timely serviced. In this scenario, +handlers should use the AcpiSetGpe() API to disable/enable the GPE. This API +will leave the reference counts undisturbed, thereby preventing unintentional +clearing of the GPE when the intent in only to temporarily disable it. Raw +handlers allow enabling and disabling of a GPE by removing GPE register +locking. As such, raw handlers much provide their own locks while using +GPE API's to protect access to GPE data structures. +Lv Zheng + +Events: Always modify GPE registers under the GPE lock. +Applies GPE lock around AcpiFinishGpe() to protect access to GPE register +values. Reported as bug by joe.liu@apple.com. + +Unix makefiles: Separate option to disable optimizations and _FORTIFY_SOURCE. +This change removes the _FORTIFY_SOURCE flag from the NOOPT disable option and +creates a separate flag (NOFORTIFY) for this purpose. Some toolchains may +define _FORTIFY_SOURCE which leads redefined errors when building ACPICA. This +allows disabling the option without also having to disable optimazations. +David Box + + Current Release: + Non-Debug Version: 101.7K Code, 27.9K Data, 129.6K Total + Debug Version: 199.2K Code, 82.4K Data, 281.6K Total + +---------------------------------------- +07 November 2014. Summary of changes for version 20141107: + +This release is available at https://acpica.org/downloads + +This release introduces and implements language extensions to ASL that +provide support for symbolic ("C-style") operators and expressions. These +language extensions are known collectively as ASL+. + + +1) iASL Compiler/Disassembler and Tools: + +Disassembler: Fixed a problem with disassembly of the UartSerialBus +macro. Changed "StopBitsNone" to the correct "StopBitsZero". David E. +Box. + +Disassembler: Fixed the Unicode macro support to add escape sequences. +All non-printable ASCII values are emitted as escape sequences, as well +as the standard escapes for quote and backslash. Ensures that the +disassembled macro can be correctly recompiled. + +iASL: Added Printf/Fprintf macros for formatted output. These macros are +translated to existing AML Concatenate and Store operations. Printf +writes to the ASL Debug object. Fprintf allows the specification of an +ASL name as the target. Only a single format specifier is required, %o, +since the AML interpreter dynamically converts objects to the required +type. David E. Box. + + (old) Store (Concatenate (Concatenate (Concatenate (Concatenate + (Concatenate (Concatenate (Concatenate ("", Arg0), + ": Unexpected value for "), Arg1), ", "), Arg2), + " at line "), Arg3), Debug) + + (new) Printf ("%o: Unexpected value for %o, %o at line %o", + Arg0, Arg1, Arg2, Arg3) + + (old) Store (Concatenate (Concatenate (Concatenate (Concatenate + ("", Arg1), ": "), Arg0), " Successful"), STR1) + + (new) Fprintf (STR1, "%o: %o Successful", Arg1, Arg0) + +iASL: Added debug options (-bp, -bt) to dynamically prune levels of the +ASL parse tree before the AML code is generated. This allows blocks of +ASL code to be removed in order to help locate and identify problem +devices and/or code. David E. Box. + +AcpiExec: Added support (-fi) for an optional namespace object +initialization file. This file specifies initial values for namespace +objects as necessary for debugging and testing different ASL code paths +that may be taken as a result of BIOS options. + + +2) Overview of symbolic operator support for ASL (ASL+) +------------------------------------------------------- + +As an extension to the ASL language, iASL implements support for symbolic +(C-style) operators for math and logical expressions. This can greatly +simplify ASL code as well as improve both readability and +maintainability. These language extensions can exist concurrently with +all legacy ASL code and expressions. + +The symbolic extensions are 100% compatible with existing AML +interpreters, since no new AML opcodes are created. To implement the +extensions, the iASL compiler transforms the symbolic expressions into +the legacy ASL/AML equivalents at compile time. + +Full symbolic expressions are supported, along with the standard C +precedence and associativity rules. + +Full disassembler support for the symbolic expressions is provided, and +creates an automatic migration path for existing ASL code to ASL+ code +via the disassembly process. By default, the disassembler now emits ASL+ +code with symbolic expressions. An option (-dl) is provided to force the +disassembler to emit legacy ASL code if desired. + +Below is the complete list of the currently supported symbolic operators +with examples. See the iASL User Guide for additional information. + + +ASL+ Syntax Legacy ASL Equivalent +----------- --------------------- + + // Math operators + +Z = X + Y Add (X, Y, Z) +Z = X - Y Subtract (X, Y, Z) +Z = X * Y Multiply (X, Y, Z) +Z = X / Y Divide (X, Y, , Z) +Z = X % Y Mod (X, Y, Z) +Z = X << Y ShiftLeft (X, Y, Z) +Z = X >> Y ShiftRight (X, Y, Z) +Z = X & Y And (X, Y, Z) +Z = X | Y Or (X, Y, Z) +Z = X ^ Y Xor (X, Y, Z) +Z = ~X Not (X, Z) +X++ Increment (X) +X-- Decrement (X) + + // Logical operators + +(X == Y) LEqual (X, Y) +(X != Y) LNotEqual (X, Y) +(X < Y) LLess (X, Y) +(X > Y) LGreater (X, Y) +(X <= Y) LLessEqual (X, Y) +(X >= Y) LGreaterEqual (X, Y) +(X && Y) LAnd (X, Y) +(X || Y) LOr (X, Y) +(!X) LNot (X) + + // Assignment and compound assignment operations + +X = Y Store (Y, X) +X += Y Add (X, Y, X) +X -= Y Subtract (X, Y, X) +X *= Y Multiply (X, Y, X) +X /= Y Divide (X, Y, , X) +X %= Y Mod (X, Y, X) +X <<= Y ShiftLeft (X, Y, X) +X >>= Y ShiftRight (X, Y, X) +X &= Y And (X, Y, X) +X |= Y Or (X, Y, X) +X ^= Y Xor (X, Y, X) + + +3) ASL+ Examples: +----------------- + +Legacy ASL: + If (LOr (LOr (LEqual (And (R510, 0x03FB), 0x02E0), LEqual ( + And (R520, 0x03FB), 0x02E0)), LOr (LEqual (And (R530, +0x03FB), + 0x02E0), LEqual (And (R540, 0x03FB), 0x02E0)))) + { + And (MEMB, 0xFFFFFFF0, SRMB) + Store (MEMB, Local2) + Store (PDBM, Local1) + And (PDBM, 0xFFFFFFFFFFFFFFF9, PDBM) + Store (SRMB, MEMB) + Or (PDBM, 0x02, PDBM) + } + +ASL+ version: + If (((R510 & 0x03FB) == 0x02E0) || + ((R520 & 0x03FB) == 0x02E0) || + ((R530 & 0x03FB) == 0x02E0) || + ((R540 & 0x03FB) == 0x02E0)) + { + SRMB = (MEMB & 0xFFFFFFF0) + Local2 = MEMB + Local1 = PDBM + PDBM &= 0xFFFFFFFFFFFFFFF9 + MEMB = SRMB + PDBM |= 0x02 + } + +Legacy ASL: + Store (0x1234, Local1) + Multiply (Add (Add (Local1, TEST), 0x20), Local2, Local3) + Multiply (Local2, Add (Add (Local1, TEST), 0x20), Local3) + Add (Local1, Add (TEST, Multiply (0x20, Local2)), Local3) + Store (Index (PKG1, 0x03), Local6) + Store (Add (Local3, Local2), Debug) + Add (Local1, 0x0F, Local2) + Add (Local1, Multiply (Local2, Local3), Local2) + Multiply (Add (Add (Local1, TEST), 0x20), ToBCD (Local1), Local3) + +ASL+ version: + Local1 = 0x1234 + Local3 = (((Local1 + TEST) + 0x20) * Local2) + Local3 = (Local2 * ((Local1 + TEST) + 0x20)) + Local3 = (Local1 + (TEST + (0x20 * Local2))) + Local6 = Index (PKG1, 0x03) + Debug = (Local3 + Local2) + Local2 = (Local1 + 0x0F) + Local2 = (Local1 + (Local2 * Local3)) + Local3 = (((Local1 + TEST) + 0x20) * ToBCD (Local1)) + + +---------------------------------------- +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 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat Apr 4 10:43:27 2015 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 5B13EC60; Sat, 4 Apr 2015 10:43:27 +0000 (UTC) Received: from mail-vn0-x236.google.com (mail-vn0-x236.google.com [IPv6:2607:f8b0:400c:c0f::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 09A6081D; Sat, 4 Apr 2015 10:43:27 +0000 (UTC) Received: by vnbg190 with SMTP id g190so186760vnb.9; Sat, 04 Apr 2015 03:43:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=/TvXjMmPBP29CqwZ5BiDYG1YcMo7IGR/EIcosm0LkBE=; b=mRMg9yFvFjEiagiUjzNU39n9pvyD6WeNGiM50yiHugV+2WTX6D34cB6QA8jdds9eMm ku/csThAfdSY1uVd1ybWEY1hfAxqks8qEvdMQ+pbh3hSDZvEP20wHcLhcN6HBH6vbAYI phr8mtz31BcN9rf/XbSx+YBqH/LGneK5BTA4GVZJruipEDX6USF1JbEkjiP8So4YdNwH hLfD0gF1ATWAYo2U0pJlO22a8OGbyVZJnzV0mNQpw5HEuJA5b6RwY6rz4wo4jl3F9EQJ QoyST5rW5tz/uW/9xIm7XAgKz4poq4wNpjwPk6e6VR4hEjv4AYgolSXldt4rGkCrQCT0 r8qQ== X-Received: by 10.52.157.72 with SMTP id wk8mr3656660vdb.12.1428144205850; Sat, 04 Apr 2015 03:43:25 -0700 (PDT) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by mx.google.com with ESMTPSA id p12sm1706590vds.23.2015.04.04.03.43.23 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 04 Apr 2015 03:43:24 -0700 (PDT) Sender: Baptiste Daroussin Date: Sat, 4 Apr 2015 12:43:21 +0200 From: Baptiste Daroussin To: Garrett Cooper Subject: Re: svn commit: r281055 - head/share/mk Message-ID: <20150404104320.GB20155@ivaldir.etoilebsd.net> References: <201504040031.t340VedI086145@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Fba/0zbH8Xs+Fj9o" Content-Disposition: inline In-Reply-To: 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: Sat, 04 Apr 2015 10:43:27 -0000 --Fba/0zbH8Xs+Fj9o Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Apr 03, 2015 at 05:36:21PM -0700, Garrett Cooper wrote: > On Apr 3, 2015, at 17:31, Baptiste Daroussin wrote: >=20 > > Author: bapt > > Date: Sat Apr 4 00:31:40 2015 > > New Revision: 281055 > > URL: https://svnweb.freebsd.org/changeset/base/281055 > >=20 > > Log: > > Do not install scripts multiple time when using bsd.progs.mk > >=20 > > Modified: > > head/share/mk/bsd.progs.mk >=20 > I=E2=80=99m sorry I=E2=80=99ve been lax with this, but unfortunately this= doesn=E2=80=99t solve the underlying issue 100%. >=20 > 1. You forgot FILES/FILESGROUPS > 2. This doesn=E2=80=99t help cases were targets are manually overridden. > 3. Etc. >=20 > The project I was working on has reached steady state. We should be done = with the big hurdle soon-ish (another month or two). I=E2=80=99ll try to re= solve it sometime between now and then by putting all of the PROGS logic do= wn into bsd.prog.mk (where it should have been in the first place=E2=80=A6)= , because bsd.progs.mk being included recursively is a layering violation b= ug that parallel installs expose. >=20 > Thanks! Well I have hit this one while packaging base because pkg(8) yell when thin= gs are being packaged twice, so I'm fixing when I see them I plan to fix others when I'll catch them, if you prefer I can keep that on my own branch to not= make collision with your work? Best regards, Bapt --Fba/0zbH8Xs+Fj9o Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlUfwEgACgkQ8kTtMUmk6EyllgCfRPz6YWRl07WZ8f7C0bNZm9TP owIAoL63DpJa5SlNxHWJhG0l1nPWTKxD =GIU9 -----END PGP SIGNATURE----- --Fba/0zbH8Xs+Fj9o-- From owner-svn-src-all@FreeBSD.ORG Sat Apr 4 17:48:19 2015 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 032B9A91; Sat, 4 Apr 2015 17:48:19 +0000 (UTC) Received: from mail-pd0-x231.google.com (mail-pd0-x231.google.com [IPv6:2607:f8b0:400e:c02::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id BDF802ED; Sat, 4 Apr 2015 17:48:18 +0000 (UTC) Received: by pdbnk13 with SMTP id nk13so76569537pdb.0; Sat, 04 Apr 2015 10:48:18 -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=fnvbHLITmFEAqsK3E1GRMV5TL2pPOEaXG7g9QkdFN98=; b=XiY+hCAAEOkxLuQaI/GQhIAdzT3H872cVrr9vc0y9Khz6ryKjhhONQMZFsPCg4cOle Ll5NWkxNnBiJ/a6dbezc0AnTP2JZPPnuehdjiqOrLUKIZCy2jXreS8LeA9l3e0qOq8fu H1TPyyIBz10DOZndEb1DETB7qlEidhmQfdy0o4cf/cAAkCh7XpBh0b/Rn3mUmEnypX5F TQSuPxl76/KrChcJ1ym4WyZQNdPrhJYke2l0g9+95g3tsdDO/DA9DZeMOZSNHPd046fK LdUEKAj1gDMR4uyFp5Vd0LG9aoHxBMUZM7rVgq8x3yuysMdIbVGfo8BwC6gAPxAgQ67A lF2Q== X-Received: by 10.66.141.38 with SMTP id rl6mr13681720pab.25.1428169698304; Sat, 04 Apr 2015 10:48:18 -0700 (PDT) Received: from ?IPv6:2601:8:ab80:7d6:690e:7f5f:75e9:7f78? ([2601:8:ab80:7d6:690e:7f5f:75e9:7f78]) by mx.google.com with ESMTPSA id dj3sm11589751pbd.48.2015.04.04.10.48.17 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 04 Apr 2015 10:48:17 -0700 (PDT) References: <201504040031.t340VedI086145@svn.freebsd.org> <20150404104320.GB20155@ivaldir.etoilebsd.net> Mime-Version: 1.0 (1.0) In-Reply-To: <20150404104320.GB20155@ivaldir.etoilebsd.net> Content-Type: text/plain; charset=cp932 Content-Transfer-Encoding: quoted-printable Message-Id: <85A796A0-FB31-4B58-BCAA-C48F5DC59ECC@gmail.com> X-Mailer: iPhone Mail (12D508) From: Garrett Cooper Subject: Re: svn commit: r281055 - head/share/mk Date: Sat, 4 Apr 2015 10:48:15 -0700 To: Baptiste Daroussin 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 Apr 2015 17:48:19 -0000 > On Apr 4, 2015, at 03:43, Baptiste Daroussin wrote: >=20 >> On Fri, Apr 03, 2015 at 05:36:21PM -0700, Garrett Cooper wrote: >>> On Apr 3, 2015, at 17:31, Baptiste Daroussin wrote: >>>=20 >>> Author: bapt >>> Date: Sat Apr 4 00:31:40 2015 >>> New Revision: 281055 >>> URL: https://svnweb.freebsd.org/changeset/base/281055 >>>=20 >>> Log: >>> Do not install scripts multiple time when using bsd.progs.mk >>>=20 >>> Modified: >>> head/share/mk/bsd.progs.mk >>=20 >> I=81fm sorry I=81fve been lax with this, but unfortunately this doesn=81f= t solve the underlying issue 100%. >>=20 >> 1. You forgot FILES/FILESGROUPS >> 2. This doesn=81ft help cases were targets are manually overridden. >> 3. Etc. >>=20 >> The project I was working on has reached steady state. We should be done w= ith the big hurdle soon-ish (another month or two). I=81fll try to resolve i= t sometime between now and then by putting all of the PROGS logic down into b= sd.prog.mk (where it should have been in the first place=81c), because bsd.p= rogs.mk being included recursively is a layering violation bug that parallel= installs expose. >>=20 >> Thanks! >=20 > Well I have hit this one while packaging base because pkg(8) yell when thi= ngs > are being packaged twice, so I'm fixing when I see them I plan to fix othe= rs > when I'll catch them, if you prefer I can keep that on my own branch to no= t make > collision with your work? That'd be good. I'll check in the short term minimal hack to fix this today a= nd work on moving bsd.test.mk away from bsd.progs.mk on another branch. Thanks for all the packaging stuff in base BTW -- really looking forward to i= t :)!!!= From owner-svn-src-all@FreeBSD.ORG Sat Apr 4 18:45:26 2015 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 A778877D; Sat, 4 Apr 2015 18:45: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 78627B53; Sat, 4 Apr 2015 18:45: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 t34IjQb0099848; Sat, 4 Apr 2015 18:45:26 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t34IjPgU099846; Sat, 4 Apr 2015 18:45:25 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504041845.t34IjPgU099846@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 4 Apr 2015 18:45:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281077 - 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: Sat, 04 Apr 2015 18:45:26 -0000 Author: andrew Date: Sat Apr 4 18:45:25 2015 New Revision: 281077 URL: https://svnweb.freebsd.org/changeset/base/281077 Log: Move uart_fdt_get_clock and uart_fdt_get_shift to uart_bus_fdt.c, we may not build uart_cpu_fdt.c in all configs. Modified: head/sys/dev/uart/uart_bus_fdt.c head/sys/dev/uart/uart_cpu_fdt.c Modified: head/sys/dev/uart/uart_bus_fdt.c ============================================================================== --- head/sys/dev/uart/uart_bus_fdt.c Sat Apr 4 18:41:18 2015 (r281076) +++ head/sys/dev/uart/uart_bus_fdt.c Sat Apr 4 18:45:25 2015 (r281077) @@ -63,6 +63,35 @@ static driver_t uart_fdt_driver = { sizeof(struct uart_softc), }; +int +uart_fdt_get_clock(phandle_t node, pcell_t *cell) +{ + pcell_t clock; + + /* clock-frequency is a FreeBSD-only extention. */ + if ((OF_getencprop(node, "clock-frequency", &clock, + sizeof(clock))) <= 0) + clock = 0; + + if (clock == 0) + /* Try to retrieve parent 'bus-frequency' */ + /* XXX this should go to simple-bus fixup or so */ + if ((OF_getencprop(OF_parent(node), "bus-frequency", &clock, + sizeof(clock))) <= 0) + clock = 0; + + return (0); +} + +int +uart_fdt_get_shift(phandle_t node, pcell_t *cell) +{ + + if ((OF_getencprop(node, "reg-shift", cell, sizeof(*cell))) <= 0) + *cell = 0; + return (0); +} + static uintptr_t uart_fdt_find_device(device_t dev) { Modified: head/sys/dev/uart/uart_cpu_fdt.c ============================================================================== --- head/sys/dev/uart/uart_cpu_fdt.c Sat Apr 4 18:41:18 2015 (r281076) +++ head/sys/dev/uart/uart_cpu_fdt.c Sat Apr 4 18:45:25 2015 (r281077) @@ -59,35 +59,6 @@ bus_space_tag_t uart_bus_space_io; bus_space_tag_t uart_bus_space_mem; int -uart_fdt_get_clock(phandle_t node, pcell_t *cell) -{ - pcell_t clock; - - /* clock-frequency is a FreeBSD-only extention. */ - if ((OF_getencprop(node, "clock-frequency", &clock, - sizeof(clock))) <= 0) - clock = 0; - - if (clock == 0) - /* Try to retrieve parent 'bus-frequency' */ - /* XXX this should go to simple-bus fixup or so */ - if ((OF_getencprop(OF_parent(node), "bus-frequency", &clock, - sizeof(clock))) <= 0) - clock = 0; - - return (0); -} - -int -uart_fdt_get_shift(phandle_t node, pcell_t *cell) -{ - - if ((OF_getencprop(node, "reg-shift", cell, sizeof(*cell))) <= 0) - *cell = 0; - return (0); -} - -int uart_cpu_eqres(struct uart_bas *b1, struct uart_bas *b2) { From owner-svn-src-all@FreeBSD.ORG Sat Apr 4 19:10:23 2015 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 CD206FA9; Sat, 4 Apr 2015 19:10: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 B7B5ED62; Sat, 4 Apr 2015 19:10: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 t34JANoj010250; Sat, 4 Apr 2015 19:10:23 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t34JANGJ010249; Sat, 4 Apr 2015 19:10:23 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201504041910.t34JANGJ010249@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Sat, 4 Apr 2015 19:10:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281079 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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 Apr 2015 19:10:23 -0000 Author: alc Date: Sat Apr 4 19:10:22 2015 New Revision: 281079 URL: https://svnweb.freebsd.org/changeset/base/281079 Log: Replace vm_fault()'s heuristic for automatic cache behind with a heuristic that performs the equivalent of an automatic madvise(..., MADV_DONTNEED). The current heuristic, even with the improvements that I made a few years ago, is a good example of making the wrong trade-off, or optimizing for the infrequent case. The infrequent case being reading a single file that is much larger than memory using mmap(2). And, in this case, the page daemon isn't the bottleneck; it's the I/O. In all other cases, the current heuristic has too many false positives, i.e., it caches too many pages that are later reused. To give one example, thousands of pages are cached by the current heuristic during a buildworld and all of them are reactivated before the buildworld completes. In particular, clang reads source files using mmap(2) and there are some relatively large source files in our source tree, e.g., sqlite, that are read multiple times. With the new heuristic, I see fewer false positives and they have a much lower cost. I actually tried something like this more than two years ago and it didn't perform as well as the cache behind heuristic. However, that was before the changes to the page daemon in late summer of 2013 and the existence of pmap_advise(). In particular, with the page daemon doing its work more frequently and in smaller batches, it now completes its work while the application accessing the file is blocked on I/O. Whereas previously, the page daemon appeared to hog the CPU for so long that it caused "hiccups" in the application's execution. Finally, I'll add that the elimination of cache pages is a prerequisite for NUMA support. Reviewed by: jeff, kib Sponsored by: EMC / Isilon Storage Division Modified: head/sys/vm/vm_fault.c Modified: head/sys/vm/vm_fault.c ============================================================================== --- head/sys/vm/vm_fault.c Sat Apr 4 18:49:48 2015 (r281078) +++ head/sys/vm/vm_fault.c Sat Apr 4 19:10:22 2015 (r281079) @@ -81,6 +81,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -113,7 +114,8 @@ static int vm_fault_additional_pages(vm_ #define VM_FAULT_READ_MAX (1 + VM_FAULT_READ_AHEAD_MAX) #define VM_FAULT_NINCR (VM_FAULT_READ_MAX / VM_FAULT_READ_BEHIND) #define VM_FAULT_SUM (VM_FAULT_NINCR * (VM_FAULT_NINCR + 1) / 2) -#define VM_FAULT_CACHE_BEHIND (VM_FAULT_READ_BEHIND * VM_FAULT_SUM) + +#define VM_FAULT_DONTNEED_MIN 1048576 struct faultstate { vm_page_t m; @@ -128,7 +130,8 @@ struct faultstate { struct vnode *vp; }; -static void vm_fault_cache_behind(const struct faultstate *fs, int distance); +static void vm_fault_dontneed(const struct faultstate *fs, vm_offset_t vaddr, + int ahead); static void vm_fault_prefault(const struct faultstate *fs, vm_offset_t addra, int faultcount, int reqpage); @@ -566,8 +569,7 @@ readrest: nera = VM_FAULT_READ_AHEAD_MAX; ahead = nera; if (fs.pindex == fs.entry->next_read) - vm_fault_cache_behind(&fs, - VM_FAULT_READ_MAX); + vm_fault_dontneed(&fs, vaddr, ahead); } else if (fs.pindex == fs.entry->next_read) { /* * This is a sequential fault. Arithmetically @@ -585,8 +587,7 @@ readrest: } ahead = nera; if (era == VM_FAULT_READ_AHEAD_MAX) - vm_fault_cache_behind(&fs, - VM_FAULT_CACHE_BEHIND); + vm_fault_dontneed(&fs, vaddr, ahead); } else { /* * This is a non-sequential fault. Request a @@ -1034,56 +1035,69 @@ vnode_locked: } /* - * Speed up the reclamation of up to "distance" pages that precede the - * faulting pindex within the first object of the shadow chain. + * Speed up the reclamation of pages that precede the faulting pindex within + * the first object of the shadow chain. Essentially, perform the equivalent + * to madvise(..., MADV_DONTNEED) on a large cluster of pages that precedes + * the faulting pindex by the cluster size when the pages read by vm_fault() + * cross a cluster-size boundary. The cluster size is the greater of the + * smallest superpage size and VM_FAULT_DONTNEED_MIN. + * + * When "fs->first_object" is a shadow object, the pages in the backing object + * that precede the faulting pindex are deactivated by vm_fault(). So, this + * function must only be concerned with pages in the first object. */ static void -vm_fault_cache_behind(const struct faultstate *fs, int distance) +vm_fault_dontneed(const struct faultstate *fs, vm_offset_t vaddr, int ahead) { + vm_map_entry_t entry; vm_object_t first_object, object; - vm_page_t m, m_prev; - vm_pindex_t pindex; + vm_offset_t end, start; + vm_page_t m, m_next; + vm_pindex_t pend, pstart; + vm_size_t size; object = fs->object; VM_OBJECT_ASSERT_WLOCKED(object); first_object = fs->first_object; if (first_object != object) { - if (!VM_OBJECT_TRYWLOCK(first_object)) { + if (!VM_OBJECT_TRYRLOCK(first_object)) { VM_OBJECT_WUNLOCK(object); - VM_OBJECT_WLOCK(first_object); + VM_OBJECT_RLOCK(first_object); VM_OBJECT_WLOCK(object); } } - /* Neither fictitious nor unmanaged pages can be cached. */ + /* Neither fictitious nor unmanaged pages can be reclaimed. */ if ((first_object->flags & (OBJ_FICTITIOUS | OBJ_UNMANAGED)) == 0) { - if (fs->first_pindex < distance) - pindex = 0; - else - pindex = fs->first_pindex - distance; - if (pindex < OFF_TO_IDX(fs->entry->offset)) - pindex = OFF_TO_IDX(fs->entry->offset); - m = first_object != object ? fs->first_m : fs->m; - vm_page_assert_xbusied(m); - m_prev = vm_page_prev(m); - while ((m = m_prev) != NULL && m->pindex >= pindex && - m->valid == VM_PAGE_BITS_ALL) { - m_prev = vm_page_prev(m); - if (vm_page_busied(m)) - continue; - vm_page_lock(m); - if (m->hold_count == 0 && m->wire_count == 0) { - pmap_remove_all(m); - vm_page_aflag_clear(m, PGA_REFERENCED); - if (m->dirty != 0) - vm_page_deactivate(m); - else - vm_page_cache(m); + size = VM_FAULT_DONTNEED_MIN; + if (MAXPAGESIZES > 1 && size < pagesizes[1]) + size = pagesizes[1]; + end = rounddown2(vaddr, size); + if (vaddr - end >= size - PAGE_SIZE - ptoa(ahead) && + (entry = fs->entry)->start < end) { + if (end - entry->start < size) + start = entry->start; + else + start = end - size; + pmap_advise(fs->map->pmap, start, end, MADV_DONTNEED); + pstart = OFF_TO_IDX(entry->offset) + atop(start - + entry->start); + m_next = vm_page_find_least(first_object, pstart); + pend = OFF_TO_IDX(entry->offset) + atop(end - + entry->start); + while ((m = m_next) != NULL && m->pindex < pend) { + m_next = TAILQ_NEXT(m, listq); + if (m->valid != VM_PAGE_BITS_ALL || + vm_page_busied(m)) + continue; + vm_page_lock(m); + if (m->hold_count == 0 && m->wire_count == 0) + vm_page_advise(m, MADV_DONTNEED); + vm_page_unlock(m); } - vm_page_unlock(m); } } if (first_object != object) - VM_OBJECT_WUNLOCK(first_object); + VM_OBJECT_RUNLOCK(first_object); } /* From owner-svn-src-all@FreeBSD.ORG Sat Apr 4 19:31:30 2015 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 B8327522; Sat, 4 Apr 2015 19:31: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 A32E5B4; Sat, 4 Apr 2015 19:31: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 t34JVU7O023150; Sat, 4 Apr 2015 19:31:30 GMT (envelope-from peter@FreeBSD.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t34JVUEK023149; Sat, 4 Apr 2015 19:31:30 GMT (envelope-from peter@FreeBSD.org) Message-Id: <201504041931.t34JVUEK023149@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: peter set sender to peter@FreeBSD.org using -f From: Peter Wemm Date: Sat, 4 Apr 2015 19:31:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r281080 - svnadmin/tools/svnssh 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 Apr 2015 19:31:30 -0000 Author: peter Date: Sat Apr 4 19:31:29 2015 New Revision: 281080 URL: https://svnweb.freebsd.org/changeset/base/281080 Log: Raise cpu failsafe limits that Baptiste ran into. Modified: svnadmin/tools/svnssh/svnssh.c Modified: svnadmin/tools/svnssh/svnssh.c ============================================================================== --- svnadmin/tools/svnssh/svnssh.c Sat Apr 4 19:10:22 2015 (r281079) +++ svnadmin/tools/svnssh/svnssh.c Sat Apr 4 19:31:29 2015 (r281080) @@ -202,8 +202,8 @@ main(int argc, char *argv[]) msg("root not allowed to commit"); exit(1); } - rl.rlim_cur = 540; /* 9 minutes (soft) */ - rl.rlim_max = 600; /* 10 minutes (hard) */ + rl.rlim_cur = 60 * 60; /* 60 minutes (soft) */ + rl.rlim_max = 70 * 60; /* 70 minutes (hard) */ setrlimit(RLIMIT_CPU, &rl); if (karma == 0) syslog(LOG_INFO, "svn server: %s, karma %d", username, karma); From owner-svn-src-all@FreeBSD.ORG Sat Apr 4 19:56:56 2015 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 5893EBC5; Sat, 4 Apr 2015 19:56: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 29CBD344; Sat, 4 Apr 2015 19:56: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 t34JuuDB033346; Sat, 4 Apr 2015 19:56:56 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t34JutvD033343; Sat, 4 Apr 2015 19:56:55 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201504041956.t34JutvD033343@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 4 Apr 2015 19:56:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281081 - in head/sys/boot: . common forth 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 Apr 2015 19:56:56 -0000 Author: bapt Date: Sat Apr 4 19:56:54 2015 New Revision: 281081 URL: https://svnweb.freebsd.org/changeset/base/281081 Log: Make sure forth manpages are only installed once. Differential Revision: https://reviews.freebsd.org/D2224 Reviewed by: imp Added: head/sys/boot/forth/Makefile (contents, props changed) Modified: head/sys/boot/Makefile head/sys/boot/common/Makefile.inc Modified: head/sys/boot/Makefile ============================================================================== --- head/sys/boot/Makefile Sat Apr 4 19:31:29 2015 (r281080) +++ head/sys/boot/Makefile Sat Apr 4 19:56:54 2015 (r281081) @@ -5,6 +5,7 @@ .if ${MK_FORTH} != "no" # Build the add-in FORTH interpreter. SUBDIR+= ficl +SUBDIR+= forth .endif .include Modified: head/sys/boot/common/Makefile.inc ============================================================================== --- head/sys/boot/common/Makefile.inc Sat Apr 4 19:31:29 2015 (r281080) +++ head/sys/boot/common/Makefile.inc Sat Apr 4 19:56:54 2015 (r281081) @@ -56,16 +56,6 @@ SRCS+= pnp.c # Forth interpreter .if defined(BOOT_FORTH) SRCS+= interp_forth.c -MAN+= ../forth/beastie.4th.8 -MAN+= ../forth/brand.4th.8 -MAN+= ../forth/check-password.4th.8 -MAN+= ../forth/color.4th.8 -MAN+= ../forth/delay.4th.8 -MAN+= ../forth/loader.conf.5 -MAN+= ../forth/loader.4th.8 -MAN+= ../forth/menu.4th.8 -MAN+= ../forth/menusets.4th.8 -MAN+= ../forth/version.4th.8 .endif .if defined(BOOT_PROMPT_123) Added: head/sys/boot/forth/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/forth/Makefile Sat Apr 4 19:56:54 2015 (r281081) @@ -0,0 +1,13 @@ +# $FreeBSD$ + +MAN+= beastie.4th.8 \ + brand.4th.8 \ + check-password.4th.8 \ + color.4th.8 \ + delay.4th.8 \ + loader.conf.5 \ + loader.4th.8 \ + menu.4th.8 \ + menusets.4th.8 + +.include From owner-svn-src-all@FreeBSD.ORG Sat Apr 4 20:02:11 2015 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 C5652EF4; Sat, 4 Apr 2015 20:02:11 +0000 (UTC) Received: from mail-ig0-x233.google.com (mail-ig0-x233.google.com [IPv6:2607:f8b0:4001:c05::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9129C605; Sat, 4 Apr 2015 20:02:11 +0000 (UTC) Received: by igcau2 with SMTP id au2so614253igc.1; Sat, 04 Apr 2015 13:02:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=lGRi1IenyNOeajBTA/IOyGIdsJl3V3ymrb1iHTScqzU=; b=RaLGwqqtF2Gw9unOvpo5FrKytmnDNXSmNaRw7caw4dQ/FUSgelXj7f8Q0DakrFWuic jY/MThVoKwiFMwKRommXtAOQsjaSy1wbrJ/HhgwsDhbT7tyi5xYl6NxLjZ0ivncHzIsm uBUl7LimMicBsAUuAIGD7hZw+bCbRzED2I2lC8PWIpLeZHADBv8qAujcCa0Iuzmu/Kml YdsmXoo4SVjsZBdPc0wCmNLiKGocl1aE7CJPaakXDMISPRwYw343HVFv+K9dPPu/LXmq gdAcVofJor1fV2zNlmjp8ehzBtO5GJrG7f4XKNLqupC2uD4QpQwlfzmKJ6maK4FNzVq+ iLtw== MIME-Version: 1.0 X-Received: by 10.107.39.72 with SMTP id n69mr11805673ion.8.1428177730515; Sat, 04 Apr 2015 13:02:10 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.36.17.194 with HTTP; Sat, 4 Apr 2015 13:02:10 -0700 (PDT) In-Reply-To: References: <201503110949.t2B9n7Yk000610@svn.freebsd.org> Date: Sat, 4 Apr 2015 13:02:10 -0700 X-Google-Sender-Auth: 0ViUwT1Vlb4hETmJL573yd-T5sI Message-ID: Subject: Re: svn commit: r279877 - stable/10/sys/boot/fdt From: Adrian Chadd To: Ed Schouten Content-Type: text/plain; charset=UTF-8 Cc: svn-src-stable@freebsd.org, Alexander Motin , "src-committers@freebsd.org" , svn-src-stable-10@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: Sat, 04 Apr 2015 20:02:11 -0000 On 4 April 2015 at 02:17, Ed Schouten wrote: > 2015-04-04 11:16 GMT+02:00 Ed Schouten : >> Couldn't this use calloc() instead? > > Oh, wait. This is the boot loader. The boot loader wouldn't > necessarily have a calloc() function. .. why not? Wouldn't it be worth the code savings to have calloc versus malloc + bzero everywhere? -adrian From owner-svn-src-all@FreeBSD.ORG Sat Apr 4 20:22:13 2015 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 A34C2226; Sat, 4 Apr 2015 20:22: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 8E70C80A; Sat, 4 Apr 2015 20:22: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 t34KMDPv047084; Sat, 4 Apr 2015 20:22:13 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t34KMD1G047083; Sat, 4 Apr 2015 20:22:13 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201504042022.t34KMD1G047083@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sat, 4 Apr 2015 20:22:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281082 - head/lib/libc/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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 Apr 2015 20:22:13 -0000 Author: jilles Date: Sat Apr 4 20:22:12 2015 New Revision: 281082 URL: https://svnweb.freebsd.org/changeset/base/281082 Log: fts: Don't return FTS_SLNONE if it's not a symlink (if race). When following symlinks, fts returned FTS_SLNONE when fstatat(flag=0) failed, but a subsequent fstatat(flag=AT_SYMLINK_NOFOLLOW) succeeded. This incorrectly triggered if a filename existed to be read from the directory, was deleted before the fstatat(flag=0) and created again after the fstatat(flag=0). Fix this by only returning FTS_SLNONE if the result from fstatat(flag=AT_SYMLINK_NOFOLLOW) is actually a symlink. If it is not a symlink, treat it as if fstatat(flag=0) succeeded. PR: 196724 Reported and tested by: pho MFC after: 1 week Modified: head/lib/libc/gen/fts.c Modified: head/lib/libc/gen/fts.c ============================================================================== --- head/lib/libc/gen/fts.c Sat Apr 4 19:56:54 2015 (r281081) +++ head/lib/libc/gen/fts.c Sat Apr 4 20:22:12 2015 (r281082) @@ -905,12 +905,13 @@ fts_stat(FTS *sp, FTSENT *p, int follow, if (ISSET(FTS_LOGICAL) || follow) { if (fstatat(dfd, path, sbp, 0)) { saved_errno = errno; - if (!fstatat(dfd, path, sbp, AT_SYMLINK_NOFOLLOW)) { - errno = 0; - return (FTS_SLNONE); + if (fstatat(dfd, path, sbp, AT_SYMLINK_NOFOLLOW)) { + p->fts_errno = saved_errno; + goto err; } - p->fts_errno = saved_errno; - goto err; + errno = 0; + if (S_ISLNK(sbp->st_mode)) + return (FTS_SLNONE); } } else if (fstatat(dfd, path, sbp, AT_SYMLINK_NOFOLLOW)) { p->fts_errno = errno; From owner-svn-src-all@FreeBSD.ORG Sat Apr 4 20:30:21 2015 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 75348542; Sat, 4 Apr 2015 20: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 6059C85D; Sat, 4 Apr 2015 20: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 t34KULYO048193; Sat, 4 Apr 2015 20:30:21 GMT (envelope-from andreast@FreeBSD.org) Received: (from andreast@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t34KULJf048191; Sat, 4 Apr 2015 20:30:21 GMT (envelope-from andreast@FreeBSD.org) Message-Id: <201504042030.t34KULJf048191@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andreast set sender to andreast@FreeBSD.org using -f From: Andreas Tobler Date: Sat, 4 Apr 2015 20:30:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281083 - head/sys/modules/i2c/iicbb 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 Apr 2015 20:30:21 -0000 Author: andreast Date: Sat Apr 4 20:30:20 2015 New Revision: 281083 URL: https://svnweb.freebsd.org/changeset/base/281083 Log: Fix build race on armv6* and powerpc*. Tested with cross builds amd64 -> armv6(hf) and powerpc(64). Suggested by: andrew@ Modified: head/sys/modules/i2c/iicbb/Makefile Modified: head/sys/modules/i2c/iicbb/Makefile ============================================================================== --- head/sys/modules/i2c/iicbb/Makefile Sat Apr 4 20:22:12 2015 (r281082) +++ head/sys/modules/i2c/iicbb/Makefile Sat Apr 4 20:30:20 2015 (r281083) @@ -1,8 +1,11 @@ # $FreeBSD$ .PATH: ${.CURDIR}/../../../dev/iicbus +.if ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "powerpc" +ofw_bus_if= ofw_bus_if.h +.endif KMOD = iicbb SRCS = device_if.h bus_if.h iicbus_if.h \ - iicbb_if.h iicbb_if.c iicbb.c opt_platform.h + iicbb_if.h iicbb_if.c iicbb.c ${ofw_bus_if} opt_platform.h .include From owner-svn-src-all@FreeBSD.ORG Sat Apr 4 20:55:48 2015 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 AFBD58C2; Sat, 4 Apr 2015 20:55: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 9AD8BAE0; Sat, 4 Apr 2015 20:55: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 t34KtmYb061550; Sat, 4 Apr 2015 20:55:48 GMT (envelope-from jpaetzel@FreeBSD.org) Received: (from jpaetzel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t34KtmQr061549; Sat, 4 Apr 2015 20:55:48 GMT (envelope-from jpaetzel@FreeBSD.org) Message-Id: <201504042055.t34KtmQr061549@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jpaetzel set sender to jpaetzel@FreeBSD.org using -f From: Josh Paetzel Date: Sat, 4 Apr 2015 20:55:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281084 - head/usr.sbin/ctld 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 Apr 2015 20:55:48 -0000 Author: jpaetzel Date: Sat Apr 4 20:55:47 2015 New Revision: 281084 URL: https://svnweb.freebsd.org/changeset/base/281084 Log: Fix thinko/copypaste error. When checking the length of the mutual secret password the variable for the secret password was used by mistake. This resulted in ctld never warning about the length of the mutual secret being wrong even if it was. MFC after: 3 days Sponsored by: iXsystems Modified: head/usr.sbin/ctld/ctld.c Modified: head/usr.sbin/ctld/ctld.c ============================================================================== --- head/usr.sbin/ctld/ctld.c Sat Apr 4 20:30:20 2015 (r281083) +++ head/usr.sbin/ctld/ctld.c Sat Apr 4 20:55:47 2015 (r281084) @@ -203,7 +203,7 @@ auth_check_secret_length(struct auth *au } if (auth->a_mutual_secret != NULL) { - len = strlen(auth->a_secret); + len = strlen(auth->a_mutual_secret); if (len > 16) { if (auth->a_auth_group->ag_name != NULL) log_warnx("mutual secret for user \"%s\", " From owner-svn-src-all@FreeBSD.ORG Sat Apr 4 21:34:50 2015 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 F19AD1F4; Sat, 4 Apr 2015 21:34: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 D804BEAD; Sat, 4 Apr 2015 21:34: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 t34LYnc5079721; Sat, 4 Apr 2015 21:34:49 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t34LYRWb079613; Sat, 4 Apr 2015 21:34:27 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504042134.t34LYRWb079613@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 4 Apr 2015 21:34:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281085 - in head/sys/arm: allwinner allwinner/a20 altera/socfpga broadcom/bcm2835 freescale/imx freescale/vybrid mv rockchip ti ti/am335x versatile 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 Apr 2015 21:34:50 -0000 Author: andrew Date: Sat Apr 4 21:34:26 2015 New Revision: 281085 URL: https://svnweb.freebsd.org/changeset/base/281085 Log: Stop using machine/fdt.h in the arm kernel code when we don't need it. Modified: head/sys/arm/allwinner/a10_clk.c head/sys/arm/allwinner/a10_common.c head/sys/arm/allwinner/a10_gpio.c head/sys/arm/allwinner/a10_sramc.c head/sys/arm/allwinner/a10_wdog.c head/sys/arm/allwinner/a20/a20_cpu_cfg.c head/sys/arm/allwinner/timer.c head/sys/arm/altera/socfpga/socfpga_gpio.c head/sys/arm/altera/socfpga/socfpga_manager.c head/sys/arm/broadcom/bcm2835/bcm2835_common.c head/sys/arm/broadcom/bcm2835/bcm2835_spi.c head/sys/arm/broadcom/bcm2835/bcm2835_systimer.c head/sys/arm/broadcom/bcm2835/bcm2835_wdog.c head/sys/arm/freescale/imx/imx51_ccm.c head/sys/arm/freescale/imx/imx51_ipuv3_fbd.c head/sys/arm/freescale/imx/imx6_anatop.c head/sys/arm/freescale/imx/imx6_audmux.c head/sys/arm/freescale/imx/imx6_sdma.c head/sys/arm/freescale/imx/imx6_ssi.c head/sys/arm/freescale/imx/imx_common.c head/sys/arm/freescale/imx/imx_gpt.c head/sys/arm/freescale/imx/imx_iomux.c head/sys/arm/freescale/imx/imx_wdog.c head/sys/arm/freescale/vybrid/vf_adc.c head/sys/arm/freescale/vybrid/vf_anadig.c head/sys/arm/freescale/vybrid/vf_ccm.c head/sys/arm/freescale/vybrid/vf_dmamux.c head/sys/arm/freescale/vybrid/vf_edma.c head/sys/arm/freescale/vybrid/vf_gpio.c head/sys/arm/freescale/vybrid/vf_i2c.c head/sys/arm/freescale/vybrid/vf_iomuxc.c head/sys/arm/freescale/vybrid/vf_mscm.c head/sys/arm/freescale/vybrid/vf_nfc.c head/sys/arm/freescale/vybrid/vf_port.c head/sys/arm/freescale/vybrid/vf_sai.c head/sys/arm/freescale/vybrid/vf_spi.c head/sys/arm/freescale/vybrid/vf_src.c head/sys/arm/freescale/vybrid/vf_tcon.c head/sys/arm/freescale/vybrid/vf_uart.c head/sys/arm/mv/gpio.c head/sys/arm/mv/mv_ts.c head/sys/arm/rockchip/rk30xx_common.c head/sys/arm/rockchip/rk30xx_gpio.c head/sys/arm/rockchip/rk30xx_grf.c head/sys/arm/rockchip/rk30xx_pmu.c head/sys/arm/ti/am335x/am335x_dmtimer.c head/sys/arm/ti/am335x/am335x_prcm.c head/sys/arm/ti/ti_common.c head/sys/arm/ti/ti_mbox.c head/sys/arm/ti/ti_pruss.c head/sys/arm/ti/ti_wdt.c head/sys/arm/versatile/pl050.c head/sys/arm/versatile/sp804.c head/sys/arm/versatile/versatile_clcd.c head/sys/arm/versatile/versatile_common.c head/sys/arm/versatile/versatile_timer.c Modified: head/sys/arm/allwinner/a10_clk.c ============================================================================== --- head/sys/arm/allwinner/a10_clk.c Sat Apr 4 20:55:47 2015 (r281084) +++ head/sys/arm/allwinner/a10_clk.c Sat Apr 4 21:34:26 2015 (r281085) @@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include "a10_clk.h" Modified: head/sys/arm/allwinner/a10_common.c ============================================================================== --- head/sys/arm/allwinner/a10_common.c Sat Apr 4 20:55:47 2015 (r281084) +++ head/sys/arm/allwinner/a10_common.c Sat Apr 4 21:34:26 2015 (r281085) @@ -36,7 +36,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include struct fdt_fixup_entry fdt_fixup_table[] = { Modified: head/sys/arm/allwinner/a10_gpio.c ============================================================================== --- head/sys/arm/allwinner/a10_gpio.c Sat Apr 4 20:55:47 2015 (r281084) +++ head/sys/arm/allwinner/a10_gpio.c Sat Apr 4 21:34:26 2015 (r281085) @@ -44,7 +44,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include Modified: head/sys/arm/allwinner/a10_sramc.c ============================================================================== --- head/sys/arm/allwinner/a10_sramc.c Sat Apr 4 20:55:47 2015 (r281084) +++ head/sys/arm/allwinner/a10_sramc.c Sat Apr 4 21:34:26 2015 (r281085) @@ -43,7 +43,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include Modified: head/sys/arm/allwinner/a10_wdog.c ============================================================================== --- head/sys/arm/allwinner/a10_wdog.c Sat Apr 4 20:55:47 2015 (r281084) +++ head/sys/arm/allwinner/a10_wdog.c Sat Apr 4 21:34:26 2015 (r281085) @@ -44,7 +44,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include Modified: head/sys/arm/allwinner/a20/a20_cpu_cfg.c ============================================================================== --- head/sys/arm/allwinner/a20/a20_cpu_cfg.c Sat Apr 4 20:55:47 2015 (r281084) +++ head/sys/arm/allwinner/a20/a20_cpu_cfg.c Sat Apr 4 21:34:26 2015 (r281085) @@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include "a20_cpu_cfg.h" Modified: head/sys/arm/allwinner/timer.c ============================================================================== --- head/sys/arm/allwinner/timer.c Sat Apr 4 20:55:47 2015 (r281084) +++ head/sys/arm/allwinner/timer.c Sat Apr 4 21:34:26 2015 (r281085) @@ -47,7 +47,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include Modified: head/sys/arm/altera/socfpga/socfpga_gpio.c ============================================================================== --- head/sys/arm/altera/socfpga/socfpga_gpio.c Sat Apr 4 20:55:47 2015 (r281084) +++ head/sys/arm/altera/socfpga/socfpga_gpio.c Sat Apr 4 21:34:26 2015 (r281085) @@ -61,7 +61,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include Modified: head/sys/arm/altera/socfpga/socfpga_manager.c ============================================================================== --- head/sys/arm/altera/socfpga/socfpga_manager.c Sat Apr 4 20:55:47 2015 (r281084) +++ head/sys/arm/altera/socfpga/socfpga_manager.c Sat Apr 4 21:34:26 2015 (r281085) @@ -54,7 +54,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include Modified: head/sys/arm/broadcom/bcm2835/bcm2835_common.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_common.c Sat Apr 4 20:55:47 2015 (r281084) +++ head/sys/arm/broadcom/bcm2835/bcm2835_common.c Sat Apr 4 21:34:26 2015 (r281085) @@ -44,7 +44,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include struct fdt_fixup_entry fdt_fixup_table[] = { Modified: head/sys/arm/broadcom/bcm2835/bcm2835_spi.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_spi.c Sat Apr 4 20:55:47 2015 (r281084) +++ head/sys/arm/broadcom/bcm2835/bcm2835_spi.c Sat Apr 4 21:34:26 2015 (r281085) @@ -43,7 +43,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include Modified: head/sys/arm/broadcom/bcm2835/bcm2835_systimer.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_systimer.c Sat Apr 4 20:55:47 2015 (r281084) +++ head/sys/arm/broadcom/bcm2835/bcm2835_systimer.c Sat Apr 4 21:34:26 2015 (r281085) @@ -48,7 +48,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #define BCM2835_NUM_TIMERS 4 Modified: head/sys/arm/broadcom/bcm2835/bcm2835_wdog.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_wdog.c Sat Apr 4 20:55:47 2015 (r281084) +++ head/sys/arm/broadcom/bcm2835/bcm2835_wdog.c Sat Apr 4 21:34:26 2015 (r281085) @@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include Modified: head/sys/arm/freescale/imx/imx51_ccm.c ============================================================================== --- head/sys/arm/freescale/imx/imx51_ccm.c Sat Apr 4 20:55:47 2015 (r281084) +++ head/sys/arm/freescale/imx/imx51_ccm.c Sat Apr 4 21:34:26 2015 (r281085) @@ -78,7 +78,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include Modified: head/sys/arm/freescale/imx/imx51_ipuv3_fbd.c ============================================================================== --- head/sys/arm/freescale/imx/imx51_ipuv3_fbd.c Sat Apr 4 20:55:47 2015 (r281084) +++ head/sys/arm/freescale/imx/imx51_ipuv3_fbd.c Sat Apr 4 21:34:26 2015 (r281085) @@ -57,7 +57,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/arm/freescale/imx/imx6_anatop.c ============================================================================== --- head/sys/arm/freescale/imx/imx6_anatop.c Sat Apr 4 20:55:47 2015 (r281084) +++ head/sys/arm/freescale/imx/imx6_anatop.c Sat Apr 4 21:34:26 2015 (r281085) @@ -67,7 +67,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include Modified: head/sys/arm/freescale/imx/imx6_audmux.c ============================================================================== --- head/sys/arm/freescale/imx/imx6_audmux.c Sat Apr 4 20:55:47 2015 (r281084) +++ head/sys/arm/freescale/imx/imx6_audmux.c Sat Apr 4 21:34:26 2015 (r281085) @@ -50,7 +50,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include Modified: head/sys/arm/freescale/imx/imx6_sdma.c ============================================================================== --- head/sys/arm/freescale/imx/imx6_sdma.c Sat Apr 4 20:55:47 2015 (r281084) +++ head/sys/arm/freescale/imx/imx6_sdma.c Sat Apr 4 21:34:26 2015 (r281085) @@ -55,7 +55,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include Modified: head/sys/arm/freescale/imx/imx6_ssi.c ============================================================================== --- head/sys/arm/freescale/imx/imx6_ssi.c Sat Apr 4 20:55:47 2015 (r281084) +++ head/sys/arm/freescale/imx/imx6_ssi.c Sat Apr 4 21:34:26 2015 (r281085) @@ -54,7 +54,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include Modified: head/sys/arm/freescale/imx/imx_common.c ============================================================================== --- head/sys/arm/freescale/imx/imx_common.c Sat Apr 4 20:55:47 2015 (r281084) +++ head/sys/arm/freescale/imx/imx_common.c Sat Apr 4 21:34:26 2015 (r281085) @@ -48,7 +48,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include struct fdt_fixup_entry fdt_fixup_table[] = { Modified: head/sys/arm/freescale/imx/imx_gpt.c ============================================================================== --- head/sys/arm/freescale/imx/imx_gpt.c Sat Apr 4 20:55:47 2015 (r281084) +++ head/sys/arm/freescale/imx/imx_gpt.c Sat Apr 4 21:34:26 2015 (r281085) @@ -44,7 +44,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include Modified: head/sys/arm/freescale/imx/imx_iomux.c ============================================================================== --- head/sys/arm/freescale/imx/imx_iomux.c Sat Apr 4 20:55:47 2015 (r281084) +++ head/sys/arm/freescale/imx/imx_iomux.c Sat Apr 4 21:34:26 2015 (r281085) @@ -58,7 +58,6 @@ #include #include -#include #include #include Modified: head/sys/arm/freescale/imx/imx_wdog.c ============================================================================== --- head/sys/arm/freescale/imx/imx_wdog.c Sat Apr 4 20:55:47 2015 (r281084) +++ head/sys/arm/freescale/imx/imx_wdog.c Sat Apr 4 21:34:26 2015 (r281085) @@ -47,7 +47,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include Modified: head/sys/arm/freescale/vybrid/vf_adc.c ============================================================================== --- head/sys/arm/freescale/vybrid/vf_adc.c Sat Apr 4 20:55:47 2015 (r281084) +++ head/sys/arm/freescale/vybrid/vf_adc.c Sat Apr 4 21:34:26 2015 (r281085) @@ -48,7 +48,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include Modified: head/sys/arm/freescale/vybrid/vf_anadig.c ============================================================================== --- head/sys/arm/freescale/vybrid/vf_anadig.c Sat Apr 4 20:55:47 2015 (r281084) +++ head/sys/arm/freescale/vybrid/vf_anadig.c Sat Apr 4 21:34:26 2015 (r281085) @@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include Modified: head/sys/arm/freescale/vybrid/vf_ccm.c ============================================================================== --- head/sys/arm/freescale/vybrid/vf_ccm.c Sat Apr 4 20:55:47 2015 (r281084) +++ head/sys/arm/freescale/vybrid/vf_ccm.c Sat Apr 4 21:34:26 2015 (r281085) @@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include Modified: head/sys/arm/freescale/vybrid/vf_dmamux.c ============================================================================== --- head/sys/arm/freescale/vybrid/vf_dmamux.c Sat Apr 4 20:55:47 2015 (r281084) +++ head/sys/arm/freescale/vybrid/vf_dmamux.c Sat Apr 4 21:34:26 2015 (r281085) @@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include Modified: head/sys/arm/freescale/vybrid/vf_edma.c ============================================================================== --- head/sys/arm/freescale/vybrid/vf_edma.c Sat Apr 4 20:55:47 2015 (r281084) +++ head/sys/arm/freescale/vybrid/vf_edma.c Sat Apr 4 21:34:26 2015 (r281085) @@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include Modified: head/sys/arm/freescale/vybrid/vf_gpio.c ============================================================================== --- head/sys/arm/freescale/vybrid/vf_gpio.c Sat Apr 4 20:55:47 2015 (r281084) +++ head/sys/arm/freescale/vybrid/vf_gpio.c Sat Apr 4 21:34:26 2015 (r281085) @@ -52,7 +52,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include Modified: head/sys/arm/freescale/vybrid/vf_i2c.c ============================================================================== --- head/sys/arm/freescale/vybrid/vf_i2c.c Sat Apr 4 20:55:47 2015 (r281084) +++ head/sys/arm/freescale/vybrid/vf_i2c.c Sat Apr 4 21:34:26 2015 (r281085) @@ -57,7 +57,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include Modified: head/sys/arm/freescale/vybrid/vf_iomuxc.c ============================================================================== --- head/sys/arm/freescale/vybrid/vf_iomuxc.c Sat Apr 4 20:55:47 2015 (r281084) +++ head/sys/arm/freescale/vybrid/vf_iomuxc.c Sat Apr 4 21:34:26 2015 (r281085) @@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include Modified: head/sys/arm/freescale/vybrid/vf_mscm.c ============================================================================== --- head/sys/arm/freescale/vybrid/vf_mscm.c Sat Apr 4 20:55:47 2015 (r281084) +++ head/sys/arm/freescale/vybrid/vf_mscm.c Sat Apr 4 21:34:26 2015 (r281085) @@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include Modified: head/sys/arm/freescale/vybrid/vf_nfc.c ============================================================================== --- head/sys/arm/freescale/vybrid/vf_nfc.c Sat Apr 4 20:55:47 2015 (r281084) +++ head/sys/arm/freescale/vybrid/vf_nfc.c Sat Apr 4 21:34:26 2015 (r281085) @@ -51,7 +51,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include "nfc_if.h" Modified: head/sys/arm/freescale/vybrid/vf_port.c ============================================================================== --- head/sys/arm/freescale/vybrid/vf_port.c Sat Apr 4 20:55:47 2015 (r281084) +++ head/sys/arm/freescale/vybrid/vf_port.c Sat Apr 4 21:34:26 2015 (r281085) @@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include Modified: head/sys/arm/freescale/vybrid/vf_sai.c ============================================================================== --- head/sys/arm/freescale/vybrid/vf_sai.c Sat Apr 4 20:55:47 2015 (r281084) +++ head/sys/arm/freescale/vybrid/vf_sai.c Sat Apr 4 21:34:26 2015 (r281085) @@ -53,7 +53,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include Modified: head/sys/arm/freescale/vybrid/vf_spi.c ============================================================================== --- head/sys/arm/freescale/vybrid/vf_spi.c Sat Apr 4 20:55:47 2015 (r281084) +++ head/sys/arm/freescale/vybrid/vf_spi.c Sat Apr 4 21:34:26 2015 (r281085) @@ -54,7 +54,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include Modified: head/sys/arm/freescale/vybrid/vf_src.c ============================================================================== --- head/sys/arm/freescale/vybrid/vf_src.c Sat Apr 4 20:55:47 2015 (r281084) +++ head/sys/arm/freescale/vybrid/vf_src.c Sat Apr 4 21:34:26 2015 (r281085) @@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include Modified: head/sys/arm/freescale/vybrid/vf_tcon.c ============================================================================== --- head/sys/arm/freescale/vybrid/vf_tcon.c Sat Apr 4 20:55:47 2015 (r281084) +++ head/sys/arm/freescale/vybrid/vf_tcon.c Sat Apr 4 21:34:26 2015 (r281085) @@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include Modified: head/sys/arm/freescale/vybrid/vf_uart.c ============================================================================== --- head/sys/arm/freescale/vybrid/vf_uart.c Sat Apr 4 20:55:47 2015 (r281084) +++ head/sys/arm/freescale/vybrid/vf_uart.c Sat Apr 4 21:34:26 2015 (r281085) @@ -40,7 +40,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include Modified: head/sys/arm/mv/gpio.c ============================================================================== --- head/sys/arm/mv/gpio.c Sat Apr 4 20:55:47 2015 (r281084) +++ head/sys/arm/mv/gpio.c Sat Apr 4 21:34:26 2015 (r281085) @@ -44,7 +44,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include Modified: head/sys/arm/mv/mv_ts.c ============================================================================== --- head/sys/arm/mv/mv_ts.c Sat Apr 4 20:55:47 2015 (r281084) +++ head/sys/arm/mv/mv_ts.c Sat Apr 4 21:34:26 2015 (r281085) @@ -35,7 +35,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include Modified: head/sys/arm/rockchip/rk30xx_common.c ============================================================================== --- head/sys/arm/rockchip/rk30xx_common.c Sat Apr 4 20:55:47 2015 (r281084) +++ head/sys/arm/rockchip/rk30xx_common.c Sat Apr 4 21:34:26 2015 (r281085) @@ -36,7 +36,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include struct fdt_fixup_entry fdt_fixup_table[] = { Modified: head/sys/arm/rockchip/rk30xx_gpio.c ============================================================================== --- head/sys/arm/rockchip/rk30xx_gpio.c Sat Apr 4 20:55:47 2015 (r281084) +++ head/sys/arm/rockchip/rk30xx_gpio.c Sat Apr 4 21:34:26 2015 (r281085) @@ -44,7 +44,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include Modified: head/sys/arm/rockchip/rk30xx_grf.c ============================================================================== --- head/sys/arm/rockchip/rk30xx_grf.c Sat Apr 4 20:55:47 2015 (r281084) +++ head/sys/arm/rockchip/rk30xx_grf.c Sat Apr 4 21:34:26 2015 (r281085) @@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include "rk30xx_grf.h" Modified: head/sys/arm/rockchip/rk30xx_pmu.c ============================================================================== --- head/sys/arm/rockchip/rk30xx_pmu.c Sat Apr 4 20:55:47 2015 (r281084) +++ head/sys/arm/rockchip/rk30xx_pmu.c Sat Apr 4 21:34:26 2015 (r281085) @@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include "rk30xx_pmu.h" Modified: head/sys/arm/ti/am335x/am335x_dmtimer.c ============================================================================== --- head/sys/arm/ti/am335x/am335x_dmtimer.c Sat Apr 4 20:55:47 2015 (r281084) +++ head/sys/arm/ti/am335x/am335x_dmtimer.c Sat Apr 4 21:34:26 2015 (r281085) @@ -52,7 +52,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include Modified: head/sys/arm/ti/am335x/am335x_prcm.c ============================================================================== --- head/sys/arm/ti/am335x/am335x_prcm.c Sat Apr 4 20:55:47 2015 (r281084) +++ head/sys/arm/ti/am335x/am335x_prcm.c Sat Apr 4 21:34:26 2015 (r281085) @@ -51,7 +51,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #define CM_PER 0 #define CM_PER_L4LS_CLKSTCTRL (CM_PER + 0x000) Modified: head/sys/arm/ti/ti_common.c ============================================================================== --- head/sys/arm/ti/ti_common.c Sat Apr 4 20:55:47 2015 (r281084) +++ head/sys/arm/ti/ti_common.c Sat Apr 4 21:34:26 2015 (r281085) @@ -44,7 +44,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include struct fdt_fixup_entry fdt_fixup_table[] = { Modified: head/sys/arm/ti/ti_mbox.c ============================================================================== --- head/sys/arm/ti/ti_mbox.c Sat Apr 4 20:55:47 2015 (r281084) +++ head/sys/arm/ti/ti_mbox.c Sat Apr 4 21:34:26 2015 (r281085) @@ -47,7 +47,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include Modified: head/sys/arm/ti/ti_pruss.c ============================================================================== --- head/sys/arm/ti/ti_pruss.c Sat Apr 4 20:55:47 2015 (r281084) +++ head/sys/arm/ti/ti_pruss.c Sat Apr 4 21:34:26 2015 (r281085) @@ -47,7 +47,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include Modified: head/sys/arm/ti/ti_wdt.c ============================================================================== --- head/sys/arm/ti/ti_wdt.c Sat Apr 4 20:55:47 2015 (r281084) +++ head/sys/arm/ti/ti_wdt.c Sat Apr 4 21:34:26 2015 (r281085) @@ -48,7 +48,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include Modified: head/sys/arm/versatile/pl050.c ============================================================================== --- head/sys/arm/versatile/pl050.c Sat Apr 4 20:55:47 2015 (r281084) +++ head/sys/arm/versatile/pl050.c Sat Apr 4 21:34:26 2015 (r281085) @@ -57,7 +57,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include Modified: head/sys/arm/versatile/sp804.c ============================================================================== --- head/sys/arm/versatile/sp804.c Sat Apr 4 20:55:47 2015 (r281084) +++ head/sys/arm/versatile/sp804.c Sat Apr 4 21:34:26 2015 (r281085) @@ -48,7 +48,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #define SP804_TIMER1_LOAD 0x00 #define SP804_TIMER1_VALUE 0x04 Modified: head/sys/arm/versatile/versatile_clcd.c ============================================================================== --- head/sys/arm/versatile/versatile_clcd.c Sat Apr 4 20:55:47 2015 (r281084) +++ head/sys/arm/versatile/versatile_clcd.c Sat Apr 4 21:34:26 2015 (r281085) @@ -51,7 +51,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #define PL110_VENDOR_ARM926PXP 1 Modified: head/sys/arm/versatile/versatile_common.c ============================================================================== --- head/sys/arm/versatile/versatile_common.c Sat Apr 4 20:55:47 2015 (r281084) +++ head/sys/arm/versatile/versatile_common.c Sat Apr 4 21:34:26 2015 (r281085) @@ -44,7 +44,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include struct fdt_fixup_entry fdt_fixup_table[] = { Modified: head/sys/arm/versatile/versatile_timer.c ============================================================================== --- head/sys/arm/versatile/versatile_timer.c Sat Apr 4 20:55:47 2015 (r281084) +++ head/sys/arm/versatile/versatile_timer.c Sat Apr 4 21:34:26 2015 (r281085) @@ -47,7 +47,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include void cpu_initclocks(void) From owner-svn-src-all@FreeBSD.ORG Sat Apr 4 21:47:56 2015 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 168985A4; Sat, 4 Apr 2015 21:47: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 019C4F82; Sat, 4 Apr 2015 21:47: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 t34LltAZ084426; Sat, 4 Apr 2015 21:47:55 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t34LltiZ084425; Sat, 4 Apr 2015 21:47:55 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201504042147.t34LltiZ084425@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sat, 4 Apr 2015 21:47:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281086 - 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 Apr 2015 21:47:56 -0000 Author: jilles Date: Sat Apr 4 21:47:54 2015 New Revision: 281086 URL: https://svnweb.freebsd.org/changeset/base/281086 Log: utimensat: Correct Capsicum required capability rights. Modified: head/sys/kern/vfs_syscalls.c Modified: head/sys/kern/vfs_syscalls.c ============================================================================== --- head/sys/kern/vfs_syscalls.c Sat Apr 4 21:34:26 2015 (r281085) +++ head/sys/kern/vfs_syscalls.c Sat Apr 4 21:47:54 2015 (r281086) @@ -3294,6 +3294,7 @@ kern_utimensat(struct thread *td, int fd { struct nameidata nd; struct timespec ts[2]; + cap_rights_t rights; int error, flags; if (flag & ~AT_SYMLINK_NOFOLLOW) @@ -3301,8 +3302,9 @@ kern_utimensat(struct thread *td, int fd if ((error = getutimens(tptr, tptrseg, ts, &flags)) != 0) return (error); - NDINIT_AT(&nd, LOOKUP, ((flag & AT_SYMLINK_NOFOLLOW) ? NOFOLLOW : - FOLLOW) | AUDITVNODE1, pathseg, path, fd, td); + NDINIT_ATRIGHTS(&nd, LOOKUP, ((flag & AT_SYMLINK_NOFOLLOW) ? NOFOLLOW : + FOLLOW) | AUDITVNODE1, pathseg, path, fd, + cap_rights_init(&rights, CAP_FUTIMES), td); if ((error = namei(&nd)) != 0) return (error); /* From owner-svn-src-all@FreeBSD.ORG Sat Apr 4 22:05:45 2015 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 A9FB0A74; Sat, 4 Apr 2015 22:05: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 9599C182; Sat, 4 Apr 2015 22:05: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 t34M5jgU093370; Sat, 4 Apr 2015 22:05:45 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t34M5iAr093367; Sat, 4 Apr 2015 22:05:44 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504042205.t34M5iAr093367@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 4 Apr 2015 22:05:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281087 - in head/sys/arm: include mv 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 Apr 2015 22:05:45 -0000 Author: andrew Date: Sat Apr 4 22:05:43 2015 New Revision: 281087 URL: https://svnweb.freebsd.org/changeset/base/281087 Log: Move the definition of fdt_localbus_devmap to a Marvell specific file as it's only used there. Modified: head/sys/arm/include/fdt.h head/sys/arm/mv/mv_localbus.c head/sys/arm/mv/mvvar.h Modified: head/sys/arm/include/fdt.h ============================================================================== --- head/sys/arm/include/fdt.h Sat Apr 4 21:47:54 2015 (r281086) +++ head/sys/arm/include/fdt.h Sat Apr 4 22:05:43 2015 (r281087) @@ -51,8 +51,4 @@ */ extern bus_space_tag_t fdtbus_bs_tag; -struct arm_devmap_entry; - -int fdt_localbus_devmap(phandle_t, struct arm_devmap_entry *, int, int *); - #endif /* _MACHINE_FDT_H_ */ Modified: head/sys/arm/mv/mv_localbus.c ============================================================================== --- head/sys/arm/mv/mv_localbus.c Sat Apr 4 21:47:54 2015 (r281086) +++ head/sys/arm/mv/mv_localbus.c Sat Apr 4 22:05:43 2015 (r281087) @@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$"); #include "dev/fdt/fdt_common.h" #include "ofw_bus_if.h" +#include #include #ifdef DEBUG Modified: head/sys/arm/mv/mvvar.h ============================================================================== --- head/sys/arm/mv/mvvar.h Sat Apr 4 21:47:54 2015 (r281086) +++ head/sys/arm/mv/mvvar.h Sat Apr 4 22:05:43 2015 (r281087) @@ -140,5 +140,6 @@ struct arm_devmap_entry; int mv_pci_devmap(phandle_t, struct arm_devmap_entry *, vm_offset_t, vm_offset_t); +int fdt_localbus_devmap(phandle_t, struct arm_devmap_entry *, int, int *); #endif /* _MVVAR_H_ */ From owner-svn-src-all@FreeBSD.ORG Sat Apr 4 22:11:40 2015 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 ED7B3D6A; Sat, 4 Apr 2015 22:11: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 CEEB11BD; Sat, 4 Apr 2015 22:11: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 t34MBd8q097599; Sat, 4 Apr 2015 22:11:39 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t34MBcnr097596; Sat, 4 Apr 2015 22:11:38 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201504042211.t34MBcnr097596@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 Apr 2015 22:11:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281088 - head/sys/dev/iscsi 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 Apr 2015 22:11:40 -0000 Author: trasz Date: Sat Apr 4 22:11:38 2015 New Revision: 281088 URL: https://svnweb.freebsd.org/changeset/base/281088 Log: Remove icl_conn_connected(); was unused. MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/iscsi/icl_conn_if.m head/sys/dev/iscsi/icl_soft.c head/sys/dev/iscsi/icl_wrappers.h Modified: head/sys/dev/iscsi/icl_conn_if.m ============================================================================== --- head/sys/dev/iscsi/icl_conn_if.m Sat Apr 4 22:05:43 2015 (r281087) +++ head/sys/dev/iscsi/icl_conn_if.m Sat Apr 4 22:11:38 2015 (r281088) @@ -82,10 +82,6 @@ METHOD void close { struct icl_conn *_ic; }; -METHOD bool connected { - struct icl_conn *_ic; -}; - METHOD int task_setup { struct icl_conn *_ic; struct ccb_scsiio *_csio; Modified: head/sys/dev/iscsi/icl_soft.c ============================================================================== --- head/sys/dev/iscsi/icl_soft.c Sat Apr 4 22:05:43 2015 (r281087) +++ head/sys/dev/iscsi/icl_soft.c Sat Apr 4 22:11:38 2015 (r281088) @@ -97,7 +97,6 @@ static icl_conn_pdu_queue_t icl_soft_con static icl_conn_handoff_t icl_soft_conn_handoff; static icl_conn_free_t icl_soft_conn_free; static icl_conn_close_t icl_soft_conn_close; -static icl_conn_connected_t icl_soft_conn_connected; static icl_conn_task_setup_t icl_soft_conn_task_setup; static icl_conn_task_done_t icl_soft_conn_task_done; static icl_conn_transfer_setup_t icl_soft_conn_transfer_setup; @@ -114,7 +113,6 @@ static kobj_method_t icl_soft_methods[] KOBJMETHOD(icl_conn_handoff, icl_soft_conn_handoff), KOBJMETHOD(icl_conn_free, icl_soft_conn_free), KOBJMETHOD(icl_conn_close, icl_soft_conn_close), - KOBJMETHOD(icl_conn_connected, icl_soft_conn_connected), KOBJMETHOD(icl_conn_task_setup, icl_soft_conn_task_setup), KOBJMETHOD(icl_conn_task_done, icl_soft_conn_task_done), KOBJMETHOD(icl_conn_transfer_setup, icl_soft_conn_transfer_setup), @@ -1425,24 +1423,6 @@ icl_soft_conn_close(struct icl_conn *ic) ICL_CONN_UNLOCK(ic); } -bool -icl_soft_conn_connected(struct icl_conn *ic) -{ - ICL_CONN_LOCK_ASSERT_NOT(ic); - - ICL_CONN_LOCK(ic); - if (ic->ic_socket == NULL) { - ICL_CONN_UNLOCK(ic); - return (false); - } - if (ic->ic_socket->so_error != 0) { - ICL_CONN_UNLOCK(ic); - return (false); - } - ICL_CONN_UNLOCK(ic); - return (true); -} - int icl_soft_conn_task_setup(struct icl_conn *ic, struct ccb_scsiio *csio, uint32_t *task_tagp, void **prvp) Modified: head/sys/dev/iscsi/icl_wrappers.h ============================================================================== --- head/sys/dev/iscsi/icl_wrappers.h Sat Apr 4 22:05:43 2015 (r281087) +++ head/sys/dev/iscsi/icl_wrappers.h Sat Apr 4 22:11:38 2015 (r281088) @@ -105,13 +105,6 @@ icl_conn_close(struct icl_conn *ic) ICL_CONN_CLOSE(ic); } -static inline bool -icl_conn_connected(struct icl_conn *ic) -{ - - return (ICL_CONN_CONNECTED(ic)); -} - static inline int icl_conn_task_setup(struct icl_conn *ic, struct ccb_scsiio *csio, uint32_t *task_tagp, void **prvp) From owner-svn-src-all@FreeBSD.ORG Sat Apr 4 22:22:07 2015 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 19F1823F; Sat, 4 Apr 2015 22:22: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 DFA6137D; Sat, 4 Apr 2015 22:22: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 t34MM62S002565; Sat, 4 Apr 2015 22:22:06 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t34MM5x9002559; Sat, 4 Apr 2015 22:22:05 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504042222.t34MM5x9002559@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 4 Apr 2015 22:22:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281089 - in head/sys/arm: 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: Sat, 04 Apr 2015 22:22:07 -0000 Author: andrew Date: Sat Apr 4 22:22:04 2015 New Revision: 281089 URL: https://svnweb.freebsd.org/changeset/base/281089 Log: Don't include unneeded files in the arm machine/fdt.h. While here, remove it from more files. Modified: head/sys/arm/arm/intr.c head/sys/arm/arm/mpcore_timer.c head/sys/arm/arm/pmu.c head/sys/arm/include/fdt.h Modified: head/sys/arm/arm/intr.c ============================================================================== --- head/sys/arm/arm/intr.c Sat Apr 4 22:11:38 2015 (r281088) +++ head/sys/arm/arm/intr.c Sat Apr 4 22:22:04 2015 (r281089) @@ -55,6 +55,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include Modified: head/sys/arm/arm/mpcore_timer.c ============================================================================== --- head/sys/arm/arm/mpcore_timer.c Sat Apr 4 22:11:38 2015 (r281088) +++ head/sys/arm/arm/mpcore_timer.c Sat Apr 4 22:22:04 2015 (r281089) @@ -65,7 +65,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include Modified: head/sys/arm/arm/pmu.c ============================================================================== --- head/sys/arm/arm/pmu.c Sat Apr 4 22:11:38 2015 (r281088) +++ head/sys/arm/arm/pmu.c Sat Apr 4 22:22:04 2015 (r281089) @@ -55,7 +55,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include Modified: head/sys/arm/include/fdt.h ============================================================================== --- head/sys/arm/include/fdt.h Sat Apr 4 22:11:38 2015 (r281088) +++ head/sys/arm/include/fdt.h Sat Apr 4 22:22:04 2015 (r281089) @@ -34,12 +34,6 @@ #include -#include -#include - -#include -#include - /* Max interrupt number */ #define FDT_INTR_MAX NIRQ From owner-svn-src-all@FreeBSD.ORG Sat Apr 4 22:37:13 2015 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 C07436E7; Sat, 4 Apr 2015 22:37: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 AC7696AB; Sat, 4 Apr 2015 22:37: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 t34MbDVj007975; Sat, 4 Apr 2015 22:37:13 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t34MbD6h007974; Sat, 4 Apr 2015 22:37:13 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201504042237.t34MbD6h007974@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sat, 4 Apr 2015 22:37:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r281090 - 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 Apr 2015 22:37:13 -0000 Author: eadler Date: Sat Apr 4 22:37:12 2015 New Revision: 281090 URL: https://svnweb.freebsd.org/changeset/base/281090 Log: Fix typo typo Approved by: core (implicit) Modified: svnadmin/conf/access Modified: svnadmin/conf/access ============================================================================== --- svnadmin/conf/access Sat Apr 4 22:22:04 2015 (r281089) +++ svnadmin/conf/access Sat Apr 4 22:37:12 2015 (r281090) @@ -1,7 +1,7 @@ # $FreeBSD$ # # Please try to keep the handbook (contrib/chapter.sgml authors.ent -# staff/chapter.sgml) in in sync with this. +# staff/chapter.sgml) in sync with this. # # KEEP ALPHABETICALLY SORTED!!! # KEEP ALPHABETICALLY SORTED!!! From owner-svn-src-all@FreeBSD.ORG Sat Apr 4 23:00:38 2015 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 2226BC2C; Sat, 4 Apr 2015 23:00: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 0E68E8F5; Sat, 4 Apr 2015 23:00: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 t34N0bS6017969; Sat, 4 Apr 2015 23:00:37 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t34N0bE3017968; Sat, 4 Apr 2015 23:00:37 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504042300.t34N0bE3017968@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 4 Apr 2015 23:00:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281091 - head/sys/arm/at91 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 Apr 2015 23:00:38 -0000 Author: andrew Date: Sat Apr 4 23:00:37 2015 New Revision: 281091 URL: https://svnweb.freebsd.org/changeset/base/281091 Log: Include machine/intr.h for arm_post_filter. Modified: head/sys/arm/at91/at91_common.c Modified: head/sys/arm/at91/at91_common.c ============================================================================== --- head/sys/arm/at91/at91_common.c Sat Apr 4 22:37:12 2015 (r281090) +++ head/sys/arm/at91/at91_common.c Sat Apr 4 23:00:37 2015 (r281091) @@ -29,15 +29,22 @@ __FBSDID("$FreeBSD$"); #define _ARM32_BUS_DMA_PRIVATE #include #include +#include + #include + #include +#include #include #include + #include #include #include + #include #include + #include extern const struct arm_devmap_entry at91_devmap[]; From owner-svn-src-all@FreeBSD.ORG Sat Apr 4 23:03:17 2015 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 A18B3D9C; Sat, 4 Apr 2015 23: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 83203999; Sat, 4 Apr 2015 23: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 t34N3Hox021762; Sat, 4 Apr 2015 23:03:17 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t34N3CqK021742; Sat, 4 Apr 2015 23:03:12 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504042303.t34N3CqK021742@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 4 Apr 2015 23:03:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281092 - in head/sys/arm: allwinner/a20 altera/socfpga amlogic/aml8726 broadcom/bcm2835 freescale/imx freescale/vybrid mv/armadaxp rockchip samsung/exynos ti/omap4 versatile xilinx 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 Apr 2015 23:03:17 -0000 Author: andrew Date: Sat Apr 4 23:03:11 2015 New Revision: 281092 URL: https://svnweb.freebsd.org/changeset/base/281092 Log: Include vm/pmap.h for pmap_kextract. Modified: head/sys/arm/allwinner/a20/a20_mp.c head/sys/arm/altera/socfpga/socfpga_mp.c head/sys/arm/amlogic/aml8726/aml8726_fb.c head/sys/arm/amlogic/aml8726/aml8726_mp.c head/sys/arm/broadcom/bcm2835/bcm2835_fbd.c head/sys/arm/freescale/imx/imx51_ipuv3.c head/sys/arm/freescale/imx/imx6_mp.c head/sys/arm/freescale/vybrid/vf_dcu4.c head/sys/arm/mv/armadaxp/armadaxp_mp.c head/sys/arm/rockchip/rk30xx_mp.c head/sys/arm/samsung/exynos/exynos5_mp.c head/sys/arm/ti/omap4/omap4_mp.c head/sys/arm/versatile/versatile_pci.c head/sys/arm/xilinx/zy7_mp.c Modified: head/sys/arm/allwinner/a20/a20_mp.c ============================================================================== --- head/sys/arm/allwinner/a20/a20_mp.c Sat Apr 4 23:00:37 2015 (r281091) +++ head/sys/arm/allwinner/a20/a20_mp.c Sat Apr 4 23:03:11 2015 (r281092) @@ -33,6 +33,9 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include + #include #include #include Modified: head/sys/arm/altera/socfpga/socfpga_mp.c ============================================================================== --- head/sys/arm/altera/socfpga/socfpga_mp.c Sat Apr 4 23:00:37 2015 (r281091) +++ head/sys/arm/altera/socfpga/socfpga_mp.c Sat Apr 4 23:03:11 2015 (r281092) @@ -38,6 +38,9 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include + #include #include #include Modified: head/sys/arm/amlogic/aml8726/aml8726_fb.c ============================================================================== --- head/sys/arm/amlogic/aml8726/aml8726_fb.c Sat Apr 4 23:00:37 2015 (r281091) +++ head/sys/arm/amlogic/aml8726/aml8726_fb.c Sat Apr 4 23:03:11 2015 (r281092) @@ -49,6 +49,9 @@ __FBSDID("$FreeBSD$"); #include +#include +#include + #include #include #include Modified: head/sys/arm/amlogic/aml8726/aml8726_mp.c ============================================================================== --- head/sys/arm/amlogic/aml8726/aml8726_mp.c Sat Apr 4 23:00:37 2015 (r281091) +++ head/sys/arm/amlogic/aml8726/aml8726_mp.c Sat Apr 4 23:03:11 2015 (r281092) @@ -50,6 +50,9 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include + #include #include #include Modified: head/sys/arm/broadcom/bcm2835/bcm2835_fbd.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_fbd.c Sat Apr 4 23:00:37 2015 (r281091) +++ head/sys/arm/broadcom/bcm2835/bcm2835_fbd.c Sat Apr 4 23:03:11 2015 (r281092) @@ -53,6 +53,9 @@ __FBSDID("$FreeBSD$"); #include +#include +#include + #include #include #include Modified: head/sys/arm/freescale/imx/imx51_ipuv3.c ============================================================================== --- head/sys/arm/freescale/imx/imx51_ipuv3.c Sat Apr 4 23:00:37 2015 (r281091) +++ head/sys/arm/freescale/imx/imx51_ipuv3.c Sat Apr 4 23:03:11 2015 (r281092) @@ -53,6 +53,9 @@ __FBSDID("$FreeBSD$"); #include +#include +#include + #include #include #include Modified: head/sys/arm/freescale/imx/imx6_mp.c ============================================================================== --- head/sys/arm/freescale/imx/imx6_mp.c Sat Apr 4 23:00:37 2015 (r281091) +++ head/sys/arm/freescale/imx/imx6_mp.c Sat Apr 4 23:03:11 2015 (r281092) @@ -34,6 +34,9 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include + #include #include #include Modified: head/sys/arm/freescale/vybrid/vf_dcu4.c ============================================================================== --- head/sys/arm/freescale/vybrid/vf_dcu4.c Sat Apr 4 23:00:37 2015 (r281091) +++ head/sys/arm/freescale/vybrid/vf_dcu4.c Sat Apr 4 23:03:11 2015 (r281092) @@ -47,6 +47,9 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include + #include #include #include Modified: head/sys/arm/mv/armadaxp/armadaxp_mp.c ============================================================================== --- head/sys/arm/mv/armadaxp/armadaxp_mp.c Sat Apr 4 23:00:37 2015 (r281091) +++ head/sys/arm/mv/armadaxp/armadaxp_mp.c Sat Apr 4 23:03:11 2015 (r281092) @@ -36,6 +36,7 @@ #include #include #include +#include #include Modified: head/sys/arm/rockchip/rk30xx_mp.c ============================================================================== --- head/sys/arm/rockchip/rk30xx_mp.c Sat Apr 4 23:00:37 2015 (r281091) +++ head/sys/arm/rockchip/rk30xx_mp.c Sat Apr 4 23:03:11 2015 (r281092) @@ -33,6 +33,9 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include + #include #include #include Modified: head/sys/arm/samsung/exynos/exynos5_mp.c ============================================================================== --- head/sys/arm/samsung/exynos/exynos5_mp.c Sat Apr 4 23:00:37 2015 (r281091) +++ head/sys/arm/samsung/exynos/exynos5_mp.c Sat Apr 4 23:03:11 2015 (r281092) @@ -33,6 +33,9 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include + #include #include #include Modified: head/sys/arm/ti/omap4/omap4_mp.c ============================================================================== --- head/sys/arm/ti/omap4/omap4_mp.c Sat Apr 4 23:00:37 2015 (r281091) +++ head/sys/arm/ti/omap4/omap4_mp.c Sat Apr 4 23:03:11 2015 (r281092) @@ -31,6 +31,9 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include + #include #include #include Modified: head/sys/arm/versatile/versatile_pci.c ============================================================================== --- head/sys/arm/versatile/versatile_pci.c Sat Apr 4 23:00:37 2015 (r281091) +++ head/sys/arm/versatile/versatile_pci.c Sat Apr 4 23:03:11 2015 (r281092) @@ -35,6 +35,10 @@ __FBSDID("$FreeBSD$"); #include #include #include + +#include +#include + #include #include #include Modified: head/sys/arm/xilinx/zy7_mp.c ============================================================================== --- head/sys/arm/xilinx/zy7_mp.c Sat Apr 4 23:00:37 2015 (r281091) +++ head/sys/arm/xilinx/zy7_mp.c Sat Apr 4 23:03:11 2015 (r281092) @@ -31,6 +31,9 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include + #include #include #include From owner-svn-src-all@FreeBSD.ORG Sat Apr 4 23:10:14 2015 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 44717F5B; Sat, 4 Apr 2015 23:10: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 303499C3; Sat, 4 Apr 2015 23:10: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 t34NAEfk022688; Sat, 4 Apr 2015 23:10:14 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t34NAERq022687; Sat, 4 Apr 2015 23:10:14 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504042310.t34NAERq022687@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 4 Apr 2015 23:10:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281093 - 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: Sat, 04 Apr 2015 23:10:14 -0000 Author: andrew Date: Sat Apr 4 23:10:13 2015 New Revision: 281093 URL: https://svnweb.freebsd.org/changeset/base/281093 Log: Re-add machine/bus.h to machine/fdt.h on arm, it's still needed. Modified: head/sys/arm/include/fdt.h Modified: head/sys/arm/include/fdt.h ============================================================================== --- head/sys/arm/include/fdt.h Sat Apr 4 23:03:11 2015 (r281092) +++ head/sys/arm/include/fdt.h Sat Apr 4 23:10:13 2015 (r281093) @@ -34,6 +34,8 @@ #include +#include + /* Max interrupt number */ #define FDT_INTR_MAX NIRQ From owner-svn-src-all@FreeBSD.ORG Sat Apr 4 23:23:07 2015 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 A730D276; Sat, 4 Apr 2015 23:23:07 +0000 (UTC) Received: from mail-wg0-x22c.google.com (mail-wg0-x22c.google.com [IPv6:2a00:1450:400c:c00::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5E0ABBA0; Sat, 4 Apr 2015 23:23:07 +0000 (UTC) Received: by wgbdm7 with SMTP id dm7so1271701wgb.1; Sat, 04 Apr 2015 16:23:05 -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=tRfw+YZN+Tfh8uXLPO5RCh/0fwYSrDoflJAyXpTxzM0=; b=vo0qfLjWugmYe482HhaHMOCQ3iNJTm4Rh55k7fpbXP2HZQTAj23wDhg0njYjzPFhvn 8YZDD0veTT3C9DdJIROWXxwiwzSAaHAQtirJ/RSkViORHyNAGY9rcj3ofcV8xO4quUZm s42sAKgTSXH4QQ/OB7ABRFHAHdbnzkmVwgdRYJ6DYT6Vhd77ySwhjhv130tpwW6dPxuG hem3jM52ujWg13Lz5cLOEiNJAch9JteyWckMQzhQOMa5rOyYkOZ7ZlEszfUdlE00ZVbP Qvd0N9Khhefbs3FdmhQ0Sp5rSVTv6UADBdmUj9p5vCeJkD1NTcgB1szOXBDI8fpL2jL9 FGnA== MIME-Version: 1.0 X-Received: by 10.194.109.70 with SMTP id hq6mr17477036wjb.77.1428189785598; Sat, 04 Apr 2015 16:23:05 -0700 (PDT) Sender: pluknet@gmail.com Received: by 10.27.20.6 with HTTP; Sat, 4 Apr 2015 16:23:05 -0700 (PDT) In-Reply-To: <201504042147.t34LltiZ084425@svn.freebsd.org> References: <201504042147.t34LltiZ084425@svn.freebsd.org> Date: Sun, 5 Apr 2015 02:23:05 +0300 X-Google-Sender-Auth: jD9vXvCJA816Wf2CskeyO9vjHLA Message-ID: Subject: Re: svn commit: r281086 - head/sys/kern From: Sergey Kandaurov To: Jilles Tjoelker Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages 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 Apr 2015 23:23:07 -0000 On 5 April 2015 at 00:47, Jilles Tjoelker wrote: > Author: jilles > Date: Sat Apr 4 21:47:54 2015 > New Revision: 281086 > URL: https://svnweb.freebsd.org/changeset/base/281086 > > Log: > utimensat: Correct Capsicum required capability rights. > > Modified: > head/sys/kern/vfs_syscalls.c > > Modified: head/sys/kern/vfs_syscalls.c > ============================================================================== > --- head/sys/kern/vfs_syscalls.c Sat Apr 4 21:34:26 2015 (r281085) > +++ head/sys/kern/vfs_syscalls.c Sat Apr 4 21:47:54 2015 (r281086) > @@ -3294,6 +3294,7 @@ kern_utimensat(struct thread *td, int fd > { > struct nameidata nd; > struct timespec ts[2]; > + cap_rights_t rights; > int error, flags; > > if (flag & ~AT_SYMLINK_NOFOLLOW) > @@ -3301,8 +3302,9 @@ kern_utimensat(struct thread *td, int fd > > if ((error = getutimens(tptr, tptrseg, ts, &flags)) != 0) > return (error); > - NDINIT_AT(&nd, LOOKUP, ((flag & AT_SYMLINK_NOFOLLOW) ? NOFOLLOW : > - FOLLOW) | AUDITVNODE1, pathseg, path, fd, td); > + NDINIT_ATRIGHTS(&nd, LOOKUP, ((flag & AT_SYMLINK_NOFOLLOW) ? NOFOLLOW : > + FOLLOW) | AUDITVNODE1, pathseg, path, fd, > + cap_rights_init(&rights, CAP_FUTIMES), td); > if ((error = namei(&nd)) != 0) > return (error); > /* > What about kern_lutimes()? It seems it needs CAP_FUTIMES as well due its path argument. -- wbr, pluknets From owner-svn-src-all@FreeBSD.ORG Sat Apr 4 23:56:39 2015 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 A0986C9B; Sat, 4 Apr 2015 23:56: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 8CD89EA8; Sat, 4 Apr 2015 23:56: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 t34NudvQ045981; Sat, 4 Apr 2015 23:56:39 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t34Nudx7045980; Sat, 4 Apr 2015 23:56:39 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201504042356.t34Nudx7045980@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 4 Apr 2015 23:56:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281094 - 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 Apr 2015 23:56:39 -0000 Author: kib Date: Sat Apr 4 23:56:38 2015 New Revision: 281094 URL: https://svnweb.freebsd.org/changeset/base/281094 Log: Restore proper error from oshmctl(2), used by COMPAT_43, when the segment cannot be found. Broken by r280323. Sponsored by: The FreeBSD Foundation MFC after: 3 days Modified: head/sys/kern/sysv_shm.c Modified: head/sys/kern/sysv_shm.c ============================================================================== --- head/sys/kern/sysv_shm.c Sat Apr 4 23:10:13 2015 (r281093) +++ head/sys/kern/sysv_shm.c Sat Apr 4 23:56:38 2015 (r281094) @@ -965,7 +965,7 @@ oshmctl(struct thread *td, struct oshmct shmseg = shm_find_segment(uap->shmid, true); if (shmseg == NULL) { SYSVSHM_UNLOCK(); - return (error); + return (EINVAL); } switch (uap->cmd) { case IPC_STAT: