From owner-svn-src-stable@freebsd.org Sun Dec 3 13:39:53 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 09229DFBDBD; Sun, 3 Dec 2017 13:39:53 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7914C794CA; Sun, 3 Dec 2017 13:39:52 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id vB3DdkRo050049 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 3 Dec 2017 15:39:46 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua vB3DdkRo050049 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id vB3Ddki5050048; Sun, 3 Dec 2017 15:39:46 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 3 Dec 2017 15:39:46 +0200 From: Konstantin Belousov To: Michael Tuexen Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: Re: svn commit: r324686 - stable/11/sys/netinet Message-ID: <20171203133946.GJ2272@kib.kiev.ua> References: <201710171242.v9HCgHG4030707@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201710171242.v9HCgHG4030707@repo.freebsd.org> User-Agent: Mutt/1.9.1 (2017-09-22) 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.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Dec 2017 13:39:53 -0000 On Tue, Oct 17, 2017 at 12:42:17PM +0000, Michael Tuexen wrote: > Author: tuexen > Date: Tue Oct 17 12:42:17 2017 > New Revision: 324686 > URL: https://svnweb.freebsd.org/changeset/base/324686 > > Log: > MFC r322648: > > Ensure inp_vflag is consistently set for TCP endpoints. > > Make sure that the flags INP_IPV4 and INP_IPV6 are consistently set > for inpcbs used for TCP sockets, no matter if the setting is derived > from the net.inet6.ip6.v6only sysctl or the IPV6_V6ONLY socket option. > For UDP this was already done right. > > PR: 221385 > > Modified: > stable/11/sys/netinet/tcp_usrreq.c > Directory Properties: > stable/11/ (props changed) > > Modified: stable/11/sys/netinet/tcp_usrreq.c > ============================================================================== > --- stable/11/sys/netinet/tcp_usrreq.c Tue Oct 17 11:20:32 2017 (r324685) > +++ stable/11/sys/netinet/tcp_usrreq.c Tue Oct 17 12:42:17 2017 (r324686) > @@ -1899,6 +1899,8 @@ tcp_attach(struct socket *so) > #ifdef INET6 > if (inp->inp_vflag & INP_IPV6PROTO) { > inp->inp_vflag |= INP_IPV6; > + if ((inp->inp_flags & IN6P_IPV6_V6ONLY) == 0) > + inp->inp_vflag |= INP_IPV4; > inp->in6p_hops = -1; /* use kernel default */ > } > else I highly suspect that this commit causes the breakage. Example is taken from the 'nestat -f inet6 -n' output, but in fact the problem is much more serious, e.g. squid acls are broken as well: tcp6 0 0 2001:470:1f14:13.23047 2a03:2880:f003:c.443 ESTABLISHED tcp46 0 0 0.0.0.1.22 69.223.183.85.58766 ESTABLISHED The tcp46 and 0.0.0.1 values in the second line are clearly nonsensical. From owner-svn-src-stable@freebsd.org Mon Dec 4 09:26:14 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2BAA6DF56E6; Mon, 4 Dec 2017 09:26:14 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E13DD7F1A2; Mon, 4 Dec 2017 09:26:13 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB49QCDG081676; Mon, 4 Dec 2017 09:26:12 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB49QCAH081675; Mon, 4 Dec 2017 09:26:12 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201712040926.vB49QCAH081675@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 4 Dec 2017 09:26:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326511 - stable/11/sys/net X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/net X-SVN-Commit-Revision: 326511 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Dec 2017 09:26:14 -0000 Author: hselasky Date: Mon Dec 4 09:26:12 2017 New Revision: 326511 URL: https://svnweb.freebsd.org/changeset/base/326511 Log: MFC r326392: Properly define the VLAN_XXX() function macros to avoid miscompilation when used inside "if" statements comparing with another value. Detailed explanation: "if (a ? b : c != 0)" is not the same like "if ((a ? b : c) != 0)" which is the expected behaviour of a function macro. Affects: toecore, linuxkpi and ibcore. Reviewed by: kib Sponsored by: Mellanox Technologies Modified: stable/11/sys/net/if_vlan_var.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/net/if_vlan_var.h ============================================================================== --- stable/11/sys/net/if_vlan_var.h Mon Dec 4 09:17:28 2017 (r326510) +++ stable/11/sys/net/if_vlan_var.h Mon Dec 4 09:26:12 2017 (r326511) @@ -143,16 +143,16 @@ struct vlanreq { } while (0) #define VLAN_TRUNKDEV(_ifp) \ - (_ifp)->if_type == IFT_L2VLAN ? (*vlan_trunkdev_p)((_ifp)) : NULL + ((_ifp)->if_type == IFT_L2VLAN ? (*vlan_trunkdev_p)((_ifp)) : NULL) #define VLAN_TAG(_ifp, _vid) \ - (_ifp)->if_type == IFT_L2VLAN ? (*vlan_tag_p)((_ifp), (_vid)) : EINVAL + ((_ifp)->if_type == IFT_L2VLAN ? (*vlan_tag_p)((_ifp), (_vid)) : EINVAL) #define VLAN_COOKIE(_ifp) \ - (_ifp)->if_type == IFT_L2VLAN ? (*vlan_cookie_p)((_ifp)) : NULL + ((_ifp)->if_type == IFT_L2VLAN ? (*vlan_cookie_p)((_ifp)) : NULL) #define VLAN_SETCOOKIE(_ifp, _cookie) \ - (_ifp)->if_type == IFT_L2VLAN ? \ - (*vlan_setcookie_p)((_ifp), (_cookie)) : EINVAL + ((_ifp)->if_type == IFT_L2VLAN ? \ + (*vlan_setcookie_p)((_ifp), (_cookie)) : EINVAL) #define VLAN_DEVAT(_ifp, _vid) \ - (_ifp)->if_vlantrunk != NULL ? (*vlan_devat_p)((_ifp), (_vid)) : NULL + ((_ifp)->if_vlantrunk != NULL ? (*vlan_devat_p)((_ifp), (_vid)) : NULL) extern void (*vlan_trunk_cap_p)(struct ifnet *); extern struct ifnet *(*vlan_trunkdev_p)(struct ifnet *); From owner-svn-src-stable@freebsd.org Mon Dec 4 09:27:37 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 67DC4DF58C7; Mon, 4 Dec 2017 09:27:37 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 313BE7F4E5; Mon, 4 Dec 2017 09:27:37 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB49Ra1H081776; Mon, 4 Dec 2017 09:27:36 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB49RatL081775; Mon, 4 Dec 2017 09:27:36 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201712040927.vB49RatL081775@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 4 Dec 2017 09:27:36 +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: r326512 - stable/10/sys/net X-SVN-Group: stable-10 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/10/sys/net X-SVN-Commit-Revision: 326512 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Dec 2017 09:27:37 -0000 Author: hselasky Date: Mon Dec 4 09:27:36 2017 New Revision: 326512 URL: https://svnweb.freebsd.org/changeset/base/326512 Log: MFC r326392: Properly define the VLAN_XXX() function macros to avoid miscompilation when used inside "if" statements comparing with another value. Detailed explanation: "if (a ? b : c != 0)" is not the same like "if ((a ? b : c) != 0)" which is the expected behaviour of a function macro. Affects: toecore, linuxkpi and ibcore. Reviewed by: kib Sponsored by: Mellanox Technologies Modified: stable/10/sys/net/if_vlan_var.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/net/if_vlan_var.h ============================================================================== --- stable/10/sys/net/if_vlan_var.h Mon Dec 4 09:26:12 2017 (r326511) +++ stable/10/sys/net/if_vlan_var.h Mon Dec 4 09:27:36 2017 (r326512) @@ -132,16 +132,16 @@ struct vlanreq { } while (0) #define VLAN_TRUNKDEV(_ifp) \ - (_ifp)->if_type == IFT_L2VLAN ? (*vlan_trunkdev_p)((_ifp)) : NULL + ((_ifp)->if_type == IFT_L2VLAN ? (*vlan_trunkdev_p)((_ifp)) : NULL) #define VLAN_TAG(_ifp, _vid) \ - (_ifp)->if_type == IFT_L2VLAN ? (*vlan_tag_p)((_ifp), (_vid)) : EINVAL + ((_ifp)->if_type == IFT_L2VLAN ? (*vlan_tag_p)((_ifp), (_vid)) : EINVAL) #define VLAN_COOKIE(_ifp) \ - (_ifp)->if_type == IFT_L2VLAN ? (*vlan_cookie_p)((_ifp)) : NULL + ((_ifp)->if_type == IFT_L2VLAN ? (*vlan_cookie_p)((_ifp)) : NULL) #define VLAN_SETCOOKIE(_ifp, _cookie) \ - (_ifp)->if_type == IFT_L2VLAN ? \ - (*vlan_setcookie_p)((_ifp), (_cookie)) : EINVAL + ((_ifp)->if_type == IFT_L2VLAN ? \ + (*vlan_setcookie_p)((_ifp), (_cookie)) : EINVAL) #define VLAN_DEVAT(_ifp, _vid) \ - (_ifp)->if_vlantrunk != NULL ? (*vlan_devat_p)((_ifp), (_vid)) : NULL + ((_ifp)->if_vlantrunk != NULL ? (*vlan_devat_p)((_ifp), (_vid)) : NULL) extern void (*vlan_trunk_cap_p)(struct ifnet *); extern struct ifnet *(*vlan_trunkdev_p)(struct ifnet *); From owner-svn-src-stable@freebsd.org Mon Dec 4 09:36:48 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E16EFDF5B23; Mon, 4 Dec 2017 09:36:48 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AAFDE7F97B; Mon, 4 Dec 2017 09:36:48 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB49alLc085980; Mon, 4 Dec 2017 09:36:47 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB49alJM085979; Mon, 4 Dec 2017 09:36:47 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201712040936.vB49alJM085979@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 4 Dec 2017 09:36: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: r326513 - stable/9/sys/net X-SVN-Group: stable-9 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/9/sys/net X-SVN-Commit-Revision: 326513 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Dec 2017 09:36:49 -0000 Author: hselasky Date: Mon Dec 4 09:36:47 2017 New Revision: 326513 URL: https://svnweb.freebsd.org/changeset/base/326513 Log: MFC r326392: Properly define the VLAN_XXX() function macros to avoid miscompilation when used inside "if" statements comparing with another value. Detailed explanation: "if (a ? b : c != 0)" is not the same like "if ((a ? b : c) != 0)" which is the expected behaviour of a function macro. Affects: toecore, linuxkpi and ibcore. Reviewed by: kib Sponsored by: Mellanox Technologies Modified: stable/9/sys/net/if_vlan_var.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/net/ (props changed) Modified: stable/9/sys/net/if_vlan_var.h ============================================================================== --- stable/9/sys/net/if_vlan_var.h Mon Dec 4 09:27:36 2017 (r326512) +++ stable/9/sys/net/if_vlan_var.h Mon Dec 4 09:36:47 2017 (r326513) @@ -132,16 +132,16 @@ struct vlanreq { } while (0) #define VLAN_TRUNKDEV(_ifp) \ - (_ifp)->if_type == IFT_L2VLAN ? (*vlan_trunkdev_p)((_ifp)) : NULL + ((_ifp)->if_type == IFT_L2VLAN ? (*vlan_trunkdev_p)((_ifp)) : NULL) #define VLAN_TAG(_ifp, _tag) \ - (_ifp)->if_type == IFT_L2VLAN ? (*vlan_tag_p)((_ifp), (_tag)) : EINVAL + ((_ifp)->if_type == IFT_L2VLAN ? (*vlan_tag_p)((_ifp), (_tag)) : EINVAL) #define VLAN_COOKIE(_ifp) \ - (_ifp)->if_type == IFT_L2VLAN ? (*vlan_cookie_p)((_ifp)) : NULL + ((_ifp)->if_type == IFT_L2VLAN ? (*vlan_cookie_p)((_ifp)) : NULL) #define VLAN_SETCOOKIE(_ifp, _cookie) \ - (_ifp)->if_type == IFT_L2VLAN ? \ - (*vlan_setcookie_p)((_ifp), (_cookie)) : EINVAL + ((_ifp)->if_type == IFT_L2VLAN ? \ + (*vlan_setcookie_p)((_ifp), (_cookie)) : EINVAL) #define VLAN_DEVAT(_ifp, _tag) \ - (_ifp)->if_vlantrunk != NULL ? (*vlan_devat_p)((_ifp), (_tag)) : NULL + ((_ifp)->if_vlantrunk != NULL ? (*vlan_devat_p)((_ifp), (_tag)) : NULL) extern void (*vlan_trunk_cap_p)(struct ifnet *); extern struct ifnet *(*vlan_trunkdev_p)(struct ifnet *); From owner-svn-src-stable@freebsd.org Mon Dec 4 09:41:58 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A95EFDF5E90; Mon, 4 Dec 2017 09:41:58 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 726137FEC3; Mon, 4 Dec 2017 09:41:58 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB49fvXZ086989; Mon, 4 Dec 2017 09:41:57 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB49fvrW086988; Mon, 4 Dec 2017 09:41:57 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201712040941.vB49fvrW086988@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 4 Dec 2017 09:41:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326514 - stable/11/sys/i386/include X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/i386/include X-SVN-Commit-Revision: 326514 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Dec 2017 09:41:58 -0000 Author: hselasky Date: Mon Dec 4 09:41:57 2017 New Revision: 326514 URL: https://svnweb.freebsd.org/changeset/base/326514 Log: MFC r326161: Implement atomic_fetchadd_64() for i386. This function is needed by the atomic64 header file in the LinuxKPI for i386. Reviewed by: kib Sponsored by: Mellanox Technologies Modified: stable/11/sys/i386/include/atomic.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/i386/include/atomic.h ============================================================================== --- stable/11/sys/i386/include/atomic.h Mon Dec 4 09:36:47 2017 (r326513) +++ stable/11/sys/i386/include/atomic.h Mon Dec 4 09:41:57 2017 (r326514) @@ -124,6 +124,7 @@ int atomic_cmpset_64(volatile uint64_t *, uint64_t, u uint64_t atomic_load_acq_64(volatile uint64_t *); void atomic_store_rel_64(volatile uint64_t *, uint64_t); uint64_t atomic_swap_64(volatile uint64_t *, uint64_t); +uint64_t atomic_fetchadd_64(volatile uint64_t *, uint64_t); #else /* !KLD_MODULE && __GNUCLIKE_ASM */ @@ -546,6 +547,17 @@ atomic_swap_64(volatile uint64_t *p, uint64_t v) return (atomic_swap_64_i386(p, v)); else return (atomic_swap_64_i586(p, v)); +} + +static __inline uint64_t +atomic_fetchadd_64(volatile uint64_t *p, uint64_t v) +{ + + for (;;) { + uint64_t t = *p; + if (atomic_cmpset_64(p, t, t + v)) + return (t); + } } #endif /* _KERNEL */ From owner-svn-src-stable@freebsd.org Mon Dec 4 09:46:10 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 15071DF5FE0; Mon, 4 Dec 2017 09:46:10 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D2F92800A9; Mon, 4 Dec 2017 09:46:09 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB49k8dV090321; Mon, 4 Dec 2017 09:46:08 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB49k8rG090320; Mon, 4 Dec 2017 09:46:08 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201712040946.vB49k8rG090320@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 4 Dec 2017 09:46: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: r326515 - stable/10/sys/i386/include X-SVN-Group: stable-10 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/10/sys/i386/include X-SVN-Commit-Revision: 326515 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Dec 2017 09:46:10 -0000 Author: hselasky Date: Mon Dec 4 09:46:08 2017 New Revision: 326515 URL: https://svnweb.freebsd.org/changeset/base/326515 Log: MFC r326161: Implement atomic_fetchadd_64() for i386. This function is needed by the atomic64 header file in the LinuxKPI for i386. Reviewed by: kib Sponsored by: Mellanox Technologies Modified: stable/10/sys/i386/include/atomic.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/i386/include/atomic.h ============================================================================== --- stable/10/sys/i386/include/atomic.h Mon Dec 4 09:41:57 2017 (r326514) +++ stable/10/sys/i386/include/atomic.h Mon Dec 4 09:46:08 2017 (r326515) @@ -97,6 +97,7 @@ int atomic_cmpset_64(volatile uint64_t *, uint64_t, u uint64_t atomic_load_acq_64(volatile uint64_t *); void atomic_store_rel_64(volatile uint64_t *, uint64_t); uint64_t atomic_swap_64(volatile uint64_t *, uint64_t); +uint64_t atomic_fetchadd_64(volatile uint64_t *, uint64_t); #else /* !KLD_MODULE && __GNUCLIKE_ASM */ @@ -503,6 +504,17 @@ atomic_swap_64(volatile uint64_t *p, uint64_t v) return (atomic_swap_64_i386(p, v)); else return (atomic_swap_64_i586(p, v)); +} + +static __inline uint64_t +atomic_fetchadd_64(volatile uint64_t *p, uint64_t v) +{ + + for (;;) { + uint64_t t = *p; + if (atomic_cmpset_64(p, t, t + v)) + return (t); + } } #endif /* _KERNEL */ From owner-svn-src-stable@freebsd.org Mon Dec 4 09:47:44 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 33B40DF6087; Mon, 4 Dec 2017 09:47:44 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F1F0D801E8; Mon, 4 Dec 2017 09:47:43 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB49lhPh090437; Mon, 4 Dec 2017 09:47:43 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB49lhmk090436; Mon, 4 Dec 2017 09:47:43 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201712040947.vB49lhmk090436@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 4 Dec 2017 09:47:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326516 - stable/11/sys/vm X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/vm X-SVN-Commit-Revision: 326516 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Dec 2017 09:47:44 -0000 Author: kib Date: Mon Dec 4 09:47:42 2017 New Revision: 326516 URL: https://svnweb.freebsd.org/changeset/base/326516 Log: MFC r326424: Add comment for vm_map_find_min(). Modified: stable/11/sys/vm/vm_map.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/vm/vm_map.c ============================================================================== --- stable/11/sys/vm/vm_map.c Mon Dec 4 09:46:08 2017 (r326515) +++ stable/11/sys/vm/vm_map.c Mon Dec 4 09:47:42 2017 (r326516) @@ -1556,6 +1556,18 @@ again: return (result); } +/* + * vm_map_find_min() is a variant of vm_map_find() that takes an + * additional parameter (min_addr) and treats the given address + * (*addr) differently. Specifically, it treats *addr as a hint + * and not as the minimum address where the mapping is created. + * + * This function works in two phases. First, it tries to + * allocate above the hint. If that fails and the hint is + * greater than min_addr, it performs a second pass, replacing + * the hint with min_addr as the minimum address for the + * allocation. + */ int vm_map_find_min(vm_map_t map, vm_object_t object, vm_ooffset_t offset, vm_offset_t *addr, vm_size_t length, vm_offset_t min_addr, From owner-svn-src-stable@freebsd.org Mon Dec 4 09:48:33 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 293C9DF6105; Mon, 4 Dec 2017 09:48:33 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E6E098031E; Mon, 4 Dec 2017 09:48:32 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB49mVh7090511; Mon, 4 Dec 2017 09:48:31 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB49mVAO090510; Mon, 4 Dec 2017 09:48:31 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201712040948.vB49mVAO090510@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 4 Dec 2017 09:48:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r326517 - stable/9/sys/i386/include X-SVN-Group: stable-9 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/9/sys/i386/include X-SVN-Commit-Revision: 326517 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Dec 2017 09:48:33 -0000 Author: hselasky Date: Mon Dec 4 09:48:31 2017 New Revision: 326517 URL: https://svnweb.freebsd.org/changeset/base/326517 Log: MFC r326161: Implement atomic_fetchadd_64() for i386. This function is needed by the atomic64 header file in the LinuxKPI for i386. Reviewed by: kib Sponsored by: Mellanox Technologies Modified: stable/9/sys/i386/include/atomic.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/i386/include/atomic.h ============================================================================== --- stable/9/sys/i386/include/atomic.h Mon Dec 4 09:47:42 2017 (r326516) +++ stable/9/sys/i386/include/atomic.h Mon Dec 4 09:48:31 2017 (r326517) @@ -94,6 +94,7 @@ void atomic_store_rel_##TYPE(volatile u_##TYPE *p, u_ int atomic_cmpset_64(volatile uint64_t *, uint64_t, uint64_t); uint64_t atomic_swap_64(volatile uint64_t *, uint64_t); +uint64_t atomic_fetchadd_64(volatile uint64_t *, uint64_t); #else /* !KLD_MODULE && __GNUCLIKE_ASM */ @@ -478,6 +479,17 @@ atomic_swap_64(volatile uint64_t *p, uint64_t v) return (atomic_swap_64_i386(p, v)); else return (atomic_swap_64_i586(p, v)); +} + +static __inline uint64_t +atomic_fetchadd_64(volatile uint64_t *p, uint64_t v) +{ + + for (;;) { + uint64_t t = *p; + if (atomic_cmpset_64(p, t, t + v)) + return (t); + } } #endif /* _KERNEL */ From owner-svn-src-stable@freebsd.org Mon Dec 4 09:51:10 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 00F8FDF6413; Mon, 4 Dec 2017 09:51:10 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BEB6E807AE; Mon, 4 Dec 2017 09:51:09 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB49p83x091429; Mon, 4 Dec 2017 09:51:08 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB49p87b091428; Mon, 4 Dec 2017 09:51:08 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201712040951.vB49p87b091428@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 4 Dec 2017 09:51:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326519 - stable/11/sys/dev/iser X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/dev/iser X-SVN-Commit-Revision: 326519 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Dec 2017 09:51:10 -0000 Author: hselasky Date: Mon Dec 4 09:51:08 2017 New Revision: 326519 URL: https://svnweb.freebsd.org/changeset/base/326519 Log: MFC r326058: Make sure all initialized mutexes are destroyed in the iser module, else WITNESS will panic. Prefix all mutex names with "iser_" to prevent future WITNESS issues. Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/iser/icl_iser.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/iser/icl_iser.c ============================================================================== --- stable/11/sys/dev/iser/icl_iser.c Mon Dec 4 09:48:55 2017 (r326518) +++ stable/11/sys/dev/iser/icl_iser.c Mon Dec 4 09:51:08 2017 (r326519) @@ -257,9 +257,9 @@ iser_new_conn(const char *name, struct mtx *lock) cv_init(&iser_conn->up_cv, "iser_cv"); sx_init(&iser_conn->state_mutex, "iser_conn_state_mutex"); - mtx_init(&iser_conn->ib_conn.beacon.flush_lock, "flush_lock", NULL, MTX_DEF); + mtx_init(&iser_conn->ib_conn.beacon.flush_lock, "iser_flush_lock", NULL, MTX_DEF); cv_init(&iser_conn->ib_conn.beacon.flush_cv, "flush_cv"); - mtx_init(&iser_conn->ib_conn.lock, "lock", NULL, MTX_DEF); + mtx_init(&iser_conn->ib_conn.lock, "iser_lock", NULL, MTX_DEF); ic = &iser_conn->icl_conn; ic->ic_lock = lock; @@ -277,6 +277,7 @@ iser_conn_free(struct icl_conn *ic) struct iser_conn *iser_conn = icl_to_iser_conn(ic); iser_conn_release(ic); + mtx_destroy(&iser_conn->ib_conn.lock); cv_destroy(&iser_conn->ib_conn.beacon.flush_cv); mtx_destroy(&iser_conn->ib_conn.beacon.flush_lock); sx_destroy(&iser_conn->state_mutex); @@ -512,7 +513,7 @@ icl_iser_load(void) /* device init is called only after the first addr resolution */ sx_init(&ig.device_list_mutex, "global_device_lock"); INIT_LIST_HEAD(&ig.device_list); - mtx_init(&ig.connlist_mutex, "global_conn_lock", NULL, MTX_DEF); + mtx_init(&ig.connlist_mutex, "iser_global_conn_lock", NULL, MTX_DEF); INIT_LIST_HEAD(&ig.connlist); sx_init(&ig.close_conns_mutex, "global_close_conns_lock"); From owner-svn-src-stable@freebsd.org Mon Dec 4 09:53:04 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9FE46DF64A2; Mon, 4 Dec 2017 09:53:04 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5F171809E3; Mon, 4 Dec 2017 09:53:04 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB49r3vt094574; Mon, 4 Dec 2017 09:53:03 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB49r3jY094573; Mon, 4 Dec 2017 09:53:03 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201712040953.vB49r3jY094573@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 4 Dec 2017 09:53:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326520 - stable/11/tools X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/tools X-SVN-Commit-Revision: 326520 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Dec 2017 09:53:04 -0000 Author: hselasky Date: Mon Dec 4 09:53:03 2017 New Revision: 326520 URL: https://svnweb.freebsd.org/changeset/base/326520 Log: MFC r325897: Improve the library dependencies helper script in src/tools. Implement double pass of the relevant Makefiles. First make a list of library names and directories and then scan for all the dependencies. Spaces in directories in the source tree are not supported. This avoids using hardcoded mappings between the library name and the directory containing the library Makefile. Add support for scanning contrib/ofed . Bail out on any errors. Sponsored by: Mellanox Technologies Modified: stable/11/tools/make_libdeps.sh Directory Properties: stable/11/ (props changed) Modified: stable/11/tools/make_libdeps.sh ============================================================================== --- stable/11/tools/make_libdeps.sh Mon Dec 4 09:51:08 2017 (r326519) +++ stable/11/tools/make_libdeps.sh Mon Dec 4 09:53:03 2017 (r326520) @@ -28,9 +28,12 @@ export PATH=/bin:/usr/bin +set -e + LC_ALL=C # make sort deterministic FS=': ' # internal field separator LIBDEPENDS=./_libdeps # intermediate output file +LIBDIRS=./_libdirs # intermediate output file USRSRC=${1:-/usr/src} # source root LIBS=" lib @@ -39,44 +42,74 @@ LIBS=" secure/lib usr.bin/lex/lib cddl/lib + contrib/ofed " # where to scan for libraries -# This sed(1) filter is used to convert -lfoo to path/to/libfoo. -# -SED_FILTER=" -sed -E - -e's; ;! ;g' - -e's;$;!;' - -e's;-lbsdxml!;lib/libexpat;g' - -e's;-lpthread!;lib/libthr;g' - -e's;-lm!;lib/msun;g' - -e's;-l(ncurses|termcap)!;lib/ncurses/ncurses;g' - -e's;-l(gcc)!;gnu/lib/lib\1;g' - -e's;-lssp_nonshared!;gnu/lib/libssp/libssp_nonshared;g' - -e's;-l(asn1|hdb|kdc|heimbase|heimntlm|heimsqlite|hx509|krb5|roken|wind)!;kerberos5/lib/lib\1;g' - -e's;-l(crypto|ssh|ssl)!;secure/lib/lib\1;g' - -e's;-l([^!]+)!;lib/lib\1;g' -" +# convert -lfoo to foo +convert() +{ + sed -e "s/\-l//g" -e "s/pthread/thr/g" -e "s/ncurses.*/ncurses/g" +} + +# find library build directory given library name +findlibdir() +{ + while read NAME && read DIR + do + if [ "$NAME" = "$1" ]; then + echo "$DIR" + exit + fi + done + + # Should not happen + echo lib_not_found/lib$1 +} + +# find library build directories given one or more library names +resolvelibdirs() +{ + while read LIBNAME + do + cat $LIBDIRS | tr ' ' '\n' | findlibdir "$LIBNAME" + done +} + # Generate interdependencies between libraries. # genlibdepends() { ( + # Reset file + echo -n > $LIBDIRS + + # First pass - generate list of directories cd ${USRSRC} - find -s ${LIBS} -mindepth 1 -name Makefile | + find -s ${LIBS} -name Makefile | xargs grep -l 'bsd\.lib\.mk' | while read makefile; do libdir=$(dirname ${makefile}) + libname=$( + cd ${libdir} + make -m ${USRSRC}/share/mk WITH_OFED=YES -V LIB + ) + if [ "${libname}" ]; then + echo "${libname} ${libdir}" >> $LIBDIRS + fi + done + + # Second pass - generate dependencies + find -s ${LIBS} -name Makefile | + xargs grep -l 'bsd\.lib\.mk' | + while read makefile; do + libdir=$(dirname ${makefile}) deps=$( cd ${libdir} - make -m ${USRSRC}/share/mk -V LDADD + make -m ${USRSRC}/share/mk WITH_OFED=YES -V LDADD ) if [ "${deps}" ]; then - echo ${libdir}"${FS}"$( - echo ${deps} | - eval ${SED_FILTER} - ) + echo ${libdir}"${FS}"$(echo ${deps} | tr ' ' '\n' | convert | resolvelibdirs) fi done ) From owner-svn-src-stable@freebsd.org Mon Dec 4 09:54:04 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D07DBDF6526; Mon, 4 Dec 2017 09:54:04 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A812B80B1F; Mon, 4 Dec 2017 09:54:04 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB49s3jQ094666; Mon, 4 Dec 2017 09:54:03 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB49s3GK094665; Mon, 4 Dec 2017 09:54:03 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201712040954.vB49s3GK094665@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 4 Dec 2017 09:54:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r326521 - stable/10/tools X-SVN-Group: stable-10 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/10/tools X-SVN-Commit-Revision: 326521 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Dec 2017 09:54:04 -0000 Author: hselasky Date: Mon Dec 4 09:54:03 2017 New Revision: 326521 URL: https://svnweb.freebsd.org/changeset/base/326521 Log: MFC r325897: Improve the library dependencies helper script in src/tools. Implement double pass of the relevant Makefiles. First make a list of library names and directories and then scan for all the dependencies. Spaces in directories in the source tree are not supported. This avoids using hardcoded mappings between the library name and the directory containing the library Makefile. Add support for scanning contrib/ofed . Bail out on any errors. Sponsored by: Mellanox Technologies Modified: stable/10/tools/make_libdeps.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/tools/make_libdeps.sh ============================================================================== --- stable/10/tools/make_libdeps.sh Mon Dec 4 09:53:03 2017 (r326520) +++ stable/10/tools/make_libdeps.sh Mon Dec 4 09:54:03 2017 (r326521) @@ -28,9 +28,12 @@ export PATH=/bin:/usr/bin +set -e + LC_ALL=C # make sort deterministic FS=': ' # internal field separator LIBDEPENDS=./_libdeps # intermediate output file +LIBDIRS=./_libdirs # intermediate output file USRSRC=${1:-/usr/src} # source root LIBS=" lib @@ -39,44 +42,74 @@ LIBS=" secure/lib usr.bin/lex/lib cddl/lib + contrib/ofed " # where to scan for libraries -# This sed(1) filter is used to convert -lfoo to path/to/libfoo. -# -SED_FILTER=" -sed -E - -e's; ;! ;g' - -e's;$;!;' - -e's;-lbsdxml!;lib/libexpat;g' - -e's;-lpthread!;lib/libthr;g' - -e's;-lm!;lib/msun;g' - -e's;-l(ncurses|termcap)!;lib/ncurses/ncurses;g' - -e's;-l(gcc)!;gnu/lib/lib\1;g' - -e's;-lssp_nonshared!;gnu/lib/libssp/libssp_nonshared;g' - -e's;-l(asn1|hdb|kdc|heimbase|heimntlm|heimsqlite|hx509|krb5|roken|wind)!;kerberos5/lib/lib\1;g' - -e's;-l(crypto|ssh|ssl)!;secure/lib/lib\1;g' - -e's;-l([^!]+)!;lib/lib\1;g' -" +# convert -lfoo to foo +convert() +{ + sed -e "s/\-l//g" -e "s/pthread/thr/g" -e "s/ncurses.*/ncurses/g" +} + +# find library build directory given library name +findlibdir() +{ + while read NAME && read DIR + do + if [ "$NAME" = "$1" ]; then + echo "$DIR" + exit + fi + done + + # Should not happen + echo lib_not_found/lib$1 +} + +# find library build directories given one or more library names +resolvelibdirs() +{ + while read LIBNAME + do + cat $LIBDIRS | tr ' ' '\n' | findlibdir "$LIBNAME" + done +} + # Generate interdependencies between libraries. # genlibdepends() { ( + # Reset file + echo -n > $LIBDIRS + + # First pass - generate list of directories cd ${USRSRC} - find -s ${LIBS} -mindepth 1 -name Makefile | + find -s ${LIBS} -name Makefile | xargs grep -l 'bsd\.lib\.mk' | while read makefile; do libdir=$(dirname ${makefile}) + libname=$( + cd ${libdir} + make -m ${USRSRC}/share/mk WITH_OFED=YES -V LIB + ) + if [ "${libname}" ]; then + echo "${libname} ${libdir}" >> $LIBDIRS + fi + done + + # Second pass - generate dependencies + find -s ${LIBS} -name Makefile | + xargs grep -l 'bsd\.lib\.mk' | + while read makefile; do + libdir=$(dirname ${makefile}) deps=$( cd ${libdir} - make -m ${USRSRC}/share/mk -V LDADD + make -m ${USRSRC}/share/mk WITH_OFED=YES -V LDADD ) if [ "${deps}" ]; then - echo ${libdir}"${FS}"$( - echo ${deps} | - eval ${SED_FILTER} - ) + echo ${libdir}"${FS}"$(echo ${deps} | tr ' ' '\n' | convert | resolvelibdirs) fi done ) From owner-svn-src-stable@freebsd.org Mon Dec 4 10:06:00 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B3EE4DF69EF; Mon, 4 Dec 2017 10:06:00 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8067F1441; Mon, 4 Dec 2017 10:06:00 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB4A5xew099093; Mon, 4 Dec 2017 10:05:59 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB4A5xke099092; Mon, 4 Dec 2017 10:05:59 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201712041005.vB4A5xke099092@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 4 Dec 2017 10:05: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: r326523 - stable/10/sys/vm X-SVN-Group: stable-10 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/10/sys/vm X-SVN-Commit-Revision: 326523 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Dec 2017 10:06:00 -0000 Author: kib Date: Mon Dec 4 10:05:59 2017 New Revision: 326523 URL: https://svnweb.freebsd.org/changeset/base/326523 Log: MFC r326424: Add comment for vm_map_find_min(). Modified: stable/10/sys/vm/vm_map.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/vm_map.c ============================================================================== --- stable/10/sys/vm/vm_map.c Mon Dec 4 09:58:38 2017 (r326522) +++ stable/10/sys/vm/vm_map.c Mon Dec 4 10:05:59 2017 (r326523) @@ -1509,6 +1509,18 @@ again: return (result); } +/* + * vm_map_find_min() is a variant of vm_map_find() that takes an + * additional parameter (min_addr) and treats the given address + * (*addr) differently. Specifically, it treats *addr as a hint + * and not as the minimum address where the mapping is created. + * + * This function works in two phases. First, it tries to + * allocate above the hint. If that fails and the hint is + * greater than min_addr, it performs a second pass, replacing + * the hint with min_addr as the minimum address for the + * allocation. + */ int vm_map_find_min(vm_map_t map, vm_object_t object, vm_ooffset_t offset, vm_offset_t *addr, vm_size_t length, vm_offset_t min_addr, From owner-svn-src-stable@freebsd.org Mon Dec 4 15:18:09 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C37C5DFEC81; Mon, 4 Dec 2017 15:18:09 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9AA2F6B8BD; Mon, 4 Dec 2017 15:18:09 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB4FI87C048700; Mon, 4 Dec 2017 15:18:08 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB4FI8KR048697; Mon, 4 Dec 2017 15:18:08 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201712041518.vB4FI8KR048697@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 4 Dec 2017 15:18:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326529 - stable/11/sys/vm X-SVN-Group: stable-11 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/11/sys/vm X-SVN-Commit-Revision: 326529 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Dec 2017 15:18:09 -0000 Author: markj Date: Mon Dec 4 15:18:08 2017 New Revision: 326529 URL: https://svnweb.freebsd.org/changeset/base/326529 Log: MFC r326234, r326235, r326284: vm_page_array initialization improvements. Modified: stable/11/sys/vm/vm_page.c stable/11/sys/vm/vm_phys.c stable/11/sys/vm/vm_phys.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/vm/vm_page.c ============================================================================== --- stable/11/sys/vm/vm_page.c Mon Dec 4 13:28:56 2017 (r326528) +++ stable/11/sys/vm/vm_page.c Mon Dec 4 15:18:08 2017 (r326529) @@ -408,6 +408,29 @@ vm_page_domain_init(struct vm_domain *vmd) } /* + * Initialize a physical page in preparation for adding it to the free + * lists. + */ +static void +vm_page_init_page(vm_page_t m, vm_paddr_t pa, int segind) +{ + + m->object = NULL; + m->wire_count = 0; + m->busy_lock = VPB_UNBUSIED; + m->hold_count = 0; + m->flags = 0; + m->phys_addr = pa; + m->queue = PQ_NONE; + m->psind = 0; + m->segind = segind; + m->order = VM_NFREEORDER; + m->pool = VM_FREEPOOL_DEFAULT; + m->valid = m->dirty = 0; + pmap_page_init(m); +} + +/* * vm_page_startup: * * Initializes the resident memory module. Allocates physical memory for @@ -654,8 +677,9 @@ vm_page_startup(vm_offset_t vaddr) vm_cnt.v_free_count = 0; for (segind = 0; segind < vm_phys_nsegs; segind++) { seg = &vm_phys_segs[segind]; - for (pa = seg->start; pa < seg->end; pa += PAGE_SIZE) - vm_phys_init_page(pa); + for (m = seg->first_page, pa = seg->start; pa < seg->end; + m++, pa += PAGE_SIZE) + vm_page_init_page(m, pa, segind); /* * Add the segment to the free lists only if it is covered by Modified: stable/11/sys/vm/vm_phys.c ============================================================================== --- stable/11/sys/vm/vm_phys.c Mon Dec 4 13:28:56 2017 (r326528) +++ stable/11/sys/vm/vm_phys.c Mon Dec 4 15:18:08 2017 (r326529) @@ -175,7 +175,6 @@ static vm_page_t vm_phys_alloc_seg_contig(struct vm_ph vm_paddr_t boundary); static void _vm_phys_create_seg(vm_paddr_t start, vm_paddr_t end, int domain); static void vm_phys_create_seg(vm_paddr_t start, vm_paddr_t end); -static int vm_phys_paddr_to_segind(vm_paddr_t pa); static void vm_phys_split_pages(vm_page_t m, int oind, struct vm_freelist *fl, int order); @@ -731,31 +730,6 @@ vm_phys_split_pages(vm_page_t m, int oind, struct vm_f } /* - * Initialize a physical page in preparation for adding it to the free - * lists. - */ -void -vm_phys_init_page(vm_paddr_t pa) -{ - vm_page_t m; - - m = vm_phys_paddr_to_vm_page(pa); - m->object = NULL; - m->wire_count = 0; - m->busy_lock = VPB_UNBUSIED; - m->hold_count = 0; - m->flags = m->aflags = m->oflags = 0; - m->phys_addr = pa; - m->queue = PQ_NONE; - m->psind = 0; - m->segind = vm_phys_paddr_to_segind(pa); - m->order = VM_NFREEORDER; - m->pool = VM_FREEPOOL_DEFAULT; - m->valid = m->dirty = 0; - pmap_page_init(m); -} - -/* * Allocate a contiguous, power of two-sized set of physical pages * from the free lists. * @@ -1061,24 +1035,6 @@ vm_phys_fictitious_unreg_range(vm_paddr_t start, vm_pa rw_wunlock(&vm_phys_fictitious_reg_lock); free(seg->first_page, M_FICT_PAGES); free(seg, M_FICT_PAGES); -} - -/* - * Find the segment containing the given physical address. - */ -static int -vm_phys_paddr_to_segind(vm_paddr_t pa) -{ - struct vm_phys_seg *seg; - int segind; - - for (segind = 0; segind < vm_phys_nsegs; segind++) { - seg = &vm_phys_segs[segind]; - if (pa >= seg->start && pa < seg->end) - return (segind); - } - panic("vm_phys_paddr_to_segind: paddr %#jx is not in any segment" , - (uintmax_t)pa); } /* Modified: stable/11/sys/vm/vm_phys.h ============================================================================== --- stable/11/sys/vm/vm_phys.h Mon Dec 4 13:28:56 2017 (r326528) +++ stable/11/sys/vm/vm_phys.h Mon Dec 4 15:18:08 2017 (r326529) @@ -82,7 +82,6 @@ vm_page_t vm_phys_fictitious_to_vm_page(vm_paddr_t pa) void vm_phys_free_contig(vm_page_t m, u_long npages); void vm_phys_free_pages(vm_page_t m, int order); void vm_phys_init(void); -void vm_phys_init_page(vm_paddr_t pa); vm_page_t vm_phys_paddr_to_vm_page(vm_paddr_t pa); vm_page_t vm_phys_scan_contig(u_long npages, vm_paddr_t low, vm_paddr_t high, u_long alignment, vm_paddr_t boundary, int options); From owner-svn-src-stable@freebsd.org Mon Dec 4 15:19:11 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2DBCBDFED15; Mon, 4 Dec 2017 15:19:11 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EDC246BA1D; Mon, 4 Dec 2017 15:19:10 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB4FJA6B048856; Mon, 4 Dec 2017 15:19:10 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB4FJ9jU048854; Mon, 4 Dec 2017 15:19:09 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201712041519.vB4FJ9jU048854@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 4 Dec 2017 15:19:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326530 - stable/11/sys/geom/mirror X-SVN-Group: stable-11 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/11/sys/geom/mirror X-SVN-Commit-Revision: 326530 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Dec 2017 15:19:11 -0000 Author: markj Date: Mon Dec 4 15:19:09 2017 New Revision: 326530 URL: https://svnweb.freebsd.org/changeset/base/326530 Log: MFC r326132: Allow kern.geom.mirror.debug to be negative. Modified: stable/11/sys/geom/mirror/g_mirror.c stable/11/sys/geom/mirror/g_mirror.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/geom/mirror/g_mirror.c ============================================================================== --- stable/11/sys/geom/mirror/g_mirror.c Mon Dec 4 15:18:08 2017 (r326529) +++ stable/11/sys/geom/mirror/g_mirror.c Mon Dec 4 15:19:09 2017 (r326530) @@ -54,8 +54,8 @@ static MALLOC_DEFINE(M_MIRROR, "mirror_data", "GEOM_MI SYSCTL_DECL(_kern_geom); static SYSCTL_NODE(_kern_geom, OID_AUTO, mirror, CTLFLAG_RW, 0, "GEOM_MIRROR stuff"); -u_int g_mirror_debug = 0; -SYSCTL_UINT(_kern_geom_mirror, OID_AUTO, debug, CTLFLAG_RWTUN, &g_mirror_debug, 0, +int g_mirror_debug = 0; +SYSCTL_INT(_kern_geom_mirror, OID_AUTO, debug, CTLFLAG_RWTUN, &g_mirror_debug, 0, "Debug level"); static u_int g_mirror_timeout = 4; SYSCTL_UINT(_kern_geom_mirror, OID_AUTO, timeout, CTLFLAG_RWTUN, &g_mirror_timeout, Modified: stable/11/sys/geom/mirror/g_mirror.h ============================================================================== --- stable/11/sys/geom/mirror/g_mirror.h Mon Dec 4 15:18:08 2017 (r326529) +++ stable/11/sys/geom/mirror/g_mirror.h Mon Dec 4 15:19:09 2017 (r326530) @@ -72,7 +72,7 @@ G_MIRROR_DEVICE_FLAG_NOFAILSYNC) #ifdef _KERNEL -extern u_int g_mirror_debug; +extern int g_mirror_debug; #define G_MIRROR_DEBUG(lvl, ...) do { \ if (g_mirror_debug >= (lvl)) { \ From owner-svn-src-stable@freebsd.org Mon Dec 4 15:19:51 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 99DCEDFED81; Mon, 4 Dec 2017 15:19:51 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 660B76BB4F; Mon, 4 Dec 2017 15:19:51 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB4FJoJm048983; Mon, 4 Dec 2017 15:19:50 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB4FJofi048982; Mon, 4 Dec 2017 15:19:50 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201712041519.vB4FJofi048982@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 4 Dec 2017 15:19:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326531 - stable/11/sys/modules/dtrace/dtrace_test X-SVN-Group: stable-11 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/11/sys/modules/dtrace/dtrace_test X-SVN-Commit-Revision: 326531 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Dec 2017 15:19:51 -0000 Author: markj Date: Mon Dec 4 15:19:50 2017 New Revision: 326531 URL: https://svnweb.freebsd.org/changeset/base/326531 Log: MFC r326178: Don't redefine _KERNEL. Modified: stable/11/sys/modules/dtrace/dtrace_test/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/modules/dtrace/dtrace_test/Makefile ============================================================================== --- stable/11/sys/modules/dtrace/dtrace_test/Makefile Mon Dec 4 15:19:09 2017 (r326530) +++ stable/11/sys/modules/dtrace/dtrace_test/Makefile Mon Dec 4 15:19:50 2017 (r326531) @@ -11,8 +11,6 @@ SRCS+= vnode_if.h CFLAGS+= -I${SYSDIR} -CFLAGS+= -D_KERNEL - .include CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h From owner-svn-src-stable@freebsd.org Mon Dec 4 15:20:41 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1147FDFEE1E; Mon, 4 Dec 2017 15:20:41 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D145D6BCA7; Mon, 4 Dec 2017 15:20:40 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB4FKd4J049145; Mon, 4 Dec 2017 15:20:39 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB4FKd2Q049144; Mon, 4 Dec 2017 15:20:39 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201712041520.vB4FKd2Q049144@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 4 Dec 2017 15:20:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326532 - stable/11/cddl/contrib/opensolaris/lib/libdtrace/common X-SVN-Group: stable-11 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/11/cddl/contrib/opensolaris/lib/libdtrace/common X-SVN-Commit-Revision: 326532 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Dec 2017 15:20:41 -0000 Author: markj Date: Mon Dec 4 15:20:39 2017 New Revision: 326532 URL: https://svnweb.freebsd.org/changeset/base/326532 Log: MFC r326177: Fix the type signature for sx(9) DTrace subroutines. Modified: stable/11/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Directory Properties: stable/11/ (props changed) Modified: stable/11/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c ============================================================================== --- stable/11/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Mon Dec 4 15:19:50 2017 (r326531) +++ stable/11/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Mon Dec 4 15:20:39 2017 (r326532) @@ -1317,7 +1317,7 @@ alloc: snprintf(intmtx_str, sizeof(intmtx_str), "int(%s`struct mtx *)",p); snprintf(threadmtx_str, sizeof(threadmtx_str), "struct thread *(%s`struct mtx *)",p); snprintf(rwlock_str, sizeof(rwlock_str), "int(%s`struct rwlock *)",p); - snprintf(sxlock_str, sizeof(sxlock_str), "int(%s`struct sxlock *)",p); + snprintf(sxlock_str, sizeof(sxlock_str), "int(%s`struct sx *)",p); } #endif From owner-svn-src-stable@freebsd.org Mon Dec 4 15:22:08 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4A4AEDFEFB0; Mon, 4 Dec 2017 15:22:08 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 16E356BEF0; Mon, 4 Dec 2017 15:22:08 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB4FM7ce052997; Mon, 4 Dec 2017 15:22:07 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB4FM74q052996; Mon, 4 Dec 2017 15:22:07 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201712041522.vB4FM74q052996@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 4 Dec 2017 15:22:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326533 - stable/11/sys/kern X-SVN-Group: stable-11 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/11/sys/kern X-SVN-Commit-Revision: 326533 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Dec 2017 15:22:08 -0000 Author: markj Date: Mon Dec 4 15:22:06 2017 New Revision: 326533 URL: https://svnweb.freebsd.org/changeset/base/326533 Log: MFC r326175, r326176: Lockstat fixes for sx locks. Modified: stable/11/sys/kern/kern_sx.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_sx.c ============================================================================== --- stable/11/sys/kern/kern_sx.c Mon Dec 4 15:20:39 2017 (r326532) +++ stable/11/sys/kern/kern_sx.c Mon Dec 4 15:22:06 2017 (r326533) @@ -456,10 +456,8 @@ sx_downgrade_(struct sx *sx, const char *file, int lin x = sx->sx_lock; if (!(x & SX_LOCK_SHARED_WAITERS) && atomic_cmpset_rel_ptr(&sx->sx_lock, x, SX_SHARERS_LOCK(1) | - (x & SX_LOCK_EXCLUSIVE_WAITERS))) { - LOCK_LOG_LOCK("XDOWNGRADE", &sx->lock_object, 0, 0, file, line); - return; - } + (x & SX_LOCK_EXCLUSIVE_WAITERS))) + goto out; /* * Lock the sleep queue so we can read the waiters bits @@ -480,11 +478,12 @@ sx_downgrade_(struct sx *sx, const char *file, int lin 0, SQ_SHARED_QUEUE); sleepq_release(&sx->lock_object); - LOCK_LOG_LOCK("XDOWNGRADE", &sx->lock_object, 0, 0, file, line); - LOCKSTAT_RECORD0(sx__downgrade, sx); - if (wakeup_swapper) kick_proc0(); + +out: + LOCK_LOG_LOCK("XDOWNGRADE", &sx->lock_object, 0, 0, file, line); + LOCKSTAT_RECORD0(sx__downgrade, sx); } /* @@ -1108,8 +1107,6 @@ _sx_sunlock_hard(struct sx *sx, uintptr_t x, const cha if (SCHEDULER_STOPPED()) return; - LOCKSTAT_PROFILE_RELEASE_RWLOCK(sx__release, sx, LOCKSTAT_READER); - for (;;) { if (_sx_sunlock_try(sx, &x)) break; @@ -1145,6 +1142,7 @@ _sx_sunlock_hard(struct sx *sx, uintptr_t x, const cha kick_proc0(); break; } + LOCKSTAT_PROFILE_RELEASE_RWLOCK(sx__release, sx, LOCKSTAT_READER); } void From owner-svn-src-stable@freebsd.org Mon Dec 4 15:28:09 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2FEA8DFF11F; Mon, 4 Dec 2017 15:28:09 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E41236C3E9; Mon, 4 Dec 2017 15:28:08 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB4FS83u053831; Mon, 4 Dec 2017 15:28:08 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB4FS7q7053828; Mon, 4 Dec 2017 15:28:07 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201712041528.vB4FS7q7053828@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 4 Dec 2017 15:28:07 +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: r326534 - in stable: 10/release 10/share/man/man7 11/release 11/share/man/man7 X-SVN-Group: stable-10 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: in stable: 10/release 10/share/man/man7 11/release 11/share/man/man7 X-SVN-Commit-Revision: 326534 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Dec 2017 15:28:09 -0000 Author: gjb Date: Mon Dec 4 15:28:07 2017 New Revision: 326534 URL: https://svnweb.freebsd.org/changeset/base/326534 Log: MFC r326315, r326330, r326331, r326412: r326315: Set DISTDIR and WRKDIRPREFIX when building ports within the chroot(8) to avoid mtime changes within the ports checkout, which can cause checksum differences. r326330: Add a comment to release/release.conf.sample documenting EMBEDDEDPORTS. [1] Remove and update stale documentation from release(7) while here. r326331: Correct a comment. r326412: Fix port build flags passed to make(1) after r326315, where it was missed for embedded image builds. PR: 206344 [1] Sponsored by: The FreeBSD Foundation Modified: stable/10/release/release.conf.sample stable/10/release/release.sh stable/10/share/man/man7/release.7 Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/release/release.conf.sample stable/11/release/release.sh stable/11/share/man/man7/release.7 Directory Properties: stable/11/ (props changed) Modified: stable/10/release/release.conf.sample ============================================================================== --- stable/10/release/release.conf.sample Mon Dec 4 15:22:06 2017 (r326533) +++ stable/10/release/release.conf.sample Mon Dec 4 15:28:07 2017 (r326534) @@ -51,6 +51,20 @@ PORTBRANCH="ports/head@rHEAD" ## Set when building embedded images. #EMBEDDEDBUILD= +## Set to a list of ports required to build embedded system-on-chip +## images, such as sysutils/u-boot-rpi. +#EMBEDDEDPORTS= + +## Set to the hardware platform of the target userland. This value +## is passed to make(1) to set the TARGET (value of uname -m) to cross +## build. +#EMBEDDED_TARGET= + +## Set to the machine processor architecture of the target userland. +## This value is passed to make(1) to set the TARGET_ARCH (value of uname -p) +## to cross build. +#EMBEDDED_TARGET_ARCH= + ## Set to skip the chroot environment buildworld/installworld/distribution ## step if it is expected the build environment will exist via alternate ## means. Modified: stable/10/release/release.sh ============================================================================== --- stable/10/release/release.sh Mon Dec 4 15:22:06 2017 (r326533) +++ stable/10/release/release.sh Mon Dec 4 15:28:07 2017 (r326534) @@ -274,8 +274,11 @@ extra_chroot_setup() { PBUILD_FLAGS="OSVERSION=${_OSVERSION} BATCH=yes" PBUILD_FLAGS="${PBUILD_FLAGS} UNAME_r=${UNAME_r}" PBUILD_FLAGS="${PBUILD_FLAGS} OSREL=${REVISION}" - chroot ${CHROOTDIR} make -C /usr/ports/textproc/docproj \ - ${PBUILD_FLAGS} OPTIONS_UNSET="FOP IGOR" \ + PBUILD_FLAGS="${PBUILD_FLAGS} WRKDIRPREFIX=/tmp/ports" + PBUILD_FLAGS="${PBUILD_FLAGS} DISTDIR=/tmp/distfiles" + chroot ${CHROOTDIR} env ${PBUILD_FLAGS} make -C \ + /usr/ports/textproc/docproj \ + OPTIONS_UNSET="FOP IGOR" \ FORCE_PKG_REGISTER=1 \ install clean distclean fi @@ -288,9 +291,12 @@ extra_chroot_setup() { PBUILD_FLAGS="OSVERSION=${_OSVERSION} BATCH=yes" PBUILD_FLAGS="${PBUILD_FLAGS} UNAME_r=${UNAME_r}" PBUILD_FLAGS="${PBUILD_FLAGS} OSREL=${REVISION}" + PBUILD_FLAGS="${PBUILD_FLAGS} WRKDIRPREFIX=/tmp/ports" + PBUILD_FLAGS="${PBUILD_FLAGS} DISTDIR=/tmp/distfiles" for _PORT in ${EMBEDDEDPORTS}; do - eval chroot ${CHROOTDIR} make -C /usr/ports/${_PORT} \ - FORCE_PKG_REGISTER=1 ${PBUILD_FLAGS} install clean distclean + eval chroot ${CHROOTDIR} env ${PBUILD_FLAGS} make -C \ + /usr/ports/${_PORT} \ + FORCE_PKG_REGISTER=1 install clean distclean done fi Modified: stable/10/share/man/man7/release.7 ============================================================================== --- stable/10/share/man/man7/release.7 Mon Dec 4 15:22:06 2017 (r326533) +++ stable/10/share/man/man7/release.7 Mon Dec 4 15:28:07 2017 (r326534) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 28, 2015 +.Dd November 28, 2017 .Dt RELEASE 7 .Os .Sh NAME @@ -305,7 +305,6 @@ variables are relevant only to release builds for embe .It Va EMBEDDEDBUILD Set to a non-null value to enable functionality for embedded device release builds. -.Pq This option is considered highly experimental. .Pp When set, .Va WITH_DVD @@ -313,15 +312,15 @@ is unset, and .Va NODOC is defined. Additionally, -.Va XDEV +.Va EMBEDDED_TARGET and -.Va XDEV_ARCH +.Va EMBEDDED_TARGET_ARCH must also be defined. When the build environment is created, .Fa release.sh runs a separate build script located in an architecture-specific directory in -.Pa src/release/${XDEV}/ . +.Pa src/release/${EMBEDDED_TARGET}/ . .It Va EMBEDDEDPORTS Set to the list of any ports that are required for the target device in the format of @@ -329,27 +328,20 @@ in the format of The .Fa devel/subversion port is built by default. -.It Va CROCHETSRC -Set to the source URL for the Crochet build tool. -.It Va CROCHETBRANCH -Set to the subversion branch from -.Va ${CROCHETSRC} -to use. -Defaults to -.Pa trunk . -.It Va UBOOTSRC -Set to the source URL of u-boot, if required. -.It Va UBOOTBRANCH -Set to the subversion branch from -.Va ${UBOOTSRC} -to use. -Defaults to -.Pa trunk . -.It Va UBOOTDIR -Set to the target directory within -.Va ${CHROOTDIR} -to check out -.Va ${UBOOTSRC}/${UBOOTBRANCH} . +.It Va EMBEDDED_TARGET +When set, its value is passed to +.Xr make 1 +to set the +.Va TARGET +.Pq value of Cm uname Fl m +to cross build the target userland. +.It Va EMBEDDED_TARGET_ARCH +When set, its value is passed to +.Xr make 1 +to set the +.Va TARGET_ARCH +.Pq value of Cm uname Fl p +to cross build the target userland. .El .Sh VIRTUAL MACHINE DISK IMAGES The following From owner-svn-src-stable@freebsd.org Mon Dec 4 15:28:09 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7B805DFF123; Mon, 4 Dec 2017 15:28:09 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 558C26C3EA; Mon, 4 Dec 2017 15:28:09 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB4FS8kl053839; Mon, 4 Dec 2017 15:28:08 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB4FS8x0053836; Mon, 4 Dec 2017 15:28:08 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201712041528.vB4FS8x0053836@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 4 Dec 2017 15:28:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326534 - in stable: 10/release 10/share/man/man7 11/release 11/share/man/man7 X-SVN-Group: stable-11 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: in stable: 10/release 10/share/man/man7 11/release 11/share/man/man7 X-SVN-Commit-Revision: 326534 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Dec 2017 15:28:09 -0000 Author: gjb Date: Mon Dec 4 15:28:07 2017 New Revision: 326534 URL: https://svnweb.freebsd.org/changeset/base/326534 Log: MFC r326315, r326330, r326331, r326412: r326315: Set DISTDIR and WRKDIRPREFIX when building ports within the chroot(8) to avoid mtime changes within the ports checkout, which can cause checksum differences. r326330: Add a comment to release/release.conf.sample documenting EMBEDDEDPORTS. [1] Remove and update stale documentation from release(7) while here. r326331: Correct a comment. r326412: Fix port build flags passed to make(1) after r326315, where it was missed for embedded image builds. PR: 206344 [1] Sponsored by: The FreeBSD Foundation Modified: stable/11/release/release.conf.sample stable/11/release/release.sh stable/11/share/man/man7/release.7 Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/release/release.conf.sample stable/10/release/release.sh stable/10/share/man/man7/release.7 Directory Properties: stable/10/ (props changed) Modified: stable/11/release/release.conf.sample ============================================================================== --- stable/11/release/release.conf.sample Mon Dec 4 15:22:06 2017 (r326533) +++ stable/11/release/release.conf.sample Mon Dec 4 15:28:07 2017 (r326534) @@ -61,6 +61,20 @@ PORTBRANCH="ports/head@rHEAD" ## Set when building embedded images. #EMBEDDEDBUILD= +## Set to a list of ports required to build embedded system-on-chip +## images, such as sysutils/u-boot-rpi. +#EMBEDDEDPORTS= + +## Set to the hardware platform of the target userland. This value +## is passed to make(1) to set the TARGET (value of uname -m) to cross +## build. +#EMBEDDED_TARGET= + +## Set to the machine processor architecture of the target userland. +## This value is passed to make(1) to set the TARGET_ARCH (value of uname -p) +## to cross build. +#EMBEDDED_TARGET_ARCH= + ## Set to skip the chroot environment buildworld/installworld/distribution ## step if it is expected the build environment will exist via alternate ## means. Modified: stable/11/release/release.sh ============================================================================== --- stable/11/release/release.sh Mon Dec 4 15:22:06 2017 (r326533) +++ stable/11/release/release.sh Mon Dec 4 15:28:07 2017 (r326534) @@ -280,8 +280,11 @@ extra_chroot_setup() { PBUILD_FLAGS="OSVERSION=${_OSVERSION} BATCH=yes" PBUILD_FLAGS="${PBUILD_FLAGS} UNAME_r=${UNAME_r}" PBUILD_FLAGS="${PBUILD_FLAGS} OSREL=${REVISION}" - chroot ${CHROOTDIR} make -C /usr/ports/textproc/docproj \ - ${PBUILD_FLAGS} OPTIONS_UNSET="FOP IGOR" \ + PBUILD_FLAGS="${PBUILD_FLAGS} WRKDIRPREFIX=/tmp/ports" + PBUILD_FLAGS="${PBUILD_FLAGS} DISTDIR=/tmp/distfiles" + chroot ${CHROOTDIR} env ${PBUILD_FLAGS} make -C \ + /usr/ports/textproc/docproj \ + OPTIONS_UNSET="FOP IGOR" \ FORCE_PKG_REGISTER=1 \ install clean distclean fi @@ -294,9 +297,12 @@ extra_chroot_setup() { PBUILD_FLAGS="OSVERSION=${_OSVERSION} BATCH=yes" PBUILD_FLAGS="${PBUILD_FLAGS} UNAME_r=${UNAME_r}" PBUILD_FLAGS="${PBUILD_FLAGS} OSREL=${REVISION}" + PBUILD_FLAGS="${PBUILD_FLAGS} WRKDIRPREFIX=/tmp/ports" + PBUILD_FLAGS="${PBUILD_FLAGS} DISTDIR=/tmp/distfiles" for _PORT in ${EMBEDDEDPORTS}; do - eval chroot ${CHROOTDIR} make -C /usr/ports/${_PORT} \ - FORCE_PKG_REGISTER=1 ${PBUILD_FLAGS} install clean distclean + eval chroot ${CHROOTDIR} env ${PBUILD_FLAGS} make -C \ + /usr/ports/${_PORT} \ + FORCE_PKG_REGISTER=1 install clean distclean done fi Modified: stable/11/share/man/man7/release.7 ============================================================================== --- stable/11/share/man/man7/release.7 Mon Dec 4 15:22:06 2017 (r326533) +++ stable/11/share/man/man7/release.7 Mon Dec 4 15:28:07 2017 (r326534) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 20, 2015 +.Dd November 28, 2017 .Dt RELEASE 7 .Os .Sh NAME @@ -314,7 +314,6 @@ variables are relevant only to release builds for embe .It Va EMBEDDEDBUILD Set to a non-null value to enable functionality for embedded device release builds. -.Pq This option is considered highly experimental. .Pp When set, .Va WITH_DVD @@ -322,15 +321,15 @@ is unset, and .Va NODOC is defined. Additionally, -.Va XDEV +.Va EMBEDDED_TARGET and -.Va XDEV_ARCH +.Va EMBEDDED_TARGET_ARCH must also be defined. When the build environment is created, .Fa release.sh runs a separate build script located in an architecture-specific directory in -.Pa src/release/${XDEV}/ . +.Pa src/release/${EMBEDDED_TARGET}/ . .It Va EMBEDDEDPORTS Set to the list of any ports that are required for the target device in the format of @@ -338,27 +337,20 @@ in the format of The .Fa devel/subversion port is built by default. -.It Va CROCHETSRC -Set to the source URL for the Crochet build tool. -.It Va CROCHETBRANCH -Set to the subversion branch from -.Va ${CROCHETSRC} -to use. -Defaults to -.Pa trunk . -.It Va UBOOTSRC -Set to the source URL of u-boot, if required. -.It Va UBOOTBRANCH -Set to the subversion branch from -.Va ${UBOOTSRC} -to use. -Defaults to -.Pa trunk . -.It Va UBOOTDIR -Set to the target directory within -.Va ${CHROOTDIR} -to check out -.Va ${UBOOTSRC}/${UBOOTBRANCH} . +.It Va EMBEDDED_TARGET +When set, its value is passed to +.Xr make 1 +to set the +.Va TARGET +.Pq value of Cm uname Fl m +to cross build the target userland. +.It Va EMBEDDED_TARGET_ARCH +When set, its value is passed to +.Xr make 1 +to set the +.Va TARGET_ARCH +.Pq value of Cm uname Fl p +to cross build the target userland. .El .Sh VIRTUAL MACHINE DISK IMAGES The following From owner-svn-src-stable@freebsd.org Mon Dec 4 16:47:20 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C9D18E5D56D; Mon, 4 Dec 2017 16:47:20 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 961026F5C2; Mon, 4 Dec 2017 16:47:20 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB4GlJam091554; Mon, 4 Dec 2017 16:47:19 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB4GlJaf091553; Mon, 4 Dec 2017 16:47:19 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201712041647.vB4GlJaf091553@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 4 Dec 2017 16:47:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326536 - stable/11/cddl/contrib/opensolaris/cmd/zdb X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/cddl/contrib/opensolaris/cmd/zdb X-SVN-Commit-Revision: 326536 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Dec 2017 16:47:20 -0000 Author: avg Date: Mon Dec 4 16:47:19 2017 New Revision: 326536 URL: https://svnweb.freebsd.org/changeset/base/326536 Log: MFC r326150: zdb: use a heap allocation instead of a huge array on stack Modified: stable/11/cddl/contrib/opensolaris/cmd/zdb/zdb.c Directory Properties: stable/11/ (props changed) Modified: stable/11/cddl/contrib/opensolaris/cmd/zdb/zdb.c ============================================================================== --- stable/11/cddl/contrib/opensolaris/cmd/zdb/zdb.c Mon Dec 4 16:38:20 2017 (r326535) +++ stable/11/cddl/contrib/opensolaris/cmd/zdb/zdb.c Mon Dec 4 16:47:19 2017 (r326536) @@ -3724,7 +3724,7 @@ zdb_embedded_block(char *thing) { blkptr_t bp = { 0 }; unsigned long long *words = (void *)&bp; - char buf[SPA_MAXBLOCKSIZE]; + char *buf; int err; err = sscanf(thing, "%llx:%llx:%llx:%llx:%llx:%llx:%llx:%llx:" @@ -3738,12 +3738,20 @@ zdb_embedded_block(char *thing) exit(1); } ASSERT3U(BPE_GET_LSIZE(&bp), <=, SPA_MAXBLOCKSIZE); + buf = malloc(SPA_MAXBLOCKSIZE); + if (buf == NULL) { + (void) fprintf(stderr, "%s: failed to allocate %llu bytes\n", + __func__, SPA_MAXBLOCKSIZE); + exit(1); + } err = decode_embedded_bp(&bp, buf, BPE_GET_LSIZE(&bp)); if (err != 0) { (void) printf("decode failed: %u\n", err); + free(buf); exit(1); } zdb_dump_block_raw(buf, BPE_GET_LSIZE(&bp), 0); + free(buf); } static boolean_t From owner-svn-src-stable@freebsd.org Mon Dec 4 20:09:39 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 62BC9E696B2; Mon, 4 Dec 2017 20:09:39 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2E4E876FF6; Mon, 4 Dec 2017 20:09:39 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB4K9ceS075465; Mon, 4 Dec 2017 20:09:38 GMT (envelope-from wulf@FreeBSD.org) Received: (from wulf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB4K9cXX075464; Mon, 4 Dec 2017 20:09:38 GMT (envelope-from wulf@FreeBSD.org) Message-Id: <201712042009.vB4K9cXX075464@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wulf set sender to wulf@FreeBSD.org using -f From: Vladimir Kondratyev Date: Mon, 4 Dec 2017 20:09:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326540 - stable/11/sys/dev/evdev X-SVN-Group: stable-11 X-SVN-Commit-Author: wulf X-SVN-Commit-Paths: stable/11/sys/dev/evdev X-SVN-Commit-Revision: 326540 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Dec 2017 20:09:39 -0000 Author: wulf Date: Mon Dec 4 20:09:38 2017 New Revision: 326540 URL: https://svnweb.freebsd.org/changeset/base/326540 Log: MFC r325294: evdev: Hide "kern.evdev.rcpt_mask" sysctl if kernel is compiled w/o EVDEV_SUPPORT as it's value has no meaning in this case. MFC r326019: evdev: Export EVDEV_SUPPORT kernel option through feature facility Approved by: gonzo (mentor) Modified: stable/11/sys/dev/evdev/evdev.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/evdev/evdev.c ============================================================================== --- stable/11/sys/dev/evdev/evdev.c Mon Dec 4 17:10:52 2017 (r326539) +++ stable/11/sys/dev/evdev/evdev.c Mon Dec 4 20:09:38 2017 (r326540) @@ -50,7 +50,10 @@ #ifdef FEATURE FEATURE(evdev, "Input event devices support"); +#ifdef EVDEV_SUPPORT +FEATURE(evdev_support, "Evdev support in hybrid drivers"); #endif +#endif enum evdev_sparse_result { @@ -64,12 +67,14 @@ MALLOC_DEFINE(M_EVDEV, "evdev", "evdev memory"); int evdev_rcpt_mask = EVDEV_RCPT_SYSMOUSE | EVDEV_RCPT_KBDMUX; int evdev_sysmouse_t_axis = 0; +#ifdef EVDEV_SUPPORT SYSCTL_NODE(_kern, OID_AUTO, evdev, CTLFLAG_RW, 0, "Evdev args"); SYSCTL_INT(_kern_evdev, OID_AUTO, rcpt_mask, CTLFLAG_RW, &evdev_rcpt_mask, 0, "Who is receiving events: bit0 - sysmouse, bit1 - kbdmux, " "bit2 - mouse hardware, bit3 - keyboard hardware"); SYSCTL_INT(_kern_evdev, OID_AUTO, sysmouse_t_axis, CTLFLAG_RW, &evdev_sysmouse_t_axis, 0, "Extract T-axis from 0-none, 1-ums, 2-psm"); +#endif static void evdev_start_repeat(struct evdev_dev *, uint16_t); static void evdev_stop_repeat(struct evdev_dev *); From owner-svn-src-stable@freebsd.org Mon Dec 4 20:22:28 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 01961E69C4B; Mon, 4 Dec 2017 20:22:28 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A9BCE77A06; Mon, 4 Dec 2017 20:22:27 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB4KMQX7083962; Mon, 4 Dec 2017 20:22:26 GMT (envelope-from wulf@FreeBSD.org) Received: (from wulf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB4KMQEP083961; Mon, 4 Dec 2017 20:22:26 GMT (envelope-from wulf@FreeBSD.org) Message-Id: <201712042022.vB4KMQEP083961@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wulf set sender to wulf@FreeBSD.org using -f From: Vladimir Kondratyev Date: Mon, 4 Dec 2017 20:22:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326541 - stable/11/sys/dev/evdev X-SVN-Group: stable-11 X-SVN-Commit-Author: wulf X-SVN-Commit-Paths: stable/11/sys/dev/evdev X-SVN-Commit-Revision: 326541 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Dec 2017 20:22:28 -0000 Author: wulf Date: Mon Dec 4 20:22:26 2017 New Revision: 326541 URL: https://svnweb.freebsd.org/changeset/base/326541 Log: MFC r325269: evdev: Translate KEY_102ND in evdev_scancode2key() MFC r326020: Fix evdev codes for slash and asterisk numpad keys of AT-keyboards MFC r326021: evdev: change USB scancode 0x54 from KEY_SLASH to KEY_KPSLASH Submitted by: dumbbell (r325269, r326021) Approved by: gonzo (mentor) Modified: stable/11/sys/dev/evdev/evdev_utils.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/evdev/evdev_utils.c ============================================================================== --- stable/11/sys/dev/evdev/evdev_utils.c Mon Dec 4 20:09:38 2017 (r326540) +++ stable/11/sys/dev/evdev/evdev_utils.c Mon Dec 4 20:22:26 2017 (r326541) @@ -62,7 +62,7 @@ static uint16_t evdev_usb_scancodes[256] = { KEY_PAUSE, KEY_INSERT, KEY_HOME, KEY_PAGEUP, KEY_DELETE, KEY_END, KEY_PAGEDOWN, KEY_RIGHT, KEY_LEFT, KEY_DOWN, KEY_UP, KEY_NUMLOCK, - KEY_SLASH, KEY_KPASTERISK, KEY_KPMINUS, KEY_KPPLUS, + KEY_KPSLASH, KEY_KPASTERISK, KEY_KPMINUS, KEY_KPPLUS, KEY_KPENTER, KEY_KP1, KEY_KP2, KEY_KP3, KEY_KP4, KEY_KP5, KEY_KP6, KEY_KP7, /* 0x60 - 0x7f */ @@ -129,7 +129,7 @@ static uint16_t evdev_at_set1_scancodes[] = { KEY_APOSTROPHE, KEY_GRAVE, KEY_LEFTSHIFT, KEY_BACKSLASH, KEY_Z, KEY_X, KEY_C, KEY_V, KEY_B, KEY_N, KEY_M, KEY_COMMA, - KEY_DOT, KEY_SLASH, KEY_RIGHTSHIFT, NONE, + KEY_DOT, KEY_SLASH, KEY_RIGHTSHIFT, KEY_KPASTERISK, KEY_LEFTALT, KEY_SPACE, KEY_CAPSLOCK, KEY_F1, KEY_F2, KEY_F3, KEY_F4, KEY_F5, /* 0x40 - 0x5f */ @@ -138,7 +138,7 @@ static uint16_t evdev_at_set1_scancodes[] = { KEY_KP8, KEY_KP9, KEY_KPMINUS, KEY_KP4, KEY_KP5, KEY_KP6, KEY_KPPLUS, KEY_KP1, KEY_KP2, KEY_KP3, KEY_KP0, KEY_KPDOT, - NONE, NONE, NONE, KEY_F11, + NONE, NONE, KEY_102ND, KEY_F11, KEY_F12, NONE, NONE, NONE, NONE, NONE, NONE, NONE, /* 0x60 - 0x7f */ @@ -165,7 +165,7 @@ static uint16_t evdev_at_set1_scancodes[] = { NONE, NONE, NONE, NONE, NONE, NONE, KEY_VOLUMEDOWN, NONE, KEY_VOLUMEUP, NONE, KEY_HOMEPAGE, NONE, - NONE, KEY_KPASTERISK, NONE, KEY_SYSRQ, + NONE, KEY_KPSLASH, NONE, KEY_SYSRQ, KEY_RIGHTALT, NONE, NONE, NONE, NONE, NONE, NONE, NONE, /* 0x40 - 0x5f. 0xE0 prefixed */ From owner-svn-src-stable@freebsd.org Mon Dec 4 21:12:06 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CBD0AE6AEB1; Mon, 4 Dec 2017 21:12:06 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8DC0479A57; Mon, 4 Dec 2017 21:12:06 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB4LC5ck005252; Mon, 4 Dec 2017 21:12:05 GMT (envelope-from wulf@FreeBSD.org) Received: (from wulf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB4LC5d2005247; Mon, 4 Dec 2017 21:12:05 GMT (envelope-from wulf@FreeBSD.org) Message-Id: <201712042112.vB4LC5d2005247@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wulf set sender to wulf@FreeBSD.org using -f From: Vladimir Kondratyev Date: Mon, 4 Dec 2017 21:12:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326543 - in stable/11/sys/dev: evdev syscons vt X-SVN-Group: stable-11 X-SVN-Commit-Author: wulf X-SVN-Commit-Paths: in stable/11/sys/dev: evdev syscons vt X-SVN-Commit-Revision: 326543 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Dec 2017 21:12:06 -0000 Author: wulf Date: Mon Dec 4 21:12:05 2017 New Revision: 326543 URL: https://svnweb.freebsd.org/changeset/base/326543 Log: MFC r325295: evdev: Lock Giant around keyboard ioctls This fixes turning ukbd(4) LEDs on/off with evdev interface as well MFC r325296: evdev: Take driver's lock in cdev write handler if necessary MFC r325297: sysmouse(4): Fix ums(4)-style T-axis reporting via evdev protocol - Do not report T-axis wheel events as button presses - Reverse T-axis to match Linux - Remove wrong comment. T-axis buttons state should be checked by level not by edge to allow continuous wheel tilt reporting MFC r325298: evdev: Disable value normalization and state filtering for SND events. Some events can take sound pitch as a value so can not be represented as binary on/off events. Tracking for on/off state is left in place as it is a part of the evdev API. MFC r325299: evdev: Do not start/stop softrepeat callout if no clients attached Approved by: gonzo (mentor) Modified: stable/11/sys/dev/evdev/evdev.c stable/11/sys/dev/evdev/evdev.h stable/11/sys/dev/evdev/evdev_utils.c stable/11/sys/dev/syscons/sysmouse.c stable/11/sys/dev/vt/vt_sysmouse.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/evdev/evdev.c ============================================================================== --- stable/11/sys/dev/evdev/evdev.c Mon Dec 4 20:45:15 2017 (r326542) +++ stable/11/sys/dev/evdev/evdev.c Mon Dec 4 21:12:05 2017 (r326543) @@ -582,7 +582,8 @@ evdev_modify_event(struct evdev_dev *evdev, uint16_t t *value = KEY_EVENT_REPEAT; } else { /* Start/stop callout for evdev repeats */ - if (bit_test(evdev->ev_key_states, code) == !*value) { + if (bit_test(evdev->ev_key_states, code) == !*value && + !LIST_EMPTY(&evdev->ev_clients)) { if (*value == KEY_EVENT_DOWN) evdev_start_repeat(evdev, code); else @@ -637,8 +638,6 @@ evdev_sparse_event(struct evdev_dev *evdev, uint16_t t break; case EV_SND: - if (bit_test(evdev->ev_snd_states, code) == value) - return (EV_SKIP_EVENT); bit_change(evdev->ev_snd_states, code, value); break; @@ -816,7 +815,11 @@ evdev_inject_event(struct evdev_dev *evdev, uint16_t t case EV_ABS: case EV_SW: push: + if (evdev->ev_lock_type != EV_LOCK_INTERNAL) + EVDEV_LOCK(evdev); ret = evdev_push_event(evdev, type, code, value); + if (evdev->ev_lock_type != EV_LOCK_INTERNAL) + EVDEV_UNLOCK(evdev); break; default: Modified: stable/11/sys/dev/evdev/evdev.h ============================================================================== --- stable/11/sys/dev/evdev/evdev.h Mon Dec 4 20:45:15 2017 (r326542) +++ stable/11/sys/dev/evdev/evdev.h Mon Dec 4 21:12:05 2017 (r326543) @@ -197,7 +197,7 @@ static __inline int evdev_push_snd(struct evdev_dev *evdev, uint16_t code, int32_t value) { - return (evdev_push_event(evdev, EV_SND, code, value != 0)); + return (evdev_push_event(evdev, EV_SND, code, value)); } static __inline int Modified: stable/11/sys/dev/evdev/evdev_utils.c ============================================================================== --- stable/11/sys/dev/evdev/evdev_utils.c Mon Dec 4 20:45:15 2017 (r326542) +++ stable/11/sys/dev/evdev/evdev_utils.c Mon Dec 4 21:12:05 2017 (r326543) @@ -32,7 +32,9 @@ #include #include #include +#include #include +#include #include #include @@ -314,19 +316,26 @@ evdev_ev_kbd_event(struct evdev_dev *evdev, void *soft leds |= 1 << i; else leds &= ~(1 << i); - if (leds != oleds) + if (leds != oleds) { + mtx_lock(&Giant); kbdd_ioctl(kbd, KDSETLED, (caddr_t)&leds); + mtx_unlock(&Giant); + } break; } } } else if (type == EV_REP && code == REP_DELAY) { delay[0] = value; delay[1] = kbd->kb_delay2; + mtx_lock(&Giant); kbdd_ioctl(kbd, KDSETREPEAT, (caddr_t)delay); + mtx_unlock(&Giant); } else if (type == EV_REP && code == REP_PERIOD) { delay[0] = kbd->kb_delay1; delay[1] = value; + mtx_lock(&Giant); kbdd_ioctl(kbd, KDSETREPEAT, (caddr_t)delay); + mtx_unlock(&Giant); } } Modified: stable/11/sys/dev/syscons/sysmouse.c ============================================================================== --- stable/11/sys/dev/syscons/sysmouse.c Mon Dec 4 20:45:15 2017 (r326542) +++ stable/11/sys/dev/syscons/sysmouse.c Mon Dec 4 21:12:05 2017 (r326543) @@ -107,11 +107,11 @@ smdev_evdev_write(int x, int y, int z, int buttons) } break; case EVDEV_SYSMOUSE_T_AXIS_UMS: - /* XXX: Edge triggering should be used here */ - if (buttons & (1 << 5)) + if (buttons & (1 << 6)) evdev_push_rel(sysmouse_evdev, REL_HWHEEL, 1); - else if (buttons & (1 << 6)) + else if (buttons & (1 << 5)) evdev_push_rel(sysmouse_evdev, REL_HWHEEL, -1); + buttons &= ~((1 << 5)|(1 << 6)); /* PASSTHROUGH */ case EVDEV_SYSMOUSE_T_AXIS_NONE: default: Modified: stable/11/sys/dev/vt/vt_sysmouse.c ============================================================================== --- stable/11/sys/dev/vt/vt_sysmouse.c Mon Dec 4 20:45:15 2017 (r326542) +++ stable/11/sys/dev/vt/vt_sysmouse.c Mon Dec 4 21:12:05 2017 (r326543) @@ -139,11 +139,11 @@ sysmouse_evdev_store(int x, int y, int z, int buttons) } break; case EVDEV_SYSMOUSE_T_AXIS_UMS: - /* XXX: Edge triggering should be used here */ - if (buttons & (1 << 5)) + if (buttons & (1 << 6)) evdev_push_rel(sysmouse_evdev, REL_HWHEEL, 1); - else if (buttons & (1 << 6)) + else if (buttons & (1 << 5)) evdev_push_rel(sysmouse_evdev, REL_HWHEEL, -1); + buttons &= ~((1 << 5)|(1 << 6)); /* PASSTHROUGH */ case EVDEV_SYSMOUSE_T_AXIS_NONE: default: From owner-svn-src-stable@freebsd.org Tue Dec 5 01:35:05 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 51029E72B5B; Tue, 5 Dec 2017 01:35:05 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1D5B93185; Tue, 5 Dec 2017 01:35:05 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB51Z4ZC014400; Tue, 5 Dec 2017 01:35:04 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB51Z41K014399; Tue, 5 Dec 2017 01:35:04 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201712050135.vB51Z41K014399@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 5 Dec 2017 01:35:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326546 - stable/11/etc/periodic/daily X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/11/etc/periodic/daily X-SVN-Commit-Revision: 326546 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 01:35:05 -0000 Author: emaste Date: Tue Dec 5 01:35:04 2017 New Revision: 326546 URL: https://svnweb.freebsd.org/changeset/base/326546 Log: MFC r326074: filter all passwords (not only changed) from periodic passwd backup The periodic 200.backup-passwd script outputs any differences it finds in master.passwd, relative to the previous backup. It intends to elide the encrypted password field, but previously did so only for changed lines (i.e., those beginning with - or + in the diff). Apply the sed expression also to unchanged lines to also elide their passwords. PR: 223461 Reported by: Andre Albsmeier Sponsored by: The FreeBSD Foundation Modified: stable/11/etc/periodic/daily/200.backup-passwd Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/periodic/daily/200.backup-passwd ============================================================================== --- stable/11/etc/periodic/daily/200.backup-passwd Mon Dec 4 22:40:51 2017 (r326545) +++ stable/11/etc/periodic/daily/200.backup-passwd Tue Dec 5 01:35:04 2017 (r326546) @@ -42,7 +42,7 @@ case "$daily_backup_passwd_enable" in [ $rc -lt 1 ] && rc=1 echo "$host passwd diffs:" diff -uI '^#' $bak/master.passwd.bak /etc/master.passwd |\ - sed 's/^\([-+][^-+:]*\):[^:]*:/\1:(password):/' + sed 's/^\([-+ ][^-+:]*\):[^:]*:/\1:(password):/' mv $bak/master.passwd.bak $bak/master.passwd.bak2 cp -p /etc/master.passwd $bak/master.passwd.bak || rc=3 fi From owner-svn-src-stable@freebsd.org Tue Dec 5 01:54:53 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 87336E73E74; Tue, 5 Dec 2017 01:54:53 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 539046352A; Tue, 5 Dec 2017 01:54:53 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB51sqGS022903; Tue, 5 Dec 2017 01:54:52 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB51sqpN022902; Tue, 5 Dec 2017 01:54:52 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201712050154.vB51sqpN022902@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 5 Dec 2017 01:54:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326548 - stable/11/usr.sbin/diskinfo X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/usr.sbin/diskinfo X-SVN-Commit-Revision: 326548 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 01:54:53 -0000 Author: mav Date: Tue Dec 5 01:54:52 2017 New Revision: 326548 URL: https://svnweb.freebsd.org/changeset/base/326548 Log: MFC r326288: Fix integer overflow in SLOG test. Modified: stable/11/usr.sbin/diskinfo/diskinfo.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/diskinfo/diskinfo.c ============================================================================== --- stable/11/usr.sbin/diskinfo/diskinfo.c Tue Dec 5 01:47:41 2017 (r326547) +++ stable/11/usr.sbin/diskinfo/diskinfo.c Tue Dec 5 01:54:52 2017 (r326548) @@ -396,7 +396,7 @@ TS(u_int size, int count) dt = delta_t(); printf("%8.1f usec/IO = %8.1f Mbytes/s\n", - dt * 1000000.0 / count, size * count / dt / (1024 * 1024)); + dt * 1000000.0 / count, (double)size * count / dt / (1024 * 1024)); } static void From owner-svn-src-stable@freebsd.org Tue Dec 5 06:44:00 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 06CABDF8120; Tue, 5 Dec 2017 06:44:00 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C2A906D4EF; Tue, 5 Dec 2017 06:43:59 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB56hwGj044913; Tue, 5 Dec 2017 06:43:58 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB56hwKF044908; Tue, 5 Dec 2017 06:43:58 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201712050643.vB56hwKF044908@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 5 Dec 2017 06:43:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326559 - stable/11/usr.bin/gzip X-SVN-Group: stable-11 X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: stable/11/usr.bin/gzip X-SVN-Commit-Revision: 326559 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 06:44:00 -0000 Author: delphij Date: Tue Dec 5 06:43:58 2017 New Revision: 326559 URL: https://svnweb.freebsd.org/changeset/base/326559 Log: MFC r326052: Support SIGINFO. Obtained from: NetBSD Modified: stable/11/usr.bin/gzip/gzip.1 stable/11/usr.bin/gzip/gzip.c stable/11/usr.bin/gzip/unbzip2.c stable/11/usr.bin/gzip/unpack.c stable/11/usr.bin/gzip/unxz.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/gzip/gzip.1 ============================================================================== --- stable/11/usr.bin/gzip/gzip.1 Tue Dec 5 05:02:46 2017 (r326558) +++ stable/11/usr.bin/gzip/gzip.1 Tue Dec 5 06:43:58 2017 (r326559) @@ -1,6 +1,6 @@ -.\" $NetBSD: gzip.1,v 1.26 2015/10/27 07:36:18 mrg Exp $ +.\" $NetBSD: gzip.1,v 1.30 2017/10/22 17:36:49 abhinav Exp $ .\" -.\" Copyright (c) 1997, 2003, 2004 Matthew R. Green +.\" Copyright (c) 1997, 2003, 2004, 2008, 2009, 2015, 2017 Matthew R. Green .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -25,11 +25,13 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd October 26, 2015 +.Dd November 21, 2017 .Dt GZIP 1 .Os .Sh NAME -.Nm gzip +.Nm gzip , +.Nm gunzip , +.Nm zcat .Nd compression/decompression tool using Lempel-Ziv coding (LZ77) .Sh SYNOPSIS .Nm @@ -112,67 +114,68 @@ or .Sh OPTIONS The following options are available: .Bl -tag -width XXrXXXrecursiveX -.It Fl 1 , -fast +.It Fl 1 , Fl Fl fast .It Fl 2 , 3 , 4 , 5 , 6 , 7 , 8 -.It Fl 9 , -best +.It Fl 9 , Fl Fl best These options change the compression level used, with the .Fl 1 option being the fastest, with less compression, and the .Fl 9 option being the slowest, with optimal compression. The default compression level is 6. -.It Fl c , -stdout , -to-stdout +.It Fl c , Fl Fl stdout , Fl Fl to-stdout This option specifies that output will go to the standard output stream, leaving files intact. -.It Fl d , -decompress , -uncompress +.It Fl d , Fl Fl decompress , Fl Fl uncompress This option selects decompression rather than compression. -.It Fl f , -force +.It Fl f , Fl Fl force This option turns on force mode. This allows files with multiple links, symbolic links to regular files, overwriting of pre-existing files, reading from or writing to a terminal, and when combined with the .Fl c option, allowing non-compressed data to pass through unchanged. -.It Fl h , -help +.It Fl h , Fl Fl help This option prints a usage summary and exits. -.It Fl k , -keep -Keep (do not delete) input files during compression -or decompression. +.It Fl k , Fl Fl keep +This option prevents +.Nm +from deleting input files after (de)compression. .It Fl L , -license This option prints .Nm license. -.It Fl l , -list +.It Fl l , Fl Fl list This option displays information about the file's compressed and uncompressed size, ratio, uncompressed name. With the .Fl v option, it also displays the compression method, CRC, date and time embedded in the file. -.It Fl N , -name +.It Fl N , Fl Fl name This option causes the stored filename in the input file to be used as the output file. -.It Fl n , -no-name +.It Fl n , Fl Fl no-name This option stops the filename and timestamp from being stored in the output file. -.It Fl q , -quiet +.It Fl q , Fl Fl quiet With this option, no warnings or errors are printed. -.It Fl r , -recursive +.It Fl r , Fl Fl recursive This option is used to .Nm the files in a directory tree individually, using the .Xr fts 3 library. -.It Fl S Ar suffix , Fl -suffix Ar suffix +.It Fl S Ar suffix , Fl Fl suffix Ar suffix This option changes the default suffix from .gz to .Ar suffix . -.It Fl t , -test +.It Fl t , Fl Fl test This option will test compressed files for integrity. -.It Fl V , -version +.It Fl V , Fl Fl version This option prints the version of the .Nm program. -.It Fl v , -verbose +.It Fl v , Fl Fl verbose This option turns on verbose mode, which prints the compression ratio for each file compressed. .El @@ -189,6 +192,13 @@ The utility exits 0 on success, 1 on errors, and 2 if a warning occurs. +.Sh SIGNALS +.Nm +responds to the following signals: +.Bl -tag -width indent +.It Dv SIGINFO +Report progress to standard error. +.El .Sh SEE ALSO .Xr bzip2 1 , .Xr compress 1 , @@ -213,7 +223,8 @@ This implementation of .Nm was ported based on the .Nx -.Nm , +.Nm +version 20170803, and first appeared in .Fx 7.0 . .Sh AUTHORS Modified: stable/11/usr.bin/gzip/gzip.c ============================================================================== --- stable/11/usr.bin/gzip/gzip.c Tue Dec 5 05:02:46 2017 (r326558) +++ stable/11/usr.bin/gzip/gzip.c Tue Dec 5 06:43:58 2017 (r326559) @@ -1,7 +1,8 @@ -/* $NetBSD: gzip.c,v 1.109 2015/10/27 07:36:18 mrg Exp $ */ +/* $NetBSD: gzip.c,v 1.112 2017/08/23 13:04:17 christos Exp $ */ /*- - * Copyright (c) 1997, 1998, 2003, 2004, 2006 Matthew R. Green + * Copyright (c) 1997, 1998, 2003, 2004, 2006, 2008, 2009, 2010, 2011, 2015, 2017 + * Matthew R. Green * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,8 +30,8 @@ #include #ifndef lint -__COPYRIGHT("@(#) Copyright (c) 1997, 1998, 2003, 2004, 2006\ - Matthew R. Green. All rights reserved."); +__COPYRIGHT("@(#) Copyright (c) 1997, 1998, 2003, 2004, 2006, 2008,\ + 2009, 2010, 2011, 2015, 2017 Matthew R. Green. All rights reserved."); __FBSDID("$FreeBSD$"); #endif /* not lint */ @@ -158,7 +159,7 @@ static suffixes_t suffixes[] = { #define NUM_SUFFIXES (nitems(suffixes)) #define SUFFIX_MAXLEN 30 -static const char gzip_version[] = "FreeBSD gzip 20150413"; +static const char gzip_version[] = "FreeBSD gzip 20171121"; #ifndef SMALL static const char gzip_copyright[] = \ @@ -192,8 +193,10 @@ static int dflag; /* decompress mode */ static int lflag; /* list mode */ static int numflag = 6; /* gzip -1..-9 value */ -#ifndef SMALL +static const char *remove_file = NULL; /* file to be removed upon SIGINT */ + static int fflag; /* force mode */ +#ifndef SMALL static int kflag; /* don't delete input files */ static int nflag; /* don't save name/timestamp */ static int Nflag; /* don't restore name/timestamp */ @@ -201,7 +204,7 @@ static int qflag; /* quiet mode */ static int rflag; /* recursive mode */ static int tflag; /* test */ static int vflag; /* verbose mode */ -static const char *remove_file = NULL; /* file to be removed upon SIGINT */ +static sig_atomic_t print_info = 0; #else #define qflag 0 #define tflag 0 @@ -209,7 +212,7 @@ static const char *remove_file = NULL; /* file to be r static int exit_value = 0; /* exit value */ -static char *infile; /* name of file coming in */ +static const char *infile; /* name of file coming in */ static void maybe_err(const char *fmt, ...) __printflike(1, 2) __dead2; #if !defined(NO_BZIP2_SUPPORT) || !defined(NO_PACK_SUPPORT) || \ @@ -236,14 +239,26 @@ static void usage(void) __dead2; static void display_version(void) __dead2; #ifndef SMALL static void display_license(void); -static void sigint_handler(int); #endif static const suffixes_t *check_suffix(char *, int); static ssize_t read_retry(int, void *, size_t); +static ssize_t write_retry(int, const void *, size_t); #ifdef SMALL +#define infile_set(f,t) infile_set(f) +#endif +static void infile_set(const char *newinfile, off_t total); + +#ifdef SMALL #define unlink_input(f, sb) unlink(f) +#define check_siginfo() /* nothing */ +#define setup_signals() /* nothing */ +#define infile_newdata(t) /* nothing */ #else +static off_t infile_total; /* total expected to read/write */ +static off_t infile_current; /* current read/write */ + +static void check_siginfo(void); static off_t cat_fd(unsigned char *, size_t, off_t *, int fd); static void prepend_gzip(char *, int *, char ***); static void handle_dir(char *); @@ -251,6 +266,9 @@ static void print_verbage(const char *, const char *, static void print_test(const char *, int); static void copymodes(int fd, const struct stat *, const char *file); static int check_outfile(const char *outfile); +static void setup_signals(void); +static void infile_newdata(size_t newdata); +static void infile_clear(void); #endif #ifndef NO_BZIP2_SUPPORT @@ -308,10 +326,11 @@ main(int argc, char **argv) #endif int ch; + setup_signals(); + #ifndef SMALL if ((gzip = getenv("GZIP")) != NULL) prepend_gzip(gzip, &argc, &argv); - signal(SIGINT, sigint_handler); #endif /* @@ -587,7 +606,7 @@ gz_compress(int in, int out, off_t *gsizep, const char origname = ""; } - i = snprintf(outbufp, BUFLEN, "%c%c%c%c%c%c%c%c%c%c%s", + i = snprintf(outbufp, BUFLEN, "%c%c%c%c%c%c%c%c%c%c%s", GZIP_MAGIC0, GZIP_MAGIC1, Z_DEFLATED, *origname ? ORIG_NAME : 0, mtime & 0xff, @@ -596,7 +615,7 @@ gz_compress(int in, int out, off_t *gsizep, const char (mtime >> 24) & 0xff, numflag == 1 ? 4 : numflag == 9 ? 2 : 0, OS_CODE, origname); - if (i >= BUFLEN) + if (i >= BUFLEN) /* this need PATH_MAX > BUFLEN ... */ maybe_err("snprintf"); if (*origname) @@ -617,7 +636,7 @@ gz_compress(int in, int out, off_t *gsizep, const char crc = crc32(0L, Z_NULL, 0); for (;;) { if (z.avail_out == 0) { - if (write(out, outbufp, BUFLEN) != BUFLEN) { + if (write_retry(out, outbufp, BUFLEN) != BUFLEN) { maybe_warn("write"); out_tot = -1; goto out; @@ -637,6 +656,7 @@ gz_compress(int in, int out, off_t *gsizep, const char } if (in_size == 0) break; + infile_newdata(in_size); crc = crc32(crc, (const Bytef *)inbufp, (unsigned)in_size); in_tot += in_size; @@ -666,7 +686,7 @@ gz_compress(int in, int out, off_t *gsizep, const char len = (char *)z.next_out - outbufp; - w = write(out, outbufp, len); + w = write_retry(out, outbufp, len); if (w == -1 || (size_t)w != len) { maybe_warn("write"); out_tot = -1; @@ -686,7 +706,7 @@ gz_compress(int in, int out, off_t *gsizep, const char goto out; } - i = snprintf(outbufp, BUFLEN, "%c%c%c%c%c%c%c%c", + i = snprintf(outbufp, BUFLEN, "%c%c%c%c%c%c%c%c", (int)crc & 0xff, (int)(crc >> 8) & 0xff, (int)(crc >> 16) & 0xff, @@ -697,7 +717,7 @@ gz_compress(int in, int out, off_t *gsizep, const char (int)(in_tot >> 24) & 0xff); if (i != 8) maybe_err("snprintf"); - if (write(out, outbufp, i) != i) { + if (write_retry(out, outbufp, i) != i) { maybe_warn("write"); in_tot = -1; } else @@ -774,6 +794,7 @@ gz_uncompress(int in, int out, char *pre, size_t prele out_tot = 0; for (;;) { + check_siginfo(); if ((z.avail_in == 0 || needmore) && done_reading == 0) { ssize_t in_size; @@ -790,6 +811,7 @@ gz_uncompress(int in, int out, char *pre, size_t prele } else if (in_size == 0) { done_reading = 1; } + infile_newdata(in_size); z.avail_in += in_size; needmore = 0; @@ -962,7 +984,7 @@ gz_uncompress(int in, int out, char *pre, size_t prele /* don't write anything with -t */ tflag == 0 && #endif - write(out, outbufp, wr) != wr) { + write_retry(out, outbufp, wr) != wr) { maybe_warn("error writing to output"); goto stop_and_fail; } @@ -1083,7 +1105,7 @@ copymodes(int fd, const struct stat *sbp, const char * (void)fchmod(fd, DEFFILEMODE & ~mask); (void)umask(mask); - return; + return; } sb = *sbp; @@ -1190,15 +1212,58 @@ unlink_input(const char *file, const struct stat *sb) } static void -sigint_handler(int signo __unused) +got_sigint(int signo __unused) { if (remove_file != NULL) unlink(remove_file); _exit(2); } + +static void +got_siginfo(int signo __unused) +{ + + print_info = 1; +} + +static void +setup_signals(void) +{ + + signal(SIGINFO, got_siginfo); + signal(SIGINT, got_sigint); +} + +static void +infile_newdata(size_t newdata) +{ + + infile_current += newdata; +} #endif +static void +infile_set(const char *newinfile, off_t total) +{ + + if (newinfile) + infile = newinfile; +#ifndef SMALL + infile_total = total; +#endif +} + +static void +infile_clear(void) +{ + + infile = NULL; +#ifndef SMALL + infile_total = infile_current = 0; +#endif +} + static const suffixes_t * check_suffix(char *file, int xlate) { @@ -1229,7 +1294,7 @@ file_compress(char *file, char *outfile, size_t outsiz { int in; int out; - off_t size, insize; + off_t size, in_size; #ifndef SMALL struct stat isb, osb; const suffixes_t *suff; @@ -1249,14 +1314,24 @@ file_compress(char *file, char *outfile, size_t outsiz } #endif +#ifndef SMALL + if (fstat(in, &isb) != 0) { + close(in); + maybe_warn("can't stat %s", file); + return -1; + } + infile_set(file, isb.st_size); +#endif + if (cflag == 0) { #ifndef SMALL if (isb.st_nlink > 1 && fflag == 0) { - maybe_warnx("%s has %ju other link%s -- skipping", - file, (uintmax_t)isb.st_nlink - 1, - (isb.st_nlink - 1) == 1 ? "" : "s"); + maybe_warnx("%s has %ju other link%s -- " + "skipping", file, + (uintmax_t)isb.st_nlink - 1, + isb.st_nlink == 1 ? "" : "s"); close(in); - return (-1); + return -1; } if (fflag == 0 && (suff = check_suffix(file, 0)) && @@ -1295,19 +1370,19 @@ file_compress(char *file, char *outfile, size_t outsiz } else out = STDOUT_FILENO; - insize = gz_compress(in, out, &size, basename(file), (uint32_t)isb.st_mtime); + in_size = gz_compress(in, out, &size, basename(file), (uint32_t)isb.st_mtime); (void)close(in); /* - * If there was an error, insize will be -1. + * If there was an error, in_size will be -1. * If we compressed to stdout, just return the size. * Otherwise stat the file and check it is the correct size. * We only blow away the file if we can stat the output and it * has the expected size. */ if (cflag != 0) - return (insize == -1 ? -1 : size); + return in_size == -1 ? -1 : size; #ifndef SMALL if (fstat(out, &osb) != 0) { @@ -1352,6 +1427,7 @@ file_uncompress(char *file, char *outfile, size_t outs unsigned char header1[4]; enum filetype method; int fd, ofd, zfd = -1; + size_t in_size; #ifndef SMALL ssize_t rv; time_t timestamp = 0; @@ -1365,6 +1441,16 @@ file_uncompress(char *file, char *outfile, size_t outs maybe_warn("can't open %s", file); goto lose; } + if (fstat(fd, &isb) != 0) { + close(fd); + maybe_warn("can't stat %s", file); + goto lose; + } + if (S_ISREG(isb.st_mode)) + in_size = isb.st_size; + else + in_size = 0; + infile_set(file, in_size); strlcpy(outfile, file, outsize); if (check_suffix(outfile, 1) == NULL && !(cflag || lflag)) { @@ -1385,6 +1471,7 @@ file_uncompress(char *file, char *outfile, size_t outs goto unexpected_EOF; goto lose; } + infile_newdata(rbytes); method = file_gettype(header1); #ifndef SMALL @@ -1407,6 +1494,7 @@ file_uncompress(char *file, char *outfile, size_t outs maybe_warn("can't read %s", file); goto lose; } + infile_newdata(rv); timestamp = ts[3] << 24 | ts[2] << 16 | ts[1] << 8 | ts[0]; if (header1[3] & ORIG_NAME) { @@ -1435,7 +1523,7 @@ file_uncompress(char *file, char *outfile, size_t outs else dp++; snprintf(outfile, outsize, "%.*s%.*s", - (int) (dp - file), + (int) (dp - file), file, (int) rbytes, nf); } } @@ -1444,8 +1532,6 @@ file_uncompress(char *file, char *outfile, size_t outs lseek(fd, 0, SEEK_SET); if (cflag == 0 || lflag) { - if (fstat(fd, &isb) != 0) - goto lose; #ifndef SMALL if (isb.st_nlink > 1 && lflag == 0 && fflag == 0) { maybe_warnx("%s has %ju other links -- skipping", @@ -1459,7 +1545,11 @@ file_uncompress(char *file, char *outfile, size_t outs #endif } - if (cflag == 0 && lflag == 0) { + if (cflag) + zfd = STDOUT_FILENO; + else if (lflag) + zfd = -1; + else { zfd = open(outfile, O_WRONLY|O_CREAT|O_EXCL, 0600); if (zfd == STDOUT_FILENO) { /* We won't close STDOUT_FILENO later... */ @@ -1470,11 +1560,8 @@ file_uncompress(char *file, char *outfile, size_t outs maybe_warn("can't open %s", outfile); goto lose; } -#ifndef SMALL remove_file = outfile; -#endif - } else - zfd = STDOUT_FILENO; + } switch (method) { #ifndef NO_BZIP2_SUPPORT @@ -1560,7 +1647,7 @@ file_uncompress(char *file, char *outfile, size_t outs #endif default: if (lflag) { - print_list(fd, isb.st_size, outfile, isb.st_mtime); + print_list(fd, in_size, outfile, isb.st_mtime); close(fd); return -1; /* XXX */ } @@ -1635,6 +1722,25 @@ file_uncompress(char *file, char *outfile, size_t outs } #ifndef SMALL +static void +check_siginfo(void) +{ + if (print_info == 0) + return; + if (infile) { + if (infile_total) { + int pcent = (int)((100.0 * infile_current) / infile_total); + + fprintf(stderr, "%s: done %llu/%llu bytes %d%%\n", + infile, (unsigned long long)infile_current, + (unsigned long long)infile_total, pcent); + } else + fprintf(stderr, "%s: done %llu bytes\n", + infile, (unsigned long long)infile_current); + } + print_info = 0; +} + static off_t cat_fd(unsigned char * prepend, size_t count, off_t *gsizep, int fd) { @@ -1643,7 +1749,7 @@ cat_fd(unsigned char * prepend, size_t count, off_t *g ssize_t w; in_tot = count; - w = write(STDOUT_FILENO, prepend, count); + w = write_retry(STDOUT_FILENO, prepend, count); if (w == -1 || (size_t)w != count) { maybe_warn("write to stdout"); return -1; @@ -1658,8 +1764,9 @@ cat_fd(unsigned char * prepend, size_t count, off_t *g maybe_warn("read from fd %d", fd); break; } + infile_newdata(rv); - if (write(STDOUT_FILENO, buf, rv) != rv) { + if (write_retry(STDOUT_FILENO, buf, rv) != rv) { maybe_warn("write to stdout"); break; } @@ -1675,7 +1782,9 @@ cat_fd(unsigned char * prepend, size_t count, off_t *g static void handle_stdin(void) { + struct stat isb; unsigned char header1[4]; + size_t in_size; off_t usize, gsize; enum filetype method; ssize_t bytes_read; @@ -1686,29 +1795,32 @@ handle_stdin(void) #ifndef SMALL if (fflag == 0 && lflag == 0 && isatty(STDIN_FILENO)) { maybe_warnx("standard input is a terminal -- ignoring"); - return; + goto out; } #endif - if (lflag) { - struct stat isb; + if (fstat(STDIN_FILENO, &isb) < 0) { + maybe_warn("fstat"); + goto out; + } + if (S_ISREG(isb.st_mode)) + in_size = isb.st_size; + else + in_size = 0; + infile_set("(stdin)", in_size); - /* XXX could read the whole file, etc. */ - if (fstat(STDIN_FILENO, &isb) < 0) { - maybe_warn("fstat"); - return; - } - print_list(STDIN_FILENO, isb.st_size, "stdout", isb.st_mtime); - return; + if (lflag) { + print_list(STDIN_FILENO, in_size, infile, isb.st_mtime); + goto out; } bytes_read = read_retry(STDIN_FILENO, header1, sizeof header1); if (bytes_read == -1) { maybe_warn("can't read stdin"); - return; + goto out; } else if (bytes_read != sizeof(header1)) { maybe_warnx("(stdin): unexpected end of file"); - return; + goto out; } method = file_gettype(header1); @@ -1717,13 +1829,13 @@ handle_stdin(void) #ifndef SMALL if (fflag == 0) { maybe_warnx("unknown compression format"); - return; + goto out; } usize = cat_fd(header1, sizeof header1, &gsize, STDIN_FILENO); break; #endif case FT_GZIP: - usize = gz_uncompress(STDIN_FILENO, STDOUT_FILENO, + usize = gz_uncompress(STDIN_FILENO, STDOUT_FILENO, (char *)header1, sizeof header1, &gsize, "(stdin)"); break; #ifndef NO_BZIP2_SUPPORT @@ -1736,7 +1848,7 @@ handle_stdin(void) case FT_Z: if ((in = zdopen(STDIN_FILENO)) == NULL) { maybe_warnx("zopen of stdin"); - return; + goto out; } usize = zuncompress(in, stdout, (char *)header1, @@ -1763,53 +1875,58 @@ handle_stdin(void) print_verbage(NULL, NULL, usize, gsize); if (vflag && tflag) print_test("(stdin)", usize != -1); -#endif +#else + (void)&usize; +#endif +out: + infile_clear(); } static void handle_stdout(void) { - off_t gsize, usize; + off_t gsize; +#ifndef SMALL + off_t usize; struct stat sb; time_t systime; uint32_t mtime; int ret; -#ifndef SMALL + infile_set("(stdout)", 0); + if (fflag == 0 && isatty(STDOUT_FILENO)) { maybe_warnx("standard output is a terminal -- ignoring"); return; } -#endif + /* If stdin is a file use its mtime, otherwise use current time */ ret = fstat(STDIN_FILENO, &sb); - -#ifndef SMALL if (ret < 0) { maybe_warn("Can't stat stdin"); return; } -#endif - if (S_ISREG(sb.st_mode)) + if (S_ISREG(sb.st_mode)) { + infile_set("(stdout)", sb.st_size); mtime = (uint32_t)sb.st_mtime; - else { + } else { systime = time(NULL); -#ifndef SMALL if (systime == -1) { maybe_warn("time"); return; - } -#endif + } mtime = (uint32_t)systime; } - usize = gz_compress(STDIN_FILENO, STDOUT_FILENO, &gsize, "", mtime); + usize = +#endif + gz_compress(STDIN_FILENO, STDOUT_FILENO, &gsize, "", mtime); #ifndef SMALL if (vflag && !tflag && usize != -1 && gsize != -1) print_verbage(NULL, NULL, usize, gsize); -#endif +#endif } /* do what is asked for, for the path name */ @@ -1876,7 +1993,7 @@ handle_file(char *file, struct stat *sbp) off_t usize, gsize; char outfile[PATH_MAX]; - infile = file; + infile_set(file, sbp->st_size); if (dflag) { usize = file_uncompress(file, outfile, sizeof(outfile)); #ifndef SMALL @@ -1892,8 +2009,8 @@ handle_file(char *file, struct stat *sbp) return; usize = sbp->st_size; } + infile_clear(); - #ifndef SMALL if (vflag && !tflag) print_verbage(file, (cflag) ? NULL : outfile, usize, gsize); @@ -1946,7 +2063,9 @@ print_ratio(off_t in, off_t out, FILE *where) int len; diff = in - out/2; - if (diff <= 0) + if (in == 0 && out == 0) + percent10 = 0; + else if (diff < 0) /* * Output is more than double size of input! print -99.9% * Quite possibly we've failed to get the original size. @@ -2165,6 +2284,28 @@ read_retry(int fd, void *buf, size_t sz) return ret; } else if (ret == 0) { break; /* EOF */ + } + cp += ret; + left -= ret; + } + + return sz - left; +} + +static ssize_t +write_retry(int fd, const void *buf, size_t sz) +{ + const char *cp = buf; + size_t left = MIN(sz, (size_t) SSIZE_MAX); + + while (left > 0) { + ssize_t ret; + + ret = write(fd, cp, left); + if (ret == -1) { + return ret; + } else if (ret == 0) { + abort(); /* Can't happen */ } cp += ret; left -= ret; Modified: stable/11/usr.bin/gzip/unbzip2.c ============================================================================== --- stable/11/usr.bin/gzip/unbzip2.c Tue Dec 5 05:02:46 2017 (r326558) +++ stable/11/usr.bin/gzip/unbzip2.c Tue Dec 5 06:43:58 2017 (r326559) @@ -1,4 +1,4 @@ -/* $NetBSD: unbzip2.c,v 1.13 2009/12/05 03:23:37 mrg Exp $ */ +/* $NetBSD: unbzip2.c,v 1.14 2017/08/04 07:27:08 mrg Exp $ */ /*- * Copyright (c) 2006 The NetBSD Foundation, Inc. @@ -65,6 +65,7 @@ unbzip2(int in, int out, char *pre, size_t prelen, off *bytes_in = prelen; while (ret == BZ_OK) { + check_siginfo(); if (bzs.avail_in == 0 && !end_of_file) { ssize_t n; @@ -73,6 +74,7 @@ unbzip2(int in, int out, char *pre, size_t prelen, off maybe_err("read"); if (n == 0) end_of_file = 1; + infile_newdata(n); bzs.next_in = inbuf; bzs.avail_in = n; if (bytes_in) Modified: stable/11/usr.bin/gzip/unpack.c ============================================================================== --- stable/11/usr.bin/gzip/unpack.c Tue Dec 5 05:02:46 2017 (r326558) +++ stable/11/usr.bin/gzip/unpack.c Tue Dec 5 06:43:58 2017 (r326559) @@ -1,3 +1,6 @@ +/* $FreeBSD$ */ +/* $NetBSD: unpack.c,v 1.3 2017/08/04 07:27:08 mrg Exp $ */ + /*- * Copyright (c) 2009 Xin LI * All rights reserved. @@ -152,6 +155,9 @@ unpack_parse_header(int in, int out, char *pre, size_t ssize_t bytesread; /* Bytes read from the file */ int i, j, thisbyte; + if (prelen > sizeof hdr) + maybe_err("prelen too long"); + /* Prepend the header buffer if we already read some data */ if (prelen != 0) memcpy(hdr, pre, prelen); @@ -160,6 +166,7 @@ unpack_parse_header(int in, int out, char *pre, size_t bytesread = read(in, hdr + prelen, PACK_HEADER_LENGTH - prelen); if (bytesread < 0) maybe_err("Error reading pack header"); + infile_newdata(bytesread); accepted_bytes(bytes_in, PACK_HEADER_LENGTH); @@ -206,6 +213,7 @@ unpack_parse_header(int in, int out, char *pre, size_t accepted_bytes(bytes_in, unpackd->treelevels); if (unpackd->symbol_size > 256) maybe_errx("Bad symbol table"); + infile_newdata(unpackd->treelevels); /* Allocate for the symbol table, point symbol_eob at the beginning */ unpackd->symbol_eob = unpackd->symbol = calloc(1, unpackd->symbol_size); @@ -229,6 +237,7 @@ unpack_parse_header(int in, int out, char *pre, size_t maybe_errx("Symbol table truncated"); *unpackd->symbol_eob++ = (char)thisbyte; } + infile_newdata(unpackd->symbolsin[i]); accepted_bytes(bytes_in, unpackd->symbolsin[i]); } @@ -266,6 +275,8 @@ unpack_decode(const unpack_descriptor_t *unpackd, off_ while ((thisbyte = fgetc(unpackd->fpIn)) != EOF) { accepted_bytes(bytes_in, 1); + infile_newdata(1); + check_siginfo(); /* * Split one bit from thisbyte, from highest to lowest, Modified: stable/11/usr.bin/gzip/unxz.c ============================================================================== --- stable/11/usr.bin/gzip/unxz.c Tue Dec 5 05:02:46 2017 (r326558) +++ stable/11/usr.bin/gzip/unxz.c Tue Dec 5 06:43:58 2017 (r326559) @@ -1,4 +1,4 @@ -/* $NetBSD: unxz.c,v 1.6 2016/01/29 15:19:01 christos Exp $ */ +/* $NetBSD: unxz.c,v 1.7 2017/08/04 07:27:08 mrg Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -56,6 +56,7 @@ unxz(int i, int o, char *pre, size_t prelen, off_t *by strm.avail_in = read(i, ibuf + prelen, sizeof(ibuf) - prelen); if (strm.avail_in == (size_t)-1) maybe_err("read failed"); + infile_newdata(strm.avail_in); strm.avail_in += prelen; *bytes_in = strm.avail_in; @@ -72,6 +73,7 @@ unxz(int i, int o, char *pre, size_t prelen, off_t *by strm.avail_out = sizeof(obuf); for (;;) { + check_siginfo(); if (strm.avail_in == 0) { strm.next_in = ibuf; strm.avail_in = read(i, ibuf, sizeof(ibuf)); @@ -83,6 +85,7 @@ unxz(int i, int o, char *pre, size_t prelen, off_t *by action = LZMA_FINISH; break; default: + infile_newdata(strm.avail_in); *bytes_in += strm.avail_in; break; } From owner-svn-src-stable@freebsd.org Tue Dec 5 14:46:13 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CFD31E6C1A3; Tue, 5 Dec 2017 14:46:13 +0000 (UTC) (envelope-from julian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9C3497D512; Tue, 5 Dec 2017 14:46:13 +0000 (UTC) (envelope-from julian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB5EkCaK046802; Tue, 5 Dec 2017 14:46:12 GMT (envelope-from julian@FreeBSD.org) Received: (from julian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB5EkCci046801; Tue, 5 Dec 2017 14:46:12 GMT (envelope-from julian@FreeBSD.org) Message-Id: <201712051446.vB5EkCci046801@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: julian set sender to julian@FreeBSD.org using -f From: Julian Elischer Date: Tue, 5 Dec 2017 14:46:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r326568 - stable/10/sys/netgraph X-SVN-Group: stable-10 X-SVN-Commit-Author: julian X-SVN-Commit-Paths: stable/10/sys/netgraph X-SVN-Commit-Revision: 326568 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 14:46:13 -0000 Author: julian Date: Tue Dec 5 14:46:12 2017 New Revision: 326568 URL: https://svnweb.freebsd.org/changeset/base/326568 Log: Steps to Reproduce: #ngctl mkpeer ipfw: patch 7 in #ngctl name ipfw:7 tcp_rst #ngctl connect ipfw: tcp_rst: 8 out #ngctl msg tcp_rst: setconfig { count=1 csum_flags=0 ops=[ { mode=8 value=4 length=1 offset=33 } ] } ngctl: send msg: Argument list too long It's broken after base r309389 and could be fixed in base r309408, but the first one went to 10.4 and the second one didn't. PR: 224019 Submitted by: sd@mostnet.ru Modified: stable/10/sys/netgraph/ng_patch.h Modified: stable/10/sys/netgraph/ng_patch.h ============================================================================== --- stable/10/sys/netgraph/ng_patch.h Tue Dec 5 14:22:08 2017 (r326567) +++ stable/10/sys/netgraph/ng_patch.h Tue Dec 5 14:46:12 2017 (r326568) @@ -86,7 +86,7 @@ struct ng_patch_config { #define NG_PATCH_CONFIG_TYPE_INFO { \ { "count", &ng_parse_uint32_type }, \ - { "csum_flags", &ng_parse_uint64_type }, \ + { "csum_flags", &ng_parse_uint32_type }, \ { "ops", &ng_patch_ops_array_type }, \ { NULL } \ } From owner-svn-src-stable@freebsd.org Wed Dec 6 00:00:38 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D1B02E87940; Wed, 6 Dec 2017 00:00:38 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9AD2279602; Wed, 6 Dec 2017 00:00:38 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB600bgZ082585; Wed, 6 Dec 2017 00:00:37 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB600bkN082584; Wed, 6 Dec 2017 00:00:37 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201712060000.vB600bkN082584@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 6 Dec 2017 00:00:37 +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: r326604 - in stable: 10/etc/rc.d 11/etc/rc.d X-SVN-Group: stable-10 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 10/etc/rc.d 11/etc/rc.d X-SVN-Commit-Revision: 326604 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2017 00:00:38 -0000 Author: cy Date: Wed Dec 6 00:00:37 2017 New Revision: 326604 URL: https://svnweb.freebsd.org/changeset/base/326604 Log: MFC r326343: Fix fetching ntp leapfile after 325256 Submitted by: Ronald Klop Original commit by: asomers MFC PR: 224126 Modified: stable/10/etc/rc.d/ntpd Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/etc/rc.d/ntpd Directory Properties: stable/11/ (props changed) Modified: stable/10/etc/rc.d/ntpd ============================================================================== --- stable/10/etc/rc.d/ntpd Tue Dec 5 23:06:15 2017 (r326603) +++ stable/10/etc/rc.d/ntpd Wed Dec 6 00:00:37 2017 (r326604) @@ -18,6 +18,8 @@ extra_commands="fetch" fetch_cmd="ntpd_fetch_leapfile" start_precmd="ntpd_precmd" +ntp_tmp_leapfile="/var/run/ntpd.leap-seconds.list" + load_rc_config $name ntpd_precmd() @@ -90,15 +92,13 @@ ntpd_init_leapfile() { } ntpd_fetch_leapfile() { - local ntp_tmp_leapfile rc verbose + local rc verbose if checkyesno ntp_leapfile_fetch_verbose; then verbose=echo else verbose=: fi - - ntp_tmp_leapfile="/var/run/ntpd.leap-seconds.list" ntp_ver_no_src=$(get_ntp_leapfile_ver $ntp_src_leapfile) ntp_expiry_src=$(get_ntp_leapfile_expiry $ntp_src_leapfile) From owner-svn-src-stable@freebsd.org Wed Dec 6 00:00:38 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 84A36E87939; Wed, 6 Dec 2017 00:00:38 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4E291795FF; Wed, 6 Dec 2017 00:00:38 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB600bBH082579; Wed, 6 Dec 2017 00:00:37 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB600bZg082578; Wed, 6 Dec 2017 00:00:37 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201712060000.vB600bZg082578@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 6 Dec 2017 00:00:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326604 - in stable: 10/etc/rc.d 11/etc/rc.d X-SVN-Group: stable-11 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 10/etc/rc.d 11/etc/rc.d X-SVN-Commit-Revision: 326604 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2017 00:00:38 -0000 Author: cy Date: Wed Dec 6 00:00:37 2017 New Revision: 326604 URL: https://svnweb.freebsd.org/changeset/base/326604 Log: MFC r326343: Fix fetching ntp leapfile after 325256 Submitted by: Ronald Klop Original commit by: asomers MFC PR: 224126 Modified: stable/11/etc/rc.d/ntpd Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/etc/rc.d/ntpd Directory Properties: stable/10/ (props changed) Modified: stable/11/etc/rc.d/ntpd ============================================================================== --- stable/11/etc/rc.d/ntpd Tue Dec 5 23:06:15 2017 (r326603) +++ stable/11/etc/rc.d/ntpd Wed Dec 6 00:00:37 2017 (r326604) @@ -20,6 +20,8 @@ fetch_cmd="ntpd_fetch_leapfile" needfetch_cmd="ntpd_needfetch_leapfile" start_precmd="ntpd_precmd" +ntp_tmp_leapfile="/var/run/ntpd.leap-seconds.list" + load_rc_config $name ntpd_precmd() @@ -92,15 +94,13 @@ ntpd_init_leapfile() { } ntpd_needfetch_leapfile() { - local ntp_tmp_leapfile rc verbose + local rc verbose if checkyesno ntp_leapfile_fetch_verbose; then verbose=echo else verbose=: fi - - ntp_tmp_leapfile="/var/run/ntpd.leap-seconds.list" ntp_ver_no_src=$(get_ntp_leapfile_ver $ntp_src_leapfile) ntp_expiry_src=$(get_ntp_leapfile_expiry $ntp_src_leapfile) From owner-svn-src-stable@freebsd.org Wed Dec 6 10:01:03 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EF300E9B106; Wed, 6 Dec 2017 10:01:03 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9FAC76B5BB; Wed, 6 Dec 2017 10:01:03 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB6A12Qt032202; Wed, 6 Dec 2017 10:01:02 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB6A12Ot032201; Wed, 6 Dec 2017 10:01:02 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201712061001.vB6A12Ot032201@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 6 Dec 2017 10:01:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326619 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 326619 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2017 10:01:04 -0000 Author: bapt Date: Wed Dec 6 10:01:02 2017 New Revision: 326619 URL: https://svnweb.freebsd.org/changeset/base/326619 Log: MFC r325851: remove the poor emulation of the IllumOS needfree global variable to prevent the ARC reclaim thread running longer than needed. Update the arc::needfree dtrace probe triggered in arc_lowmem() to also report the value we may want to free. Submitted by: Nikita Kozlov Reviewed by: avg Approved by: avg Sponsored by: blade Differential Revision: https://reviews.freebsd.org/D12163 Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Wed Dec 6 09:53:10 2017 (r326618) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Wed Dec 6 10:01:02 2017 (r326619) @@ -4199,8 +4199,6 @@ arc_shrink(int64_t to_free) } } -static long needfree = 0; - typedef enum free_memory_reason_t { FMR_UNKNOWN, FMR_NEEDFREE, @@ -4238,14 +4236,6 @@ arc_available_memory(void) free_memory_reason_t r = FMR_UNKNOWN; #ifdef _KERNEL - if (needfree > 0) { - n = PAGESIZE * (-needfree); - if (n < lowest) { - lowest = n; - r = FMR_NEEDFREE; - } - } - /* * Cooperate with pagedaemon when it's time for it to scan * and reclaim some pages. @@ -4510,9 +4500,6 @@ arc_reclaim_thread(void *dummy __unused) int64_t to_free = (arc_c >> arc_shrink_shift) - free_memory; if (to_free > 0) { -#ifdef _KERNEL - to_free = MAX(to_free, ptob(needfree)); -#endif arc_shrink(to_free); } } else if (free_memory < arc_c >> arc_no_grow_shift) { @@ -4533,9 +4520,6 @@ arc_reclaim_thread(void *dummy __unused) * infinite loop. */ if (arc_size <= arc_c || evicted == 0) { -#ifdef _KERNEL - needfree = 0; -#endif /* * We're either no longer overflowing, or we * can't evict anything more, so we should wake @@ -6310,9 +6294,7 @@ arc_lowmem(void *arg __unused, int howto __unused) { mutex_enter(&arc_reclaim_lock); - /* XXX: Memory deficit should be passed as argument. */ - needfree = btoc(arc_c >> arc_shrink_shift); - DTRACE_PROBE(arc__needfree); + DTRACE_PROBE1(arc__needfree, int64_t, ((int64_t)freemem - zfs_arc_free_target) * PAGESIZE); cv_signal(&arc_reclaim_thread_cv); /* From owner-svn-src-stable@freebsd.org Wed Dec 6 10:06:02 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0C037E9B3B4; Wed, 6 Dec 2017 10:06:02 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C9C466BA65; Wed, 6 Dec 2017 10:06:01 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB6A60Q5036007; Wed, 6 Dec 2017 10:06:00 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB6A60qD036006; Wed, 6 Dec 2017 10:06:00 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201712061006.vB6A60qD036006@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 6 Dec 2017 10:06:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326620 - stable/11/contrib/mdocml X-SVN-Group: stable-11 X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: stable/11/contrib/mdocml X-SVN-Commit-Revision: 326620 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2017 10:06:02 -0000 Author: bapt Date: Wed Dec 6 10:06:00 2017 New Revision: 326620 URL: https://svnweb.freebsd.org/changeset/base/326620 Log: MFC r326518, r326522 r326518: Add Posix 2013 référence for manpages PR: 223930 Reported by: Mateusz Piotrowski r326522: Properly name the 2013 edition Reported by: ed Modified: stable/11/contrib/mdocml/st.in Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/mdocml/st.in ============================================================================== --- stable/11/contrib/mdocml/st.in Wed Dec 6 10:01:02 2017 (r326619) +++ stable/11/contrib/mdocml/st.in Wed Dec 6 10:06:00 2017 (r326620) @@ -34,6 +34,7 @@ LINE("-p1003.1-96", "ISO/IEC 9945-1:1996 (\\(LqPOSIX.1 LINE("-p1003.1-2001", "IEEE Std 1003.1-2001 (\\(LqPOSIX.1\\(Rq)") LINE("-p1003.1-2004", "IEEE Std 1003.1-2004 (\\(LqPOSIX.1\\(Rq)") LINE("-p1003.1-2008", "IEEE Std 1003.1-2008 (\\(LqPOSIX.1\\(Rq)") +LINE("-p1003.1-2013", "IEEE Std 1003.1-2008, 2013 Edition (\\(LqPOSIX.1\\(Rq)") LINE("-p1003.1", "IEEE Std 1003.1 (\\(LqPOSIX.1\\(Rq)") LINE("-p1003.1b", "IEEE Std 1003.1b (\\(LqPOSIX.1b\\(Rq)") LINE("-p1003.1b-93", "IEEE Std 1003.1b-1993 (\\(LqPOSIX.1b\\(Rq)") From owner-svn-src-stable@freebsd.org Wed Dec 6 21:39:03 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 23A23E8CB6A; Wed, 6 Dec 2017 21:39:03 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F1E4E3FEB; Wed, 6 Dec 2017 21:39:02 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB6Ld25Z028033; Wed, 6 Dec 2017 21:39:02 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB6Ld23d028032; Wed, 6 Dec 2017 21:39:02 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201712062139.vB6Ld23d028032@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Wed, 6 Dec 2017 21:39:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326637 - stable/11/sys/x86/cpufreq X-SVN-Group: stable-11 X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: stable/11/sys/x86/cpufreq X-SVN-Commit-Revision: 326637 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2017 21:39:03 -0000 Author: jkim Date: Wed Dec 6 21:39:01 2017 New Revision: 326637 URL: https://svnweb.freebsd.org/changeset/base/326637 Log: MFC: r309361, r322710, r323286, r326378, r326383, r326407 Sync. hwpstate with head. r309361 (danfe): - Mention mismatching numbers in MSR vs. ACPI _PSS count warning. - Rephrase unsupported AMD CPUs message and wrap as an overly long line. - Improve readability when reporting resulted P-state transition (debug). r322710, r323286 (cem): - Add support for family 17h pstate info from MSRs. - Yield CPU awaiting frequency change. r326378, r326383, r326407: - Fix some style(9) nits. - Add a tunable "debug.hwpstate_verify" to check P-state after changing it and turn it off by default. Modified: stable/11/sys/x86/cpufreq/hwpstate.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/x86/cpufreq/hwpstate.c ============================================================================== --- stable/11/sys/x86/cpufreq/hwpstate.c Wed Dec 6 21:18:45 2017 (r326636) +++ stable/11/sys/x86/cpufreq/hwpstate.c Wed Dec 6 21:39:01 2017 (r326637) @@ -83,11 +83,15 @@ __FBSDID("$FreeBSD$"); #define AMD_10H_11H_CUR_DID(msr) (((msr) >> 6) & 0x07) #define AMD_10H_11H_CUR_FID(msr) ((msr) & 0x3F) +#define AMD_17H_CUR_VID(msr) (((msr) >> 14) & 0xFF) +#define AMD_17H_CUR_DID(msr) (((msr) >> 8) & 0x3F) +#define AMD_17H_CUR_FID(msr) ((msr) & 0xFF) + #define HWPSTATE_DEBUG(dev, msg...) \ - do{ \ - if(hwpstate_verbose) \ + do { \ + if (hwpstate_verbose) \ device_printf(dev, msg); \ - }while(0) + } while (0) struct hwpstate_setting { int freq; /* CPU clock in Mhz or 100ths of a percent. */ @@ -117,10 +121,14 @@ static int hwpstate_get_info_from_acpi_perf(device_t d static int hwpstate_get_info_from_msr(device_t dev); static int hwpstate_goto_pstate(device_t dev, int pstate_id); -static int hwpstate_verbose = 0; +static int hwpstate_verbose; SYSCTL_INT(_debug, OID_AUTO, hwpstate_verbose, CTLFLAG_RWTUN, - &hwpstate_verbose, 0, "Debug hwpstate"); + &hwpstate_verbose, 0, "Debug hwpstate"); +static int hwpstate_verify; +SYSCTL_INT(_debug, OID_AUTO, hwpstate_verify, CTLFLAG_RWTUN, + &hwpstate_verify, 0, "Verify P-state after setting"); + static device_method_t hwpstate_methods[] = { /* Device interface */ DEVMETHOD(device_identify, hwpstate_identify), @@ -154,61 +162,69 @@ DRIVER_MODULE(hwpstate, cpu, hwpstate_driver, hwpstate * Go to Px-state on all cpus considering the limit. */ static int -hwpstate_goto_pstate(device_t dev, int pstate) +hwpstate_goto_pstate(device_t dev, int id) { - int i; + sbintime_t sbt; uint64_t msr; - int j; - int limit; - int id = pstate; - int error; - + int cpu, i, j, limit; + /* get the current pstate limit */ msr = rdmsr(MSR_AMD_10H_11H_LIMIT); limit = AMD_10H_11H_GET_PSTATE_LIMIT(msr); - if(limit > id) + if (limit > id) id = limit; + cpu = curcpu; + HWPSTATE_DEBUG(dev, "setting P%d-state on cpu%d\n", id, cpu); + /* Go To Px-state */ + wrmsr(MSR_AMD_10H_11H_CONTROL, id); + /* * We are going to the same Px-state on all cpus. * Probably should take _PSD into account. */ - error = 0; CPU_FOREACH(i) { + if (i == cpu) + continue; + /* Bind to each cpu. */ thread_lock(curthread); sched_bind(curthread, i); thread_unlock(curthread); - HWPSTATE_DEBUG(dev, "setting P%d-state on cpu%d\n", - id, PCPU_GET(cpuid)); + HWPSTATE_DEBUG(dev, "setting P%d-state on cpu%d\n", id, i); /* Go To Px-state */ wrmsr(MSR_AMD_10H_11H_CONTROL, id); } - CPU_FOREACH(i) { - /* Bind to each cpu. */ - thread_lock(curthread); - sched_bind(curthread, i); - thread_unlock(curthread); - /* wait loop (100*100 usec is enough ?) */ - for(j = 0; j < 100; j++){ - /* get the result. not assure msr=id */ - msr = rdmsr(MSR_AMD_10H_11H_STATUS); - if(msr == id){ - break; + + /* + * Verify whether each core is in the requested P-state. + */ + if (hwpstate_verify) { + CPU_FOREACH(i) { + thread_lock(curthread); + sched_bind(curthread, i); + thread_unlock(curthread); + /* wait loop (100*100 usec is enough ?) */ + for (j = 0; j < 100; j++) { + /* get the result. not assure msr=id */ + msr = rdmsr(MSR_AMD_10H_11H_STATUS); + if (msr == id) + break; + sbt = SBT_1MS / 10; + tsleep_sbt(dev, PZERO, "pstate_goto", sbt, + sbt >> tc_precexp, 0); } - DELAY(100); + HWPSTATE_DEBUG(dev, "result: P%d-state on cpu%d\n", + (int)msr, i); + if (msr != id) { + HWPSTATE_DEBUG(dev, + "error: loop is not enough.\n"); + return (ENXIO); + } } - HWPSTATE_DEBUG(dev, "result P%d-state on cpu%d\n", - (int)msr, PCPU_GET(cpuid)); - if (msr != id) { - HWPSTATE_DEBUG(dev, "error: loop is not enough.\n"); - error = ENXIO; - } } - thread_lock(curthread); - sched_unbind(curthread); - thread_unlock(curthread); - return (error); + + return (0); } static int @@ -242,7 +258,7 @@ hwpstate_get(device_t dev, struct cf_setting *cf) if (cf == NULL) return (EINVAL); msr = rdmsr(MSR_AMD_10H_11H_STATUS); - if(msr >= sc->cfnum) + if (msr >= sc->cfnum) return (EINVAL); set = sc->hwpstate_settings[msr]; @@ -367,7 +383,8 @@ hwpstate_probe(device_t dev) */ msr = rdmsr(MSR_AMD_10H_11H_LIMIT); if (sc->cfnum != 1 + AMD_10H_11H_GET_PSTATE_MAX_VAL(msr)) { - HWPSTATE_DEBUG(dev, "msr and acpi _PSS count mismatch.\n"); + HWPSTATE_DEBUG(dev, "MSR (%jd) and ACPI _PSS (%d)" + " count mismatch\n", (intmax_t)msr, sc->cfnum); error = TRUE; } } @@ -416,7 +433,7 @@ hwpstate_get_info_from_msr(device_t dev) fid = AMD_10H_11H_CUR_FID(msr); /* Convert fid/did to frequency. */ - switch(family) { + switch (family) { case 0x11: hwpstate_set[i].freq = (100 * (fid + 0x08)) >> did; break; @@ -426,8 +443,18 @@ hwpstate_get_info_from_msr(device_t dev) case 0x16: hwpstate_set[i].freq = (100 * (fid + 0x10)) >> did; break; + case 0x17: + did = AMD_17H_CUR_DID(msr); + if (did == 0) { + HWPSTATE_DEBUG(dev, "unexpected did: 0\n"); + did = 1; + } + fid = AMD_17H_CUR_FID(msr); + hwpstate_set[i].freq = (200 * fid) / did; + break; default: - HWPSTATE_DEBUG(dev, "get_info_from_msr: AMD family 0x%02x CPU's are not implemented yet. sorry.\n", family); + HWPSTATE_DEBUG(dev, "get_info_from_msr: AMD family" + " 0x%02x CPUs are not supported yet\n", family); return (ENXIO); } hwpstate_set[i].pstate_id = i; From owner-svn-src-stable@freebsd.org Wed Dec 6 21:40:26 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 38D99E8CC5B; Wed, 6 Dec 2017 21:40:26 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 124016342F; Wed, 6 Dec 2017 21:40:25 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB6LePn8028137; Wed, 6 Dec 2017 21:40:25 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB6LePC1028136; Wed, 6 Dec 2017 21:40:25 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201712062140.vB6LePC1028136@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Wed, 6 Dec 2017 21:40: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: r326638 - stable/10/sys/x86/cpufreq X-SVN-Group: stable-10 X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: stable/10/sys/x86/cpufreq X-SVN-Commit-Revision: 326638 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2017 21:40:26 -0000 Author: jkim Date: Wed Dec 6 21:40:24 2017 New Revision: 326638 URL: https://svnweb.freebsd.org/changeset/base/326638 Log: MFC: r267961, r309361, r322710, r323286, r326378, r326383, r326407 Sync. hwpstate with head. r267961 (hselasky, partial): Remove a redundant TUNABLE statement. r309361 (danfe): - Mention mismatching numbers in MSR vs. ACPI _PSS count warning. - Rephrase unsupported AMD CPUs message and wrap as an overly long line. - Improve readability when reporting resulted P-state transition (debug). r322710, r323286 (cem): - Add support for family 17h pstate info from MSRs. - Yield CPU awaiting frequency change. r326378, r326383, r326407: - Fix some style(9) nits. - Add a tunable "debug.hwpstate_verify" to check P-state after changing it and turn it off by default. Modified: stable/10/sys/x86/cpufreq/hwpstate.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/x86/cpufreq/hwpstate.c ============================================================================== --- stable/10/sys/x86/cpufreq/hwpstate.c Wed Dec 6 21:39:01 2017 (r326637) +++ stable/10/sys/x86/cpufreq/hwpstate.c Wed Dec 6 21:40:24 2017 (r326638) @@ -83,11 +83,15 @@ __FBSDID("$FreeBSD$"); #define AMD_10H_11H_CUR_DID(msr) (((msr) >> 6) & 0x07) #define AMD_10H_11H_CUR_FID(msr) ((msr) & 0x3F) +#define AMD_17H_CUR_VID(msr) (((msr) >> 14) & 0xFF) +#define AMD_17H_CUR_DID(msr) (((msr) >> 8) & 0x3F) +#define AMD_17H_CUR_FID(msr) ((msr) & 0xFF) + #define HWPSTATE_DEBUG(dev, msg...) \ - do{ \ - if(hwpstate_verbose) \ + do { \ + if (hwpstate_verbose) \ device_printf(dev, msg); \ - }while(0) + } while (0) struct hwpstate_setting { int freq; /* CPU clock in Mhz or 100ths of a percent. */ @@ -117,11 +121,14 @@ static int hwpstate_get_info_from_acpi_perf(device_t d static int hwpstate_get_info_from_msr(device_t dev); static int hwpstate_goto_pstate(device_t dev, int pstate_id); -static int hwpstate_verbose = 0; -SYSCTL_INT(_debug, OID_AUTO, hwpstate_verbose, CTLFLAG_RW | CTLFLAG_TUN, - &hwpstate_verbose, 0, "Debug hwpstate"); -TUNABLE_INT("debug.hwpstate_verbose", &hwpstate_verbose); +static int hwpstate_verbose; +SYSCTL_INT(_debug, OID_AUTO, hwpstate_verbose, CTLFLAG_RWTUN, + &hwpstate_verbose, 0, "Debug hwpstate"); +static int hwpstate_verify; +SYSCTL_INT(_debug, OID_AUTO, hwpstate_verify, CTLFLAG_RWTUN, + &hwpstate_verify, 0, "Verify P-state after setting"); + static device_method_t hwpstate_methods[] = { /* Device interface */ DEVMETHOD(device_identify, hwpstate_identify), @@ -155,61 +162,69 @@ DRIVER_MODULE(hwpstate, cpu, hwpstate_driver, hwpstate * Go to Px-state on all cpus considering the limit. */ static int -hwpstate_goto_pstate(device_t dev, int pstate) +hwpstate_goto_pstate(device_t dev, int id) { - int i; + sbintime_t sbt; uint64_t msr; - int j; - int limit; - int id = pstate; - int error; - + int cpu, i, j, limit; + /* get the current pstate limit */ msr = rdmsr(MSR_AMD_10H_11H_LIMIT); limit = AMD_10H_11H_GET_PSTATE_LIMIT(msr); - if(limit > id) + if (limit > id) id = limit; + cpu = curcpu; + HWPSTATE_DEBUG(dev, "setting P%d-state on cpu%d\n", id, cpu); + /* Go To Px-state */ + wrmsr(MSR_AMD_10H_11H_CONTROL, id); + /* * We are going to the same Px-state on all cpus. * Probably should take _PSD into account. */ - error = 0; CPU_FOREACH(i) { + if (i == cpu) + continue; + /* Bind to each cpu. */ thread_lock(curthread); sched_bind(curthread, i); thread_unlock(curthread); - HWPSTATE_DEBUG(dev, "setting P%d-state on cpu%d\n", - id, PCPU_GET(cpuid)); + HWPSTATE_DEBUG(dev, "setting P%d-state on cpu%d\n", id, i); /* Go To Px-state */ wrmsr(MSR_AMD_10H_11H_CONTROL, id); } - CPU_FOREACH(i) { - /* Bind to each cpu. */ - thread_lock(curthread); - sched_bind(curthread, i); - thread_unlock(curthread); - /* wait loop (100*100 usec is enough ?) */ - for(j = 0; j < 100; j++){ - /* get the result. not assure msr=id */ - msr = rdmsr(MSR_AMD_10H_11H_STATUS); - if(msr == id){ - break; + + /* + * Verify whether each core is in the requested P-state. + */ + if (hwpstate_verify) { + CPU_FOREACH(i) { + thread_lock(curthread); + sched_bind(curthread, i); + thread_unlock(curthread); + /* wait loop (100*100 usec is enough ?) */ + for (j = 0; j < 100; j++) { + /* get the result. not assure msr=id */ + msr = rdmsr(MSR_AMD_10H_11H_STATUS); + if (msr == id) + break; + sbt = SBT_1MS / 10; + tsleep_sbt(dev, PZERO, "pstate_goto", sbt, + sbt >> tc_precexp, 0); } - DELAY(100); + HWPSTATE_DEBUG(dev, "result: P%d-state on cpu%d\n", + (int)msr, i); + if (msr != id) { + HWPSTATE_DEBUG(dev, + "error: loop is not enough.\n"); + return (ENXIO); + } } - HWPSTATE_DEBUG(dev, "result P%d-state on cpu%d\n", - (int)msr, PCPU_GET(cpuid)); - if (msr != id) { - HWPSTATE_DEBUG(dev, "error: loop is not enough.\n"); - error = ENXIO; - } } - thread_lock(curthread); - sched_unbind(curthread); - thread_unlock(curthread); - return (error); + + return (0); } static int @@ -243,7 +258,7 @@ hwpstate_get(device_t dev, struct cf_setting *cf) if (cf == NULL) return (EINVAL); msr = rdmsr(MSR_AMD_10H_11H_STATUS); - if(msr >= sc->cfnum) + if (msr >= sc->cfnum) return (EINVAL); set = sc->hwpstate_settings[msr]; @@ -368,7 +383,8 @@ hwpstate_probe(device_t dev) */ msr = rdmsr(MSR_AMD_10H_11H_LIMIT); if (sc->cfnum != 1 + AMD_10H_11H_GET_PSTATE_MAX_VAL(msr)) { - HWPSTATE_DEBUG(dev, "msr and acpi _PSS count mismatch.\n"); + HWPSTATE_DEBUG(dev, "MSR (%jd) and ACPI _PSS (%d)" + " count mismatch\n", (intmax_t)msr, sc->cfnum); error = TRUE; } } @@ -417,7 +433,7 @@ hwpstate_get_info_from_msr(device_t dev) fid = AMD_10H_11H_CUR_FID(msr); /* Convert fid/did to frequency. */ - switch(family) { + switch (family) { case 0x11: hwpstate_set[i].freq = (100 * (fid + 0x08)) >> did; break; @@ -427,8 +443,18 @@ hwpstate_get_info_from_msr(device_t dev) case 0x16: hwpstate_set[i].freq = (100 * (fid + 0x10)) >> did; break; + case 0x17: + did = AMD_17H_CUR_DID(msr); + if (did == 0) { + HWPSTATE_DEBUG(dev, "unexpected did: 0\n"); + did = 1; + } + fid = AMD_17H_CUR_FID(msr); + hwpstate_set[i].freq = (200 * fid) / did; + break; default: - HWPSTATE_DEBUG(dev, "get_info_from_msr: AMD family 0x%02x CPU's are not implemented yet. sorry.\n", family); + HWPSTATE_DEBUG(dev, "get_info_from_msr: AMD family" + " 0x%02x CPUs are not supported yet\n", family); return (ENXIO); } hwpstate_set[i].pstate_id = i; From owner-svn-src-stable@freebsd.org Thu Dec 7 03:57:13 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1E402E9B27A; Thu, 7 Dec 2017 03:57:13 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D895474104; Thu, 7 Dec 2017 03:57:12 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB73vCED087285; Thu, 7 Dec 2017 03:57:12 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB73vC3F087284; Thu, 7 Dec 2017 03:57:12 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201712070357.vB73vC3F087284@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 7 Dec 2017 03:57:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326653 - stable/11/usr.sbin/bsdinstall/scripts X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/11/usr.sbin/bsdinstall/scripts X-SVN-Commit-Revision: 326653 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Dec 2017 03:57:13 -0000 Author: emaste Date: Thu Dec 7 03:57:11 2017 New Revision: 326653 URL: https://svnweb.freebsd.org/changeset/base/326653 Log: MFC r326094: Fix indentation in bsdinstall-created wpa_supplicant.conf r311690 (MFC of r309934) cleaned up some cases in bsdinstall to use heredocs but broke the indentation of the generated output, because <<- heredocs strip leading tabs. PR: 221982 Modified: stable/11/usr.sbin/bsdinstall/scripts/wlanconfig Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/bsdinstall/scripts/wlanconfig ============================================================================== --- stable/11/usr.sbin/bsdinstall/scripts/wlanconfig Thu Dec 7 02:08:55 2017 (r326652) +++ stable/11/usr.sbin/bsdinstall/scripts/wlanconfig Thu Dec 7 03:57:11 2017 (r326653) @@ -280,14 +280,14 @@ if echo "$ENCRYPTION" | grep -q PSK; then 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD ) || exec "$0" "$@" awk 'sub(/^\t/,"")||1' \ - >> "$BSDINSTALL_TMPETC/wpa_supplicant.conf" <<-EOF - network={ - ssid="$NETWORK" - scan_ssid=$SCANSSID - psk="$PASS" - priority=5 - } - EOF + >> "$BSDINSTALL_TMPETC/wpa_supplicant.conf" <&1 >&$DIALOG_TERMINAL_PASSTHRU_FD ) || exec "$0" "$@" awk 'sub(/^\t/,"")||1' \ - >> "$BSDINSTALL_TMPETC/wpa_supplicant.conf" <<-EOF - network={ - ssid="$NETWORK" - scan_ssid=$SCANSSID - key_mgmt=WPA-EAP$( - echo "$USERPASS" | awk ' - NR == 1 { printf "\n\t\tidentity=\"%s\"", $1 } - NR == 2 { printf "\n\t\tpassword=\"%s\"", $1 } - ' ) - priority=5 - } - EOF + >> "$BSDINSTALL_TMPETC/wpa_supplicant.conf" <&1 >&$DIALOG_TERMINAL_PASSTHRU_FD ) || exec "$0" "$@" awk 'sub(/^\t/,"")||1' \ - >> "$BSDINSTALL_TMPETC/wpa_supplicant.conf" <<-EOF - network={ - ssid="$NETWORK" - scan_ssid=$SCANSSID - key_mgmt=NONE - wep_key0="$WEPKEY" - wep_tx_keyidx=0 - priority=5 - } - EOF + >> "$BSDINSTALL_TMPETC/wpa_supplicant.conf" <> "$BSDINSTALL_TMPETC/wpa_supplicant.conf" <<-EOF - network={ - ssid="$NETWORK" - scan_ssid=$SCANSSID - key_mgmt=NONE - priority=5 - } - EOF + >> "$BSDINSTALL_TMPETC/wpa_supplicant.conf" < Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 96CEBE8D98B; Thu, 7 Dec 2017 18:04:54 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 27AF96FB5A; Thu, 7 Dec 2017 18:04:54 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB7I4rtE045735; Thu, 7 Dec 2017 18:04:53 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB7I4nHP045690; Thu, 7 Dec 2017 18:04:49 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201712071804.vB7I4nHP045690@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 7 Dec 2017 18:04:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326663 - in stable/11: crypto/openssl crypto/openssl/apps crypto/openssl/crypto crypto/openssl/crypto/aes/asm crypto/openssl/crypto/asn1 crypto/openssl/crypto/bio crypto/openssl/crypto... X-SVN-Group: stable-11 X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: in stable/11: crypto/openssl crypto/openssl/apps crypto/openssl/crypto crypto/openssl/crypto/aes/asm crypto/openssl/crypto/asn1 crypto/openssl/crypto/bio crypto/openssl/crypto/bn crypto/openssl/crypto... X-SVN-Commit-Revision: 326663 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Dec 2017 18:04:54 -0000 Author: jkim Date: Thu Dec 7 18:04:48 2017 New Revision: 326663 URL: https://svnweb.freebsd.org/changeset/base/326663 Log: MFC: r326662 Merge OpenSSL 1.0.2n. Added: stable/11/crypto/openssl/ssl/fatalerrtest.c - copied unchanged from r326662, head/crypto/openssl/ssl/fatalerrtest.c Modified: stable/11/crypto/openssl/CHANGES stable/11/crypto/openssl/Configure stable/11/crypto/openssl/Makefile stable/11/crypto/openssl/NEWS stable/11/crypto/openssl/README stable/11/crypto/openssl/apps/apps.c stable/11/crypto/openssl/apps/dsa.c stable/11/crypto/openssl/apps/s_client.c stable/11/crypto/openssl/apps/speed.c stable/11/crypto/openssl/crypto/aes/asm/aes-armv4.pl stable/11/crypto/openssl/crypto/aes/asm/bsaes-armv7.pl stable/11/crypto/openssl/crypto/asn1/a_i2d_fp.c stable/11/crypto/openssl/crypto/bio/b_print.c stable/11/crypto/openssl/crypto/bn/asm/rsaz-avx2.pl stable/11/crypto/openssl/crypto/bn/bn_exp.c stable/11/crypto/openssl/crypto/dsa/dsa_ameth.c stable/11/crypto/openssl/crypto/engine/eng_fat.c stable/11/crypto/openssl/crypto/lhash/lhash.c stable/11/crypto/openssl/crypto/opensslv.h stable/11/crypto/openssl/crypto/rsa/rsa_gen.c stable/11/crypto/openssl/crypto/sha/asm/sha256-armv4.pl stable/11/crypto/openssl/crypto/symhacks.h stable/11/crypto/openssl/crypto/x509v3/v3_lib.c stable/11/crypto/openssl/crypto/x509v3/v3_scts.c stable/11/crypto/openssl/doc/crypto/EVP_EncryptInit.pod stable/11/crypto/openssl/ssl/Makefile stable/11/crypto/openssl/ssl/bad_dtls_test.c stable/11/crypto/openssl/ssl/s23_clnt.c stable/11/crypto/openssl/ssl/s3_pkt.c stable/11/crypto/openssl/ssl/ssl.h stable/11/crypto/openssl/ssl/ssltest.c stable/11/crypto/openssl/ssl/t1_lib.c stable/11/crypto/openssl/util/copy-if-different.pl stable/11/crypto/openssl/util/copy.pl stable/11/crypto/openssl/util/libeay.num stable/11/crypto/openssl/util/mk1mf.pl stable/11/secure/lib/libcrypto/Makefile.inc stable/11/secure/lib/libcrypto/amd64/rsaz-avx2.S stable/11/secure/lib/libcrypto/arm/aes-armv4.S stable/11/secure/lib/libcrypto/arm/bsaes-armv7.S stable/11/secure/lib/libcrypto/arm/sha256-armv4.S stable/11/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 stable/11/secure/lib/libcrypto/man/ASN1_STRING_length.3 stable/11/secure/lib/libcrypto/man/ASN1_STRING_new.3 stable/11/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 stable/11/secure/lib/libcrypto/man/ASN1_TIME_set.3 stable/11/secure/lib/libcrypto/man/ASN1_generate_nconf.3 stable/11/secure/lib/libcrypto/man/BIO_ctrl.3 stable/11/secure/lib/libcrypto/man/BIO_f_base64.3 stable/11/secure/lib/libcrypto/man/BIO_f_buffer.3 stable/11/secure/lib/libcrypto/man/BIO_f_cipher.3 stable/11/secure/lib/libcrypto/man/BIO_f_md.3 stable/11/secure/lib/libcrypto/man/BIO_f_null.3 stable/11/secure/lib/libcrypto/man/BIO_f_ssl.3 stable/11/secure/lib/libcrypto/man/BIO_find_type.3 stable/11/secure/lib/libcrypto/man/BIO_new.3 stable/11/secure/lib/libcrypto/man/BIO_new_CMS.3 stable/11/secure/lib/libcrypto/man/BIO_push.3 stable/11/secure/lib/libcrypto/man/BIO_read.3 stable/11/secure/lib/libcrypto/man/BIO_s_accept.3 stable/11/secure/lib/libcrypto/man/BIO_s_bio.3 stable/11/secure/lib/libcrypto/man/BIO_s_connect.3 stable/11/secure/lib/libcrypto/man/BIO_s_fd.3 stable/11/secure/lib/libcrypto/man/BIO_s_file.3 stable/11/secure/lib/libcrypto/man/BIO_s_mem.3 stable/11/secure/lib/libcrypto/man/BIO_s_null.3 stable/11/secure/lib/libcrypto/man/BIO_s_socket.3 stable/11/secure/lib/libcrypto/man/BIO_set_callback.3 stable/11/secure/lib/libcrypto/man/BIO_should_retry.3 stable/11/secure/lib/libcrypto/man/BN_BLINDING_new.3 stable/11/secure/lib/libcrypto/man/BN_CTX_new.3 stable/11/secure/lib/libcrypto/man/BN_CTX_start.3 stable/11/secure/lib/libcrypto/man/BN_add.3 stable/11/secure/lib/libcrypto/man/BN_add_word.3 stable/11/secure/lib/libcrypto/man/BN_bn2bin.3 stable/11/secure/lib/libcrypto/man/BN_cmp.3 stable/11/secure/lib/libcrypto/man/BN_copy.3 stable/11/secure/lib/libcrypto/man/BN_generate_prime.3 stable/11/secure/lib/libcrypto/man/BN_mod_inverse.3 stable/11/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 stable/11/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 stable/11/secure/lib/libcrypto/man/BN_new.3 stable/11/secure/lib/libcrypto/man/BN_num_bytes.3 stable/11/secure/lib/libcrypto/man/BN_rand.3 stable/11/secure/lib/libcrypto/man/BN_set_bit.3 stable/11/secure/lib/libcrypto/man/BN_swap.3 stable/11/secure/lib/libcrypto/man/BN_zero.3 stable/11/secure/lib/libcrypto/man/CMS_add0_cert.3 stable/11/secure/lib/libcrypto/man/CMS_add1_recipient_cert.3 stable/11/secure/lib/libcrypto/man/CMS_add1_signer.3 stable/11/secure/lib/libcrypto/man/CMS_compress.3 stable/11/secure/lib/libcrypto/man/CMS_decrypt.3 stable/11/secure/lib/libcrypto/man/CMS_encrypt.3 stable/11/secure/lib/libcrypto/man/CMS_final.3 stable/11/secure/lib/libcrypto/man/CMS_get0_RecipientInfos.3 stable/11/secure/lib/libcrypto/man/CMS_get0_SignerInfos.3 stable/11/secure/lib/libcrypto/man/CMS_get0_type.3 stable/11/secure/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 stable/11/secure/lib/libcrypto/man/CMS_sign.3 stable/11/secure/lib/libcrypto/man/CMS_sign_receipt.3 stable/11/secure/lib/libcrypto/man/CMS_uncompress.3 stable/11/secure/lib/libcrypto/man/CMS_verify.3 stable/11/secure/lib/libcrypto/man/CMS_verify_receipt.3 stable/11/secure/lib/libcrypto/man/CONF_modules_free.3 stable/11/secure/lib/libcrypto/man/CONF_modules_load_file.3 stable/11/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 stable/11/secure/lib/libcrypto/man/DH_generate_key.3 stable/11/secure/lib/libcrypto/man/DH_generate_parameters.3 stable/11/secure/lib/libcrypto/man/DH_get_ex_new_index.3 stable/11/secure/lib/libcrypto/man/DH_new.3 stable/11/secure/lib/libcrypto/man/DH_set_method.3 stable/11/secure/lib/libcrypto/man/DH_size.3 stable/11/secure/lib/libcrypto/man/DSA_SIG_new.3 stable/11/secure/lib/libcrypto/man/DSA_do_sign.3 stable/11/secure/lib/libcrypto/man/DSA_dup_DH.3 stable/11/secure/lib/libcrypto/man/DSA_generate_key.3 stable/11/secure/lib/libcrypto/man/DSA_generate_parameters.3 stable/11/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 stable/11/secure/lib/libcrypto/man/DSA_new.3 stable/11/secure/lib/libcrypto/man/DSA_set_method.3 stable/11/secure/lib/libcrypto/man/DSA_sign.3 stable/11/secure/lib/libcrypto/man/DSA_size.3 stable/11/secure/lib/libcrypto/man/EC_GFp_simple_method.3 stable/11/secure/lib/libcrypto/man/EC_GROUP_copy.3 stable/11/secure/lib/libcrypto/man/EC_GROUP_new.3 stable/11/secure/lib/libcrypto/man/EC_KEY_new.3 stable/11/secure/lib/libcrypto/man/EC_POINT_add.3 stable/11/secure/lib/libcrypto/man/EC_POINT_new.3 stable/11/secure/lib/libcrypto/man/ERR_GET_LIB.3 stable/11/secure/lib/libcrypto/man/ERR_clear_error.3 stable/11/secure/lib/libcrypto/man/ERR_error_string.3 stable/11/secure/lib/libcrypto/man/ERR_get_error.3 stable/11/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 stable/11/secure/lib/libcrypto/man/ERR_load_strings.3 stable/11/secure/lib/libcrypto/man/ERR_print_errors.3 stable/11/secure/lib/libcrypto/man/ERR_put_error.3 stable/11/secure/lib/libcrypto/man/ERR_remove_state.3 stable/11/secure/lib/libcrypto/man/ERR_set_mark.3 stable/11/secure/lib/libcrypto/man/EVP_BytesToKey.3 stable/11/secure/lib/libcrypto/man/EVP_DigestInit.3 stable/11/secure/lib/libcrypto/man/EVP_DigestSignInit.3 stable/11/secure/lib/libcrypto/man/EVP_DigestVerifyInit.3 stable/11/secure/lib/libcrypto/man/EVP_EncodeInit.3 stable/11/secure/lib/libcrypto/man/EVP_EncryptInit.3 stable/11/secure/lib/libcrypto/man/EVP_OpenInit.3 stable/11/secure/lib/libcrypto/man/EVP_PKEY_CTX_ctrl.3 stable/11/secure/lib/libcrypto/man/EVP_PKEY_CTX_new.3 stable/11/secure/lib/libcrypto/man/EVP_PKEY_cmp.3 stable/11/secure/lib/libcrypto/man/EVP_PKEY_decrypt.3 stable/11/secure/lib/libcrypto/man/EVP_PKEY_derive.3 stable/11/secure/lib/libcrypto/man/EVP_PKEY_encrypt.3 stable/11/secure/lib/libcrypto/man/EVP_PKEY_get_default_digest.3 stable/11/secure/lib/libcrypto/man/EVP_PKEY_keygen.3 stable/11/secure/lib/libcrypto/man/EVP_PKEY_meth_new.3 stable/11/secure/lib/libcrypto/man/EVP_PKEY_new.3 stable/11/secure/lib/libcrypto/man/EVP_PKEY_print_private.3 stable/11/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 stable/11/secure/lib/libcrypto/man/EVP_PKEY_sign.3 stable/11/secure/lib/libcrypto/man/EVP_PKEY_verify.3 stable/11/secure/lib/libcrypto/man/EVP_PKEY_verify_recover.3 stable/11/secure/lib/libcrypto/man/EVP_SealInit.3 stable/11/secure/lib/libcrypto/man/EVP_SignInit.3 stable/11/secure/lib/libcrypto/man/EVP_VerifyInit.3 stable/11/secure/lib/libcrypto/man/OBJ_nid2obj.3 stable/11/secure/lib/libcrypto/man/OPENSSL_Applink.3 stable/11/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 stable/11/secure/lib/libcrypto/man/OPENSSL_config.3 stable/11/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 stable/11/secure/lib/libcrypto/man/OPENSSL_instrument_bus.3 stable/11/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 stable/11/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 stable/11/secure/lib/libcrypto/man/PEM_write_bio_CMS_stream.3 stable/11/secure/lib/libcrypto/man/PEM_write_bio_PKCS7_stream.3 stable/11/secure/lib/libcrypto/man/PKCS12_create.3 stable/11/secure/lib/libcrypto/man/PKCS12_parse.3 stable/11/secure/lib/libcrypto/man/PKCS7_decrypt.3 stable/11/secure/lib/libcrypto/man/PKCS7_encrypt.3 stable/11/secure/lib/libcrypto/man/PKCS7_sign.3 stable/11/secure/lib/libcrypto/man/PKCS7_sign_add_signer.3 stable/11/secure/lib/libcrypto/man/PKCS7_verify.3 stable/11/secure/lib/libcrypto/man/RAND_add.3 stable/11/secure/lib/libcrypto/man/RAND_bytes.3 stable/11/secure/lib/libcrypto/man/RAND_cleanup.3 stable/11/secure/lib/libcrypto/man/RAND_egd.3 stable/11/secure/lib/libcrypto/man/RAND_load_file.3 stable/11/secure/lib/libcrypto/man/RAND_set_rand_method.3 stable/11/secure/lib/libcrypto/man/RSA_blinding_on.3 stable/11/secure/lib/libcrypto/man/RSA_check_key.3 stable/11/secure/lib/libcrypto/man/RSA_generate_key.3 stable/11/secure/lib/libcrypto/man/RSA_get_ex_new_index.3 stable/11/secure/lib/libcrypto/man/RSA_new.3 stable/11/secure/lib/libcrypto/man/RSA_padding_add_PKCS1_type_1.3 stable/11/secure/lib/libcrypto/man/RSA_print.3 stable/11/secure/lib/libcrypto/man/RSA_private_encrypt.3 stable/11/secure/lib/libcrypto/man/RSA_public_encrypt.3 stable/11/secure/lib/libcrypto/man/RSA_set_method.3 stable/11/secure/lib/libcrypto/man/RSA_sign.3 stable/11/secure/lib/libcrypto/man/RSA_sign_ASN1_OCTET_STRING.3 stable/11/secure/lib/libcrypto/man/RSA_size.3 stable/11/secure/lib/libcrypto/man/SMIME_read_CMS.3 stable/11/secure/lib/libcrypto/man/SMIME_read_PKCS7.3 stable/11/secure/lib/libcrypto/man/SMIME_write_CMS.3 stable/11/secure/lib/libcrypto/man/SMIME_write_PKCS7.3 stable/11/secure/lib/libcrypto/man/X509_NAME_ENTRY_get_object.3 stable/11/secure/lib/libcrypto/man/X509_NAME_add_entry_by_txt.3 stable/11/secure/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 stable/11/secure/lib/libcrypto/man/X509_NAME_print_ex.3 stable/11/secure/lib/libcrypto/man/X509_STORE_CTX_get_error.3 stable/11/secure/lib/libcrypto/man/X509_STORE_CTX_get_ex_new_index.3 stable/11/secure/lib/libcrypto/man/X509_STORE_CTX_new.3 stable/11/secure/lib/libcrypto/man/X509_STORE_CTX_set_verify_cb.3 stable/11/secure/lib/libcrypto/man/X509_STORE_set_verify_cb_func.3 stable/11/secure/lib/libcrypto/man/X509_VERIFY_PARAM_set_flags.3 stable/11/secure/lib/libcrypto/man/X509_check_host.3 stable/11/secure/lib/libcrypto/man/X509_check_private_key.3 stable/11/secure/lib/libcrypto/man/X509_new.3 stable/11/secure/lib/libcrypto/man/X509_verify_cert.3 stable/11/secure/lib/libcrypto/man/bio.3 stable/11/secure/lib/libcrypto/man/blowfish.3 stable/11/secure/lib/libcrypto/man/bn.3 stable/11/secure/lib/libcrypto/man/bn_internal.3 stable/11/secure/lib/libcrypto/man/buffer.3 stable/11/secure/lib/libcrypto/man/crypto.3 stable/11/secure/lib/libcrypto/man/d2i_ASN1_OBJECT.3 stable/11/secure/lib/libcrypto/man/d2i_CMS_ContentInfo.3 stable/11/secure/lib/libcrypto/man/d2i_DHparams.3 stable/11/secure/lib/libcrypto/man/d2i_DSAPublicKey.3 stable/11/secure/lib/libcrypto/man/d2i_ECPKParameters.3 stable/11/secure/lib/libcrypto/man/d2i_ECPrivateKey.3 stable/11/secure/lib/libcrypto/man/d2i_PKCS8PrivateKey.3 stable/11/secure/lib/libcrypto/man/d2i_PrivateKey.3 stable/11/secure/lib/libcrypto/man/d2i_RSAPublicKey.3 stable/11/secure/lib/libcrypto/man/d2i_X509.3 stable/11/secure/lib/libcrypto/man/d2i_X509_ALGOR.3 stable/11/secure/lib/libcrypto/man/d2i_X509_CRL.3 stable/11/secure/lib/libcrypto/man/d2i_X509_NAME.3 stable/11/secure/lib/libcrypto/man/d2i_X509_REQ.3 stable/11/secure/lib/libcrypto/man/d2i_X509_SIG.3 stable/11/secure/lib/libcrypto/man/des.3 stable/11/secure/lib/libcrypto/man/dh.3 stable/11/secure/lib/libcrypto/man/dsa.3 stable/11/secure/lib/libcrypto/man/ec.3 stable/11/secure/lib/libcrypto/man/ecdsa.3 stable/11/secure/lib/libcrypto/man/engine.3 stable/11/secure/lib/libcrypto/man/err.3 stable/11/secure/lib/libcrypto/man/evp.3 stable/11/secure/lib/libcrypto/man/hmac.3 stable/11/secure/lib/libcrypto/man/i2d_CMS_bio_stream.3 stable/11/secure/lib/libcrypto/man/i2d_PKCS7_bio_stream.3 stable/11/secure/lib/libcrypto/man/lh_stats.3 stable/11/secure/lib/libcrypto/man/lhash.3 stable/11/secure/lib/libcrypto/man/md5.3 stable/11/secure/lib/libcrypto/man/mdc2.3 stable/11/secure/lib/libcrypto/man/pem.3 stable/11/secure/lib/libcrypto/man/rand.3 stable/11/secure/lib/libcrypto/man/rc4.3 stable/11/secure/lib/libcrypto/man/ripemd.3 stable/11/secure/lib/libcrypto/man/rsa.3 stable/11/secure/lib/libcrypto/man/sha.3 stable/11/secure/lib/libcrypto/man/threads.3 stable/11/secure/lib/libcrypto/man/ui.3 stable/11/secure/lib/libcrypto/man/ui_compat.3 stable/11/secure/lib/libcrypto/man/x509.3 stable/11/secure/lib/libssl/man/SSL_CIPHER_get_name.3 stable/11/secure/lib/libssl/man/SSL_COMP_add_compression_method.3 stable/11/secure/lib/libssl/man/SSL_CONF_CTX_new.3 stable/11/secure/lib/libssl/man/SSL_CONF_CTX_set1_prefix.3 stable/11/secure/lib/libssl/man/SSL_CONF_CTX_set_flags.3 stable/11/secure/lib/libssl/man/SSL_CONF_CTX_set_ssl_ctx.3 stable/11/secure/lib/libssl/man/SSL_CONF_cmd.3 stable/11/secure/lib/libssl/man/SSL_CONF_cmd_argv.3 stable/11/secure/lib/libssl/man/SSL_CTX_add1_chain_cert.3 stable/11/secure/lib/libssl/man/SSL_CTX_add_extra_chain_cert.3 stable/11/secure/lib/libssl/man/SSL_CTX_add_session.3 stable/11/secure/lib/libssl/man/SSL_CTX_ctrl.3 stable/11/secure/lib/libssl/man/SSL_CTX_flush_sessions.3 stable/11/secure/lib/libssl/man/SSL_CTX_free.3 stable/11/secure/lib/libssl/man/SSL_CTX_get0_param.3 stable/11/secure/lib/libssl/man/SSL_CTX_get_ex_new_index.3 stable/11/secure/lib/libssl/man/SSL_CTX_get_verify_mode.3 stable/11/secure/lib/libssl/man/SSL_CTX_load_verify_locations.3 stable/11/secure/lib/libssl/man/SSL_CTX_new.3 stable/11/secure/lib/libssl/man/SSL_CTX_sess_number.3 stable/11/secure/lib/libssl/man/SSL_CTX_sess_set_cache_size.3 stable/11/secure/lib/libssl/man/SSL_CTX_sess_set_get_cb.3 stable/11/secure/lib/libssl/man/SSL_CTX_sessions.3 stable/11/secure/lib/libssl/man/SSL_CTX_set1_curves.3 stable/11/secure/lib/libssl/man/SSL_CTX_set1_verify_cert_store.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_alpn_select_cb.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_cert_cb.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_cert_store.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_cert_verify_callback.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_cipher_list.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_client_CA_list.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_client_cert_cb.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_custom_cli_ext.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_default_passwd_cb.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_generate_session_id.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_info_callback.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_max_cert_list.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_mode.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_msg_callback.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_options.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_psk_client_callback.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_quiet_shutdown.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_read_ahead.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_session_cache_mode.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_session_id_context.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_ssl_version.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_timeout.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_tlsext_servername_callback.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_tlsext_status_cb.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_tlsext_ticket_key_cb.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_tmp_dh_callback.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_tmp_rsa_callback.3 stable/11/secure/lib/libssl/man/SSL_CTX_set_verify.3 stable/11/secure/lib/libssl/man/SSL_CTX_use_certificate.3 stable/11/secure/lib/libssl/man/SSL_CTX_use_psk_identity_hint.3 stable/11/secure/lib/libssl/man/SSL_CTX_use_serverinfo.3 stable/11/secure/lib/libssl/man/SSL_SESSION_free.3 stable/11/secure/lib/libssl/man/SSL_SESSION_get_ex_new_index.3 stable/11/secure/lib/libssl/man/SSL_SESSION_get_time.3 stable/11/secure/lib/libssl/man/SSL_accept.3 stable/11/secure/lib/libssl/man/SSL_alert_type_string.3 stable/11/secure/lib/libssl/man/SSL_check_chain.3 stable/11/secure/lib/libssl/man/SSL_clear.3 stable/11/secure/lib/libssl/man/SSL_connect.3 stable/11/secure/lib/libssl/man/SSL_do_handshake.3 stable/11/secure/lib/libssl/man/SSL_export_keying_material.3 stable/11/secure/lib/libssl/man/SSL_free.3 stable/11/secure/lib/libssl/man/SSL_get_SSL_CTX.3 stable/11/secure/lib/libssl/man/SSL_get_ciphers.3 stable/11/secure/lib/libssl/man/SSL_get_client_CA_list.3 stable/11/secure/lib/libssl/man/SSL_get_current_cipher.3 stable/11/secure/lib/libssl/man/SSL_get_default_timeout.3 stable/11/secure/lib/libssl/man/SSL_get_error.3 stable/11/secure/lib/libssl/man/SSL_get_ex_data_X509_STORE_CTX_idx.3 stable/11/secure/lib/libssl/man/SSL_get_ex_new_index.3 stable/11/secure/lib/libssl/man/SSL_get_fd.3 stable/11/secure/lib/libssl/man/SSL_get_peer_cert_chain.3 stable/11/secure/lib/libssl/man/SSL_get_peer_certificate.3 stable/11/secure/lib/libssl/man/SSL_get_psk_identity.3 stable/11/secure/lib/libssl/man/SSL_get_rbio.3 stable/11/secure/lib/libssl/man/SSL_get_session.3 stable/11/secure/lib/libssl/man/SSL_get_verify_result.3 stable/11/secure/lib/libssl/man/SSL_get_version.3 stable/11/secure/lib/libssl/man/SSL_library_init.3 stable/11/secure/lib/libssl/man/SSL_load_client_CA_file.3 stable/11/secure/lib/libssl/man/SSL_new.3 stable/11/secure/lib/libssl/man/SSL_pending.3 stable/11/secure/lib/libssl/man/SSL_read.3 stable/11/secure/lib/libssl/man/SSL_rstate_string.3 stable/11/secure/lib/libssl/man/SSL_session_reused.3 stable/11/secure/lib/libssl/man/SSL_set_bio.3 stable/11/secure/lib/libssl/man/SSL_set_connect_state.3 stable/11/secure/lib/libssl/man/SSL_set_fd.3 stable/11/secure/lib/libssl/man/SSL_set_session.3 stable/11/secure/lib/libssl/man/SSL_set_shutdown.3 stable/11/secure/lib/libssl/man/SSL_set_verify_result.3 stable/11/secure/lib/libssl/man/SSL_shutdown.3 stable/11/secure/lib/libssl/man/SSL_state_string.3 stable/11/secure/lib/libssl/man/SSL_want.3 stable/11/secure/lib/libssl/man/SSL_write.3 stable/11/secure/lib/libssl/man/d2i_SSL_SESSION.3 stable/11/secure/lib/libssl/man/ssl.3 stable/11/secure/usr.bin/openssl/man/CA.pl.1 stable/11/secure/usr.bin/openssl/man/asn1parse.1 stable/11/secure/usr.bin/openssl/man/c_rehash.1 stable/11/secure/usr.bin/openssl/man/ca.1 stable/11/secure/usr.bin/openssl/man/ciphers.1 stable/11/secure/usr.bin/openssl/man/cms.1 stable/11/secure/usr.bin/openssl/man/crl.1 stable/11/secure/usr.bin/openssl/man/crl2pkcs7.1 stable/11/secure/usr.bin/openssl/man/dgst.1 stable/11/secure/usr.bin/openssl/man/dhparam.1 stable/11/secure/usr.bin/openssl/man/dsa.1 stable/11/secure/usr.bin/openssl/man/dsaparam.1 stable/11/secure/usr.bin/openssl/man/ec.1 stable/11/secure/usr.bin/openssl/man/ecparam.1 stable/11/secure/usr.bin/openssl/man/enc.1 stable/11/secure/usr.bin/openssl/man/errstr.1 stable/11/secure/usr.bin/openssl/man/gendsa.1 stable/11/secure/usr.bin/openssl/man/genpkey.1 stable/11/secure/usr.bin/openssl/man/genrsa.1 stable/11/secure/usr.bin/openssl/man/nseq.1 stable/11/secure/usr.bin/openssl/man/ocsp.1 stable/11/secure/usr.bin/openssl/man/openssl.1 stable/11/secure/usr.bin/openssl/man/passwd.1 stable/11/secure/usr.bin/openssl/man/pkcs12.1 stable/11/secure/usr.bin/openssl/man/pkcs7.1 stable/11/secure/usr.bin/openssl/man/pkcs8.1 stable/11/secure/usr.bin/openssl/man/pkey.1 stable/11/secure/usr.bin/openssl/man/pkeyparam.1 stable/11/secure/usr.bin/openssl/man/pkeyutl.1 stable/11/secure/usr.bin/openssl/man/rand.1 stable/11/secure/usr.bin/openssl/man/req.1 stable/11/secure/usr.bin/openssl/man/rsa.1 stable/11/secure/usr.bin/openssl/man/rsautl.1 stable/11/secure/usr.bin/openssl/man/s_client.1 stable/11/secure/usr.bin/openssl/man/s_server.1 stable/11/secure/usr.bin/openssl/man/s_time.1 stable/11/secure/usr.bin/openssl/man/sess_id.1 stable/11/secure/usr.bin/openssl/man/smime.1 stable/11/secure/usr.bin/openssl/man/speed.1 stable/11/secure/usr.bin/openssl/man/spkac.1 stable/11/secure/usr.bin/openssl/man/ts.1 stable/11/secure/usr.bin/openssl/man/tsget.1 stable/11/secure/usr.bin/openssl/man/verify.1 stable/11/secure/usr.bin/openssl/man/version.1 stable/11/secure/usr.bin/openssl/man/x509.1 stable/11/secure/usr.bin/openssl/man/x509v3_config.1 Directory Properties: stable/11/ (props changed) Modified: stable/11/crypto/openssl/CHANGES ============================================================================== --- stable/11/crypto/openssl/CHANGES Thu Dec 7 18:02:57 2017 (r326662) +++ stable/11/crypto/openssl/CHANGES Thu Dec 7 18:04:48 2017 (r326663) @@ -7,6 +7,51 @@ https://github.com/openssl/openssl/commits/ and pick the appropriate release branch. + Changes between 1.0.2m and 1.0.2n [7 Dec 2017] + + *) Read/write after SSL object in error state + + OpenSSL 1.0.2 (starting from version 1.0.2b) introduced an "error state" + mechanism. The intent was that if a fatal error occurred during a handshake + then OpenSSL would move into the error state and would immediately fail if + you attempted to continue the handshake. This works as designed for the + explicit handshake functions (SSL_do_handshake(), SSL_accept() and + SSL_connect()), however due to a bug it does not work correctly if + SSL_read() or SSL_write() is called directly. In that scenario, if the + handshake fails then a fatal error will be returned in the initial function + call. If SSL_read()/SSL_write() is subsequently called by the application + for the same SSL object then it will succeed and the data is passed without + being decrypted/encrypted directly from the SSL/TLS record layer. + + In order to exploit this issue an application bug would have to be present + that resulted in a call to SSL_read()/SSL_write() being issued after having + already received a fatal error. + + This issue was reported to OpenSSL by David Benjamin (Google). + (CVE-2017-3737) + [Matt Caswell] + + *) rsaz_1024_mul_avx2 overflow bug on x86_64 + + There is an overflow bug in the AVX2 Montgomery multiplication procedure + used in exponentiation with 1024-bit moduli. No EC algorithms are affected. + Analysis suggests that attacks against RSA and DSA as a result of this + defect would be very difficult to perform and are not believed likely. + Attacks against DH1024 are considered just feasible, because most of the + work necessary to deduce information about a private key may be performed + offline. The amount of resources required for such an attack would be + significant. However, for an attack on TLS to be meaningful, the server + would have to share the DH1024 private key among multiple clients, which is + no longer an option since CVE-2016-0701. + + This only affects processors that support the AVX2 but not ADX extensions + like Intel Haswell (4th generation). + + This issue was reported to OpenSSL by David Benjamin (Google). The issue + was originally found via the OSS-Fuzz project. + (CVE-2017-3738) + [Andy Polyakov] + Changes between 1.0.2l and 1.0.2m [2 Nov 2017] *) bn_sqrx8x_internal carry bug on x86_64 Modified: stable/11/crypto/openssl/Configure ============================================================================== --- stable/11/crypto/openssl/Configure Thu Dec 7 18:02:57 2017 (r326662) +++ stable/11/crypto/openssl/Configure Thu Dec 7 18:04:48 2017 (r326663) @@ -592,9 +592,9 @@ my %table=( "debug-VC-WIN64A","cl:-W3 -Gs0 -Gy -Zi -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DUNICODE -D_UNICODE -D_CRT_SECURE_NO_DEPRECATE:::WIN64A::SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT EXPORT_VAR_AS_FN:".eval{my $asm=$x86_64_asm;$asm=~s/x86_64-gcc\.o/bn_asm.o/;$asm}.":auto:win32", # x86 Win32 target defaults to ANSI API, if you want UNICODE, complement # 'perl Configure VC-WIN32' with '-DUNICODE -D_UNICODE' -"VC-WIN32","cl:-W3 -Gs0 -GF -Gy -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${x86_asm}:win32n:win32", +"VC-WIN32","cl:-W3 -WX -Gs0 -GF -Gy -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE -D_WINSOCK_DEPRECATED_NO_WARNINGS:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${x86_asm}:win32n:win32", # Unified CE target -"debug-VC-WIN32","cl:-W3 -Gs0 -GF -Gy -Zi -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${x86_asm}:win32n:win32", +"debug-VC-WIN32","cl:-W3 -WX -Gs0 -GF -Gy -Zi -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE -D_WINSOCK_DEPRECATED_NO_WARNINGS:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${x86_asm}:win32n:win32", "VC-CE","cl::::WINCE::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${no_asm}:win32", # Borland C++ 4.5 Modified: stable/11/crypto/openssl/Makefile ============================================================================== --- stable/11/crypto/openssl/Makefile Thu Dec 7 18:02:57 2017 (r326662) +++ stable/11/crypto/openssl/Makefile Thu Dec 7 18:04:48 2017 (r326663) @@ -4,7 +4,7 @@ ## Makefile for OpenSSL ## -VERSION=1.0.2m +VERSION=1.0.2n MAJOR=1 MINOR=0.2 SHLIB_VERSION_NUMBER=1.0.0 Modified: stable/11/crypto/openssl/NEWS ============================================================================== --- stable/11/crypto/openssl/NEWS Thu Dec 7 18:02:57 2017 (r326662) +++ stable/11/crypto/openssl/NEWS Thu Dec 7 18:04:48 2017 (r326663) @@ -5,6 +5,11 @@ This file gives a brief overview of the major changes between each OpenSSL release. For more details please read the CHANGES file. + Major changes between OpenSSL 1.0.2m and OpenSSL 1.0.2n [7 Dec 2017] + + o Read/write after SSL object in error state (CVE-2017-3737) + o rsaz_1024_mul_avx2 overflow bug on x86_64 (CVE-2017-3738) + Major changes between OpenSSL 1.0.2l and OpenSSL 1.0.2m [2 Nov 2017] o bn_sqrx8x_internal carry bug on x86_64 (CVE-2017-3736) Modified: stable/11/crypto/openssl/README ============================================================================== --- stable/11/crypto/openssl/README Thu Dec 7 18:02:57 2017 (r326662) +++ stable/11/crypto/openssl/README Thu Dec 7 18:04:48 2017 (r326663) @@ -1,5 +1,5 @@ - OpenSSL 1.0.2m 2 Nov 2017 + OpenSSL 1.0.2n 7 Dec 2017 Copyright (c) 1998-2015 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson Modified: stable/11/crypto/openssl/apps/apps.c ============================================================================== --- stable/11/crypto/openssl/apps/apps.c Thu Dec 7 18:02:57 2017 (r326662) +++ stable/11/crypto/openssl/apps/apps.c Thu Dec 7 18:04:48 2017 (r326663) @@ -148,6 +148,10 @@ #ifdef _WIN32 static int WIN32_rename(const char *from, const char *to); # define rename(from,to) WIN32_rename((from),(to)) +# ifdef fileno +# undef fileno +# endif +# define fileno(a) (int)_fileno(a) #endif typedef struct { @@ -2788,13 +2792,13 @@ unsigned char *next_protos_parse(unsigned short *outle OPENSSL_free(out); return NULL; } - out[start] = i - start; + out[start] = (unsigned char)(i - start); start = i + 1; } else out[i + 1] = in[i]; } - *outlen = len + 1; + *outlen = (unsigned char)(len + 1); return out; } #endif /* ndef OPENSSL_NO_TLSEXT */ Modified: stable/11/crypto/openssl/apps/dsa.c ============================================================================== --- stable/11/crypto/openssl/apps/dsa.c Thu Dec 7 18:02:57 2017 (r326662) +++ stable/11/crypto/openssl/apps/dsa.c Thu Dec 7 18:04:48 2017 (r326663) @@ -327,6 +327,9 @@ int MAIN(int argc, char **argv) } else if (outformat == FORMAT_MSBLOB || outformat == FORMAT_PVK) { EVP_PKEY *pk; pk = EVP_PKEY_new(); + if (pk == NULL) + goto end; + EVP_PKEY_set1_DSA(pk, dsa); if (outformat == FORMAT_PVK) i = i2b_PVK_bio(out, pk, pvk_encr, 0, passout); Modified: stable/11/crypto/openssl/apps/s_client.c ============================================================================== --- stable/11/crypto/openssl/apps/s_client.c Thu Dec 7 18:02:57 2017 (r326662) +++ stable/11/crypto/openssl/apps/s_client.c Thu Dec 7 18:04:48 2017 (r326663) @@ -630,10 +630,11 @@ static int serverinfo_cli_parse_cb(SSL *s, unsigned in unsigned char ext_buf[4 + 65536]; /* Reconstruct the type/len fields prior to extension data */ - ext_buf[0] = ext_type >> 8; - ext_buf[1] = ext_type & 0xFF; - ext_buf[2] = inlen >> 8; - ext_buf[3] = inlen & 0xFF; + inlen &= 0xffff; /* for formal memcpy correctness */ + ext_buf[0] = (unsigned char)(ext_type >> 8); + ext_buf[1] = (unsigned char)(ext_type); + ext_buf[2] = (unsigned char)(inlen >> 8); + ext_buf[3] = (unsigned char)(inlen); memcpy(ext_buf + 4, in, inlen); BIO_snprintf(pem_name, sizeof(pem_name), "SERVERINFO FOR EXTENSION %d", Modified: stable/11/crypto/openssl/apps/speed.c ============================================================================== --- stable/11/crypto/openssl/apps/speed.c Thu Dec 7 18:02:57 2017 (r326662) +++ stable/11/crypto/openssl/apps/speed.c Thu Dec 7 18:04:48 2017 (r326663) @@ -2829,8 +2829,8 @@ static void multiblock_speed(const EVP_CIPHER *evp_cip RAND_bytes(out, 16); len += 16; - aad[11] = len >> 8; - aad[12] = len; + aad[11] = (unsigned char)(len >> 8); + aad[12] = (unsigned char)(len); pad = EVP_CIPHER_CTX_ctrl(&ctx, EVP_CTRL_AEAD_TLS1_AAD, EVP_AEAD_TLS1_AAD_LEN, aad); Modified: stable/11/crypto/openssl/crypto/aes/asm/aes-armv4.pl ============================================================================== --- stable/11/crypto/openssl/crypto/aes/asm/aes-armv4.pl Thu Dec 7 18:02:57 2017 (r326662) +++ stable/11/crypto/openssl/crypto/aes/asm/aes-armv4.pl Thu Dec 7 18:04:48 2017 (r326663) @@ -184,7 +184,7 @@ AES_encrypt: #if __ARM_ARCH__<7 sub r3,pc,#8 @ AES_encrypt #else - adr r3,AES_encrypt + adr r3,. #endif stmdb sp!,{r1,r4-r12,lr} mov $rounds,r0 @ inp @@ -430,7 +430,7 @@ _armv4_AES_set_encrypt_key: #if __ARM_ARCH__<7 sub r3,pc,#8 @ AES_set_encrypt_key #else - adr r3,private_AES_set_encrypt_key + adr r3,. #endif teq r0,#0 #if __ARM_ARCH__>=7 @@ -952,7 +952,7 @@ AES_decrypt: #if __ARM_ARCH__<7 sub r3,pc,#8 @ AES_decrypt #else - adr r3,AES_decrypt + adr r3,. #endif stmdb sp!,{r1,r4-r12,lr} mov $rounds,r0 @ inp Modified: stable/11/crypto/openssl/crypto/aes/asm/bsaes-armv7.pl ============================================================================== --- stable/11/crypto/openssl/crypto/aes/asm/bsaes-armv7.pl Thu Dec 7 18:02:57 2017 (r326662) +++ stable/11/crypto/openssl/crypto/aes/asm/bsaes-armv7.pl Thu Dec 7 18:04:48 2017 (r326663) @@ -724,7 +724,7 @@ $code.=<<___; .type _bsaes_decrypt8,%function .align 4 _bsaes_decrypt8: - adr $const,_bsaes_decrypt8 + adr $const,. vldmia $key!, {@XMM[9]} @ round 0 key add $const,$const,#.LM0ISR-_bsaes_decrypt8 @@ -819,7 +819,7 @@ _bsaes_const: .type _bsaes_encrypt8,%function .align 4 _bsaes_encrypt8: - adr $const,_bsaes_encrypt8 + adr $const,. vldmia $key!, {@XMM[9]} @ round 0 key sub $const,$const,#_bsaes_encrypt8-.LM0SR @@ -923,7 +923,7 @@ $code.=<<___; .type _bsaes_key_convert,%function .align 4 _bsaes_key_convert: - adr $const,_bsaes_key_convert + adr $const,. vld1.8 {@XMM[7]}, [$inp]! @ load round 0 key sub $const,$const,#_bsaes_key_convert-.LM0 vld1.8 {@XMM[15]}, [$inp]! @ load round 1 key Modified: stable/11/crypto/openssl/crypto/asn1/a_i2d_fp.c ============================================================================== --- stable/11/crypto/openssl/crypto/asn1/a_i2d_fp.c Thu Dec 7 18:02:57 2017 (r326662) +++ stable/11/crypto/openssl/crypto/asn1/a_i2d_fp.c Thu Dec 7 18:04:48 2017 (r326663) @@ -87,6 +87,9 @@ int ASN1_i2d_bio(i2d_of_void *i2d, BIO *out, unsigned int i, j = 0, n, ret = 1; n = i2d(x, NULL); + if (n <= 0) + return 0; + b = (char *)OPENSSL_malloc(n); if (b == NULL) { ASN1err(ASN1_F_ASN1_I2D_BIO, ERR_R_MALLOC_FAILURE); Modified: stable/11/crypto/openssl/crypto/bio/b_print.c ============================================================================== --- stable/11/crypto/openssl/crypto/bio/b_print.c Thu Dec 7 18:02:57 2017 (r326662) +++ stable/11/crypto/openssl/crypto/bio/b_print.c Thu Dec 7 18:04:48 2017 (r326663) @@ -385,7 +385,7 @@ _dopr(char **sbuffer, if (cflags == DP_C_SHORT) { short int *num; num = va_arg(args, short int *); - *num = currlen; + *num = (short int)currlen; } else if (cflags == DP_C_LONG) { /* XXX */ long int *num; num = va_arg(args, long int *); @@ -502,7 +502,7 @@ fmtint(char **sbuffer, if (!(flags & DP_F_UNSIGNED)) { if (value < 0) { signvalue = '-'; - uvalue = -(unsigned LLONG)value; + uvalue = 0 - (unsigned LLONG)value; } else if (flags & DP_F_PLUS) signvalue = '+'; else if (flags & DP_F_SPACE) Modified: stable/11/crypto/openssl/crypto/bn/asm/rsaz-avx2.pl ============================================================================== --- stable/11/crypto/openssl/crypto/bn/asm/rsaz-avx2.pl Thu Dec 7 18:02:57 2017 (r326662) +++ stable/11/crypto/openssl/crypto/bn/asm/rsaz-avx2.pl Thu Dec 7 18:04:48 2017 (r326663) @@ -239,7 +239,7 @@ $code.=<<___; vmovdqu 32*8-128($ap), $ACC8 lea 192(%rsp), $tp0 # 64+128=192 - vpbroadcastq .Land_mask(%rip), $AND_MASK + vmovdqu .Land_mask(%rip), $AND_MASK jmp .LOOP_GRANDE_SQR_1024 .align 32 @@ -1070,10 +1070,10 @@ $code.=<<___; vpmuludq 32*6-128($np),$Yi,$TEMP1 vpaddq $TEMP1,$ACC6,$ACC6 vpmuludq 32*7-128($np),$Yi,$TEMP2 - vpblendd \$3, $ZERO, $ACC9, $ACC9 # correct $ACC3 + vpblendd \$3, $ZERO, $ACC9, $TEMP1 # correct $ACC3 vpaddq $TEMP2,$ACC7,$ACC7 vpmuludq 32*8-128($np),$Yi,$TEMP0 - vpaddq $ACC9, $ACC3, $ACC3 # correct $ACC3 + vpaddq $TEMP1, $ACC3, $ACC3 # correct $ACC3 vpaddq $TEMP0,$ACC8,$ACC8 mov %rbx, %rax @@ -1086,7 +1086,9 @@ $code.=<<___; vmovdqu -8+32*2-128($ap),$TEMP2 mov $r1, %rax + vpblendd \$0xfc, $ZERO, $ACC9, $ACC9 # correct $ACC3 imull $n0, %eax + vpaddq $ACC9,$ACC4,$ACC4 # correct $ACC3 and \$0x1fffffff, %eax imulq 16-128($ap),%rbx @@ -1322,15 +1324,12 @@ ___ # But as we underutilize resources, it's possible to correct in # each iteration with marginal performance loss. But then, as # we do it in each iteration, we can correct less digits, and -# avoid performance penalties completely. Also note that we -# correct only three digits out of four. This works because -# most significant digit is subjected to less additions. +# avoid performance penalties completely. $TEMP0 = $ACC9; $TEMP3 = $Bi; $TEMP4 = $Yi; $code.=<<___; - vpermq \$0, $AND_MASK, $AND_MASK vpaddq (%rsp), $TEMP1, $ACC0 vpsrlq \$29, $ACC0, $TEMP1 @@ -1763,7 +1762,7 @@ $code.=<<___; .align 64 .Land_mask: - .quad 0x1fffffff,0x1fffffff,0x1fffffff,-1 + .quad 0x1fffffff,0x1fffffff,0x1fffffff,0x1fffffff .Lscatter_permd: .long 0,2,4,6,7,7,7,7 .Lgather_permd: Modified: stable/11/crypto/openssl/crypto/bn/bn_exp.c ============================================================================== --- stable/11/crypto/openssl/crypto/bn/bn_exp.c Thu Dec 7 18:02:57 2017 (r326662) +++ stable/11/crypto/openssl/crypto/bn/bn_exp.c Thu Dec 7 18:04:48 2017 (r326663) @@ -149,7 +149,7 @@ int BN_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p || BN_get_flags(a, BN_FLG_CONSTTIME) != 0) { /* BN_FLG_CONSTTIME only supported by BN_mod_exp_mont() */ BNerr(BN_F_BN_EXP, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); - return -1; + return 0; } BN_CTX_start(ctx); @@ -285,7 +285,7 @@ int BN_mod_exp_recp(BIGNUM *r, const BIGNUM *a, const || BN_get_flags(m, BN_FLG_CONSTTIME) != 0) { /* BN_FLG_CONSTTIME only supported by BN_mod_exp_mont() */ BNerr(BN_F_BN_MOD_EXP_RECP, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); - return -1; + return 0; } bits = BN_num_bits(p); @@ -1228,7 +1228,7 @@ int BN_mod_exp_mont_word(BIGNUM *rr, BN_ULONG a, const || BN_get_flags(m, BN_FLG_CONSTTIME) != 0) { /* BN_FLG_CONSTTIME only supported by BN_mod_exp_mont() */ BNerr(BN_F_BN_MOD_EXP_MONT_WORD, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); - return -1; + return 0; } bn_check_top(p); @@ -1361,7 +1361,7 @@ int BN_mod_exp_simple(BIGNUM *r, const BIGNUM *a, cons || BN_get_flags(m, BN_FLG_CONSTTIME) != 0) { /* BN_FLG_CONSTTIME only supported by BN_mod_exp_mont() */ BNerr(BN_F_BN_MOD_EXP_SIMPLE, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); - return -1; + return 0; } bits = BN_num_bits(p); Modified: stable/11/crypto/openssl/crypto/dsa/dsa_ameth.c ============================================================================== --- stable/11/crypto/openssl/crypto/dsa/dsa_ameth.c Thu Dec 7 18:02:57 2017 (r326662) +++ stable/11/crypto/openssl/crypto/dsa/dsa_ameth.c Thu Dec 7 18:04:48 2017 (r326663) @@ -133,6 +133,7 @@ static int dsa_pub_encode(X509_PUBKEY *pk, const EVP_P unsigned char *penc = NULL; int penclen; ASN1_STRING *str = NULL; + ASN1_OBJECT *aobj; dsa = pkey->pkey.dsa; if (pkey->save_parameters && dsa->p && dsa->q && dsa->g) { @@ -159,8 +160,11 @@ static int dsa_pub_encode(X509_PUBKEY *pk, const EVP_P goto err; } - if (X509_PUBKEY_set0_param(pk, OBJ_nid2obj(EVP_PKEY_DSA), - ptype, str, penc, penclen)) + aobj = OBJ_nid2obj(EVP_PKEY_DSA); + if (aobj == NULL) + goto err; + + if (X509_PUBKEY_set0_param(pk, aobj, ptype, str, penc, penclen)) return 1; err: Modified: stable/11/crypto/openssl/crypto/engine/eng_fat.c ============================================================================== --- stable/11/crypto/openssl/crypto/engine/eng_fat.c Thu Dec 7 18:02:57 2017 (r326662) +++ stable/11/crypto/openssl/crypto/engine/eng_fat.c Thu Dec 7 18:04:48 2017 (r326663) @@ -167,6 +167,7 @@ int ENGINE_register_complete(ENGINE *e) #endif ENGINE_register_RAND(e); ENGINE_register_pkey_meths(e); + ENGINE_register_pkey_asn1_meths(e); return 1; } Modified: stable/11/crypto/openssl/crypto/lhash/lhash.c ============================================================================== --- stable/11/crypto/openssl/crypto/lhash/lhash.c Thu Dec 7 18:02:57 2017 (r326662) +++ stable/11/crypto/openssl/crypto/lhash/lhash.c Thu Dec 7 18:04:48 2017 (r326663) @@ -107,7 +107,7 @@ * https://en.wikipedia.org/wiki/Linear_hashing * * Litwin, Witold (1980), "Linear hashing: A new tool for file and table - * addressing", Proc. 6th Conference on Very Large Databases: 212–223 + * addressing", Proc. 6th Conference on Very Large Databases: 212-223 * http://hackthology.com/pdfs/Litwin-1980-Linear_Hashing.pdf * * From the wikipedia article "Linear hashing is used in the BDB Berkeley Modified: stable/11/crypto/openssl/crypto/opensslv.h ============================================================================== --- stable/11/crypto/openssl/crypto/opensslv.h Thu Dec 7 18:02:57 2017 (r326662) +++ stable/11/crypto/openssl/crypto/opensslv.h Thu Dec 7 18:04:48 2017 (r326663) @@ -30,11 +30,11 @@ extern "C" { * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for * major minor fix final patch/beta) */ -# define OPENSSL_VERSION_NUMBER 0x100020dfL +# define OPENSSL_VERSION_NUMBER 0x100020efL # ifdef OPENSSL_FIPS -# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2m-fips 2 Nov 2017" +# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2n-fips 7 Dec 2017" # else -# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2m-freebsd 2 Nov 2017" +# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2n-freebsd 7 Dec 2017" # endif # define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT Modified: stable/11/crypto/openssl/crypto/rsa/rsa_gen.c ============================================================================== --- stable/11/crypto/openssl/crypto/rsa/rsa_gen.c Thu Dec 7 18:02:57 2017 (r326662) +++ stable/11/crypto/openssl/crypto/rsa/rsa_gen.c Thu Dec 7 18:04:48 2017 (r326663) @@ -110,6 +110,16 @@ static int rsa_builtin_keygen(RSA *rsa, int bits, BIGN int bitsp, bitsq, ok = -1, n = 0; BN_CTX *ctx = NULL; + /* + * When generating ridiculously small keys, we can get stuck + * continually regenerating the same prime values. + */ + if (bits < 16) { + ok = 0; /* we set our own err */ + RSAerr(RSA_F_RSA_BUILTIN_KEYGEN, RSA_R_KEY_SIZE_TOO_SMALL); + goto err; + } + ctx = BN_CTX_new(); if (ctx == NULL) goto err; @@ -161,21 +171,10 @@ static int rsa_builtin_keygen(RSA *rsa, int bits, BIGN if (!BN_GENCB_call(cb, 3, 0)) goto err; for (;;) { - /* - * When generating ridiculously small keys, we can get stuck - * continually regenerating the same prime values. Check for this and - * bail if it happens 3 times. - */ - unsigned int degenerate = 0; do { if (!BN_generate_prime_ex(rsa->q, bitsq, 0, NULL, NULL, cb)) goto err; - } while ((BN_cmp(rsa->p, rsa->q) == 0) && (++degenerate < 3)); - if (degenerate == 3) { - ok = 0; /* we set our own err */ - RSAerr(RSA_F_RSA_BUILTIN_KEYGEN, RSA_R_KEY_SIZE_TOO_SMALL); - goto err; - } + } while (BN_cmp(rsa->p, rsa->q) == 0); if (!BN_sub(r2, rsa->q, BN_value_one())) goto err; if (!BN_gcd(r1, r2, rsa->e, ctx)) Modified: stable/11/crypto/openssl/crypto/sha/asm/sha256-armv4.pl ============================================================================== --- stable/11/crypto/openssl/crypto/sha/asm/sha256-armv4.pl Thu Dec 7 18:02:57 2017 (r326662) +++ stable/11/crypto/openssl/crypto/sha/asm/sha256-armv4.pl Thu Dec 7 18:04:48 2017 (r326663) @@ -205,7 +205,7 @@ sha256_block_data_order: #if __ARM_ARCH__<7 sub r3,pc,#8 @ sha256_block_data_order #else - adr r3,sha256_block_data_order + adr r3,. #endif #if __ARM_MAX_ARCH__>=7 && !defined(__KERNEL__) ldr r12,.LOPENSSL_armcap Modified: stable/11/crypto/openssl/crypto/symhacks.h ============================================================================== --- stable/11/crypto/openssl/crypto/symhacks.h Thu Dec 7 18:02:57 2017 (r326662) +++ stable/11/crypto/openssl/crypto/symhacks.h Thu Dec 7 18:04:48 2017 (r326663) @@ -280,6 +280,8 @@ # define OPENSSL_add_all_algorithms_conf OPENSSL_add_all_algo_conf # undef EVP_PKEY_meth_set_verify_recover # define EVP_PKEY_meth_set_verify_recover EVP_PKEY_meth_set_vrfy_recover +# undef EVP_PKEY_meth_get_verify_recover +# define EVP_PKEY_meth_get_verify_recover EVP_PKEY_meth_get_vrfy_recover /* Hack some long EC names */ # undef EC_GROUP_set_point_conversion_form Modified: stable/11/crypto/openssl/crypto/x509v3/v3_lib.c ============================================================================== --- stable/11/crypto/openssl/crypto/x509v3/v3_lib.c Thu Dec 7 18:02:57 2017 (r326662) +++ stable/11/crypto/openssl/crypto/x509v3/v3_lib.c Thu Dec 7 18:04:48 2017 (r326663) @@ -286,9 +286,9 @@ void *X509V3_get_d2i(STACK_OF(X509_EXTENSION) *x, int int X509V3_add1_i2d(STACK_OF(X509_EXTENSION) **x, int nid, void *value, int crit, unsigned long flags) { - int extidx = -1; - int errcode; - X509_EXTENSION *ext, *extmp; + int errcode, extidx = -1; + X509_EXTENSION *ext = NULL, *extmp; + STACK_OF(X509_EXTENSION) *ret = NULL; unsigned long ext_op = flags & X509V3_ADD_OP_MASK; /* @@ -347,12 +347,20 @@ int X509V3_add1_i2d(STACK_OF(X509_EXTENSION) **x, int return 1; } - if (!*x && !(*x = sk_X509_EXTENSION_new_null())) - return -1; - if (!sk_X509_EXTENSION_push(*x, ext)) - return -1; + if ((ret = *x) == NULL + && (ret = sk_X509_EXTENSION_new_null()) == NULL) + goto m_fail; + if (!sk_X509_EXTENSION_push(ret, ext)) + goto m_fail; + *x = ret; return 1; + + m_fail: + if (ret != *x) + sk_X509_EXTENSION_free(ret); + X509_EXTENSION_free(ext); + return -1; err: if (!(flags & X509V3_ADD_SILENT)) Modified: stable/11/crypto/openssl/crypto/x509v3/v3_scts.c ============================================================================== --- stable/11/crypto/openssl/crypto/x509v3/v3_scts.c Thu Dec 7 18:02:57 2017 (r326662) +++ stable/11/crypto/openssl/crypto/x509v3/v3_scts.c Thu Dec 7 18:04:48 2017 (r326663) @@ -156,7 +156,7 @@ static void timestamp_print(BIO *out, SCT_TIMESTAMP ti gen = ASN1_GENERALIZEDTIME_new(); ASN1_GENERALIZEDTIME_adj(gen, (time_t)0, (int)(timestamp / 86400000), - (timestamp % 86400000) / 1000); + (int)(timestamp % 86400000) / 1000); /* * Note GeneralizedTime from ASN1_GENERALIZETIME_adj is always 15 * characters long with a final Z. Update it with fractional seconds. Modified: stable/11/crypto/openssl/doc/crypto/EVP_EncryptInit.pod ============================================================================== --- stable/11/crypto/openssl/doc/crypto/EVP_EncryptInit.pod Thu Dec 7 18:02:57 2017 (r326662) +++ stable/11/crypto/openssl/doc/crypto/EVP_EncryptInit.pod Thu Dec 7 18:04:48 2017 (r326663) @@ -40,14 +40,14 @@ EVP_aes_128_cbc_hmac_sha256, EVP_aes_256_cbc_hmac_sha2 int EVP_EncryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type, ENGINE *impl, unsigned char *key, unsigned char *iv); int EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, - int *outl, unsigned char *in, int inl); + int *outl, const unsigned char *in, int inl); int EVP_EncryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl); int EVP_DecryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type, ENGINE *impl, unsigned char *key, unsigned char *iv); int EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, - int *outl, unsigned char *in, int inl); + int *outl, const unsigned char *in, int inl); int EVP_DecryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl); Modified: stable/11/crypto/openssl/ssl/Makefile ============================================================================== --- stable/11/crypto/openssl/ssl/Makefile Thu Dec 7 18:02:57 2017 (r326662) +++ stable/11/crypto/openssl/ssl/Makefile Thu Dec 7 18:04:48 2017 (r326663) @@ -15,7 +15,8 @@ KRB5_INCLUDES= CFLAGS= $(INCLUDES) $(CFLAG) GENERAL=Makefile README ssl-lib.com install.com -TEST=ssltest.c heartbeat_test.c clienthellotest.c sslv2conftest.c dtlstest.c bad_dtls_test.c +TEST=ssltest.c heartbeat_test.c clienthellotest.c sslv2conftest.c dtlstest.c \ + bad_dtls_test.c fatalerrtest.c APPS= LIB=$(TOP)/libssl.a Modified: stable/11/crypto/openssl/ssl/bad_dtls_test.c ============================================================================== --- stable/11/crypto/openssl/ssl/bad_dtls_test.c Thu Dec 7 18:02:57 2017 (r326662) +++ stable/11/crypto/openssl/ssl/bad_dtls_test.c Thu Dec 7 18:04:48 2017 (r326663) @@ -590,13 +590,13 @@ static int send_record(BIO *rbio, unsigned char type, unsigned char *enc; #ifdef SIXTY_FOUR_BIT_LONG - seq[0] = (seqnr >> 40) & 0xff; - seq[1] = (seqnr >> 32) & 0xff; + seq[0] = (unsigned char)(seqnr >> 40); + seq[1] = (unsigned char)(seqnr >> 32); #endif - seq[2] = (seqnr >> 24) & 0xff; - seq[3] = (seqnr >> 16) & 0xff; - seq[4] = (seqnr >> 8) & 0xff; - seq[5] = seqnr & 0xff; + seq[2] = (unsigned char)(seqnr >> 24); + seq[3] = (unsigned char)(seqnr >> 16); + seq[4] = (unsigned char)(seqnr >> 8); + seq[5] = (unsigned char)(seqnr); pad = 15 - ((len + SHA_DIGEST_LENGTH) % 16); enc = OPENSSL_malloc(len + SHA_DIGEST_LENGTH + 1 + pad); @@ -612,8 +612,8 @@ static int send_record(BIO *rbio, unsigned char type, HMAC_Update(&ctx, seq, 6); HMAC_Update(&ctx, &type, 1); HMAC_Update(&ctx, ver, 2); /* Version */ - lenbytes[0] = len >> 8; - lenbytes[1] = len & 0xff; + lenbytes[0] = (unsigned char)(len >> 8); + lenbytes[1] = (unsigned char)(len); HMAC_Update(&ctx, lenbytes, 2); /* Length */ HMAC_Update(&ctx, enc, len); /* Finally the data itself */ HMAC_Final(&ctx, enc + len, NULL); @@ -637,8 +637,8 @@ static int send_record(BIO *rbio, unsigned char type, BIO_write(rbio, ver, 2); BIO_write(rbio, epoch, 2); BIO_write(rbio, seq, 6); - lenbytes[0] = (len + sizeof(iv)) >> 8; - lenbytes[1] = (len + sizeof(iv)) & 0xff; + lenbytes[0] = (unsigned char)((len + sizeof(iv)) >> 8); + lenbytes[1] = (unsigned char)(len + sizeof(iv)); BIO_write(rbio, lenbytes, 2); BIO_write(rbio, iv, sizeof(iv)); Copied: stable/11/crypto/openssl/ssl/fatalerrtest.c (from r326662, head/crypto/openssl/ssl/fatalerrtest.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/crypto/openssl/ssl/fatalerrtest.c Thu Dec 7 18:04:48 2017 (r326663, copy of r326662, head/crypto/openssl/ssl/fatalerrtest.c) @@ -0,0 +1,109 @@ +/* + * Copyright 2017 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#include +#include +#include "ssltestlib.h" + +int main(int argc, char *argv[]) +{ + SSL_CTX *sctx, *cctx; + SSL *sssl, *cssl; + const char *msg = "Dummy"; + BIO *err = NULL, *wbio = NULL; + int ret = 1, len; + char buf[80]; + unsigned char dummyrec[] = { + 0x17, 0x03, 0x03, 0x00, 0x05, 'D', 'u', 'm', 'm', 'y' + }; + + if (argc != 3) { + printf("Incorrect number of parameters\n"); + return 1; + } + + SSL_library_init(); + SSL_load_error_strings(); + err = BIO_new_fp(stderr, BIO_NOCLOSE | BIO_FP_TEXT); + CRYPTO_malloc_debug_init(); + CRYPTO_set_mem_debug_options(V_CRYPTO_MDEBUG_ALL); + CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON); + + if (!create_ssl_ctx_pair(SSLv23_method(), SSLv23_method(), &sctx, &cctx, + argv[1], argv[2])) { + printf("Failed to create SSL_CTX pair\n"); + goto err; + } + + /* + * Deliberately set the cipher lists for client and server to be different + * to force a handshake failure. + */ + if (!SSL_CTX_set_cipher_list(sctx, "AES128-SHA") + || !SSL_CTX_set_cipher_list(cctx, "AES256-SHA")) { + printf("Failed to set cipher lists\n"); + goto err; + } + + if (!create_ssl_objects(sctx, cctx, &sssl, &cssl, NULL, NULL)) { + printf("Failed to create SSL objectx\n"); + goto err; + } + + wbio = SSL_get_wbio(cssl); + if (wbio == NULL) { + printf("Unexpected NULL bio received\n"); + goto err; + } + + if (create_ssl_connection(sssl, cssl)) { + printf("Unexpected success creating a connection\n"); + goto err; + } + + ERR_clear_error(); + + /* Inject a plaintext record from client to server */ + if (BIO_write(wbio, dummyrec, sizeof(dummyrec)) <= 0) { + printf("Unexpected failure injecting dummy record\n"); + goto err; + } + + /* SSL_read()/SSL_write should fail because of a previous fatal error */ + if ((len = SSL_read(sssl, buf, sizeof(buf - 1))) > 0) { + buf[len] = '\0'; + printf("Unexpected success reading data: %s\n", buf); + goto err; + } + if (SSL_write(sssl, msg, strlen(msg)) > 0) { + printf("Unexpected success writing data\n"); + goto err; + } + + ret = 0; + err: + SSL_free(sssl); + SSL_free(cssl); + SSL_CTX_free(sctx); + SSL_CTX_free(cctx); + ERR_print_errors_fp(stderr); + + if (ret) { + printf("Fatal err test: FAILED\n"); + } + + ERR_free_strings(); + ERR_remove_thread_state(NULL); + EVP_cleanup(); + CRYPTO_cleanup_all_ex_data(); + CRYPTO_mem_leaks(err); + BIO_free(err); + + return ret; +} Modified: stable/11/crypto/openssl/ssl/s23_clnt.c ============================================================================== --- stable/11/crypto/openssl/ssl/s23_clnt.c Thu Dec 7 18:02:57 2017 (r326662) +++ stable/11/crypto/openssl/ssl/s23_clnt.c Thu Dec 7 18:04:48 2017 (r326663) @@ -757,10 +757,12 @@ static int ssl23_get_server_hello(SSL *s) s->version = TLS1_VERSION; s->method = TLSv1_client_method(); break; +#ifndef OPENSSL_NO_SSL3 case SSL3_VERSION: s->version = SSL3_VERSION; s->method = SSLv3_client_method(); break; +#endif } SSLerr(SSL_F_SSL23_GET_SERVER_HELLO, SSL_R_UNSUPPORTED_PROTOCOL); ssl3_send_alert(s, SSL3_AL_FATAL, SSL_AD_PROTOCOL_VERSION); Modified: stable/11/crypto/openssl/ssl/s3_pkt.c ============================================================================== --- stable/11/crypto/openssl/ssl/s3_pkt.c Thu Dec 7 18:02:57 2017 (r326662) +++ stable/11/crypto/openssl/ssl/s3_pkt.c Thu Dec 7 18:04:48 2017 (r326663) @@ -1324,10 +1324,16 @@ int ssl3_read_bytes(SSL *s, int type, unsigned char *b } #ifndef OPENSSL_NO_HEARTBEATS else if (rr->type == TLS1_RT_HEARTBEAT) { - tls1_process_heartbeat(s); + i = tls1_process_heartbeat(s); - /* Exit and notify application to read again */ + if (i < 0) + return i; + rr->length = 0; + if (s->mode & SSL_MODE_AUTO_RETRY) + goto start; + + /* Exit and notify application to read again */ s->rwstate = SSL_READING; BIO_clear_retry_flags(SSL_get_rbio(s)); BIO_set_retry_read(SSL_get_rbio(s)); Modified: stable/11/crypto/openssl/ssl/ssl.h ============================================================================== --- stable/11/crypto/openssl/ssl/ssl.h Thu Dec 7 18:02:57 2017 (r326662) +++ stable/11/crypto/openssl/ssl/ssl.h Thu Dec 7 18:04:48 2017 (r326663) @@ -1727,7 +1727,7 @@ extern "C" { # define SSL_ST_BEFORE 0x4000 # define SSL_ST_OK 0x03 # define SSL_ST_RENEGOTIATE (0x04|SSL_ST_INIT) -# define SSL_ST_ERR 0x05 +# define SSL_ST_ERR (0x05|SSL_ST_INIT) # define SSL_CB_LOOP 0x01 # define SSL_CB_EXIT 0x02 Modified: stable/11/crypto/openssl/ssl/ssltest.c ============================================================================== --- stable/11/crypto/openssl/ssl/ssltest.c Thu Dec 7 18:02:57 2017 (r326662) +++ stable/11/crypto/openssl/ssl/ssltest.c Thu Dec 7 18:04:48 2017 (r326663) @@ -423,13 +423,13 @@ static unsigned char *next_protos_parse(unsigned short OPENSSL_free(out); return NULL; } - out[start] = i - start; + out[start] = (unsigned char)(i - start); start = i + 1; } else out[i + 1] = in[i]; } - *outlen = len + 1; + *outlen = (unsigned char)(len + 1); return out; } @@ -554,6 +554,7 @@ static int cb_ticket2(SSL* s, unsigned char* key_name, { fprintf(stderr, "ticket callback for SNI context should never be called\n"); EXIT(1); + return 0; } #endif Modified: stable/11/crypto/openssl/ssl/t1_lib.c ============================================================================== --- stable/11/crypto/openssl/ssl/t1_lib.c Thu Dec 7 18:02:57 2017 (r326662) +++ stable/11/crypto/openssl/ssl/t1_lib.c Thu Dec 7 18:04:48 2017 (r326663) @@ -1916,7 +1916,7 @@ unsigned char *ssl_add_serverhello_tlsext(SSL *s, unsi s2n(TLSEXT_TYPE_application_layer_protocol_negotiation, ret); s2n(3 + len, ret); s2n(1 + len, ret); - *ret++ = len; + *ret++ = (unsigned char)len; memcpy(ret, selected, len); ret += len; } Modified: stable/11/crypto/openssl/util/copy-if-different.pl ============================================================================== --- stable/11/crypto/openssl/util/copy-if-different.pl Thu Dec 7 18:02:57 2017 (r326662) +++ stable/11/crypto/openssl/util/copy-if-different.pl Thu Dec 7 18:04:48 2017 (r326663) @@ -12,7 +12,8 @@ my @filelist; foreach my $arg (@ARGV) { $arg =~ s|\\|/|g; # compensate for bug/feature in cygwin glob... - foreach (glob qq("$arg")) + $arg = qq("$arg") if ($arg =~ /\s/); # compensate for bug in 5.10... + foreach (glob $arg) { push @filelist, $_; } Modified: stable/11/crypto/openssl/util/copy.pl ============================================================================== --- stable/11/crypto/openssl/util/copy.pl Thu Dec 7 18:02:57 2017 (r326662) +++ stable/11/crypto/openssl/util/copy.pl Thu Dec 7 18:04:48 2017 (r326663) @@ -19,7 +19,8 @@ foreach $arg (@ARGV) { next; } $arg =~ s|\\|/|g; # compensate for bug/feature in cygwin glob... - foreach (glob qq("$arg")) + $arg = qq("$arg") if ($arg =~ /\s/); # compensate for bug in 5.10... + foreach (glob $arg) { push @filelist, $_; } Modified: stable/11/crypto/openssl/util/libeay.num ============================================================================== --- stable/11/crypto/openssl/util/libeay.num Thu Dec 7 18:02:57 2017 (r326662) +++ stable/11/crypto/openssl/util/libeay.num Thu Dec 7 18:04:48 2017 (r326663) @@ -4417,7 +4417,8 @@ EC_GROUP_get_mont_data 4772 EXIST::FU i2d_re_X509_tbs 4773 EXIST::FUNCTION: EVP_PKEY_asn1_set_item 4774 EXIST::FUNCTION: EVP_PKEY_meth_get_init 4775 EXIST::FUNCTION: -EVP_PKEY_meth_get_verify_recover 4776 EXIST::FUNCTION: +EVP_PKEY_meth_get_verify_recover 4776 EXIST:!VMS:FUNCTION: +EVP_PKEY_meth_get_vrfy_recover 4776 EXIST:VMS:FUNCTION: EVP_PKEY_meth_get_keygen 4777 EXIST::FUNCTION: EVP_PKEY_meth_get_derive 4778 EXIST::FUNCTION: EVP_PKEY_meth_get_verifyctx 4779 EXIST::FUNCTION: Modified: stable/11/crypto/openssl/util/mk1mf.pl ============================================================================== --- stable/11/crypto/openssl/util/mk1mf.pl Thu Dec 7 18:02:57 2017 (r326662) +++ stable/11/crypto/openssl/util/mk1mf.pl Thu Dec 7 18:04:48 2017 (r326663) @@ -765,7 +765,7 @@ foreach (split(/\s+/,$test)) { $t=&bname($_); $tt="\$(OBJ_D)${o}$t${obj}"; - $tt.=" \$(OBJ_D)${o}ssltestlib${obj}" if $t eq "dtlstest"; + $tt.=" \$(OBJ_D)${o}ssltestlib${obj}" if $t eq "dtlstest" or $t eq "fatalerrtest"; $rules.=&do_link_rule("\$(TEST_D)$o$t$exep",$tt,"\$(LIBS_DEP)","\$(L_LIBS) \$(EX_LIBS)"); } Modified: stable/11/secure/lib/libcrypto/Makefile.inc ============================================================================== --- stable/11/secure/lib/libcrypto/Makefile.inc Thu Dec 7 18:02:57 2017 (r326662) +++ stable/11/secure/lib/libcrypto/Makefile.inc Thu Dec 7 18:04:48 2017 (r326663) @@ -3,8 +3,8 @@ .include # OpenSSL version used for manual page generation -OPENSSL_VER= 1.0.2m -OPENSSL_DATE= 2017-11-02 +OPENSSL_VER= 1.0.2n +OPENSSL_DATE= 2017-12-07 LCRYPTO_SRC= ${SRCTOP}/crypto/openssl LCRYPTO_DOC= ${LCRYPTO_SRC}/doc Modified: stable/11/secure/lib/libcrypto/amd64/rsaz-avx2.S ============================================================================== --- stable/11/secure/lib/libcrypto/amd64/rsaz-avx2.S Thu Dec 7 18:02:57 2017 (r326662) +++ stable/11/secure/lib/libcrypto/amd64/rsaz-avx2.S Thu Dec 7 18:04:48 2017 (r326663) @@ -68,7 +68,7 @@ rsaz_1024_sqr_avx2: vmovdqu 256-128(%rsi),%ymm8 leaq 192(%rsp),%rbx - vpbroadcastq .Land_mask(%rip),%ymm15 + vmovdqu .Land_mask(%rip),%ymm15 jmp .LOOP_GRANDE_SQR_1024 .align 32 @@ -801,10 +801,10 @@ rsaz_1024_mul_avx2: vpmuludq 192-128(%rcx),%ymm11,%ymm12 vpaddq %ymm12,%ymm6,%ymm6 vpmuludq 224-128(%rcx),%ymm11,%ymm13 - vpblendd $3,%ymm14,%ymm9,%ymm9 + vpblendd $3,%ymm14,%ymm9,%ymm12 vpaddq %ymm13,%ymm7,%ymm7 vpmuludq 256-128(%rcx),%ymm11,%ymm0 - vpaddq %ymm9,%ymm3,%ymm3 + vpaddq %ymm12,%ymm3,%ymm3 vpaddq %ymm0,%ymm8,%ymm8 movq %rbx,%rax @@ -817,7 +817,9 @@ rsaz_1024_mul_avx2: vmovdqu -8+64-128(%rsi),%ymm13 movq %r10,%rax + vpblendd $0xfc,%ymm14,%ymm9,%ymm9 imull %r8d,%eax + vpaddq %ymm9,%ymm4,%ymm4 andl $0x1fffffff,%eax imulq 16-128(%rsi),%rbx @@ -1046,7 +1048,6 @@ rsaz_1024_mul_avx2: decl %r14d jnz .Loop_mul_1024 - vpermq $0,%ymm15,%ymm15 vpaddq (%rsp),%ymm12,%ymm0 vpsrlq $29,%ymm0,%ymm12 @@ -1686,7 +1687,7 @@ rsaz_avx2_eligible: .align 64 .Land_mask: -.quad 0x1fffffff,0x1fffffff,0x1fffffff,-1 +.quad 0x1fffffff,0x1fffffff,0x1fffffff,0x1fffffff .Lscatter_permd: .long 0,2,4,6,7,7,7,7 .Lgather_permd: Modified: stable/11/secure/lib/libcrypto/arm/aes-armv4.S ============================================================================== --- stable/11/secure/lib/libcrypto/arm/aes-armv4.S Thu Dec 7 18:02:57 2017 (r326662) +++ stable/11/secure/lib/libcrypto/arm/aes-armv4.S Thu Dec 7 18:04:48 2017 (r326663) @@ -166,7 +166,7 @@ AES_encrypt: #if __ARM_ARCH__<7 sub r3,pc,#8 @ AES_encrypt #else - adr r3,AES_encrypt + adr r3,. #endif stmdb sp!,{r1,r4-r12,lr} mov r12,r0 @ inp @@ -412,7 +412,7 @@ _armv4_AES_set_encrypt_key: #if __ARM_ARCH__<7 sub r3,pc,#8 @ AES_set_encrypt_key #else - adr r3,private_AES_set_encrypt_key + adr r3,. #endif teq r0,#0 #if __ARM_ARCH__>=7 @@ -929,7 +929,7 @@ AES_decrypt: #if __ARM_ARCH__<7 sub r3,pc,#8 @ AES_decrypt #else - adr r3,AES_decrypt + adr r3,. #endif stmdb sp!,{r1,r4-r12,lr} mov r12,r0 @ inp Modified: stable/11/secure/lib/libcrypto/arm/bsaes-armv7.S ============================================================================== --- stable/11/secure/lib/libcrypto/arm/bsaes-armv7.S Thu Dec 7 18:02:57 2017 (r326662) +++ stable/11/secure/lib/libcrypto/arm/bsaes-armv7.S Thu Dec 7 18:04:48 2017 (r326663) @@ -83,7 +83,7 @@ .type _bsaes_decrypt8,%function .align 4 _bsaes_decrypt8: - adr r6,_bsaes_decrypt8 + adr r6,. vldmia r4!, {q9} @ round 0 key add r6,r6,#.LM0ISR-_bsaes_decrypt8 @@ -569,7 +569,7 @@ _bsaes_const: .type _bsaes_encrypt8,%function .align 4 _bsaes_encrypt8: - adr r6,_bsaes_encrypt8 + adr r6,. vldmia r4!, {q9} @ round 0 key sub r6,r6,#_bsaes_encrypt8-.LM0SR @@ -1000,7 +1000,7 @@ _bsaes_encrypt8_bitslice: .type _bsaes_key_convert,%function .align 4 _bsaes_key_convert: - adr r6,_bsaes_key_convert + adr r6,. vld1.8 {q7}, [r4]! @ load round 0 key sub r6,r6,#_bsaes_key_convert-.LM0 vld1.8 {q15}, [r4]! @ load round 1 key Modified: stable/11/secure/lib/libcrypto/arm/sha256-armv4.S ============================================================================== --- stable/11/secure/lib/libcrypto/arm/sha256-armv4.S Thu Dec 7 18:02:57 2017 (r326662) +++ stable/11/secure/lib/libcrypto/arm/sha256-armv4.S Thu Dec 7 18:04:48 2017 (r326663) @@ -90,7 +90,7 @@ sha256_block_data_order: #if __ARM_ARCH__<7 sub r3,pc,#8 @ sha256_block_data_order #else - adr r3,sha256_block_data_order + adr r3,. #endif #if __ARM_MAX_ARCH__>=7 && !defined(__KERNEL__) ldr r12,.LOPENSSL_armcap Modified: stable/11/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 ============================================================================== --- stable/11/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 Thu Dec 7 18:02:57 2017 (r326662) +++ stable/11/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 Thu Dec 7 18:04:48 2017 (r326663) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_OBJECT_new 3" -.TH ASN1_OBJECT_new 3 "2017-11-02" "1.0.2m" "OpenSSL" +.TH ASN1_OBJECT_new 3 "2017-12-07" "1.0.2n" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@freebsd.org Fri Dec 8 04:21:32 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D0812E99551; Fri, 8 Dec 2017 04:21:32 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 93FCA36A8; Fri, 8 Dec 2017 04:21:32 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB84LVol005598; Fri, 8 Dec 2017 04:21:31 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB84LVEo005597; Fri, 8 Dec 2017 04:21:31 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201712080421.vB84LVEo005597@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Fri, 8 Dec 2017 04:21:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326676 - stable/11/etc X-SVN-Group: stable-11 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: stable/11/etc X-SVN-Commit-Revision: 326676 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Dec 2017 04:21:32 -0000 Author: asomers Date: Fri Dec 8 04:21:31 2017 New Revision: 326676 URL: https://svnweb.freebsd.org/changeset/base/326676 Log: MFC r325812: devd.conf: add mps and mpr to the scsi controllers regex Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D12744 Modified: stable/11/etc/devd.conf Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/devd.conf ============================================================================== --- stable/11/etc/devd.conf Fri Dec 8 03:49:53 2017 (r326675) +++ stable/11/etc/devd.conf Fri Dec 8 04:21:31 2017 (r326676) @@ -20,8 +20,8 @@ options { #XXX Yes, these are gross -- imp set scsi-controller-regex "(aac|adv|adw|aha|ahb|ahc|ahd|aic|amd|amr|asr|bt|ciss|ct|dpt|\ - esp|ida|iir|ips|isp|mlx|mly|mpt|ncr|ncv|nsp|stg|sym|trm|wds)\ - [0-9]+"; + esp|ida|iir|ips|isp|mlx|mly|mpr|mps|mpt|ncr|ncv|nsp|stg|sym|\ + trm|wds)[0-9]+"; set wifi-driver-regex "(ath|bwi|bwn|ipw|iwi|iwm|iwn|malo|mwl|ral|rsu|rum|run|uath|\ upgt|ural|urtw|urtwn|wi|wpi|wtap|zyd)[0-9]+"; From owner-svn-src-stable@freebsd.org Fri Dec 8 05:20:56 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 381ADE9A95B; Fri, 8 Dec 2017 05:20:56 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 129086447B; Fri, 8 Dec 2017 05:20:56 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB85KtGY028842; Fri, 8 Dec 2017 05:20:55 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB85KtaT028840; Fri, 8 Dec 2017 05:20:55 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201712080520.vB85KtaT028840@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Fri, 8 Dec 2017 05:20:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326677 - stable/11/tests/sys/aio X-SVN-Group: stable-11 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: stable/11/tests/sys/aio X-SVN-Commit-Revision: 326677 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Dec 2017 05:20:56 -0000 Author: asomers Date: Fri Dec 8 05:20:54 2017 New Revision: 326677 URL: https://svnweb.freebsd.org/changeset/base/326677 Log: MFC r325817, r325827 r325817: AIO tests: increase limits tests/sys/aio/aio_kqueue_test.c Instead of using a hard-coded queue depth, use vfs.aio.max_aio_queue_per_proc tests/sys/aio/lio_kqueue_test.c The old, small limit on lio_listio's operation count was lifted by change 324941. Raise the operation count as high as possible without exceeding the process's operation limit. Sponsored by: Spectra Logic Corp r325827: Fix build on arm after r325817 Reported by: rpokala X-MFC-With: 325817 Sponsored by: Spectra Logic Corp Modified: stable/11/tests/sys/aio/aio_kqueue_test.c stable/11/tests/sys/aio/lio_kqueue_test.c Directory Properties: stable/11/ (props changed) Modified: stable/11/tests/sys/aio/aio_kqueue_test.c ============================================================================== --- stable/11/tests/sys/aio/aio_kqueue_test.c Fri Dec 8 04:21:31 2017 (r326676) +++ stable/11/tests/sys/aio/aio_kqueue_test.c Fri Dec 8 05:20:54 2017 (r326677) @@ -51,28 +51,37 @@ #define PATH_TEMPLATE "aio.XXXXXXXXXX" -#define MAX_IOCBS 128 #define MAX_RUNS 300 /* #define DEBUG */ int main (int argc, char *argv[]) { - struct aiocb *iocb[MAX_IOCBS], *kq_iocb; + struct aiocb **iocb, *kq_iocb; char *file, pathname[sizeof(PATH_TEMPLATE)+1]; struct kevent ke, kq_returned; struct timespec ts; char buffer[32768]; + int max_queue_per_proc; + size_t max_queue_per_proc_size; #ifdef DEBUG int cancel, error; #endif int failed = 0, fd, kq, pending, result, run; int tmp_file = 0; - unsigned i, j; + int i, j; PLAIN_REQUIRE_KERNEL_MODULE("aio", 0); PLAIN_REQUIRE_UNSAFE_AIO(0); + max_queue_per_proc_size = sizeof(max_queue_per_proc); + if (sysctlbyname("vfs.aio.max_aio_queue_per_proc", + &max_queue_per_proc, &max_queue_per_proc_size, NULL, 0) != 0) + err(1, "sysctlbyname"); + iocb = calloc(max_queue_per_proc, sizeof(struct aiocb*)); + if (iocb == NULL) + err(1, "calloc"); + kq = kqueue(); if (kq < 0) { perror("No kqeueue\n"); @@ -95,7 +104,7 @@ main (int argc, char *argv[]) #ifdef DEBUG printf("Run %d\n", run); #endif - for (i = 0; i < nitems(iocb); i++) { + for (i = 0; i < max_queue_per_proc; i++) { iocb[i] = (struct aiocb *)calloc(1, sizeof(struct aiocb)); if (iocb[i] == NULL) @@ -103,7 +112,7 @@ main (int argc, char *argv[]) } pending = 0; - for (i = 0; i < nitems(iocb); i++) { + for (i = 0; i < max_queue_per_proc; i++) { pending++; iocb[i]->aio_nbytes = sizeof(buffer); iocb[i]->aio_buf = buffer; @@ -139,7 +148,7 @@ main (int argc, char *argv[]) } } #ifdef DEBUG - cancel = nitems(iocb) - pending; + cancel = max_queue_per_proc - pending; #endif i = 0; @@ -173,11 +182,11 @@ main (int argc, char *argv[]) break; #ifdef DEBUG printf("Try again left %d out of %lu %d\n", - pending, nitems(iocb), cancel); + pending, max_queue_per_proc, cancel); #endif } - for (j = 0; j < nitems(iocb) && iocb[j] != kq_iocb; + for (j = 0; j < max_queue_per_proc && iocb[j] != kq_iocb; j++) ; #ifdef DEBUG printf("kq_iocb %p\n", kq_iocb); @@ -204,7 +213,7 @@ main (int argc, char *argv[]) i++; } - for (i = 0; i < nitems(iocb); i++) + for (i = 0; i < max_queue_per_proc; i++) free(iocb[i]); } Modified: stable/11/tests/sys/aio/lio_kqueue_test.c ============================================================================== --- stable/11/tests/sys/aio/lio_kqueue_test.c Fri Dec 8 04:21:31 2017 (r326676) +++ stable/11/tests/sys/aio/lio_kqueue_test.c Fri Dec 8 05:20:54 2017 (r326677) @@ -27,14 +27,7 @@ /* * Note: it is a good idea to run this against a physical drive to - * exercise the physio fast path (ie. lio_kqueue /dev/) - * This will ensure op's counting is correct. It is currently broken. - * - * Also note that LIO & kqueue is not implemented in FreeBSD yet, LIO - * is also broken with respect to op's and some paths. - * - * A patch to make this work is at: - * http://www.ambrisko.com/doug/listio_kqueue/listio_kqueue.patch + * exercise the physio fast path (ie. lio_kqueue_test /dev/) */ #include @@ -55,8 +48,8 @@ #define PATH_TEMPLATE "aio.XXXXXXXXXX" #define LIO_MAX 5 -#define IOCBS_PER_LIO 16 -#define MAX_IOCBS (LIO_MAX * IOCBS_PER_LIO) +#define MAX_IOCBS_PER_LIO 64 +#define MAX_IOCBS (LIO_MAX * MAX_IOCBS_PER_LIO) #define MAX_RUNS 300 int @@ -65,7 +58,9 @@ main(int argc, char *argv[]) int fd; struct aiocb *iocb[MAX_IOCBS]; struct aiocb **lio[LIO_MAX], **kq_lio; - int i, result, run, error, j, k; + int i, result, run, error, j, k, max_queue_per_proc; + int max_iocbs, iocbs_per_lio; + size_t max_queue_per_proc_size; char buffer[32768]; int kq; struct kevent ke, kq_returned; @@ -78,6 +73,13 @@ main(int argc, char *argv[]) PLAIN_REQUIRE_KERNEL_MODULE("aio", 0); PLAIN_REQUIRE_UNSAFE_AIO(0); + max_queue_per_proc_size = sizeof(max_queue_per_proc); + if (sysctlbyname("vfs.aio.max_aio_queue_per_proc", + &max_queue_per_proc, &max_queue_per_proc_size, NULL, 0) != 0) + err(1, "sysctlbyname"); + iocbs_per_lio = max_queue_per_proc / LIO_MAX; + max_iocbs = LIO_MAX * iocbs_per_lio; + kq = kqueue(); if (kq < 0) err(1, "kqeueue(2) failed"); @@ -104,9 +106,9 @@ main(int argc, char *argv[]) #endif for (j = 0; j < LIO_MAX; j++) { lio[j] = - malloc(sizeof(struct aiocb *) * IOCBS_PER_LIO); - for (i = 0; i < IOCBS_PER_LIO; i++) { - k = (IOCBS_PER_LIO * j) + i; + malloc(sizeof(struct aiocb *) * iocbs_per_lio); + for (i = 0; i < iocbs_per_lio; i++) { + k = (iocbs_per_lio * j) + i; lio[j][i] = iocb[k] = calloc(1, sizeof(struct aiocb)); iocb[k]->aio_nbytes = sizeof(buffer); @@ -116,8 +118,8 @@ main(int argc, char *argv[]) = iocb[k]->aio_nbytes * k * (run + 1); #ifdef DEBUG - printf("hello iocb[k] %ld\n", - iocb[k]->aio_offset); + printf("hello iocb[k] %jd\n", + (intmax_t)iocb[k]->aio_offset); #endif iocb[k]->aio_lio_opcode = LIO_WRITE; } @@ -126,12 +128,13 @@ main(int argc, char *argv[]) sig.sigev_notify = SIGEV_KEVENT; time(&time1); result = lio_listio(LIO_NOWAIT, lio[j], - IOCBS_PER_LIO, &sig); + iocbs_per_lio, &sig); error = errno; time(&time2); #ifdef DEBUG - printf("Time %ld %ld %ld result -> %d\n", - time1, time2, time2-time1, result); + printf("Time %jd %jd %jd result -> %d\n", + (intmax_t)time1, (intmax_t)time2, + (intmax_t)time2-time1, result); #endif if (result != 0) { errno = error; @@ -202,10 +205,10 @@ main(int argc, char *argv[]) failed++; } else printf("PASS: run %d, operation %d result %d \n", run, LIO_MAX - i -1, result); - for (k = 0; k < MAX_IOCBS / LIO_MAX; k++) { + for (k = 0; k < max_iocbs / LIO_MAX; k++) { result = aio_return(kq_lio[k]); #ifdef DEBUG - printf("Return Resulto for %d %d is %d\n", j, k, result); + printf("Return Result 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 %zu\n", @@ -219,7 +222,7 @@ main(int argc, char *argv[]) printf("\n"); #endif - for (k = 0; k < MAX_IOCBS / LIO_MAX; k++) + for (k = 0; k < max_iocbs / LIO_MAX; k++) free(lio[j][k]); free(lio[j]); lio[j] = NULL; From owner-svn-src-stable@freebsd.org Fri Dec 8 05:24:50 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C5E14E9AB2A; Fri, 8 Dec 2017 05:24:50 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9284964773; Fri, 8 Dec 2017 05:24:50 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB85On2o030707; Fri, 8 Dec 2017 05:24:49 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB85Ond7030706; Fri, 8 Dec 2017 05:24:49 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201712080524.vB85Ond7030706@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Fri, 8 Dec 2017 05:24:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326678 - stable/11/sys/cam X-SVN-Group: stable-11 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: stable/11/sys/cam X-SVN-Commit-Revision: 326678 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Dec 2017 05:24:50 -0000 Author: asomers Date: Fri Dec 8 05:24:49 2017 New Revision: 326678 URL: https://svnweb.freebsd.org/changeset/base/326678 Log: MFC r325857: Remove a double free(9) in xpt_bus_register In xpt_bus_register(), remove superfluous call to free(). This was mostly benign since free(9) checks for NULL before doing anything, and xpt_create_path() is nice enough to NULL out the pointer on failure. However, it could've segfaulted if malloc(9) failed during xpt_create_path(). Submitted by: gibbs Sponsored by: Spectra Logic Corp Modified: stable/11/sys/cam/cam_xpt.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cam/cam_xpt.c ============================================================================== --- stable/11/sys/cam/cam_xpt.c Fri Dec 8 05:20:54 2017 (r326677) +++ stable/11/sys/cam/cam_xpt.c Fri Dec 8 05:24:49 2017 (r326678) @@ -3900,7 +3900,6 @@ xpt_bus_register(struct cam_sim *sim, device_t parent, CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD); if (status != CAM_REQ_CMP) { xpt_release_bus(new_bus); - free(path, M_CAMXPT); return (CAM_RESRC_UNAVAIL); } From owner-svn-src-stable@freebsd.org Fri Dec 8 05:26:11 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 81BEEE9ABCF; Fri, 8 Dec 2017 05:26:11 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B003648C9; Fri, 8 Dec 2017 05:26:11 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB85QAdL030833; Fri, 8 Dec 2017 05:26:10 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB85QAgT030832; Fri, 8 Dec 2017 05:26:10 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201712080526.vB85QAgT030832@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Fri, 8 Dec 2017 05:26:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326679 - stable/11/share/man/man9 X-SVN-Group: stable-11 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: stable/11/share/man/man9 X-SVN-Commit-Revision: 326679 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Dec 2017 05:26:11 -0000 Author: asomers Date: Fri Dec 8 05:26:10 2017 New Revision: 326679 URL: https://svnweb.freebsd.org/changeset/base/326679 Log: MFC r325946: VOP_LOOKUP.9: update locking info The old description has been inaccurate since at least 243271, if not before. Submitted by: will Reviewed by: kib Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D13108 Modified: stable/11/share/man/man9/VOP_LOOKUP.9 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man9/VOP_LOOKUP.9 ============================================================================== --- stable/11/share/man/man9/VOP_LOOKUP.9 Fri Dec 8 05:24:49 2017 (r326678) +++ stable/11/share/man/man9/VOP_LOOKUP.9 Fri Dec 8 05:26:10 2017 (r326679) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 27, 2017 +.Dd November 17, 2017 .Dt VOP_LOOKUP 9 .Os .Sh NAME @@ -121,19 +121,9 @@ If not at end, add name to cache; if at end and neithe nor deleting, add name to cache. .Ed .Sh LOCKS -The directory, +The directory .Fa dvp -should be locked on entry. -If an error (note: the return value -.Er EJUSTRETURN -is not considered an error) -is detected, it will be returned locked. -Otherwise, it will be unlocked unless both -.Dv LOCKPARENT -and -.Dv ISLASTCN -are specified in -.Fa cnp->cn_flags . +should be locked on entry and exit, regardless of error condition. If an entry is found in the directory, it will be returned locked. .Sh RETURN VALUES Zero is returned with From owner-svn-src-stable@freebsd.org Fri Dec 8 05:32:19 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 279D0E9AEB9; Fri, 8 Dec 2017 05:32:19 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E7B0364CF7; Fri, 8 Dec 2017 05:32:18 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB85WIqE034906; Fri, 8 Dec 2017 05:32:18 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB85WIa1034905; Fri, 8 Dec 2017 05:32:18 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201712080532.vB85WIa1034905@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Fri, 8 Dec 2017 05:32:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326680 - stable/11/sys/cam/scsi X-SVN-Group: stable-11 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: stable/11/sys/cam/scsi X-SVN-Commit-Revision: 326680 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Dec 2017 05:32:19 -0000 Author: asomers Date: Fri Dec 8 05:32:17 2017 New Revision: 326680 URL: https://svnweb.freebsd.org/changeset/base/326680 Log: MFC r325947: Fix potential NULL pointer dereference of device physical path In scsi_dev_advinfo(), if the physical path is being stored and there is a malloc failure (malloc(9) is called with M_NOWAIT), we could wind up in a situation where the device's physpath_len is set to the length the user provided, but the physpath itself is NULL. If another context then comes in to fetch the physical path value, we would wind up trying to memcpy a NULL pointer into the caller's buffer. So, set the physpath_len to 0 when we free the physpath on entry into the store case for the physical path. Reset the length to a non-zero value only after we've successfully malloced a buffer to hold it. Submitted by: ken Reviewed by: asomers Sponsored by: Spectra Logic Corp Modified: stable/11/sys/cam/scsi/scsi_xpt.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cam/scsi/scsi_xpt.c ============================================================================== --- stable/11/sys/cam/scsi/scsi_xpt.c Fri Dec 8 05:26:10 2017 (r326679) +++ stable/11/sys/cam/scsi/scsi_xpt.c Fri Dec 8 05:32:17 2017 (r326680) @@ -2506,8 +2506,8 @@ scsi_dev_advinfo(union ccb *start_ccb) if (device->physpath != NULL) { free(device->physpath, M_CAMXPT); device->physpath = NULL; + device->physpath_len = 0; } - device->physpath_len = cdai->bufsiz; /* Clear existing buffer if zero length */ if (cdai->bufsiz == 0) break; @@ -2516,6 +2516,7 @@ scsi_dev_advinfo(union ccb *start_ccb) start_ccb->ccb_h.status = CAM_REQ_ABORTED; return; } + device->physpath_len = cdai->bufsiz; memcpy(device->physpath, cdai->buf, cdai->bufsiz); } else { cdai->provsiz = device->physpath_len; From owner-svn-src-stable@freebsd.org Fri Dec 8 05:57:19 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9579FE9B460; Fri, 8 Dec 2017 05:57:19 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 61A51655AA; Fri, 8 Dec 2017 05:57:19 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB85vI6V043205; Fri, 8 Dec 2017 05:57:18 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB85vIge043204; Fri, 8 Dec 2017 05:57:18 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201712080557.vB85vIge043204@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Fri, 8 Dec 2017 05:57:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326681 - stable/11/share/man/man4 X-SVN-Group: stable-11 X-SVN-Commit-Author: ed X-SVN-Commit-Paths: stable/11/share/man/man4 X-SVN-Commit-Revision: 326681 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Dec 2017 05:57:19 -0000 Author: ed Date: Fri Dec 8 05:57:18 2017 New Revision: 326681 URL: https://svnweb.freebsd.org/changeset/base/326681 Log: MFC r326420: Add an mlink for cloudabi32(4). We already provide this for cloudabi64(4), so not adding it for cloudabi32(4) is fairly inconsistent. Modified: stable/11/share/man/man4/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/Makefile ============================================================================== --- stable/11/share/man/man4/Makefile Fri Dec 8 05:32:17 2017 (r326680) +++ stable/11/share/man/man4/Makefile Fri Dec 8 05:57:18 2017 (r326681) @@ -618,7 +618,8 @@ MLINKS+=${_bxe.4} ${_if_bxe.4} MLINKS+=cas.4 if_cas.4 MLINKS+=cdce.4 if_cdce.4 MLINKS+=cfi.4 cfid.4 -MLINKS+=cloudabi.4 cloudabi64.4 +MLINKS+=cloudabi.4 cloudabi32.4 \ + cloudabi.4 cloudabi64.4 MLINKS+=crypto.4 cryptodev.4 MLINKS+=cue.4 if_cue.4 MLINKS+=cxgb.4 if_cxgb.4 From owner-svn-src-stable@freebsd.org Fri Dec 8 08:16:37 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 61027E9D580; Fri, 8 Dec 2017 08:16:37 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2D7AE688DC; Fri, 8 Dec 2017 08:16:37 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB88GacK001541; Fri, 8 Dec 2017 08:16:36 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB88Gab7001540; Fri, 8 Dec 2017 08:16:36 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201712080816.vB88Gab7001540@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Fri, 8 Dec 2017 08:16:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326682 - stable/11/sys/netipsec X-SVN-Group: stable-11 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: stable/11/sys/netipsec X-SVN-Commit-Revision: 326682 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Dec 2017 08:16:37 -0000 Author: ae Date: Fri Dec 8 08:16:36 2017 New Revision: 326682 URL: https://svnweb.freebsd.org/changeset/base/326682 Log: MFC r326422: Do better cleaning in key_destroy() for VIMAGE case. SPDB was cleaned using TAILQ_CONCAT() instead of calling key_unlink() for each SP, thus we need to properly clean lists in each bucket of V_sphashtbl to avoid panic in hashdestroy() when INVARIANTS is enabled. Do the same for V_acqaddrhashtbl and V_acqseqhashtbl. When we are called in DEFAULT_VNET, destroy also all global locks and drain key_timer callout. Reported by: kp Tested by: kp Modified: stable/11/sys/netipsec/key.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netipsec/key.c ============================================================================== --- stable/11/sys/netipsec/key.c Fri Dec 8 05:57:18 2017 (r326681) +++ stable/11/sys/netipsec/key.c Fri Dec 8 08:16:36 2017 (r326682) @@ -8145,7 +8145,10 @@ key_destroy(void) TAILQ_CONCAT(&drainq, &V_sptree[i], chain); TAILQ_CONCAT(&drainq, &V_sptree_ifnet[i], chain); } + for (i = 0; i < V_sphash_mask + 1; i++) + LIST_INIT(&V_sphashtbl[i]); SPTREE_WUNLOCK(); + sp = TAILQ_FIRST(&drainq); while (sp != NULL) { nextsp = TAILQ_NEXT(sp, chain); @@ -8196,6 +8199,10 @@ key_destroy(void) free(acq, M_IPSEC_SAQ); acq = nextacq; } + for (i = 0; i < V_acqaddrhash_mask + 1; i++) + LIST_INIT(&V_acqaddrhashtbl[i]); + for (i = 0; i < V_acqseqhash_mask + 1; i++) + LIST_INIT(&V_acqseqhashtbl[i]); ACQ_UNLOCK(); SPACQ_LOCK(); @@ -8211,6 +8218,18 @@ key_destroy(void) hashdestroy(V_acqaddrhashtbl, M_IPSEC_SAQ, V_acqaddrhash_mask); hashdestroy(V_acqseqhashtbl, M_IPSEC_SAQ, V_acqseqhash_mask); uma_zdestroy(V_key_lft_zone); + + if (!IS_DEFAULT_VNET(curvnet)) + return; +#ifndef IPSEC_DEBUG2 + callout_drain(&key_timer); +#endif + XFORMS_LOCK_DESTROY(); + SPTREE_LOCK_DESTROY(); + REGTREE_LOCK_DESTROY(); + SAHTREE_LOCK_DESTROY(); + ACQ_LOCK_DESTROY(); + SPACQ_LOCK_DESTROY(); } #endif From owner-svn-src-stable@freebsd.org Fri Dec 8 10:31:04 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 422A0EA084D; Fri, 8 Dec 2017 10:31:04 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0F8786C842; Fri, 8 Dec 2017 10:31:03 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB8AV3Ik055803; Fri, 8 Dec 2017 10:31:03 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB8AV3gE055802; Fri, 8 Dec 2017 10:31:03 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201712081031.vB8AV3gE055802@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 8 Dec 2017 10:31:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326684 - stable/11/sys/kern X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/kern X-SVN-Commit-Revision: 326684 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Dec 2017 10:31:04 -0000 Author: kib Date: Fri Dec 8 10:31:02 2017 New Revision: 326684 URL: https://svnweb.freebsd.org/changeset/base/326684 Log: MFC r326429: Destroy seltd st_mtx and st_wait in seltdfini(). Modified: stable/11/sys/kern/sys_generic.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/sys_generic.c ============================================================================== --- stable/11/sys/kern/sys_generic.c Fri Dec 8 10:05:23 2017 (r326683) +++ stable/11/sys/kern/sys_generic.c Fri Dec 8 10:31:02 2017 (r326684) @@ -1902,6 +1902,8 @@ seltdfini(struct thread *td) if (stp->st_free2) uma_zfree(selfd_zone, stp->st_free2); td->td_sel = NULL; + cv_destroy(&stp->st_wait); + mtx_destroy(&stp->st_mtx); free(stp, M_SELECT); } From owner-svn-src-stable@freebsd.org Fri Dec 8 10:42:07 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 07B60EA0C4E; Fri, 8 Dec 2017 10:42:07 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C54026D134; Fri, 8 Dec 2017 10:42:06 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB8Ag5Du063746; Fri, 8 Dec 2017 10:42:05 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB8Ag5sc063745; Fri, 8 Dec 2017 10:42:05 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201712081042.vB8Ag5sc063745@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 8 Dec 2017 10:42:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326685 - stable/11/usr.bin/man X-SVN-Group: stable-11 X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: stable/11/usr.bin/man X-SVN-Commit-Revision: 326685 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Dec 2017 10:42:07 -0000 Author: bapt Date: Fri Dec 8 10:42:05 2017 New Revision: 326685 URL: https://svnweb.freebsd.org/changeset/base/326685 Log: MFC r326526: In case man(1) found a catpage to display skip looking ".so" which is manpage only. In case we are trying to read a catpage, the manpage variable is not defined. It results in the "cattool" having no arguments. In case the catpage is compressed, the cattool used is "zcat" which dies if the standard input is a terminal, meaning the function calling it is exiting as if there were no ".so" In case the catpage is uncompressed, the cattool used is "zcat -f" which waits reading standard input, making the man(1) command hang. PR: 223560 Reported by: wosch Modified: stable/11/usr.bin/man/man.sh Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/man/man.sh ============================================================================== --- stable/11/usr.bin/man/man.sh Fri Dec 8 10:31:02 2017 (r326684) +++ stable/11/usr.bin/man/man.sh Fri Dec 8 10:42:05 2017 (r326685) @@ -274,6 +274,9 @@ man_check_for_so() { local IFS line tstr unset IFS + if [ -n "$catpage" ]; then + return 0 + fi # We need to loop to accommodate multiple .so directives. while true From owner-svn-src-stable@freebsd.org Fri Dec 8 10:44:46 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 368B1EA0E86; Fri, 8 Dec 2017 10:44:46 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 02D246D35C; Fri, 8 Dec 2017 10:44:45 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB8AijmU063897; Fri, 8 Dec 2017 10:44:45 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB8AijcJ063896; Fri, 8 Dec 2017 10:44:45 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201712081044.vB8AijcJ063896@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 8 Dec 2017 10:44:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r326686 - stable/10/usr.bin/man X-SVN-Group: stable-10 X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: stable/10/usr.bin/man X-SVN-Commit-Revision: 326686 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Dec 2017 10:44:46 -0000 Author: bapt Date: Fri Dec 8 10:44:44 2017 New Revision: 326686 URL: https://svnweb.freebsd.org/changeset/base/326686 Log: MFC r326526: In case man(1) found a catpage to display skip looking ".so" which is manpage only. In case we are trying to read a catpage, the manpage variable is not defined. It results in the "cattool" having no arguments. In case the catpage is compressed, the cattool used is "zcat" which dies if the standard input is a terminal, meaning the function calling it is exiting as if there were no ".so" In case the catpage is uncompressed, the cattool used is "zcat -f" which waits reading standard input, making the man(1) command hang. PR: 223560 Reported by: wosch Modified: stable/10/usr.bin/man/man.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/man/man.sh ============================================================================== --- stable/10/usr.bin/man/man.sh Fri Dec 8 10:42:05 2017 (r326685) +++ stable/10/usr.bin/man/man.sh Fri Dec 8 10:44:44 2017 (r326686) @@ -255,6 +255,9 @@ man_check_for_so() { local IFS line tstr unset IFS + if [ -n "$catpage" ]; then + return 0 + fi # We need to loop to accommodate multiple .so directives. while true From owner-svn-src-stable@freebsd.org Fri Dec 8 10:47:25 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 58E17EA0F95; Fri, 8 Dec 2017 10:47:25 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 258BB6D543; Fri, 8 Dec 2017 10:47:25 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB8AlO7g064045; Fri, 8 Dec 2017 10:47:24 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB8AlO9k064044; Fri, 8 Dec 2017 10:47:24 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201712081047.vB8AlO9k064044@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 8 Dec 2017 10:47:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326687 - stable/11/usr.bin/man X-SVN-Group: stable-11 X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: stable/11/usr.bin/man X-SVN-Commit-Revision: 326687 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Dec 2017 10:47:25 -0000 Author: bapt Date: Fri Dec 8 10:47:24 2017 New Revision: 326687 URL: https://svnweb.freebsd.org/changeset/base/326687 Log: MFC r326527: Only skip looking for manpages if both man directory and cat directory are not existing. This allows man(1) to read catpages when no man directories are available at all PR: 223559 Reported by: wosch Modified: stable/11/usr.bin/man/man.sh Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/man/man.sh ============================================================================== --- stable/11/usr.bin/man/man.sh Fri Dec 8 10:44:44 2017 (r326686) +++ stable/11/usr.bin/man/man.sh Fri Dec 8 10:47:24 2017 (r326687) @@ -199,7 +199,7 @@ find_file() { catroot="$catroot/$3" fi - if [ ! -d "$manroot" ]; then + if [ ! -d "$manroot" -a ! -d "$catroot" ]; then return 1 fi decho " Searching directory $manroot" 2 From owner-svn-src-stable@freebsd.org Fri Dec 8 10:47:31 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4304BEA0FC3; Fri, 8 Dec 2017 10:47:31 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0FAFB6D577; Fri, 8 Dec 2017 10:47:30 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB8AlU5K064103; Fri, 8 Dec 2017 10:47:30 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB8AlUsx064102; Fri, 8 Dec 2017 10:47:30 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201712081047.vB8AlUsx064102@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 8 Dec 2017 10:47: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: r326688 - stable/10/usr.bin/man X-SVN-Group: stable-10 X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: stable/10/usr.bin/man X-SVN-Commit-Revision: 326688 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Dec 2017 10:47:31 -0000 Author: bapt Date: Fri Dec 8 10:47:29 2017 New Revision: 326688 URL: https://svnweb.freebsd.org/changeset/base/326688 Log: MFC r326527: Only skip looking for manpages if both man directory and cat directory are not existing. This allows man(1) to read catpages when no man directories are available at all PR: 223559 Reported by: wosch Modified: stable/10/usr.bin/man/man.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/man/man.sh ============================================================================== --- stable/10/usr.bin/man/man.sh Fri Dec 8 10:47:24 2017 (r326687) +++ stable/10/usr.bin/man/man.sh Fri Dec 8 10:47:29 2017 (r326688) @@ -176,7 +176,7 @@ find_file() { catroot="$catroot/$3" fi - if [ ! -d "$manroot" ]; then + if [ ! -d "$manroot" -a ! -d "$catroot" ]; then return 1 fi decho " Searching directory $manroot" 2 From owner-svn-src-stable@freebsd.org Fri Dec 8 10:49:55 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1CBDBE800CA; Fri, 8 Dec 2017 10:49:55 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CB0626D7FD; Fri, 8 Dec 2017 10:49:54 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB8Anrla064236; Fri, 8 Dec 2017 10:49:53 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB8Anr1h064235; Fri, 8 Dec 2017 10:49:53 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201712081049.vB8Anr1h064235@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 8 Dec 2017 10:49:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326689 - stable/11/share/misc X-SVN-Group: stable-11 X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: stable/11/share/misc X-SVN-Commit-Revision: 326689 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Dec 2017 10:49:55 -0000 Author: bapt Date: Fri Dec 8 10:49:53 2017 New Revision: 326689 URL: https://svnweb.freebsd.org/changeset/base/326689 Log: MFC r326633: Update to 2017-12-06 Modified: stable/11/share/misc/pci_vendors Directory Properties: stable/11/ (props changed) Modified: stable/11/share/misc/pci_vendors ============================================================================== --- stable/11/share/misc/pci_vendors Fri Dec 8 10:47:29 2017 (r326688) +++ stable/11/share/misc/pci_vendors Fri Dec 8 10:49:53 2017 (r326689) @@ -3,8 +3,8 @@ # # List of PCI ID's # -# Version: 2017.10.21 -# Date: 2017-10-21 03:15:01 +# Version: 2017.12.06 +# Date: 2017-12-06 03:15:02 # # Maintained by Albert Pool, Martin Mares, and other volunteers from # the PCI ID Project at http://pci-ids.ucw.cz/. @@ -751,6 +751,7 @@ 131b Kaveri [Radeon R4 Graphics] 131c Kaveri [Radeon R7 Graphics] 131d Kaveri [Radeon R6 Graphics] + 15dd Radeon Vega 8 Mobile 1714 BeaverCreek HDMI Audio [Radeon HD 6500D and 6400G-6600G series] 103c 168b ProBook 4535s 3150 RV380/M24 [Mobility Radeon X600] @@ -1629,6 +1630,7 @@ 6623 Mars 6631 Oland 6640 Saturn XT [FirePro M6100] + 106b 014b Tropo XT [Radeon R9 M380 Mac Edition] 6641 Saturn PRO [Radeon HD 8930M] 6646 Bonaire XT [Radeon R9 M280X] 6647 Bonaire PRO [Radeon R9 M270X] @@ -2370,7 +2372,8 @@ 6828 Cape Verde PRO [FirePro W600] 6829 Cape Verde 682a Venus PRO - 682b Venus LE [Radeon HD 8830M] + 682b Venus LE / Tropo PRO-L [Radeon HD 8830M / R7 M465X] + 0128 079c Radeon R7 465X 682c Cape Verde GL [FirePro W4100] 682d Chelsea XT GL [FirePro M4000] 682f Chelsea LP [Radeon HD 7730M] @@ -2504,6 +2507,7 @@ 144d c0c7 Radeon HD 7550M 6842 Thames LE [Radeon HD 7000M Series] 6843 Thames [Radeon HD 7670M] + 6861 Vega 10 XT [Radeon PRO WX 9100] 6863 Vega 10 XTX [Radeon Vega Frontier Edition] 687f Vega 10 XT [Radeon RX Vega 64] 6888 Cypress XT [FirePro V8800] @@ -4037,6 +4041,7 @@ 141f Family 15h (Models 30h-3fh) Processor Function 5 1422 Family 15h (Models 30h-3fh) Processor Root Complex 1423 Family 15h (Models 30h-3fh) I/O Memory Management Unit + 1424 Family 15h (Models 30h-3fh) Processor Root Port 1426 Family 15h (Models 30h-3fh) Processor Root Port 1436 Liverpool Processor Root Complex 1437 Liverpool I/O Memory Management Unit @@ -4045,6 +4050,7 @@ 1450 Family 17h (Models 00h-0fh) Root Complex 1451 Family 17h (Models 00h-0fh) I/O Memory Management Unit 1452 Family 17h (Models 00h-0fh) PCIe Dummy Host Bridge + 1453 Family 17h (Models 00h-0fh) PCIe GPP Bridge 1454 Family 17h (Models 00h-0fh) Internal PCIe GPP Bridge 0 to Bus B 1456 Family 17h (Models 00h-0fh) Platform Security Processor 1457 Family 17h (Models 00h-0fh) HD Audio Controller @@ -5217,6 +5223,7 @@ 3020 Samurai_IDE 1043 ASUSTeK Computer Inc. 0464 Radeon R9 270x GPU + 0521 RX580 [RX 580 Dual O8G] 0675 ISDNLink P-IN100-ST-D 0675 1704 ISDN Adapter (PCI Bus, D, C) 0675 1707 ISDN Adapter (PCI Bus, DV, W) @@ -6176,6 +6183,7 @@ 103c 12dd 4Gb Fibre Channel [AB429A] 2432 ISP2432-based 4Gb Fibre Channel to PCI Express HBA 103c 7040 FC1142SR 4Gb 1-port PCIe Fibre Channel Host Bus Adapter [HPAE311A] + 1077 0137 QLE2460 4 GB PCI-X Host-Bus-Adapter 2532 ISP2532-based 8Gb Fibre Channel to PCI Express HBA 1014 041e FC EN0Y/EN12 PCIe2 LP 8 Gb 4-port Fibre Channel Adapter for POWER 103c 3262 StorageWorks 81Q @@ -6227,6 +6235,10 @@ 1077 000b 25GE 2P QL41262HxCU-DE Adapter 1077 0011 FastLinQ QL41212H 25GbE Adapter 1077 0012 FastLinQ QL41112H 10GbE Adapter + 1590 021d 10/25GbE 2P QL41222HLCU-HP Adapter + 1590 021e 10/25GbE 2P QL41162HMRJ-HP Adapter + 1590 021f 10/25GbE 2P QL41262HMCU-HP Adapter + 1590 0220 10/25GbE 2P QL41122HLRJ-HP Adapter 8080 FastLinQ QL41000 Series 10/25/40/50GbE Controller (FCoE) 1077 0001 10GE 2P QL41162HxRJ-DE Adapter 1077 0002 10GE 2P QL41112HxCU-DE Adapter @@ -6247,6 +6259,8 @@ 1077 000e FastLinQ QL41162H 10GbE iSCSI Adapter (SR-IOV VF) 1077 0011 FastLinQ QL41212H 25GbE Adapter (SR-IOV VF) 1077 0012 FastLinQ QL41112H 10GbE Adapter (SR-IOV VF) + 1590 021e 10/25GbE 2P QL41162HMRJ-HP Adapter + 1590 021f 10/25GbE 2P QL41262HMCU-HP Adapter 8430 ISP8324 1/10GbE Converged Network Controller (NIC VF) 8431 8300 Series 10GbE Converged Network Adapter (FCoE VF) 8432 ISP2432M-based 10GbE Converged Network Adapter (CNA) @@ -10853,6 +10867,8 @@ 1725 GP100 172e GP100 172f GP100 + 174d GM108M [GeForce MX130] + 174e GM108M [GeForce MX110] 17c2 GM200 [GeForce GTX TITAN X] 17c8 GM200 [GeForce GTX 980 Ti] 17f0 GM200GL [Quadro M6000] @@ -10868,7 +10884,7 @@ 1b78 GP102GL 1b80 GP104 [GeForce GTX 1080] 1b81 GP104 [GeForce GTX 1070] - 1b82 GP104 + 1b82 GP104 [GeForce GTX 1070 Ti] 1b83 GP104 1b84 GP104 [GeForce GTX 1060 3GB] 1b87 GP104 [P104-100] @@ -10882,7 +10898,7 @@ 1bb0 GP104GL [Quadro P5000] 1bb1 GP104GL [Quadro P4000] 1bb3 GP104GL [Tesla P4] - 1bb4 GP104GL + 1bb4 GP104GL [Tesla P6] 1bb5 GP104GLM [Quadro P5200 Mobile] 1bb6 GP104GLM [Quadro P5000 Mobile] 1bb7 GP104GLM [Quadro P4000 Mobile] @@ -10933,6 +10949,7 @@ 103c 21d4 StoreFabric CN1200E 10Gb Converged Network Adapter 103c 220a FlexFabric 10Gb 2-port 556FLR-SFP+ Adapter 103c 803f Ethernet 10Gb 2-port 557SFP+ Adapter + 103c 8144 FlexFabric 10GB 2-port 556FLR-T Adapter 17aa 1056 ThinkServer OCm14102-UX-L AnyFabric 17aa 1057 ThinkServer OCm14104-UX-L AnyFabric 17aa 1059 ThinkServer OCm14104-UT-L AnyFabric @@ -11263,6 +11280,7 @@ 8821 RTL8821AE 802.11ac PCIe Wireless Network Adapter b723 RTL8723BE PCIe Wireless Network Adapter 10ec 8739 Dell Wireless 1801 + c821 RTL8821CE 802.11ac PCIe Wireless Network Adapter 10ed Ascii Corporation 7310 V7310 10ee Xilinx Corporation @@ -12565,6 +12583,8 @@ 1131 4f61 Activy DVB-S Budget Rev GR 1131 5f61 Activy DVB-T Budget 114b 2003 DVRaptor Video Edit/Capture Card + 1159 0040 MuTech M-Vision 500 (MV-500 rev. E) + 1159 0050 MuTech M-Vision 500 (MV-500 rev. F) 11bd 0006 DV500 Overlay 11bd 000a DV500 Overlay 11bd 000f DV500 Overlay @@ -13021,7 +13041,7 @@ 3011 Tokenet/vg 1001/10m anylan 9050 Lanfleet/Truevalue 9051 Lanfleet/Truevalue -1159 Mutech Corp +1159 MuTech Corporation 0001 MV-1000 0002 MV-1500 115a Harlequin Ltd @@ -15480,9 +15500,9 @@ 1392 Medialight Inc 1393 Moxa Technologies Co Ltd 0001 UC7000 Serial - 1020 CP102 (2-port RS-232 PCI) - 1021 CP102UL (2-port RS-232 Universal PCI) - 1022 CP102U (2-port RS-232 Universal PCI) + 1020 CP-102 (2-port RS-232 PCI) + 1021 CP-102UL (2-port RS-232 Universal PCI) + 1022 CP-102U (2-port RS-232 Universal PCI) 1023 CP-102UF 1024 CP-102E (2-port RS-232 Smart PCI Express Serial Board) 1025 CP-102EL (2-port RS-232 Smart PCI Express Serial Board) @@ -15509,7 +15529,7 @@ 1380 CP138U (8-port RS-232/422/485 Smart Universal PCI) 1680 Smartio C168H/PCI 1681 CP-168U V2 Smart Serial Board (8-port RS-232) - 1682 CP168EL (8-port RS-232 Smart PCI Express) + 1682 CP-168EL (8-port RS-232 Smart PCI Express) 1683 CP-168EL-A (8-port RS-232 PCI Express Serial Board) 2040 Intellio CP-204J 2180 Intellio C218 Turbo PCI @@ -16588,6 +16608,7 @@ 6083 T62100-6083 Unified Wire Ethernet Controller 6084 T64100-6084 Unified Wire Ethernet Controller 6085 T6240-6085 Unified Wire Ethernet Controller + 6086 T6225-6086 Unified Wire Ethernet Controller 6401 T6225-CR Unified Wire Ethernet Controller 6402 T6225-SO-CR Unified Wire Ethernet Controller 6403 T6425-CR Unified Wire Ethernet Controller @@ -16607,6 +16628,7 @@ 6483 T62100-6083 Unified Wire Ethernet Controller 6484 T64100-6084 Unified Wire Ethernet Controller 6485 T6240-6085 Unified Wire Ethernet Controller + 6486 T6225-6086 Unified Wire Ethernet Controller 6501 T6225-CR Unified Wire Storage Controller 6502 T6225-SO-CR Unified Wire Storage Controller 6503 T6425-CR Unified Wire Storage Controller @@ -16626,6 +16648,7 @@ 6583 T62100-6083 Unified Wire Storage Controller 6584 T64100-6084 Unified Wire Storage Controller 6585 T6240-6085 Unified Wire Storage Controller + 6586 T6225-6086 Unified Wire Storage Controller 6601 T6225-CR Unified Wire Storage Controller 6602 T6225-SO-CR Unified Wire Storage Controller 6603 T6425-CR Unified Wire Storage Controller @@ -16645,6 +16668,7 @@ 6683 T62100-6083 Unified Wire Storage Controller 6684 T64100-6084 Unified Wire Storage Controller 6685 T6240-6085 Unified Wire Storage Controller + 6686 T6225-6086 Unified Wire Storage Controller 6801 T6225-CR Unified Wire Ethernet Controller [VF] 6802 T6225-SO-CR Unified Wire Ethernet Controller [VF] 6803 T6425-CR Unified Wire Ethernet Controller [VF] @@ -16664,6 +16688,7 @@ 6883 T62100-6083 Unified Wire Ethernet Controller [VF] 6884 T64100-6084 Unified Wire Ethernet Controller [VF] 6885 T6240-6085 Unified Wire Ethernet Controller [VF] + 6886 T6225-6086 Unified Wire Ethernet Controller [VF] a000 PE10K Unified Wire Ethernet Controller 1426 Storage Technology Corp. 1427 Better On-Line Solutions @@ -17303,6 +17328,7 @@ 169d NetLink BCM5789 Gigabit Ethernet PCI Express 16a0 NetLink BCM5785 Fast Ethernet 16a1 BCM57840 NetXtreme II 10 Gigabit Ethernet + 1043 866e PEB-10G/57840-2T 10GBase-T Network Adapter 16a2 BCM57840 NetXtreme II 10/20-Gigabit Ethernet 103c 1916 FlexFabric 20Gb 2-port 630FLB Adapter 103c 1917 FlexFabric 20Gb 2-port 630M Adapter @@ -17427,7 +17453,8 @@ 14e4 1404 BCM957414M4142 OCP 2x25G Type1 wRoCE 1590 020e Ethernet 25Gb 2-port 631SFP28 Adapter 1590 0211 Ethernet 25Gb 2-port 631FLR-SFP28 Adapter - 16d8 BCM57416 NetXtreme-E 10GBase-T RDMA Ethernet Controller + 16d8 BCM57416 NetXtreme-E Dual-Media 10G RDMA Ethernet Controller + 1028 1feb NetXtreme-E 10Gb SFP+ Adapter 1590 020c Ethernet 10Gb 2-port 535T Adapter 1590 0212 Ethernet 10Gb 2-port 535FLR-T Adapter 16d9 BCM57417 NetXtreme-E 10GBASE-T RDMA Ethernet Controller @@ -21984,6 +22011,7 @@ 0897 Centrino Wireless-N 130 8086 5015 Centrino Wireless-N 130 BGN 8086 5017 Centrino Wireless-N 130 BG + 08a7 Quark SoC X1000 SDIO / eMMC Controller 08ae Centrino Wireless-N 100 8086 1005 Centrino Wireless-N 100 BGN 8086 1007 Centrino Wireless-N 100 BG @@ -22182,6 +22210,12 @@ 8086 8370 Dual Band Wireless AC 3160 # PowerVR SGX 545 08cf Atom Processor Z2760 Integrated Graphics Controller + 0934 Quark SoC X1000 I2C Controller and GPIO Controller + 0935 Quark SoC X1000 SPI Controller + 0936 Quark SoC X1000 HS-UART + 0937 Quark SoC X1000 10/100 Ethernet MAC + 0939 Quark SoC X1000 USB EHCI Host Controller / USB 2.0 Device + 093a Quark SoC X1000 USB OHCI Host Controller 0953 PCIe Data Center SSD 8086 3702 DC P3700 SSD 8086 3703 DC P3700 SSD [2.5" SFF] @@ -22191,6 +22225,7 @@ 8086 370a DC P3600 SSD [2.5" SFF] 8086 370d SSD 750 Series [Add-in Card] 8086 370e SSD 750 Series [2.5" SFF] + 0958 Quark SoC X1000 Host Bridge 095a Wireless 7265 # Stone Peak 2 AC 8086 1010 Dual Band Wireless-AC 7265 @@ -22277,6 +22312,7 @@ 8086 5310 Dual Band Wireless-AC 7265 # Stone Peak 2 AGN 8086 9200 Dual Band Wireless-AC 7265 + 095e Quark SoC X1000 Legacy Bridge 0960 80960RP (i960RP) Microprocessor/Bridge 0962 80960RM (i960RM) Bridge 0964 80960RP (i960RP) Microprocessor/Bridge @@ -23077,6 +23113,8 @@ 11a1 Merrifield Power Management Unit 11a2 Merrifield Serial IO DMA Controller 11a5 Merrifield Serial IO PWM Controller + 11c3 Quark SoC X1000 PCIe Root Port 0 + 11c4 Quark SoC X1000 PCIe Root Port 1 1200 IXP1200 Network Processor 172a 0000 AEP SSL Accelerator 1209 8255xER/82551IT Fast Ethernet Controller @@ -23392,6 +23430,7 @@ 108e 7b14 Sun Dual Port 10 GbE PCIe 2.0 ExpressModule, Base-T 108e 7b15 Sun Dual Port 10 GbE PCIe 2.0 Low Profile Adapter, Base-T 1137 00bf Ethernet Converged Network Adapter X540-T2 + 1170 0052 Ethernet Controller 10-Gigabit X540-AT2 17aa 1073 ThinkServer X540-T2 AnyFabric 17aa 4006 Ethernet Controller 10-Gigabit X540-AT2 1bd4 001a 10G base-T DP ER102Ti3 Rack Adapter @@ -23512,6 +23551,7 @@ 8086 000b Ethernet Server Adapter X710-DA2 for OCP 8086 000d Ethernet Controller X710 for 10GbE SFP+ 8086 000e Ethernet Server Adapter OCP X710-2 + 8086 000f Ethernet Server Adapter OCP X710-2 8086 0010 Ethernet Converged Network Adapter X710 8086 4005 Ethernet Controller X710 for 10GbE SFP+ 8086 4006 Ethernet Controller X710 for 10GbE SFP+ @@ -23622,6 +23662,7 @@ 15c8 Ethernet Connection X553/X557-AT 10GBASE-T 15ce Ethernet Connection X553 10 GbE SFP+ 15d0 Ethernet SDI Adapter FM10420-100GbE-QDA2 + 8086 0001 Ethernet SDI Adapter FM10420-100GbE-QDA2 15d1 Ethernet Controller 10G X550T 8086 0002 Ethernet Converged Network Adapter X550-T1 8086 001b Ethernet Server Adapter X550-T1 for OCP From owner-svn-src-stable@freebsd.org Fri Dec 8 10:50:15 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 27889E80144; Fri, 8 Dec 2017 10:50:15 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E84816D945; Fri, 8 Dec 2017 10:50:14 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB8AoEw7064318; Fri, 8 Dec 2017 10:50:14 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB8AoEtd064317; Fri, 8 Dec 2017 10:50:14 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201712081050.vB8AoEtd064317@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 8 Dec 2017 10:50: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: r326690 - stable/10/share/misc X-SVN-Group: stable-10 X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: stable/10/share/misc X-SVN-Commit-Revision: 326690 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Dec 2017 10:50:15 -0000 Author: bapt Date: Fri Dec 8 10:50:13 2017 New Revision: 326690 URL: https://svnweb.freebsd.org/changeset/base/326690 Log: MFC r326633: Update to 2017-12-06 Modified: stable/10/share/misc/pci_vendors Directory Properties: stable/10/ (props changed) Modified: stable/10/share/misc/pci_vendors ============================================================================== --- stable/10/share/misc/pci_vendors Fri Dec 8 10:49:53 2017 (r326689) +++ stable/10/share/misc/pci_vendors Fri Dec 8 10:50:13 2017 (r326690) @@ -3,8 +3,8 @@ # # List of PCI ID's # -# Version: 2017.10.21 -# Date: 2017-10-21 03:15:01 +# Version: 2017.12.06 +# Date: 2017-12-06 03:15:02 # # Maintained by Albert Pool, Martin Mares, and other volunteers from # the PCI ID Project at http://pci-ids.ucw.cz/. @@ -751,6 +751,7 @@ 131b Kaveri [Radeon R4 Graphics] 131c Kaveri [Radeon R7 Graphics] 131d Kaveri [Radeon R6 Graphics] + 15dd Radeon Vega 8 Mobile 1714 BeaverCreek HDMI Audio [Radeon HD 6500D and 6400G-6600G series] 103c 168b ProBook 4535s 3150 RV380/M24 [Mobility Radeon X600] @@ -1629,6 +1630,7 @@ 6623 Mars 6631 Oland 6640 Saturn XT [FirePro M6100] + 106b 014b Tropo XT [Radeon R9 M380 Mac Edition] 6641 Saturn PRO [Radeon HD 8930M] 6646 Bonaire XT [Radeon R9 M280X] 6647 Bonaire PRO [Radeon R9 M270X] @@ -2370,7 +2372,8 @@ 6828 Cape Verde PRO [FirePro W600] 6829 Cape Verde 682a Venus PRO - 682b Venus LE [Radeon HD 8830M] + 682b Venus LE / Tropo PRO-L [Radeon HD 8830M / R7 M465X] + 0128 079c Radeon R7 465X 682c Cape Verde GL [FirePro W4100] 682d Chelsea XT GL [FirePro M4000] 682f Chelsea LP [Radeon HD 7730M] @@ -2504,6 +2507,7 @@ 144d c0c7 Radeon HD 7550M 6842 Thames LE [Radeon HD 7000M Series] 6843 Thames [Radeon HD 7670M] + 6861 Vega 10 XT [Radeon PRO WX 9100] 6863 Vega 10 XTX [Radeon Vega Frontier Edition] 687f Vega 10 XT [Radeon RX Vega 64] 6888 Cypress XT [FirePro V8800] @@ -4037,6 +4041,7 @@ 141f Family 15h (Models 30h-3fh) Processor Function 5 1422 Family 15h (Models 30h-3fh) Processor Root Complex 1423 Family 15h (Models 30h-3fh) I/O Memory Management Unit + 1424 Family 15h (Models 30h-3fh) Processor Root Port 1426 Family 15h (Models 30h-3fh) Processor Root Port 1436 Liverpool Processor Root Complex 1437 Liverpool I/O Memory Management Unit @@ -4045,6 +4050,7 @@ 1450 Family 17h (Models 00h-0fh) Root Complex 1451 Family 17h (Models 00h-0fh) I/O Memory Management Unit 1452 Family 17h (Models 00h-0fh) PCIe Dummy Host Bridge + 1453 Family 17h (Models 00h-0fh) PCIe GPP Bridge 1454 Family 17h (Models 00h-0fh) Internal PCIe GPP Bridge 0 to Bus B 1456 Family 17h (Models 00h-0fh) Platform Security Processor 1457 Family 17h (Models 00h-0fh) HD Audio Controller @@ -5217,6 +5223,7 @@ 3020 Samurai_IDE 1043 ASUSTeK Computer Inc. 0464 Radeon R9 270x GPU + 0521 RX580 [RX 580 Dual O8G] 0675 ISDNLink P-IN100-ST-D 0675 1704 ISDN Adapter (PCI Bus, D, C) 0675 1707 ISDN Adapter (PCI Bus, DV, W) @@ -6176,6 +6183,7 @@ 103c 12dd 4Gb Fibre Channel [AB429A] 2432 ISP2432-based 4Gb Fibre Channel to PCI Express HBA 103c 7040 FC1142SR 4Gb 1-port PCIe Fibre Channel Host Bus Adapter [HPAE311A] + 1077 0137 QLE2460 4 GB PCI-X Host-Bus-Adapter 2532 ISP2532-based 8Gb Fibre Channel to PCI Express HBA 1014 041e FC EN0Y/EN12 PCIe2 LP 8 Gb 4-port Fibre Channel Adapter for POWER 103c 3262 StorageWorks 81Q @@ -6227,6 +6235,10 @@ 1077 000b 25GE 2P QL41262HxCU-DE Adapter 1077 0011 FastLinQ QL41212H 25GbE Adapter 1077 0012 FastLinQ QL41112H 10GbE Adapter + 1590 021d 10/25GbE 2P QL41222HLCU-HP Adapter + 1590 021e 10/25GbE 2P QL41162HMRJ-HP Adapter + 1590 021f 10/25GbE 2P QL41262HMCU-HP Adapter + 1590 0220 10/25GbE 2P QL41122HLRJ-HP Adapter 8080 FastLinQ QL41000 Series 10/25/40/50GbE Controller (FCoE) 1077 0001 10GE 2P QL41162HxRJ-DE Adapter 1077 0002 10GE 2P QL41112HxCU-DE Adapter @@ -6247,6 +6259,8 @@ 1077 000e FastLinQ QL41162H 10GbE iSCSI Adapter (SR-IOV VF) 1077 0011 FastLinQ QL41212H 25GbE Adapter (SR-IOV VF) 1077 0012 FastLinQ QL41112H 10GbE Adapter (SR-IOV VF) + 1590 021e 10/25GbE 2P QL41162HMRJ-HP Adapter + 1590 021f 10/25GbE 2P QL41262HMCU-HP Adapter 8430 ISP8324 1/10GbE Converged Network Controller (NIC VF) 8431 8300 Series 10GbE Converged Network Adapter (FCoE VF) 8432 ISP2432M-based 10GbE Converged Network Adapter (CNA) @@ -10853,6 +10867,8 @@ 1725 GP100 172e GP100 172f GP100 + 174d GM108M [GeForce MX130] + 174e GM108M [GeForce MX110] 17c2 GM200 [GeForce GTX TITAN X] 17c8 GM200 [GeForce GTX 980 Ti] 17f0 GM200GL [Quadro M6000] @@ -10868,7 +10884,7 @@ 1b78 GP102GL 1b80 GP104 [GeForce GTX 1080] 1b81 GP104 [GeForce GTX 1070] - 1b82 GP104 + 1b82 GP104 [GeForce GTX 1070 Ti] 1b83 GP104 1b84 GP104 [GeForce GTX 1060 3GB] 1b87 GP104 [P104-100] @@ -10882,7 +10898,7 @@ 1bb0 GP104GL [Quadro P5000] 1bb1 GP104GL [Quadro P4000] 1bb3 GP104GL [Tesla P4] - 1bb4 GP104GL + 1bb4 GP104GL [Tesla P6] 1bb5 GP104GLM [Quadro P5200 Mobile] 1bb6 GP104GLM [Quadro P5000 Mobile] 1bb7 GP104GLM [Quadro P4000 Mobile] @@ -10933,6 +10949,7 @@ 103c 21d4 StoreFabric CN1200E 10Gb Converged Network Adapter 103c 220a FlexFabric 10Gb 2-port 556FLR-SFP+ Adapter 103c 803f Ethernet 10Gb 2-port 557SFP+ Adapter + 103c 8144 FlexFabric 10GB 2-port 556FLR-T Adapter 17aa 1056 ThinkServer OCm14102-UX-L AnyFabric 17aa 1057 ThinkServer OCm14104-UX-L AnyFabric 17aa 1059 ThinkServer OCm14104-UT-L AnyFabric @@ -11263,6 +11280,7 @@ 8821 RTL8821AE 802.11ac PCIe Wireless Network Adapter b723 RTL8723BE PCIe Wireless Network Adapter 10ec 8739 Dell Wireless 1801 + c821 RTL8821CE 802.11ac PCIe Wireless Network Adapter 10ed Ascii Corporation 7310 V7310 10ee Xilinx Corporation @@ -12565,6 +12583,8 @@ 1131 4f61 Activy DVB-S Budget Rev GR 1131 5f61 Activy DVB-T Budget 114b 2003 DVRaptor Video Edit/Capture Card + 1159 0040 MuTech M-Vision 500 (MV-500 rev. E) + 1159 0050 MuTech M-Vision 500 (MV-500 rev. F) 11bd 0006 DV500 Overlay 11bd 000a DV500 Overlay 11bd 000f DV500 Overlay @@ -13021,7 +13041,7 @@ 3011 Tokenet/vg 1001/10m anylan 9050 Lanfleet/Truevalue 9051 Lanfleet/Truevalue -1159 Mutech Corp +1159 MuTech Corporation 0001 MV-1000 0002 MV-1500 115a Harlequin Ltd @@ -15480,9 +15500,9 @@ 1392 Medialight Inc 1393 Moxa Technologies Co Ltd 0001 UC7000 Serial - 1020 CP102 (2-port RS-232 PCI) - 1021 CP102UL (2-port RS-232 Universal PCI) - 1022 CP102U (2-port RS-232 Universal PCI) + 1020 CP-102 (2-port RS-232 PCI) + 1021 CP-102UL (2-port RS-232 Universal PCI) + 1022 CP-102U (2-port RS-232 Universal PCI) 1023 CP-102UF 1024 CP-102E (2-port RS-232 Smart PCI Express Serial Board) 1025 CP-102EL (2-port RS-232 Smart PCI Express Serial Board) @@ -15509,7 +15529,7 @@ 1380 CP138U (8-port RS-232/422/485 Smart Universal PCI) 1680 Smartio C168H/PCI 1681 CP-168U V2 Smart Serial Board (8-port RS-232) - 1682 CP168EL (8-port RS-232 Smart PCI Express) + 1682 CP-168EL (8-port RS-232 Smart PCI Express) 1683 CP-168EL-A (8-port RS-232 PCI Express Serial Board) 2040 Intellio CP-204J 2180 Intellio C218 Turbo PCI @@ -16588,6 +16608,7 @@ 6083 T62100-6083 Unified Wire Ethernet Controller 6084 T64100-6084 Unified Wire Ethernet Controller 6085 T6240-6085 Unified Wire Ethernet Controller + 6086 T6225-6086 Unified Wire Ethernet Controller 6401 T6225-CR Unified Wire Ethernet Controller 6402 T6225-SO-CR Unified Wire Ethernet Controller 6403 T6425-CR Unified Wire Ethernet Controller @@ -16607,6 +16628,7 @@ 6483 T62100-6083 Unified Wire Ethernet Controller 6484 T64100-6084 Unified Wire Ethernet Controller 6485 T6240-6085 Unified Wire Ethernet Controller + 6486 T6225-6086 Unified Wire Ethernet Controller 6501 T6225-CR Unified Wire Storage Controller 6502 T6225-SO-CR Unified Wire Storage Controller 6503 T6425-CR Unified Wire Storage Controller @@ -16626,6 +16648,7 @@ 6583 T62100-6083 Unified Wire Storage Controller 6584 T64100-6084 Unified Wire Storage Controller 6585 T6240-6085 Unified Wire Storage Controller + 6586 T6225-6086 Unified Wire Storage Controller 6601 T6225-CR Unified Wire Storage Controller 6602 T6225-SO-CR Unified Wire Storage Controller 6603 T6425-CR Unified Wire Storage Controller @@ -16645,6 +16668,7 @@ 6683 T62100-6083 Unified Wire Storage Controller 6684 T64100-6084 Unified Wire Storage Controller 6685 T6240-6085 Unified Wire Storage Controller + 6686 T6225-6086 Unified Wire Storage Controller 6801 T6225-CR Unified Wire Ethernet Controller [VF] 6802 T6225-SO-CR Unified Wire Ethernet Controller [VF] 6803 T6425-CR Unified Wire Ethernet Controller [VF] @@ -16664,6 +16688,7 @@ 6883 T62100-6083 Unified Wire Ethernet Controller [VF] 6884 T64100-6084 Unified Wire Ethernet Controller [VF] 6885 T6240-6085 Unified Wire Ethernet Controller [VF] + 6886 T6225-6086 Unified Wire Ethernet Controller [VF] a000 PE10K Unified Wire Ethernet Controller 1426 Storage Technology Corp. 1427 Better On-Line Solutions @@ -17303,6 +17328,7 @@ 169d NetLink BCM5789 Gigabit Ethernet PCI Express 16a0 NetLink BCM5785 Fast Ethernet 16a1 BCM57840 NetXtreme II 10 Gigabit Ethernet + 1043 866e PEB-10G/57840-2T 10GBase-T Network Adapter 16a2 BCM57840 NetXtreme II 10/20-Gigabit Ethernet 103c 1916 FlexFabric 20Gb 2-port 630FLB Adapter 103c 1917 FlexFabric 20Gb 2-port 630M Adapter @@ -17427,7 +17453,8 @@ 14e4 1404 BCM957414M4142 OCP 2x25G Type1 wRoCE 1590 020e Ethernet 25Gb 2-port 631SFP28 Adapter 1590 0211 Ethernet 25Gb 2-port 631FLR-SFP28 Adapter - 16d8 BCM57416 NetXtreme-E 10GBase-T RDMA Ethernet Controller + 16d8 BCM57416 NetXtreme-E Dual-Media 10G RDMA Ethernet Controller + 1028 1feb NetXtreme-E 10Gb SFP+ Adapter 1590 020c Ethernet 10Gb 2-port 535T Adapter 1590 0212 Ethernet 10Gb 2-port 535FLR-T Adapter 16d9 BCM57417 NetXtreme-E 10GBASE-T RDMA Ethernet Controller @@ -21984,6 +22011,7 @@ 0897 Centrino Wireless-N 130 8086 5015 Centrino Wireless-N 130 BGN 8086 5017 Centrino Wireless-N 130 BG + 08a7 Quark SoC X1000 SDIO / eMMC Controller 08ae Centrino Wireless-N 100 8086 1005 Centrino Wireless-N 100 BGN 8086 1007 Centrino Wireless-N 100 BG @@ -22182,6 +22210,12 @@ 8086 8370 Dual Band Wireless AC 3160 # PowerVR SGX 545 08cf Atom Processor Z2760 Integrated Graphics Controller + 0934 Quark SoC X1000 I2C Controller and GPIO Controller + 0935 Quark SoC X1000 SPI Controller + 0936 Quark SoC X1000 HS-UART + 0937 Quark SoC X1000 10/100 Ethernet MAC + 0939 Quark SoC X1000 USB EHCI Host Controller / USB 2.0 Device + 093a Quark SoC X1000 USB OHCI Host Controller 0953 PCIe Data Center SSD 8086 3702 DC P3700 SSD 8086 3703 DC P3700 SSD [2.5" SFF] @@ -22191,6 +22225,7 @@ 8086 370a DC P3600 SSD [2.5" SFF] 8086 370d SSD 750 Series [Add-in Card] 8086 370e SSD 750 Series [2.5" SFF] + 0958 Quark SoC X1000 Host Bridge 095a Wireless 7265 # Stone Peak 2 AC 8086 1010 Dual Band Wireless-AC 7265 @@ -22277,6 +22312,7 @@ 8086 5310 Dual Band Wireless-AC 7265 # Stone Peak 2 AGN 8086 9200 Dual Band Wireless-AC 7265 + 095e Quark SoC X1000 Legacy Bridge 0960 80960RP (i960RP) Microprocessor/Bridge 0962 80960RM (i960RM) Bridge 0964 80960RP (i960RP) Microprocessor/Bridge @@ -23077,6 +23113,8 @@ 11a1 Merrifield Power Management Unit 11a2 Merrifield Serial IO DMA Controller 11a5 Merrifield Serial IO PWM Controller + 11c3 Quark SoC X1000 PCIe Root Port 0 + 11c4 Quark SoC X1000 PCIe Root Port 1 1200 IXP1200 Network Processor 172a 0000 AEP SSL Accelerator 1209 8255xER/82551IT Fast Ethernet Controller @@ -23392,6 +23430,7 @@ 108e 7b14 Sun Dual Port 10 GbE PCIe 2.0 ExpressModule, Base-T 108e 7b15 Sun Dual Port 10 GbE PCIe 2.0 Low Profile Adapter, Base-T 1137 00bf Ethernet Converged Network Adapter X540-T2 + 1170 0052 Ethernet Controller 10-Gigabit X540-AT2 17aa 1073 ThinkServer X540-T2 AnyFabric 17aa 4006 Ethernet Controller 10-Gigabit X540-AT2 1bd4 001a 10G base-T DP ER102Ti3 Rack Adapter @@ -23512,6 +23551,7 @@ 8086 000b Ethernet Server Adapter X710-DA2 for OCP 8086 000d Ethernet Controller X710 for 10GbE SFP+ 8086 000e Ethernet Server Adapter OCP X710-2 + 8086 000f Ethernet Server Adapter OCP X710-2 8086 0010 Ethernet Converged Network Adapter X710 8086 4005 Ethernet Controller X710 for 10GbE SFP+ 8086 4006 Ethernet Controller X710 for 10GbE SFP+ @@ -23622,6 +23662,7 @@ 15c8 Ethernet Connection X553/X557-AT 10GBASE-T 15ce Ethernet Connection X553 10 GbE SFP+ 15d0 Ethernet SDI Adapter FM10420-100GbE-QDA2 + 8086 0001 Ethernet SDI Adapter FM10420-100GbE-QDA2 15d1 Ethernet Controller 10G X550T 8086 0002 Ethernet Converged Network Adapter X550-T1 8086 001b Ethernet Server Adapter X550-T1 for OCP From owner-svn-src-stable@freebsd.org Fri Dec 8 15:23:18 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D5C4EE8605A; Fri, 8 Dec 2017 15:23:18 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8DCAB76115; Fri, 8 Dec 2017 15:23:18 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB8FNH8N079878; Fri, 8 Dec 2017 15:23:17 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB8FNHjY079874; Fri, 8 Dec 2017 15:23:17 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201712081523.vB8FNHjY079874@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 8 Dec 2017 15:23:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326691 - in stable/11: share/man/man4 sys/net X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/11: share/man/man4 sys/net X-SVN-Commit-Revision: 326691 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Dec 2017 15:23:19 -0000 Author: hselasky Date: Fri Dec 8 15:23:17 2017 New Revision: 326691 URL: https://svnweb.freebsd.org/changeset/base/326691 Log: MFC r326362: Disallow TUN and TAP character device IOCTLs to modify the network device type to any value. This can cause page faults and panics due to accessing uninitialized fields in the "struct ifnet" which are specific to the network device type. Found by: jau@iki.fi PR: 223767 Sponsored by: Mellanox Technologies Modified: stable/11/share/man/man4/tap.4 stable/11/share/man/man4/tun.4 stable/11/sys/net/if_tap.c stable/11/sys/net/if_tun.c Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/tap.4 ============================================================================== --- stable/11/share/man/man4/tap.4 Fri Dec 8 10:50:13 2017 (r326690) +++ stable/11/share/man/man4/tap.4 Fri Dec 8 15:23:17 2017 (r326691) @@ -1,7 +1,7 @@ .\" $FreeBSD$ .\" Based on PR#2411 .\" -.Dd April 10, 2015 +.Dd November 29, 2017 .Dt TAP 4 .Os .Sh NAME @@ -171,7 +171,14 @@ calls are supported .In net/if_tap.h ) : .Bl -tag -width VMIO_SIOCSETMACADDR .It Dv TAPSIFINFO -Set network interface information (line speed, MTU and type). +Set network interface information (line speed and MTU). +The type must be the same as returned by +.Dv TAPGIFINFO +or set to +.Dv IFT_ETHER +else the +.Xr ioctl 2 +call will fail. The argument should be a pointer to a .Va struct tapinfo . .It Dv TAPGIFINFO Modified: stable/11/share/man/man4/tun.4 ============================================================================== --- stable/11/share/man/man4/tun.4 Fri Dec 8 10:50:13 2017 (r326690) +++ stable/11/share/man/man4/tun.4 Fri Dec 8 15:23:17 2017 (r326691) @@ -2,7 +2,7 @@ .\" $FreeBSD$ .\" Based on PR#2411 .\" -.Dd November 30, 2014 +.Dd November 29, 2017 .Dt TUN 4 .Os .Sh NAME @@ -208,8 +208,15 @@ this stores the internal debugging variable's value in .It Dv TUNSIFINFO The argument should be a pointer to an .Vt struct tuninfo -and allows setting the MTU, the type, and the baudrate of the tunnel +and allows setting the MTU and the baudrate of the tunnel device. +The type must be the same as returned by +.Dv TUNGIFINFO +or set to +.Dv IFT_PPP +else the +.Xr ioctl 2 +call will fail. The .Vt struct tuninfo is declared in Modified: stable/11/sys/net/if_tap.c ============================================================================== --- stable/11/sys/net/if_tap.c Fri Dec 8 10:50:13 2017 (r326690) +++ stable/11/sys/net/if_tap.c Fri Dec 8 15:23:17 2017 (r326691) @@ -735,9 +735,10 @@ tapioctl(struct cdev *dev, u_long cmd, caddr_t data, i switch (cmd) { case TAPSIFINFO: tapp = (struct tapinfo *)data; + if (ifp->if_type != tapp->type) + return (EPROTOTYPE); mtx_lock(&tp->tap_mtx); ifp->if_mtu = tapp->mtu; - ifp->if_type = tapp->type; ifp->if_baudrate = tapp->baudrate; mtx_unlock(&tp->tap_mtx); break; Modified: stable/11/sys/net/if_tun.c ============================================================================== --- stable/11/sys/net/if_tun.c Fri Dec 8 10:50:13 2017 (r326690) +++ stable/11/sys/net/if_tun.c Fri Dec 8 15:23:17 2017 (r326691) @@ -676,9 +676,10 @@ tunioctl(struct cdev *dev, u_long cmd, caddr_t data, i if (error) return (error); } + if (TUN2IFP(tp)->if_type != tunp->type) + return (EPROTOTYPE); mtx_lock(&tp->tun_mtx); TUN2IFP(tp)->if_mtu = tunp->mtu; - TUN2IFP(tp)->if_type = tunp->type; TUN2IFP(tp)->if_baudrate = tunp->baudrate; mtx_unlock(&tp->tun_mtx); break; From owner-svn-src-stable@freebsd.org Fri Dec 8 15:26:58 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 91502E8627A; Fri, 8 Dec 2017 15:26:58 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6B15B764C5; Fri, 8 Dec 2017 15:26:58 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB8FQv1p080072; Fri, 8 Dec 2017 15:26:57 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB8FQvTt080068; Fri, 8 Dec 2017 15:26:57 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201712081526.vB8FQvTt080068@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 8 Dec 2017 15:26:57 +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: r326692 - in stable/10: share/man/man4 sys/net X-SVN-Group: stable-10 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/10: share/man/man4 sys/net X-SVN-Commit-Revision: 326692 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Dec 2017 15:26:58 -0000 Author: hselasky Date: Fri Dec 8 15:26:57 2017 New Revision: 326692 URL: https://svnweb.freebsd.org/changeset/base/326692 Log: MFC r326362: Disallow TUN and TAP character device IOCTLs to modify the network device type to any value. This can cause page faults and panics due to accessing uninitialized fields in the "struct ifnet" which are specific to the network device type. Found by: jau@iki.fi PR: 223767 Sponsored by: Mellanox Technologies Modified: stable/10/share/man/man4/tap.4 stable/10/share/man/man4/tun.4 stable/10/sys/net/if_tap.c stable/10/sys/net/if_tun.c Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/tap.4 ============================================================================== --- stable/10/share/man/man4/tap.4 Fri Dec 8 15:23:17 2017 (r326691) +++ stable/10/share/man/man4/tap.4 Fri Dec 8 15:26:57 2017 (r326692) @@ -1,7 +1,7 @@ .\" $FreeBSD$ .\" Based on PR#2411 .\" -.Dd November 30, 2014 +.Dd November 29, 2017 .Dt TAP 4 .Os .Sh NAME @@ -171,7 +171,14 @@ calls are supported .In net/if_tap.h ) : .Bl -tag -width VMIO_SIOCSETMACADDR .It Dv TAPSIFINFO -Set network interface information (line speed, MTU and type). +Set network interface information (line speed and MTU). +The type must be the same as returned by +.Dv TAPGIFINFO +or set to +.Dv IFT_ETHER +else the +.Xr ioctl 2 +call will fail. The argument should be a pointer to a .Va struct tapinfo . .It Dv TAPGIFINFO Modified: stable/10/share/man/man4/tun.4 ============================================================================== --- stable/10/share/man/man4/tun.4 Fri Dec 8 15:23:17 2017 (r326691) +++ stable/10/share/man/man4/tun.4 Fri Dec 8 15:26:57 2017 (r326692) @@ -2,7 +2,7 @@ .\" $FreeBSD$ .\" Based on PR#2411 .\" -.Dd November 30, 2014 +.Dd November 29, 2017 .Dt TUN 4 .Os .Sh NAME @@ -208,8 +208,15 @@ this stores the internal debugging variable's value in .It Dv TUNSIFINFO The argument should be a pointer to an .Vt struct tuninfo -and allows setting the MTU, the type, and the baudrate of the tunnel +and allows setting the MTU and the baudrate of the tunnel device. +The type must be the same as returned by +.Dv TUNGIFINFO +or set to +.Dv IFT_PPP +else the +.Xr ioctl 2 +call will fail. The .Vt struct tuninfo is declared in Modified: stable/10/sys/net/if_tap.c ============================================================================== --- stable/10/sys/net/if_tap.c Fri Dec 8 15:23:17 2017 (r326691) +++ stable/10/sys/net/if_tap.c Fri Dec 8 15:26:57 2017 (r326692) @@ -736,9 +736,10 @@ tapioctl(struct cdev *dev, u_long cmd, caddr_t data, i switch (cmd) { case TAPSIFINFO: tapp = (struct tapinfo *)data; + if (ifp->if_type != tapp->type) + return (EPROTOTYPE); mtx_lock(&tp->tap_mtx); ifp->if_mtu = tapp->mtu; - ifp->if_type = tapp->type; ifp->if_baudrate = tapp->baudrate; mtx_unlock(&tp->tap_mtx); break; Modified: stable/10/sys/net/if_tun.c ============================================================================== --- stable/10/sys/net/if_tun.c Fri Dec 8 15:23:17 2017 (r326691) +++ stable/10/sys/net/if_tun.c Fri Dec 8 15:26:57 2017 (r326692) @@ -677,9 +677,10 @@ tunioctl(struct cdev *dev, u_long cmd, caddr_t data, i if (error) return (error); } + if (TUN2IFP(tp)->if_type != tunp->type) + return (EPROTOTYPE); mtx_lock(&tp->tun_mtx); TUN2IFP(tp)->if_mtu = tunp->mtu; - TUN2IFP(tp)->if_type = tunp->type; TUN2IFP(tp)->if_baudrate = tunp->baudrate; mtx_unlock(&tp->tun_mtx); break; From owner-svn-src-stable@freebsd.org Fri Dec 8 15:31:00 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F0049E863A8; Fri, 8 Dec 2017 15:31:00 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C9F2B767D1; Fri, 8 Dec 2017 15:31:00 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB8FUxMH080329; Fri, 8 Dec 2017 15:30:59 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB8FUxue080325; Fri, 8 Dec 2017 15:30:59 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201712081530.vB8FUxue080325@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 8 Dec 2017 15:30:59 +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: r326693 - in stable/9: share/man/man4 sys/net X-SVN-Group: stable-9 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/9: share/man/man4 sys/net X-SVN-Commit-Revision: 326693 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Dec 2017 15:31:01 -0000 Author: hselasky Date: Fri Dec 8 15:30:59 2017 New Revision: 326693 URL: https://svnweb.freebsd.org/changeset/base/326693 Log: MFC r326362: Disallow TUN and TAP character device IOCTLs to modify the network device type to any value. This can cause page faults and panics due to accessing uninitialized fields in the "struct ifnet" which are specific to the network device type. Found by: jau@iki.fi PR: 223767 Sponsored by: Mellanox Technologies Modified: stable/9/share/man/man4/tap.4 stable/9/share/man/man4/tun.4 stable/9/sys/net/if_tap.c stable/9/sys/net/if_tun.c Directory Properties: stable/9/share/ (props changed) stable/9/share/man/ (props changed) stable/9/share/man/man4/ (props changed) stable/9/sys/ (props changed) stable/9/sys/net/ (props changed) Modified: stable/9/share/man/man4/tap.4 ============================================================================== --- stable/9/share/man/man4/tap.4 Fri Dec 8 15:26:57 2017 (r326692) +++ stable/9/share/man/man4/tap.4 Fri Dec 8 15:30:59 2017 (r326693) @@ -1,7 +1,7 @@ .\" $FreeBSD$ .\" Based on PR#2411 .\" -.Dd November 30, 2014 +.Dd November 29, 2017 .Dt TAP 4 .Os .Sh NAME @@ -171,7 +171,14 @@ calls are supported .In net/if_tap.h ) : .Bl -tag -width VMIO_SIOCSETMACADDR .It Dv TAPSIFINFO -Set network interface information (line speed, MTU and type). +Set network interface information (line speed and MTU). +The type must be the same as returned by +.Dv TAPGIFINFO +or set to +.Dv IFT_ETHER +else the +.Xr ioctl 2 +call will fail. The argument should be a pointer to a .Va struct tapinfo . .It Dv TAPGIFINFO Modified: stable/9/share/man/man4/tun.4 ============================================================================== --- stable/9/share/man/man4/tun.4 Fri Dec 8 15:26:57 2017 (r326692) +++ stable/9/share/man/man4/tun.4 Fri Dec 8 15:30:59 2017 (r326693) @@ -2,7 +2,7 @@ .\" $FreeBSD$ .\" Based on PR#2411 .\" -.Dd November 30, 2014 +.Dd November 29, 2017 .Dt TUN 4 .Os .Sh NAME @@ -208,8 +208,15 @@ this stores the internal debugging variable's value in .It Dv TUNSIFINFO The argument should be a pointer to an .Vt struct tuninfo -and allows setting the MTU, the type, and the baudrate of the tunnel +and allows setting the MTU and the baudrate of the tunnel device. +The type must be the same as returned by +.Dv TUNGIFINFO +or set to +.Dv IFT_PPP +else the +.Xr ioctl 2 +call will fail. The .Vt struct tuninfo is declared in Modified: stable/9/sys/net/if_tap.c ============================================================================== --- stable/9/sys/net/if_tap.c Fri Dec 8 15:26:57 2017 (r326692) +++ stable/9/sys/net/if_tap.c Fri Dec 8 15:30:59 2017 (r326693) @@ -731,9 +731,10 @@ tapioctl(struct cdev *dev, u_long cmd, caddr_t data, i switch (cmd) { case TAPSIFINFO: tapp = (struct tapinfo *)data; + if (ifp->if_type != tapp->type) + return (EPROTOTYPE); mtx_lock(&tp->tap_mtx); ifp->if_mtu = tapp->mtu; - ifp->if_type = tapp->type; ifp->if_baudrate = tapp->baudrate; mtx_unlock(&tp->tap_mtx); break; Modified: stable/9/sys/net/if_tun.c ============================================================================== --- stable/9/sys/net/if_tun.c Fri Dec 8 15:26:57 2017 (r326692) +++ stable/9/sys/net/if_tun.c Fri Dec 8 15:30:59 2017 (r326693) @@ -685,9 +685,10 @@ tunioctl(struct cdev *dev, u_long cmd, caddr_t data, i if (error) return (error); } + if (TUN2IFP(tp)->if_type != tunp->type) + return (EPROTOTYPE); mtx_lock(&tp->tun_mtx); TUN2IFP(tp)->if_mtu = tunp->mtu; - TUN2IFP(tp)->if_type = tunp->type; TUN2IFP(tp)->if_baudrate = tunp->baudrate; mtx_unlock(&tp->tun_mtx); break; From owner-svn-src-stable@freebsd.org Fri Dec 8 15:37:38 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0ED89E8690B; Fri, 8 Dec 2017 15:37:38 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DCB5476EC1; Fri, 8 Dec 2017 15:37:37 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB8FbbtH084559; Fri, 8 Dec 2017 15:37:37 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB8FbaPg084555; Fri, 8 Dec 2017 15:37:36 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201712081537.vB8FbaPg084555@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 8 Dec 2017 15:37:36 +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: r326694 - in stable/8: share/man/man4 sys/net X-SVN-Group: stable-8 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/8: share/man/man4 sys/net X-SVN-Commit-Revision: 326694 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Dec 2017 15:37:38 -0000 Author: hselasky Date: Fri Dec 8 15:37:36 2017 New Revision: 326694 URL: https://svnweb.freebsd.org/changeset/base/326694 Log: MFC r326362: Disallow TUN and TAP character device IOCTLs to modify the network device type to any value. This can cause page faults and panics due to accessing uninitialized fields in the "struct ifnet" which are specific to the network device type. Found by: jau@iki.fi PR: 223767 Sponsored by: Mellanox Technologies Modified: stable/8/share/man/man4/tap.4 stable/8/share/man/man4/tun.4 stable/8/sys/net/if_tap.c stable/8/sys/net/if_tun.c Directory Properties: stable/8/share/ (props changed) stable/8/share/man/ (props changed) stable/8/share/man/man4/ (props changed) stable/8/sys/ (props changed) stable/8/sys/net/ (props changed) Modified: stable/8/share/man/man4/tap.4 ============================================================================== --- stable/8/share/man/man4/tap.4 Fri Dec 8 15:30:59 2017 (r326693) +++ stable/8/share/man/man4/tap.4 Fri Dec 8 15:37:36 2017 (r326694) @@ -1,7 +1,7 @@ .\" $FreeBSD$ .\" Based on PR#2411 .\" -.Dd September 8, 2008 +.Dd November 29, 2017 .Dt TAP 4 .Os .Sh NAME @@ -164,7 +164,14 @@ calls are supported .In net/if_tap.h ) : .Bl -tag -width VMIO_SIOCSETMACADDR .It Dv TAPSIFINFO -Set network interface information (line speed, MTU and type). +Set network interface information (line speed and MTU). +The type must be the same as returned by +.Dv TAPGIFINFO +or set to +.Dv IFT_ETHER +else the +.Xr ioctl 2 +call will fail. The argument should be a pointer to a .Va struct tapinfo . .It Dv TAPGIFINFO Modified: stable/8/share/man/man4/tun.4 ============================================================================== --- stable/8/share/man/man4/tun.4 Fri Dec 8 15:30:59 2017 (r326693) +++ stable/8/share/man/man4/tun.4 Fri Dec 8 15:37:36 2017 (r326694) @@ -2,7 +2,7 @@ .\" $FreeBSD$ .\" Based on PR#2411 .\" -.Dd February 4, 2007 +.Dd November 29, 2017 .Dt TUN 4 .Os .Sh NAME @@ -197,8 +197,15 @@ this stores the internal debugging variable's value in .It Dv TUNSIFINFO The argument should be a pointer to an .Vt struct tuninfo -and allows setting the MTU, the type, and the baudrate of the tunnel +and allows setting the MTU and the baudrate of the tunnel device. +The type must be the same as returned by +.Dv TUNGIFINFO +or set to +.Dv IFT_PPP +else the +.Xr ioctl 2 +call will fail. The .Vt struct tuninfo is declared in Modified: stable/8/sys/net/if_tap.c ============================================================================== --- stable/8/sys/net/if_tap.c Fri Dec 8 15:30:59 2017 (r326693) +++ stable/8/sys/net/if_tap.c Fri Dec 8 15:37:36 2017 (r326694) @@ -717,9 +717,10 @@ tapioctl(struct cdev *dev, u_long cmd, caddr_t data, i switch (cmd) { case TAPSIFINFO: tapp = (struct tapinfo *)data; + if (ifp->if_type != tapp->type) + return (EPROTOTYPE); mtx_lock(&tp->tap_mtx); ifp->if_mtu = tapp->mtu; - ifp->if_type = tapp->type; ifp->if_baudrate = tapp->baudrate; mtx_unlock(&tp->tap_mtx); break; Modified: stable/8/sys/net/if_tun.c ============================================================================== --- stable/8/sys/net/if_tun.c Fri Dec 8 15:30:59 2017 (r326693) +++ stable/8/sys/net/if_tun.c Fri Dec 8 15:37:36 2017 (r326694) @@ -685,9 +685,10 @@ tunioctl(struct cdev *dev, u_long cmd, caddr_t data, i if (error) return (error); } + if (TUN2IFP(tp)->if_type != tunp->type) + return (EPROTOTYPE); mtx_lock(&tp->tun_mtx); TUN2IFP(tp)->if_mtu = tunp->mtu; - TUN2IFP(tp)->if_type = tunp->type; TUN2IFP(tp)->if_baudrate = tunp->baudrate; mtx_unlock(&tp->tun_mtx); break; From owner-svn-src-stable@freebsd.org Fri Dec 8 16:12:46 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9ED45E87847; Fri, 8 Dec 2017 16:12:46 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5907878ADD; Fri, 8 Dec 2017 16:12:46 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB8GCjPI001201; Fri, 8 Dec 2017 16:12:45 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB8GCjvA001199; Fri, 8 Dec 2017 16:12:45 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201712081612.vB8GCjvA001199@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 8 Dec 2017 16:12:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326696 - stable/11/sys/geom/mirror X-SVN-Group: stable-11 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/11/sys/geom/mirror X-SVN-Commit-Revision: 326696 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Dec 2017 16:12:46 -0000 Author: markj Date: Fri Dec 8 16:12:45 2017 New Revision: 326696 URL: https://svnweb.freebsd.org/changeset/base/326696 Log: MFC r302794, r306744, r307691, r307692, r316174, r316681, r316859, r316866, r316867, r316869: Various gmirror fixes and cleanups. Modified: stable/11/sys/geom/mirror/g_mirror.c stable/11/sys/geom/mirror/g_mirror.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/geom/mirror/g_mirror.c ============================================================================== --- stable/11/sys/geom/mirror/g_mirror.c Fri Dec 8 15:57:29 2017 (r326695) +++ stable/11/sys/geom/mirror/g_mirror.c Fri Dec 8 16:12:45 2017 (r326696) @@ -854,7 +854,7 @@ g_mirror_idle(struct g_mirror_softc *sc, int acw) LIST_FOREACH(disk, &sc->sc_disks, d_next) { if (disk->d_state != G_MIRROR_DISK_STATE_ACTIVE) continue; - G_MIRROR_DEBUG(1, "Disk %s (device %s) marked as clean.", + G_MIRROR_DEBUG(2, "Disk %s (device %s) marked as clean.", g_mirror_get_diskname(disk), sc->sc_name); disk->d_flags &= ~G_MIRROR_DISK_FLAG_DIRTY; g_mirror_update_metadata(disk); @@ -877,7 +877,7 @@ g_mirror_unidle(struct g_mirror_softc *sc) LIST_FOREACH(disk, &sc->sc_disks, d_next) { if (disk->d_state != G_MIRROR_DISK_STATE_ACTIVE) continue; - G_MIRROR_DEBUG(1, "Disk %s (device %s) marked as dirty.", + G_MIRROR_DEBUG(2, "Disk %s (device %s) marked as dirty.", g_mirror_get_diskname(disk), sc->sc_name); disk->d_flags |= G_MIRROR_DISK_FLAG_DIRTY; g_mirror_update_metadata(disk); @@ -1182,6 +1182,11 @@ g_mirror_start(struct bio *bp) return; } mtx_lock(&sc->sc_queue_mtx); + if (bp->bio_to->error != 0) { + mtx_unlock(&sc->sc_queue_mtx); + g_io_deliver(bp, bp->bio_to->error); + return; + } bioq_insert_tail(&sc->sc_queue, bp); mtx_unlock(&sc->sc_queue_mtx); G_MIRROR_DEBUG(4, "%s: Waking up %p.", __func__, sc); @@ -1281,13 +1286,6 @@ g_mirror_regular_release(struct g_mirror_softc *sc) G_MIRROR_LOGREQ(2, bp, "Releasing delayed request (%p).", bp); mtx_lock(&sc->sc_queue_mtx); bioq_insert_head(&sc->sc_queue, bp); -#if 0 - /* - * wakeup() is not needed, because this function is called from - * the worker thread. - */ - wakeup(&sc->sc_queue); -#endif mtx_unlock(&sc->sc_queue_mtx); } } @@ -1312,6 +1310,24 @@ g_mirror_sync_release(struct g_mirror_softc *sc) } /* + * Free a synchronization request and clear its slot in the array. + */ +static void +g_mirror_sync_request_free(struct g_mirror_disk *disk, struct bio *bp) +{ + int idx; + + if (disk != NULL && disk->d_sync.ds_bios != NULL) { + idx = (int)(uintptr_t)bp->bio_caller1; + KASSERT(disk->d_sync.ds_bios[idx] == bp, + ("unexpected sync BIO at %p:%d", disk, idx)); + disk->d_sync.ds_bios[idx] = NULL; + } + free(bp->bio_data, M_MIRROR); + g_destroy_bio(bp); +} + +/* * Handle synchronization requests. * Every synchronization request is two-steps process: first, READ request is * send to active provider and then WRITE request (with read data) to the provider @@ -1323,6 +1339,7 @@ g_mirror_sync_request(struct bio *bp) { struct g_mirror_softc *sc; struct g_mirror_disk *disk; + struct g_mirror_disk_sync *sync; bp->bio_from->index--; sc = bp->bio_from->geom->softc; @@ -1332,8 +1349,7 @@ g_mirror_sync_request(struct bio *bp) g_topology_lock(); g_mirror_kill_consumer(sc, bp->bio_from); g_topology_unlock(); - free(bp->bio_data, M_MIRROR); - g_destroy_bio(bp); + g_mirror_sync_request_free(NULL, bp); sx_xlock(&sc->sc_lock); return; } @@ -1353,7 +1369,7 @@ g_mirror_sync_request(struct bio *bp) G_MIRROR_LOGREQ(0, bp, "Synchronization request failed (error=%d).", bp->bio_error); - g_destroy_bio(bp); + g_mirror_sync_request_free(disk, bp); return; } G_MIRROR_LOGREQ(3, bp, @@ -1370,10 +1386,9 @@ g_mirror_sync_request(struct bio *bp) } case BIO_WRITE: { - struct g_mirror_disk_sync *sync; off_t offset; void *data; - int i; + int i, idx; KFAIL_POINT_ERROR(DEBUG_FP, g_mirror_sync_request_write, bp->bio_error); @@ -1382,7 +1397,7 @@ g_mirror_sync_request(struct bio *bp) G_MIRROR_LOGREQ(0, bp, "Synchronization request failed (error=%d).", bp->bio_error); - g_destroy_bio(bp); + g_mirror_sync_request_free(disk, bp); sc->sc_bump_id |= G_MIRROR_BUMP_GENID; g_mirror_event_send(disk, G_MIRROR_DISK_STATE_DISCONNECTED, @@ -1396,12 +1411,7 @@ g_mirror_sync_request(struct bio *bp) (sc->sc_flags & G_MIRROR_DEVICE_FLAG_DESTROY) != 0) { /* Don't send more synchronization requests. */ sync->ds_inflight--; - if (sync->ds_bios != NULL) { - i = (int)(uintptr_t)bp->bio_caller1; - sync->ds_bios[i] = NULL; - } - free(bp->bio_data, M_MIRROR); - g_destroy_bio(bp); + g_mirror_sync_request_free(disk, bp); if (sync->ds_inflight > 0) return; if (sync->ds_consumer == NULL || @@ -1416,6 +1426,7 @@ g_mirror_sync_request(struct bio *bp) /* Send next synchronization request. */ data = bp->bio_data; + idx = (int)(uintptr_t)bp->bio_caller1; g_reset_bio(bp); bp->bio_cmd = BIO_READ; bp->bio_offset = sync->ds_offset; @@ -1425,6 +1436,7 @@ g_mirror_sync_request(struct bio *bp) bp->bio_data = data; bp->bio_from = sync->ds_consumer; bp->bio_to = sc->sc_provider; + bp->bio_caller1 = (void *)(uintptr_t)idx; G_MIRROR_LOGREQ(3, bp, "Sending synchronization request."); sync->ds_consumer->index++; /* @@ -1442,7 +1454,7 @@ g_mirror_sync_request(struct bio *bp) offset = sc->sc_mediasize; for (i = 0; i < g_mirror_syncreqs; i++) { bp = sync->ds_bios[i]; - if (bp->bio_offset < offset) + if (bp != NULL && bp->bio_offset < offset) offset = bp->bio_offset; } if (sync->ds_offset_done + (MAXPHYS * 100) < offset) { @@ -1705,6 +1717,14 @@ g_mirror_register_request(struct bio *bp) sc->sc_last_write = time_uptime; /* + * Bump syncid on first write. + */ + if ((sc->sc_bump_id & G_MIRROR_BUMP_SYNCID) != 0) { + sc->sc_bump_id &= ~G_MIRROR_BUMP_SYNCID; + g_mirror_bump_syncid(sc); + } + + /* * Allocate all bios before sending any request, so we can * return ENOMEM in nice and clean way. */ @@ -1759,13 +1779,6 @@ g_mirror_register_request(struct bio *bp) * synchronization requests don't collide with it. */ bioq_insert_tail(&sc->sc_inflight, bp); - /* - * Bump syncid on first write. - */ - if ((sc->sc_bump_id & G_MIRROR_BUMP_SYNCID) != 0) { - sc->sc_bump_id &= ~G_MIRROR_BUMP_SYNCID; - g_mirror_bump_syncid(sc); - } return; } default: @@ -1818,7 +1831,7 @@ g_mirror_try_destroy(struct g_mirror_softc *sc) } sc->sc_geom->softc = NULL; sc->sc_sync.ds_geom->softc = NULL; - if ((sc->sc_flags & G_MIRROR_DEVICE_FLAG_WAIT) != 0) { + if ((sc->sc_flags & G_MIRROR_DEVICE_FLAG_DRAIN) != 0) { g_topology_unlock(); G_MIRROR_DEBUG(4, "%s: Waking up %p.", __func__, &sc->sc_worker); @@ -1971,12 +1984,12 @@ g_mirror_update_idle(struct g_mirror_softc *sc, struct if ((sc->sc_flags & G_MIRROR_DEVICE_FLAG_NOFAILSYNC) != 0) return; if (!sc->sc_idle && (disk->d_flags & G_MIRROR_DISK_FLAG_DIRTY) == 0) { - G_MIRROR_DEBUG(1, "Disk %s (device %s) marked as dirty.", + G_MIRROR_DEBUG(2, "Disk %s (device %s) marked as dirty.", g_mirror_get_diskname(disk), sc->sc_name); disk->d_flags |= G_MIRROR_DISK_FLAG_DIRTY; } else if (sc->sc_idle && (disk->d_flags & G_MIRROR_DISK_FLAG_DIRTY) != 0) { - G_MIRROR_DEBUG(1, "Disk %s (device %s) marked as clean.", + G_MIRROR_DEBUG(2, "Disk %s (device %s) marked as clean.", g_mirror_get_diskname(disk), sc->sc_name); disk->d_flags &= ~G_MIRROR_DISK_FLAG_DIRTY; } @@ -2096,6 +2109,7 @@ g_mirror_sync_stop(struct g_mirror_disk *disk, int typ G_MIRROR_DEBUG(0, "Device %s: rebuilding provider %s stopped.", sc->sc_name, g_mirror_get_diskname(disk)); } + g_mirror_regular_release(sc); free(disk->d_sync.ds_bios, M_MIRROR); disk->d_sync.ds_bios = NULL; cp = disk->d_sync.ds_consumer; @@ -2167,6 +2181,11 @@ g_mirror_destroy_provider(struct g_mirror_softc *sc) KASSERT(sc->sc_provider != NULL, ("NULL provider (device=%s).", sc->sc_name)); + LIST_FOREACH(disk, &sc->sc_disks, d_next) { + if (disk->d_state == G_MIRROR_DISK_STATE_SYNCHRONIZING) + g_mirror_sync_stop(disk, 1); + } + g_topology_lock(); g_error_provider(sc->sc_provider, ENXIO); mtx_lock(&sc->sc_queue_mtx); @@ -2190,10 +2209,6 @@ g_mirror_destroy_provider(struct g_mirror_softc *sc) sc->sc_provider = NULL; G_MIRROR_DEBUG(0, "Device %s: provider destroyed.", sc->sc_name); g_topology_unlock(); - LIST_FOREACH(disk, &sc->sc_disks, d_next) { - if (disk->d_state == G_MIRROR_DISK_STATE_SYNCHRONIZING) - g_mirror_sync_stop(disk, 1); - } } static void @@ -2482,11 +2497,8 @@ g_mirror_update_device(struct g_mirror_softc *sc, bool if (g_mirror_ndisks(sc, G_MIRROR_DISK_STATE_ACTIVE) == 0 && g_mirror_ndisks(sc, G_MIRROR_DISK_STATE_NEW) == 0) { /* - * No active disks or no disks at all, - * so destroy device. + * No usable disks, so destroy the device. */ - if (sc->sc_provider != NULL) - g_mirror_destroy_provider(sc); sc->sc_flags |= G_MIRROR_DEVICE_FLAG_DESTROY; break; } else if (g_mirror_ndisks(sc, @@ -2911,8 +2923,8 @@ g_mirror_destroy_delayed(void *arg, int flag) sx_xlock(&sc->sc_lock); KASSERT((sc->sc_flags & G_MIRROR_DEVICE_FLAG_DESTROY) == 0, ("DESTROY flag set on %s.", sc->sc_name)); - KASSERT((sc->sc_flags & G_MIRROR_DEVICE_FLAG_DESTROYING) != 0, - ("DESTROYING flag not set on %s.", sc->sc_name)); + KASSERT((sc->sc_flags & G_MIRROR_DEVICE_FLAG_CLOSEWAIT) != 0, + ("CLOSEWAIT flag not set on %s.", sc->sc_name)); G_MIRROR_DEBUG(1, "Destroying %s (delayed).", sc->sc_name); error = g_mirror_destroy(sc, G_MIRROR_DESTROY_SOFT); if (error != 0) { @@ -2939,7 +2951,7 @@ g_mirror_access(struct g_provider *pp, int acr, int ac g_topology_unlock(); sx_xlock(&sc->sc_lock); if ((sc->sc_flags & G_MIRROR_DEVICE_FLAG_DESTROY) != 0 || - (sc->sc_flags & G_MIRROR_DEVICE_FLAG_DESTROYING) != 0 || + (sc->sc_flags & G_MIRROR_DEVICE_FLAG_CLOSEWAIT) != 0 || LIST_EMPTY(&sc->sc_disks)) { if (acr > 0 || acw > 0 || ace > 0) error = ENXIO; @@ -2948,7 +2960,7 @@ g_mirror_access(struct g_provider *pp, int acr, int ac sc->sc_provider_open += acr + acw + ace; if (pp->acw + acw == 0) g_mirror_idle(sc, 0); - if ((sc->sc_flags & G_MIRROR_DEVICE_FLAG_DESTROYING) != 0 && + if ((sc->sc_flags & G_MIRROR_DEVICE_FLAG_CLOSEWAIT) != 0 && sc->sc_provider_open == 0) g_post_event(g_mirror_destroy_delayed, sc, M_WAITOK, sc, NULL); end: @@ -3068,7 +3080,7 @@ g_mirror_destroy(struct g_mirror_softc *sc, int how) g_mirror_sync_stop(disk, 1); } } - sc->sc_flags |= G_MIRROR_DEVICE_FLAG_DESTROYING; + sc->sc_flags |= G_MIRROR_DEVICE_FLAG_CLOSEWAIT; return (EBUSY); case G_MIRROR_DESTROY_HARD: G_MIRROR_DEBUG(1, "Device %s is still open, so it " @@ -3076,17 +3088,10 @@ g_mirror_destroy(struct g_mirror_softc *sc, int how) } } - g_topology_lock(); - if (sc->sc_geom->softc == NULL) { - g_topology_unlock(); + if ((sc->sc_flags & G_MIRROR_DEVICE_FLAG_DESTROY) != 0) return (0); - } - sc->sc_geom->softc = NULL; - sc->sc_sync.ds_geom->softc = NULL; - g_topology_unlock(); - sc->sc_flags |= G_MIRROR_DEVICE_FLAG_DESTROY; - sc->sc_flags |= G_MIRROR_DEVICE_FLAG_WAIT; + sc->sc_flags |= G_MIRROR_DEVICE_FLAG_DRAIN; G_MIRROR_DEBUG(4, "%s: Waking up %p.", __func__, sc); sx_xunlock(&sc->sc_lock); mtx_lock(&sc->sc_queue_mtx); Modified: stable/11/sys/geom/mirror/g_mirror.h ============================================================================== --- stable/11/sys/geom/mirror/g_mirror.h Fri Dec 8 15:57:29 2017 (r326695) +++ stable/11/sys/geom/mirror/g_mirror.h Fri Dec 8 16:12:45 2017 (r326696) @@ -157,8 +157,8 @@ struct g_mirror_event { }; #define G_MIRROR_DEVICE_FLAG_DESTROY 0x0100000000000000ULL -#define G_MIRROR_DEVICE_FLAG_WAIT 0x0200000000000000ULL -#define G_MIRROR_DEVICE_FLAG_DESTROYING 0x0400000000000000ULL +#define G_MIRROR_DEVICE_FLAG_DRAIN 0x0200000000000000ULL +#define G_MIRROR_DEVICE_FLAG_CLOSEWAIT 0x0400000000000000ULL #define G_MIRROR_DEVICE_FLAG_TASTING 0x0800000000000000ULL #define G_MIRROR_DEVICE_FLAG_WIPE 0x1000000000000000ULL From owner-svn-src-stable@freebsd.org Fri Dec 8 16:25:06 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CD0D0E87CB8; Fri, 8 Dec 2017 16:25:06 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 969137924A; Fri, 8 Dec 2017 16:25:06 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB8GP5hL005731; Fri, 8 Dec 2017 16:25:05 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB8GP5QW005730; Fri, 8 Dec 2017 16:25:05 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201712081625.vB8GP5QW005730@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 8 Dec 2017 16:25:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326697 - stable/11/sys/cddl/dev/dtrace X-SVN-Group: stable-11 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/11/sys/cddl/dev/dtrace X-SVN-Commit-Revision: 326697 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Dec 2017 16:25:06 -0000 Author: markj Date: Fri Dec 8 16:25:05 2017 New Revision: 326697 URL: https://svnweb.freebsd.org/changeset/base/326697 Log: MFC r326286: Don't use pcpu_find() to determine if a CPU ID is valid. Modified: stable/11/sys/cddl/dev/dtrace/dtrace_ioctl.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/dev/dtrace/dtrace_ioctl.c ============================================================================== --- stable/11/sys/cddl/dev/dtrace/dtrace_ioctl.c Fri Dec 8 16:12:45 2017 (r326696) +++ stable/11/sys/cddl/dev/dtrace/dtrace_ioctl.c Fri Dec 8 16:25:05 2017 (r326697) @@ -236,10 +236,8 @@ dtrace_ioctl(struct cdev *dev, u_long cmd, caddr_t add "DTRACEIOC_AGGSNAP":"DTRACEIOC_BUFSNAP", curcpu, desc.dtbd_cpu); - if (desc.dtbd_cpu >= NCPU) + if (desc.dtbd_cpu >= MAXCPU || CPU_ABSENT(desc.dtbd_cpu)) return (ENOENT); - if (pcpu_find(desc.dtbd_cpu) == NULL) - return (ENOENT); mutex_enter(&dtrace_lock); @@ -801,11 +799,7 @@ dtrace_ioctl(struct cdev *dev, u_long cmd, caddr_t add nerrs = state->dts_errors; dstate = &state->dts_vstate.dtvs_dynvars; - for (i = 0; i < NCPU; i++) { -#ifndef illumos - if (pcpu_find(i) == NULL) - continue; -#endif + CPU_FOREACH(i) { dtrace_dstate_percpu_t *dcpu = &dstate->dtds_percpu[i]; stat->dtst_dyndrops += dcpu->dtdsc_drops; From owner-svn-src-stable@freebsd.org Fri Dec 8 17:16:37 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 06821E8901E; Fri, 8 Dec 2017 17:16:37 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C4B3A7AFA6; Fri, 8 Dec 2017 17:16:36 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB8HGZFt026332; Fri, 8 Dec 2017 17:16:35 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB8HGZNj026331; Fri, 8 Dec 2017 17:16:35 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201712081716.vB8HGZNj026331@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 8 Dec 2017 17:16:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326699 - stable/11/sys/vm X-SVN-Group: stable-11 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/11/sys/vm X-SVN-Commit-Revision: 326699 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Dec 2017 17:16:37 -0000 Author: markj Date: Fri Dec 8 17:16:35 2017 New Revision: 326699 URL: https://svnweb.freebsd.org/changeset/base/326699 Log: MFC r326371: Verify the object/vnode association after vget() in vm_pageout_clean(). Modified: stable/11/sys/vm/vm_pageout.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/vm/vm_pageout.c ============================================================================== --- stable/11/sys/vm/vm_pageout.c Fri Dec 8 17:15:20 2017 (r326698) +++ stable/11/sys/vm/vm_pageout.c Fri Dec 8 17:16:35 2017 (r326699) @@ -617,7 +617,17 @@ vm_pageout_clean(vm_page_t m, int *numpagedout) goto unlock_mp; } VM_OBJECT_WLOCK(object); + + /* + * Ensure that the object and vnode were not disassociated + * while locks were dropped. + */ + if (vp->v_object != object) { + error = ENOENT; + goto unlock_all; + } vm_page_lock(m); + /* * While the object and page were unlocked, the page * may have been: From owner-svn-src-stable@freebsd.org Fri Dec 8 18:04:45 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 146ABE8A0BC; Fri, 8 Dec 2017 18:04:45 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D1FA27CD34; Fri, 8 Dec 2017 18:04:44 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB8I4hhU047621; Fri, 8 Dec 2017 18:04:43 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB8I4hKK047620; Fri, 8 Dec 2017 18:04:43 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201712081804.vB8I4hKK047620@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 8 Dec 2017 18:04:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326701 - stable/11/sys/cddl/contrib/opensolaris/uts/common/dtrace X-SVN-Group: stable-11 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/11/sys/cddl/contrib/opensolaris/uts/common/dtrace X-SVN-Commit-Revision: 326701 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Dec 2017 18:04:45 -0000 Author: markj Date: Fri Dec 8 18:04:43 2017 New Revision: 326701 URL: https://svnweb.freebsd.org/changeset/base/326701 Log: MFC r326134: Duplicate helpers after disabling inherited tracepoints during a fork. Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c Fri Dec 8 17:52:53 2017 (r326700) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c Fri Dec 8 18:04:43 2017 (r326701) @@ -600,8 +600,8 @@ fasttrap_fork(proc_t *p, proc_t *cp) pid_t ppid = p->p_pid; int i; -#ifdef illumos ASSERT(curproc == p); +#ifdef illumos ASSERT(p->p_proc_flag & P_PR_LOCK); #else PROC_LOCK_ASSERT(p, MA_OWNED); @@ -609,26 +609,15 @@ fasttrap_fork(proc_t *p, proc_t *cp) #ifdef illumos ASSERT(p->p_dtrace_count > 0); #else - if (p->p_dtrace_helpers) { - /* - * dtrace_helpers_duplicate() allocates memory. - */ - _PHOLD(cp); - PROC_UNLOCK(p); - PROC_UNLOCK(cp); - dtrace_helpers_duplicate(p, cp); - PROC_LOCK(cp); - PROC_LOCK(p); - _PRELE(cp); - } /* * This check is purposely here instead of in kern_fork.c because, * for legal resons, we cannot include the dtrace_cddl.h header * inside kern_fork.c and insert if-clause there. */ - if (p->p_dtrace_count == 0) + if (p->p_dtrace_count == 0 && p->p_dtrace_helpers == NULL) return; #endif + ASSERT(cp->p_dtrace_count == 0); /* @@ -657,6 +646,8 @@ fasttrap_fork(proc_t *p, proc_t *cp) _PHOLD(cp); PROC_UNLOCK(cp); PROC_UNLOCK(p); + if (p->p_dtrace_count == 0) + goto dup_helpers; #endif /* @@ -710,6 +701,9 @@ fasttrap_fork(proc_t *p, proc_t *cp) mutex_enter(&cp->p_lock); sprunlock(cp); #else +dup_helpers: + if (p->p_dtrace_helpers != NULL) + dtrace_helpers_duplicate(p, cp); PROC_LOCK(p); PROC_LOCK(cp); _PRELE(cp); From owner-svn-src-stable@freebsd.org Fri Dec 8 19:19:48 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7FB11E8BA3C; Fri, 8 Dec 2017 19:19:48 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3E4497F707; Fri, 8 Dec 2017 19:19:48 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB8JJlPP077389; Fri, 8 Dec 2017 19:19:47 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB8JJlZe077388; Fri, 8 Dec 2017 19:19:47 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201712081919.vB8JJlZe077388@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 8 Dec 2017 19:19:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326703 - stable/11/sys/ofed/drivers/infiniband/core X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 326703 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Dec 2017 19:19:48 -0000 Author: hselasky Date: Fri Dec 8 19:19:47 2017 New Revision: 326703 URL: https://svnweb.freebsd.org/changeset/base/326703 Log: Add support for IPv6 based addresses as part of the TCP unify portspace feature in ibcore. This resolves an interopability issue when using both iWarp(T6) and RDMA(CX-4 and CX-5) devices at the same time. The problem is IPv4 based sockets cannot be bound to an IPv6 based address causing sobind() to fail preventing all use of IPv6 based addresses with RDMA when an iWarp device is present. This is a direct commit. Tested by: KrishnamRaju ErapaRaju Sponsored by: Mellanox Technologies Modified: stable/11/sys/ofed/drivers/infiniband/core/cma.c Modified: stable/11/sys/ofed/drivers/infiniband/core/cma.c ============================================================================== --- stable/11/sys/ofed/drivers/infiniband/core/cma.c Fri Dec 8 18:43:31 2017 (r326702) +++ stable/11/sys/ofed/drivers/infiniband/core/cma.c Fri Dec 8 19:19:47 2017 (r326703) @@ -2569,32 +2569,37 @@ static int cma_get_tcp_port(struct rdma_id_private *id int ret; int size; struct socket *sock; + struct sockaddr *src_addr = (struct sockaddr *)&id_priv->id.route.addr.src_addr; - ret = sock_create_kern(AF_INET, SOCK_STREAM, IPPROTO_TCP, &sock); + switch (src_addr->sa_family) { + case AF_INET: + case AF_INET6: + break; + default: + /* other address families are not handled by iWarp */ + id_priv->unify_ps_tcp = 0; + return (0); + } + + ret = sock_create_kern(src_addr->sa_family, SOCK_STREAM, IPPROTO_TCP, &sock); if (ret) return ret; #ifdef __linux__ - ret = sock->ops->bind(sock, - (struct sockaddr *) &id_priv->id.route.addr.src_addr, - ip_addr_size((struct sockaddr *) &id_priv->id.route.addr.src_addr)); + ret = sock->ops->bind(sock, src_addr, ip_addr_size(src_addr)); #else SOCK_LOCK(sock); sock->so_options |= SO_REUSEADDR; SOCK_UNLOCK(sock); - ret = -sobind(sock, - (struct sockaddr *)&id_priv->id.route.addr.src_addr, - curthread); + ret = -sobind(sock, src_addr, curthread); #endif if (ret) { sock_release(sock); return ret; } - size = ip_addr_size((struct sockaddr *) &id_priv->id.route.addr.src_addr); - ret = sock_getname(sock, - (struct sockaddr *) &id_priv->id.route.addr.src_addr, - &size, 0); + size = ip_addr_size(src_addr); + ret = sock_getname(sock, src_addr, &size, 0); if (ret) { sock_release(sock); return ret; From owner-svn-src-stable@freebsd.org Fri Dec 8 19:21:47 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E28FDE8BD52; Fri, 8 Dec 2017 19:21:47 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 47B427FAD8; Fri, 8 Dec 2017 19:21:47 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB8JLkPj081131; Fri, 8 Dec 2017 19:21:46 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB8JLk6e081130; Fri, 8 Dec 2017 19:21:46 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201712081921.vB8JLk6e081130@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 8 Dec 2017 19:21:46 +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: r326704 - stable/10/sys/ofed/drivers/infiniband/core X-SVN-Group: stable-10 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/10/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 326704 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Dec 2017 19:21:48 -0000 Author: hselasky Date: Fri Dec 8 19:21:46 2017 New Revision: 326704 URL: https://svnweb.freebsd.org/changeset/base/326704 Log: Add support for IPv6 based addresses as part of the TCP unify portspace feature in ibcore. This resolves an interopability issue when using both iWarp(T6) and RDMA(CX-4 and CX-5) devices at the same time. The problem is IPv4 based sockets cannot be bound to an IPv6 based address causing sobind() to fail preventing all use of IPv6 based addresses with RDMA when an iWarp device is present. This is a direct commit. Tested by: KrishnamRaju ErapaRaju Sponsored by: Mellanox Technologies Modified: stable/10/sys/ofed/drivers/infiniband/core/cma.c Modified: stable/10/sys/ofed/drivers/infiniband/core/cma.c ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/core/cma.c Fri Dec 8 19:19:47 2017 (r326703) +++ stable/10/sys/ofed/drivers/infiniband/core/cma.c Fri Dec 8 19:21:46 2017 (r326704) @@ -2373,32 +2373,37 @@ static int cma_get_tcp_port(struct rdma_id_private *id int ret; int size; struct socket *sock; + struct sockaddr *src_addr = (struct sockaddr *)&id_priv->id.route.addr.src_addr; - ret = sock_create_kern(AF_INET, SOCK_STREAM, IPPROTO_TCP, &sock); + switch (src_addr->sa_family) { + case AF_INET: + case AF_INET6: + break; + default: + /* other address families are not handled by iWarp */ + id_priv->unify_ps_tcp = 0; + return (0); + } + + ret = sock_create_kern(src_addr->sa_family, SOCK_STREAM, IPPROTO_TCP, &sock); if (ret) return ret; #ifdef __linux__ - ret = sock->ops->bind(sock, - (struct sockaddr *) &id_priv->id.route.addr.src_addr, - ip_addr_size((struct sockaddr *) &id_priv->id.route.addr.src_addr)); + ret = sock->ops->bind(sock, src_addr, ip_addr_size(src_addr)); #else SOCK_LOCK(sock); sock->so_options |= SO_REUSEADDR; SOCK_UNLOCK(sock); - ret = -sobind(sock, - (struct sockaddr *)&id_priv->id.route.addr.src_addr, - curthread); + ret = -sobind(sock, src_addr, curthread); #endif if (ret) { sock_release(sock); return ret; } - size = ip_addr_size((struct sockaddr *) &id_priv->id.route.addr.src_addr); - ret = sock_getname(sock, - (struct sockaddr *) &id_priv->id.route.addr.src_addr, - &size, 0); + size = ip_addr_size(src_addr); + ret = sock_getname(sock, src_addr, &size, 0); if (ret) { sock_release(sock); return ret; From owner-svn-src-stable@freebsd.org Fri Dec 8 20:04:12 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 578B6E8DC79; Fri, 8 Dec 2017 20:04:12 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 208E4271C; Fri, 8 Dec 2017 20:04:12 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB8K4BfN098694; Fri, 8 Dec 2017 20:04:11 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB8K4BOu098693; Fri, 8 Dec 2017 20:04:11 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201712082004.vB8K4BOu098693@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 8 Dec 2017 20:04:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326715 - stable/11/sys/geom/mirror X-SVN-Group: stable-11 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/11/sys/geom/mirror X-SVN-Commit-Revision: 326715 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Dec 2017 20:04:12 -0000 Author: markj Date: Fri Dec 8 20:04:10 2017 New Revision: 326715 URL: https://svnweb.freebsd.org/changeset/base/326715 Log: MFC r325044: Fix a lock leak in g_mirror_destroy(). Modified: stable/11/sys/geom/mirror/g_mirror.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/geom/mirror/g_mirror.c ============================================================================== --- stable/11/sys/geom/mirror/g_mirror.c Fri Dec 8 19:57:26 2017 (r326714) +++ stable/11/sys/geom/mirror/g_mirror.c Fri Dec 8 20:04:10 2017 (r326715) @@ -3088,8 +3088,10 @@ g_mirror_destroy(struct g_mirror_softc *sc, int how) } } - if ((sc->sc_flags & G_MIRROR_DEVICE_FLAG_DESTROY) != 0) + if ((sc->sc_flags & G_MIRROR_DEVICE_FLAG_DESTROY) != 0) { + sx_xunlock(&sc->sc_lock); return (0); + } sc->sc_flags |= G_MIRROR_DEVICE_FLAG_DESTROY; sc->sc_flags |= G_MIRROR_DEVICE_FLAG_DRAIN; G_MIRROR_DEBUG(4, "%s: Waking up %p.", __func__, sc); From owner-svn-src-stable@freebsd.org Sat Dec 9 03:41:32 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 76A80E9C3F4; Sat, 9 Dec 2017 03:41:32 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3C66572EEB; Sat, 9 Dec 2017 03:41:32 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB93fVS8091557; Sat, 9 Dec 2017 03:41:31 GMT (envelope-from gordon@FreeBSD.org) Received: (from gordon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB93fV85091556; Sat, 9 Dec 2017 03:41:31 GMT (envelope-from gordon@FreeBSD.org) Message-Id: <201712090341.vB93fV85091556@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gordon set sender to gordon@FreeBSD.org using -f From: Gordon Tetlow Date: Sat, 9 Dec 2017 03:41: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: r326721 - stable/10/crypto/openssl/ssl X-SVN-Group: stable-10 X-SVN-Commit-Author: gordon X-SVN-Commit-Paths: stable/10/crypto/openssl/ssl X-SVN-Commit-Revision: 326721 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Dec 2017 03:41:32 -0000 Author: gordon Date: Sat Dec 9 03:41:31 2017 New Revision: 326721 URL: https://svnweb.freebsd.org/changeset/base/326721 Log: Fix error state handling. Security: CVE-2017-3737 Security: FreeBSD-SA-17:12.openssl Modified: stable/10/crypto/openssl/ssl/ssl.h Modified: stable/10/crypto/openssl/ssl/ssl.h ============================================================================== --- stable/10/crypto/openssl/ssl/ssl.h Fri Dec 8 22:19:41 2017 (r326720) +++ stable/10/crypto/openssl/ssl/ssl.h Sat Dec 9 03:41:31 2017 (r326721) @@ -1544,7 +1544,7 @@ extern "C" { # define SSL_ST_BEFORE 0x4000 # define SSL_ST_OK 0x03 # define SSL_ST_RENEGOTIATE (0x04|SSL_ST_INIT) -# define SSL_ST_ERR 0x05 +# define SSL_ST_ERR (0x05|SSL_ST_INIT) # define SSL_CB_LOOP 0x01 # define SSL_CB_EXIT 0x02 From owner-svn-src-stable@freebsd.org Sat Dec 9 17:58:37 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E7115E92C79; Sat, 9 Dec 2017 17:58:37 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7B0C06E9E7; Sat, 9 Dec 2017 17:58:37 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id vB9HwTiX029986 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 9 Dec 2017 19:58:32 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua vB9HwTiX029986 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id vB9HwSGE029984; Sat, 9 Dec 2017 19:58:28 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 9 Dec 2017 19:58:28 +0200 From: Konstantin Belousov To: Michael Tuexen Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: Re: svn commit: r324686 - stable/11/sys/netinet Message-ID: <20171209175828.GT2272@kib.kiev.ua> References: <201710171242.v9HCgHG4030707@repo.freebsd.org> <20171203133946.GJ2272@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171203133946.GJ2272@kib.kiev.ua> User-Agent: Mutt/1.9.1 (2017-09-22) 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.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Dec 2017 17:58:38 -0000 On Sun, Dec 03, 2017 at 03:39:46PM +0200, Konstantin Belousov wrote: > On Tue, Oct 17, 2017 at 12:42:17PM +0000, Michael Tuexen wrote: > > Author: tuexen > > Date: Tue Oct 17 12:42:17 2017 > > New Revision: 324686 > > URL: https://svnweb.freebsd.org/changeset/base/324686 > > > > Log: > > MFC r322648: > > > > Ensure inp_vflag is consistently set for TCP endpoints. > > > > Make sure that the flags INP_IPV4 and INP_IPV6 are consistently set > > for inpcbs used for TCP sockets, no matter if the setting is derived > > from the net.inet6.ip6.v6only sysctl or the IPV6_V6ONLY socket option. > > For UDP this was already done right. > > > > PR: 221385 > > > > Modified: > > stable/11/sys/netinet/tcp_usrreq.c > > Directory Properties: > > stable/11/ (props changed) > > > > Modified: stable/11/sys/netinet/tcp_usrreq.c > > ============================================================================== > > --- stable/11/sys/netinet/tcp_usrreq.c Tue Oct 17 11:20:32 2017 (r324685) > > +++ stable/11/sys/netinet/tcp_usrreq.c Tue Oct 17 12:42:17 2017 (r324686) > > @@ -1899,6 +1899,8 @@ tcp_attach(struct socket *so) > > #ifdef INET6 > > if (inp->inp_vflag & INP_IPV6PROTO) { > > inp->inp_vflag |= INP_IPV6; > > + if ((inp->inp_flags & IN6P_IPV6_V6ONLY) == 0) > > + inp->inp_vflag |= INP_IPV4; > > inp->in6p_hops = -1; /* use kernel default */ > > } > > else > > I highly suspect that this commit causes the breakage. Example is taken > from the 'nestat -f inet6 -n' output, but in fact the problem is much > more serious, e.g. squid acls are broken as well: > tcp6 0 0 2001:470:1f14:13.23047 2a03:2880:f003:c.443 ESTABLISHED > tcp46 0 0 0.0.0.1.22 69.223.183.85.58766 ESTABLISHED > > The tcp46 and 0.0.0.1 values in the second line are clearly nonsensical. Ping. This looks like quite serious regression in stable/11.